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.nix72
-rwxr-xr-xnixpkgs/pkgs/development/compilers/abcl/update.sh5
-rw-r--r--nixpkgs/pkgs/development/compilers/acme/default.nix31
-rwxr-xr-xnixpkgs/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py68
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix66
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix123
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-darwin.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-linux.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-darwin.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-linux.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-darwin.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-linux.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-darwin.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-linux.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-darwin.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-linux.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-darwin.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-linux.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/sources.json1192
-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/alan/2.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/alan/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/ante/Cargo.lock970
-rw-r--r--nixpkgs/pkgs/development/compilers/ante/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/apache-flex-sdk/default.nix56
-rw-r--r--nixpkgs/pkgs/development/compilers/arachne-pnr/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/armips/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/as31/0000-getline-break.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/as31/default.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/asl/Makefile-nixos.def31
-rw-r--r--nixpkgs/pkgs/development/compilers/asl/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/asn1c/default.nix33
-rwxr-xr-xnixpkgs/pkgs/development/compilers/aspectj/builder.sh28
-rw-r--r--nixpkgs/pkgs/development/compilers/aspectj/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/assemblyscript/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/atasm/0000-file-not-found.diff16
-rw-r--r--nixpkgs/pkgs/development/compilers/atasm/0001-select-flags.diff14
-rw-r--r--nixpkgs/pkgs/development/compilers/atasm/default.nix64
-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.nix70
-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/august/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/avra/default.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/ballerina/default.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/bfc/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/bigloo/default.nix77
-rw-r--r--nixpkgs/pkgs/development/compilers/binaryen/default.nix69
-rw-r--r--nixpkgs/pkgs/development/compilers/blueprint/default.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/bluespec/default.nix133
-rw-r--r--nixpkgs/pkgs/development/compilers/bluespec/libstp_stub_makefile.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/build-bs-platform.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/default.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/ocaml.nix23
-rw-r--r--nixpkgs/pkgs/development/compilers/bupc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/c0/default.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/c0/use-system-libraries.patch53
-rw-r--r--nixpkgs/pkgs/development/compilers/c3c/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/cairo/default.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/cairo/ensure-consistency-of-cargo-lock.patch1165
-rw-r--r--nixpkgs/pkgs/development/compilers/cakelisp/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/carp/default.nix62
-rw-r--r--nixpkgs/pkgs/development/compilers/cc65/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/ccl/default.nix94
-rw-r--r--nixpkgs/pkgs/development/compilers/chez-racket/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/chez-racket/setup-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/compilers/chez-racket/shared.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/chez/default.nix75
-rw-r--r--nixpkgs/pkgs/development/compilers/chez/setup-hook.sh5
-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.nix96
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/default.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/egg2nix.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/eggDerivation.nix49
-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.sh8
-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.nix83
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/deps.toml3998
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/egg2nix.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/eggDerivation.nix56
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/overrides.nix177
-rwxr-xr-xnixpkgs/pkgs/development/compilers/chicken/5/read-egg.scm43
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/setup-hook.sh6
-rwxr-xr-xnixpkgs/pkgs/development/compilers/chicken/5/update.sh19
-rw-r--r--nixpkgs/pkgs/development/compilers/ciao/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/circt/default.nix87
-rw-r--r--nixpkgs/pkgs/development/compilers/clasp/clasp-pin-repos-commits.patch90
-rw-r--r--nixpkgs/pkgs/development/compilers/clasp/default.nix90
-rw-r--r--nixpkgs/pkgs/development/compilers/clasp/dependencies.nix457
-rw-r--r--nixpkgs/pkgs/development/compilers/clasp/remove-unused-command-line-argument.patch13
-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.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/closure/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/cmdstan/default.nix95
-rw-r--r--nixpkgs/pkgs/development/compilers/cmucl/binary.nix62
-rw-r--r--nixpkgs/pkgs/development/compilers/codon/Add-a-hash-to-the-googletest-binary.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/codon/default.nix141
-rw-r--r--nixpkgs/pkgs/development/compilers/coffeescript/default.nix32
-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/computecpp/default.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/cone/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/copper/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/corretto/11.nix37
-rw-r--r--nixpkgs/pkgs/development/compilers/corretto/17.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/corretto/19.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/corretto/mk-corretto.nix117
-rw-r--r--nixpkgs/pkgs/development/compilers/critcl/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/build-package.nix165
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/default.nix300
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/tzdata.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal2nix/default.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal2nix/shards.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/dale/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/default.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/package-source-builders/default.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix23
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/package-source-builders/olm/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/dart/sources.nix24
-rwxr-xr-xnixpkgs/pkgs/development/compilers/dart/update.sh77
-rw-r--r--nixpkgs/pkgs/development/compilers/dasm/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/dev86/default.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/dictu/default.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/djgpp/default.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/djgpp/sources.nix81
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/binary.nix77
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/bootstrap.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/default.nix5
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/generic.nix226
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix169
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/default.nix45
-rwxr-xr-xnixpkgs/pkgs/development/compilers/dotnet/update.sh379
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix179
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix186
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix178
-rw-r--r--nixpkgs/pkgs/development/compilers/dtc/default.nix105
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix99
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/default.nix86
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/ecl-1.16.2-libffi-3.3-abi.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/edk2/default.nix148
-rw-r--r--nixpkgs/pkgs/development/compilers/eli/default.nix94
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/README.md24
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/default.nix307
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix10
-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/avh4-lib.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/bimap.nix15
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-format-lib.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-format-markdown.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-instrument.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-json.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-json.patch43
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-init-read-only.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-read-only.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-srcs.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-test-rs.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-test.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elmi-to-json.nix26
-rwxr-xr-xnixpkgs/pkgs/development/compilers/elm/packages/generate-node-packages.sh11
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/indents.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/lamdera.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/lib.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/node-composition.nix17
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/node-packages.json19
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/node-packages.nix19059
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/registry.datbin0 -> 130280 bytes
-rwxr-xr-xnixpkgs/pkgs/development/compilers/elm/update.sh15
-rw-r--r--nixpkgs/pkgs/development/compilers/emscripten/0001-emulate-clang-sysroot-include-logic.patch38
-rw-r--r--nixpkgs/pkgs/development/compilers/emscripten/default.nix144
-rw-r--r--nixpkgs/pkgs/development/compilers/erg/default.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/factor99.nix224
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/scope.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.99-pre.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/fasm/bin.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/fasm/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/fasmg/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/fbc/default.nix136
-rw-r--r--nixpkgs/pkgs/development/compilers/fbc/mac-bin.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/firrtl/default.nix60
-rw-r--r--nixpkgs/pkgs/development/compilers/flasm/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/flix/default.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix73
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/default.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/flutter-tools.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/flutter.nix144
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/copy-without-perms.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/deregister-pub-dependencies-artifact.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/disable-auto-update.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/dont-validate-executable-location.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/flutter-pub-dart-override.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/git-dir.patch84
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/override-host-platform.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/override-operating-system.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/sdk-symlink.nix37
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/update/get-artifact-hashes.nix.in48
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/update/get-dart-hashes.nix.in26
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/update/get-flutter.nix.in7
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/update/get-pubspec-lock.nix.in30
-rwxr-xr-xnixpkgs/pkgs/development/compilers/flutter/update/update.py339
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_13/data.json901
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_13/patches/disable-auto-update-shared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_16/data.json951
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update-shared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/wrapper.nix160
-rw-r--r--nixpkgs/pkgs/development/compilers/flux/default.nix21
-rwxr-xr-xnixpkgs/pkgs/development/compilers/fpc/binary-builder-darwin.sh18
-rwxr-xr-xnixpkgs/pkgs/development/compilers/fpc/binary-builder.sh15
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/binary.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/default.nix80
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/lazarus.nix111
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/libqt5pas.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/mark-paths.patch109
-rwxr-xr-xnixpkgs/pkgs/development/compilers/fpc/remove-signature.sh3
-rw-r--r--nixpkgs/pkgs/development/compilers/fsharp/default.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/fstar/default.nix83
-rw-r--r--nixpkgs/pkgs/development/compilers/fstar/dune.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/fstar/ulib.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/build.nix138
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/default.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/unstable.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/gavrasm/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/gbforth/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/11/default.nix66
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/12/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/13/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/all.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/builder.nix287
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/checksum.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix261
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/dependencies.nix92
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/extra-target-flags.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/libgcc.nix164
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/meta.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/platform-flags.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix129
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/strip-attributes.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/default.nix457
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/10/Added-mcf-thread-model-support-from-mcfgthread.patch306
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch306
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/11/gcc-issue-103910.patch41
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/11/libgcc-aarch64-darwin-detection.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/12/Added-mcf-thread-model-support-from-mcfgthread.patch306
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch77
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/12/mangle-NIX_STORE-in-__FILE__.patch97
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/13/ICE-PR110280.patch60
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/13/mangle-NIX_STORE-in-__FILE__.patch95
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/13/no-sys-dirs-riscv.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/4.9/libsanitizer.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/4.9/parallel-strsignal.patch61
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/6/0001-Fix-build-for-glibc-2.31.patch62
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch285
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/6/gnat-glibc234.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch62
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch285
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/7/gcc8-asan-glibc-2.34.patch70
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/7/riscv-no-relax.patch109
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/7/riscv-pthread-reentrant.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/8/Added-mcf-thread-model-support-from-mcfgthread.patch306
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/8/avr-gcc-8-darwin.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch96
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/9/Added-mcf-thread-model-support-from-mcfgthread.patch306
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch99
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/ada-cctools-as-detection-configure.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/clang-genconditions.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/default.nix335
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/fix-bug-80431.patch92
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-gfortran-driving.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-no-sys-dirs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gfortran-darwin-NXConstStr.patch27
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gfortran-driving.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gnat-cflags-11.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gnat-cflags.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/gnat-darwin-dylib-install-name.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/libgomp-dont-force-initial-exec.patch40
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/libphobos.patch119
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/libsanitizer-no-cyclades-9.patch82
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/libstdc++-netbsd-ctypes.patch141
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/libstdc++-target.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv-gcc9.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/parallel-bconfig.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/ppc-musl.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/res_state-not-declared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/sigsegv-not-declared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/struct-sigaltstack-4.9.patch78
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/struct-ucontext-4.8.patch177
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/struct-ucontext.patch190
-rwxr-xr-xnixpkgs/pkgs/development/compilers/gcc/patches/update-mcfgthread-patches.sh15
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/patches/use-source-date-epoch.patch52
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/versions.nix38
-rw-r--r--nixpkgs/pkgs/development/compilers/gcl/default.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/build.nix127
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/default.nix18
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/ftw.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-crypto.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-ethereum.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-leveldb.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-libp2p.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-libxml.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-libyaml.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-lmdb.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-mysql.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-persist.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-poo.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-support.nix162
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-utils.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/glow-lang.nix56
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/smug-gerbil.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/unstable.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/gforth/boot-forth.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/gforth/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/gforth/swig.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix454
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix407
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix231
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix393
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.4-binary.nix439
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix389
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix389
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix389
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix389
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix396
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.6-bytestring-posix-source.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix392
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix388
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix388
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.6.3.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.6.4.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.8.1.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch99
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch602
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix537
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch8
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7.patch8
-rwxr-xr-xnixpkgs/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh46
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/head.nix5
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/respect-ar-path.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/8.10/common-overrides.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/8.10/configured-ghcjs-src.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/8.10/default.nix128
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/8.10/generate_host_version.hs54
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/8.10/git.json6
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/8.10/stage0.nix77
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs/ghcjs-base.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/default.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/expected-output.txt8
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/simple-tb.vhd78
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/simple.vhd45
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/test-simple.nix23
-rw-r--r--nixpkgs/pkgs/development/compilers/gleam/default.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/glslang/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/gmqcc/default.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/gnat-bootstrap/default.nix149
-rw-r--r--nixpkgs/pkgs/development/compilers/gnostic/default.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/gnu-cim/default.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/gnu-cobol/default.nix102
-rw-r--r--nixpkgs/pkgs/development/compilers/gnu-smalltalk/default.nix60
-rw-r--r--nixpkgs/pkgs/development/compilers/go-jsonnet/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.20.nix189
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.21.nix189
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.22.nix189
-rw-r--r--nixpkgs/pkgs/development/compilers/go/binary.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/go/bootstrap116.nix15
-rw-r--r--nixpkgs/pkgs/development/compilers/go/bootstrap117.nix15
-rw-r--r--nixpkgs/pkgs/development/compilers/go/bootstrap121.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.16.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.21.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.22.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/go/iana-etc-1.17.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/go/mailcap-1.17.patch12
-rwxr-xr-xnixpkgs/pkgs/development/compilers/go/print-hashes.sh16
-rw-r--r--nixpkgs/pkgs/development/compilers/go/remove-tools-1.11.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/go/tzdata-1.19.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/gprolog/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix216
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix76
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix23
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix17
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/hashes.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix17
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/hashes.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix18
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/hashes.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/hashes.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix38
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/hashes.nix22
-rwxr-xr-xnixpkgs/pkgs/development/compilers/graalvm/community-edition/update.sh130
-rw-r--r--nixpkgs/pkgs/development/compilers/gwt/2.4.0.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/halide/default.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/haxe/default.nix132
-rw-r--r--nixpkgs/pkgs/development/compilers/haxe/setup-hook.sh7
-rw-r--r--nixpkgs/pkgs/development/compilers/heptagon/default.nix56
-rw-r--r--nixpkgs/pkgs/development/compilers/hop/default.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/hvm/default.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/build-idris.nix86
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/default.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/idris2-lsp.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/idris2.nix97
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/tests.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/inform6/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/inform7/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/inklecate/default.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/inklecate/deps.nix5
-rw-r--r--nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix88
-rw-r--r--nixpkgs/pkgs/development/compilers/intercal/default.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2.nix66
-rw-r--r--nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh154
-rw-r--r--nixpkgs/pkgs/development/compilers/ios-cross-compile/alt_wrapper.c212
-rw-r--r--nixpkgs/pkgs/development/compilers/ispc/default.nix76
-rw-r--r--nixpkgs/pkgs/development/compilers/jasmin-compiler/default.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/jasmin/default.nix62
-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.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix156
-rw-r--r--nixpkgs/pkgs/development/compilers/jetbrains-jdk/jcef.nix259
-rw-r--r--nixpkgs/pkgs/development/compilers/jrsonnet/Cargo.lock551
-rw-r--r--nixpkgs/pkgs/development/compilers/jrsonnet/default.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/jsonnet/default.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/jsonnet/fix-cpp-unresolved-symbols.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/README.md24
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/default.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/generic-bin.nix119
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/generic.nix91
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/patches/1.10/0001-skip-building-docs-as-it-requires-network-access.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch50
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/patches/1.9/0001-skip-building-doc.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/juniper/default.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/jwasm/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/kaitai-struct-compiler/default.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/kind2/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/koka/default.nix107
-rw-r--r--nixpkgs/pkgs/development/compilers/kotlin/default.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/kotlin/native.nix64
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/binary.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/generic.nix136
-rw-r--r--nixpkgs/pkgs/development/compilers/lesscpy/default.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/ligo/default.nix149
-rw-r--r--nixpkgs/pkgs/development/compilers/lingua-franca/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix138
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/clang/gnu-install-dirs.patch235
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/clang/purity.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/X86-support-extension.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/armv7l.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix140
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/gnu-install-dirs.patch129
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/default.nix285
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/libcxx/default.nix104
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch100
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/default.nix89
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/libunwind/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/libunwind/gnu-install-dirs.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/lld/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/lld/gnu-install-dirs.patch68
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/lldb/gnu-install-dirs.patch91
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/lldb/procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix363
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs-polly.patch106
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs.patch417
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/openmp/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/clang/default.nix132
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/clang/gnu-install-dirs.patch235
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/clang/purity.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/armv7l.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix131
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/gnu-install-dirs.patch129
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/default.nix286
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/libcxx/default.nix79
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch100
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/default.nix87
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/libunwind/default.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/lld/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/lld/gnu-install-dirs.patch68
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/lldb/gnu-install-dirs.patch91
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/lldb/procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/lldb/resource-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix351
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/llvm/fix-llvm-issue-49955.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs-polly.patch105
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs.patch417
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/openmp/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix126
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch235
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/clang/revert-malloc-alignment-assumption.patch78
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch71
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix138
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/default.nix335
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix92
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch82
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix84
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch36
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch68
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch91
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/lldb/procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix313
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch105
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch381
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/clang/default.nix129
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/clang/gnu-install-dirs.patch50
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/clang/purity.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/darwin-targetconditionals.patch71
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/default.nix146
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/gnu-install-dirs.patch42
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/default.nix329
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/libcxx/default.nix98
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/libcxx/gnu-install-dirs.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/default.nix103
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/libunwind/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/libunwind/gnu-install-dirs.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/lld/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/lld/fix-root-src-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/lld/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/lldb/cpu_subtype_arm64e_replacement.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/lldb/procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/lldb/resource-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix315
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs-polly.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs.patch220
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/openmp/default.nix69
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/openmp/gnu-install-dirs.patch45
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/openmp/run-lit-directly.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/clang/default.nix143
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/clang/gnu-install-dirs.patch105
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/clang/purity.patch29
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/darwin-targetconditionals.patch71
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/default.nix145
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/gnu-install-dirs.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/default.nix369
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/libcxx/default.nix139
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/libcxx/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/default.nix113
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/libunwind/default.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/libunwind/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/lld/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/lld/gnu-install-dirs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/lldb/cpu_subtype_arm64e_replacement.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/lldb/procfs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/lldb/resource-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix440
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs-polly.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs.patch138
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/lit-shell-script-runner-set-dyld-library-path.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch79
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/openmp/default.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/openmp/fix-find-tool.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/openmp/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/openmp/run-lit-directly.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/clang/default.nix137
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/clang/gnu-install-dirs.patch109
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/clang/purity.patch29
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/darwin-targetconditionals.patch71
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/default.nix159
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/gnu-install-dirs.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/default.nix380
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/libcxx/default.nix126
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/libcxx/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/default.nix114
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/libunwind/default.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/libunwind/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/lld/add-table-base.patch190
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/lld/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/lld/gnu-install-dirs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/lldb/cpu_subtype_arm64e_replacement.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/lldb/procfs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/lldb/resource-dir.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix428
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs-polly.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs.patch161
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/lit-shell-script-runner-set-dyld-library-path.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch79
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/openmp/default.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/openmp/fix-find-tool.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/openmp/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/openmp/run-lit-directly.patch0
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/clang/default.nix141
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/clang/gnu-install-dirs.patch98
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/clang/purity.patch29
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/darwin-targetconditionals.patch71
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/default.nix159
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/gnu-install-dirs.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/default.nix364
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/libcxx/default.nix133
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/default.nix114
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/libunwind/default.nix63
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/lld/add-table-base.patch190
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/lld/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/lld/gnu-install-dirs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/lldb/cpu_subtype_arm64e_replacement.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/lldb/procfs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix427
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs-polly.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs.patch137
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/lit-shell-script-runner-set-dyld-library-path.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch80
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/openmp/default.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/openmp/fix-find-tool.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/openmp/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/openmp/run-lit-directly.patch0
-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.nix140
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/clang/gnu-install-dirs.patch278
-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/default.nix123
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch117
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/default.nix273
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libcxx/default.nix88
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch99
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/default.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libunwind/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libunwind/gnu-install-dirs.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lld/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lld/gnu-install-dirs.patch68
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lldb/default.nix117
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lldb/gnu-install-dirs.patch105
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lldb/lldb-gdb-remote-no-libcompress.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lldb/procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix344
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/llvm/fix-test-on-non-x86-like-others.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs-polly.patch106
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs.patch395
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/openmp/default.nix37
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/README.md79
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/TLI-musl.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/clang-11-15-LLVMgold-path.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/clang-at-least-16-LLVMgold-path.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/bintools.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/clang/add-nostdlibinc-flag.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/common-let.nix60
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/7-12-codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-mcr-dmb.patch75
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-no-ldrexd-strexd.patch162
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-libatomic.patch65
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-no-yield.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-sync-ops-no-thumb.patch52
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv7l-15.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/glibc.patch48
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch80
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch80
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/libclc.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/libclc/libclc-gnu-install-dirs.patch10
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/libcxxabi/no-threads.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/libcxxabi/wasm.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/lldb-plugins/llef.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/lldb.nix218
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/lldb/gnu-install-dirs.patch49
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/exegesis-force-bdver2.patch11
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix142
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/clang/gnu-install-dirs.patch98
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/clang/purity.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch71
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix159
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/normalize-var.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/default.nix364
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/libcxx/default.nix125
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix117
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/libunwind/default.nix63
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/lld/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/lld/gnu-install-dirs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/lldb/procfs.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix430
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs-polly.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs.patch137
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/lit-shell-script-runner-set-dyld-library-path.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch80
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/openmp/default.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/openmp/fix-find-tool.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/openmp/gnu-install-dirs.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/openmp/run-lit-directly.patch0
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/llvm-config-link-static.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/multi.nix60
-rwxr-xr-xnixpkgs/pkgs/development/compilers/llvm/update-git.py88
-rwxr-xr-xnixpkgs/pkgs/development/compilers/llvm/update.sh55
-rw-r--r--nixpkgs/pkgs/development/compilers/lobster/default.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/lobster/test-can-run-hello-world.nix13
-rw-r--r--nixpkgs/pkgs/development/compilers/lunarml/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/manticore/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/marst/default.nix54
-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.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/mcpp/readlink.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/mercury/default.nix63
-rw-r--r--nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix15
-rw-r--r--nixpkgs/pkgs/development/compilers/mezzo/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/microscheme/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/minimacy/default.nix80
-rw-r--r--nixpkgs/pkgs/development/compilers/mint/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/mint/shards.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/miranda/default.nix81
-rw-r--r--nixpkgs/pkgs/development/compilers/mit-scheme/default.nix114
-rw-r--r--nixpkgs/pkgs/development/compilers/mkcl/default.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/mlkit/default.nix26
-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/20210107-binary.nix60
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix43
-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.nix113
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/llvm.nix51
-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.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/mozart/binary.nix81
-rw-r--r--nixpkgs/pkgs/development/compilers/mozart/default.nix82
-rw-r--r--nixpkgs/pkgs/development/compilers/mozart/patch-limits.diff10
-rw-r--r--nixpkgs/pkgs/development/compilers/mruby/default.nix38
-rw-r--r--nixpkgs/pkgs/development/compilers/mrustc/bootstrap.nix147
-rw-r--r--nixpkgs/pkgs/development/compilers/mrustc/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/mrustc/minicargo.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/mrustc/patches/0001-dont-download-rustc.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/muonlang/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/myrddin/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/nasm/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/neko/default.nix62
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/build-nim-package.nix135
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/default.nix321
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/extra-mangling.patch48
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/nim.cfg.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/nim2.cfg.patch41
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/nixbuild.patch40
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/openssl.patch458
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/toLocation.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/nqc/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/nqc/nqc-unistd.patch11
-rw-r--r--nixpkgs/pkgs/development/compilers/nvidia-cg-toolkit/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/obliv-c/default.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix79
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.01.0.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.02.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.03.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.04.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.05.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.06.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.07.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.08.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.09.1-Werror.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.09.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.10.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.11.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.12.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.13.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.14.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/5.0.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/5.1.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/Makefile.nixpkgs16
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/ber-metaocaml.nix104
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/builder.sh9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff20
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/generic.nix163
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/glibc-2.34-for-ocaml-4.10-and-11.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/ocamlbuild.patch45
-rw-r--r--nixpkgs/pkgs/development/compilers/odin/default.nix79
-rw-r--r--nixpkgs/pkgs/development/compilers/open-watcom/bin.nix125
-rw-r--r--nixpkgs/pkgs/development/compilers/open-watcom/v2.nix133
-rw-r--r--nixpkgs/pkgs/development/compilers/open-watcom/wrapper.nix143
-rw-r--r--nixpkgs/pkgs/development/compilers/opendylan/bin.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/opendylan/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/11.nix171
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/12.nix172
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/13.nix177
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/14.nix173
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/15.nix176
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/16.nix180
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/17.nix194
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/18.nix190
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/19.nix194
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/20.nix194
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/21.nix188
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/8.nix226
-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/fix-glibc-2.34.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk10.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk21.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk8.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk11.patch55
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk17.patch60
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/generate-cacerts.pl366
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk17.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk18.patch21
-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/jre.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/make-bootstrap.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/meta.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix120
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/15.nix129
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/17.nix130
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/19.nix127
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/20.nix114
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/21.nix114
-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/openjdk/tests/hello-logging.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/tests/hello.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/opensmalltalk-vm/default.nix186
-rw-r--r--nixpkgs/pkgs/development/compilers/openspin/default.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/opensycl/default.nix66
-rw-r--r--nixpkgs/pkgs/development/compilers/ophis/default.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh60
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix190
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/jdk11-linux.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/jdk8-linux.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/orc/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/osl/default.nix87
-rw-r--r--nixpkgs/pkgs/development/compilers/owl-lisp/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/p4c/default.nix100
-rw-r--r--nixpkgs/pkgs/development/compilers/paco/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/pakcs/curry-frontend.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/pakcs/default.nix95
-rw-r--r--nixpkgs/pkgs/development/compilers/passerine/default.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/pforth/default.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/picat/default.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/polyml/5.6.nix42
-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.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/polyml/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/default.nix115
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/disable-tests.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/fix-darwin-build.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch116
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/psc-package/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix74
-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
-rwxr-xr-xnixpkgs/pkgs/development/compilers/purescript/purescript/update.sh48
-rw-r--r--nixpkgs/pkgs/development/compilers/qbe/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/qbe/test-can-run-hello-world.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/rasm/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/default.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/tests/hello/default.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/tests/hello/dune4
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/tests/hello/dune-project1
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.opam0
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.re6
-rw-r--r--nixpkgs/pkgs/development/compilers/rgbds/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/rml/default.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/roslyn/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/roslyn/deps.nix175
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_46.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_47.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_75.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/binary.nix100
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/bootstrap.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/cargo-auditable.nix56
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/cargo.nix120
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/cargo_cross.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/clippy.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/default.nix106
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix40
-rwxr-xr-xnixpkgs/pkgs/development/compilers/rust/print-hashes.sh43
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rust-lib-src.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rust-src.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rustc.nix301
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rustfmt.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/setup-hook.sh4
-rw-r--r--nixpkgs/pkgs/development/compilers/sagittarius-scheme/default.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/default.nix201
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/fix-2.4.0-aarch64-darwin.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/scala-runners/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/2.x.nix119
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/bare.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/default.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/scryer-prolog/Cargo.lock3058
-rw-r--r--nixpkgs/pkgs/development/compilers/scryer-prolog/default.nix51
-rwxr-xr-xnixpkgs/pkgs/development/compilers/semeru-bin/generate-sources.py85
-rw-r--r--nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin-base.nix5
-rw-r--r--nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux-base.nix5
-rw-r--r--nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/semeru-bin/sources.json248
-rw-r--r--nixpkgs/pkgs/development/compilers/serpent/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/shaderc/default.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/silice/default.nix87
-rw-r--r--nixpkgs/pkgs/development/compilers/sjasmplus/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/smlnj/default.nix94
-rw-r--r--nixpkgs/pkgs/development/compilers/smlnj/heap2exec.diff9
-rw-r--r--nixpkgs/pkgs/development/compilers/solc/default.nix134
-rw-r--r--nixpkgs/pkgs/development/compilers/souffle/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/souffle/threads.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/spasm-ng/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/spirv-llvm-translator/default.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/squeak/default.nix234
-rw-r--r--nixpkgs/pkgs/development/compilers/squeak/squeak-configure-version.patch94
-rw-r--r--nixpkgs/pkgs/development/compilers/squeak/squeak-plugins-discovery.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/squeak/squeak-squeaksh-nixpkgs.patch40
-rw-r--r--nixpkgs/pkgs/development/compilers/stalin/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/stanc/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/swi-prolog/default.nix88
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/default.nix709
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-toolchain-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-wrap.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/llvm-module-cache.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-cmake-3.25-compat.patch1509
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-libcxx-flags.patch63
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-link-cxxabi.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-plistbuddy-workaround.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-libc-paths.patch48
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-linking.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-nix-resource-root.patch67
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-prevent-sdk-dirs-warning.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-separate-lib.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-wrap.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/default.nix121
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/foundation/default.nix71
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/foundation/glue.cmake8
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/libdispatch/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/libdispatch/disable-swift-overlay.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/libdispatch/glue.cmake5
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/default.nix75
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/default.nix17
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/workspace-state.json195
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/force-unwrap-file-handles.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/indexstore-db-macos-target.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/sources.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-docc/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/default.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/workspace-state.json144
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/default.nix80
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/default.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/workspace-state.json93
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/disable-catalyst.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/force-unwrap-file-handles.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/linux-fix-linking.patch40
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/prevent-sdk-dirs-warnings.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-format/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-format/generated/default.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-format/generated/workspace-state.json76
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swift-format/patches/force-unwrap-file-handles.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/cmake-glue.nix87
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/default.nix453
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/default.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/workspace-state.json144
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch36
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-fix-quoting.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-sandbox.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-xctest.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-clang-cxx.patch121
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-stdlib-path.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/force-unwrap-file-handles.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/llbuild-cmake-disable-rpath.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/nix-pkgconfig-vars.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/swiftpm/setup-hook.sh60
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/wrapper/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/wrapper/setup-hook.sh28
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/wrapper/wrapper.sh291
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/xctest/default.nix55
-rwxr-xr-xnixpkgs/pkgs/development/compilers/temurin-bin/generate-sources.py72
-rw-r--r--nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin-base.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix131
-rw-r--r--nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/temurin-bin/sources.json868
-rw-r--r--nixpkgs/pkgs/development/compilers/terra/default.nix93
-rw-r--r--nixpkgs/pkgs/development/compilers/terra/nix-cflags.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/teyjus/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/tinycc/default.nix120
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/0001-Makefile.patch70
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/0002-Add-clang-header-path.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/0003-Use-out-path-as-build-id-on-darwin.patch56
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/0004-fix-darwin-build.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/default.nix166
-rw-r--r--nixpkgs/pkgs/development/compilers/tvm/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/typescript/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/uasm/default.nix63
-rw-r--r--nixpkgs/pkgs/development/compilers/unison/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/urn/default.nix63
-rw-r--r--nixpkgs/pkgs/development/compilers/urweb/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/default.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.46.1.patch280
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.56.8.patch173
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/setup-hook.sh24
-rw-r--r--nixpkgs/pkgs/development/compilers/vlang/default.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/vyper/default.nix90
-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.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/xa/dxa.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/xa/xa.nix69
-rw-r--r--nixpkgs/pkgs/development/compilers/yap/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/yasm/default.nix20
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/default.nix176
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/fix-clang-build.patch42
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/plugin-search-dirs.patch45
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/plugins/symbiflow.nix99
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/plugins/synlig.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/setup-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/compilers/z88dk/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/zasm/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/0.10.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/0.11.nix37
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/0.9.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/000-0.9-read-dynstr-at-rpath-offset.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/001-0.9-bump-macos-supported-version.patch50
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/002-0.10-macho-fixes.patch367
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/generic.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/hook.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/setup-hook.sh70
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/shell-completions.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/11.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/16.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/17.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/18.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/19.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/20.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/21.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/8.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/common.nix159
-rw-r--r--nixpkgs/pkgs/development/compilers/zz/Cargo.lock961
-rw-r--r--nixpkgs/pkgs/development/compilers/zz/default.nix51
1124 files changed, 115621 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..e36d8975e26b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/abcl/default.nix
@@ -0,0 +1,72 @@
+{ lib
+, stdenv
+, writeShellScriptBin
+, fetchurl
+, ant
+, jdk
+, jre
+, makeWrapper
+, canonicalize-jars-hook
+}:
+
+let
+  fakeHostname = writeShellScriptBin "hostname" ''
+    echo nix-builder.localdomain
+  '';
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "abcl";
+  version = "1.9.2";
+
+  src = fetchurl {
+    url = "https://common-lisp.net/project/armedbear/releases/${finalAttrs.version}/abcl-src-${finalAttrs.version}.tar.gz";
+    hash = "sha256-Ti9Lj4Xi2V2V5b282foXrWExoX4vzxK8Gf+5e0i8HTg=";
+  };
+
+  # note for the future:
+  # if you use makeBinaryWrapper, you will trade bash for glibc, the closure will be slightly larger
+  nativeBuildInputs = [
+    ant
+    jdk
+    fakeHostname
+    makeWrapper
+    canonicalize-jars-hook
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    ant
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out"/{share/doc/abcl,lib/abcl}
+    cp -r README COPYING CHANGES examples/  "$out/share/doc/abcl/"
+    cp -r dist/*.jar contrib/ "$out/lib/abcl/"
+
+    makeWrapper ${jre}/bin/java $out/bin/abcl \
+      --add-flags "-classpath $out/lib/abcl/\*" \
+      ${lib.optionalString (lib.versionAtLeast jre.version "17")
+        # Fix for https://github.com/armedbear/abcl/issues/484
+        "--add-flags --add-opens=java.base/java.util.jar=ALL-UNNAMED \\"
+      }
+      --add-flags org.armedbear.lisp.Main
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = ./update.sh;
+
+  meta = {
+    description = "A JVM-based Common Lisp implementation";
+    homepage = "https://common-lisp.net/project/armedbear/";
+    license = lib.licenses.gpl2Classpath;
+    mainProgram = "abcl";
+    maintainers = lib.teams.lisp.members;
+    platforms = lib.platforms.darwin ++ lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/abcl/update.sh b/nixpkgs/pkgs/development/compilers/abcl/update.sh
new file mode 100755
index 000000000000..a8b38e776f25
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/abcl/update.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p nix-update subversion
+
+new_version=$(svn ls https://abcl.org/svn/tags | tail -1 | tr -d /)
+nix-update abcl --version "$new_version"
diff --git a/nixpkgs/pkgs/development/compilers/acme/default.nix b/nixpkgs/pkgs/development/compilers/acme/default.nix
new file mode 100644
index 000000000000..3f8110b5b5a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/acme/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchsvn }:
+
+stdenv.mkDerivation rec {
+  pname = "acme";
+  version = "unstable-2021-11-05";
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/acme-crossass/code-0/trunk";
+    rev = "323";
+    sha256 = "1dzvip90yf1wg0fhfghn96dwrhg289d06b624px9a2wwy3vp5ryg";
+  };
+
+  sourceRoot = "${src.name}/src";
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "= gcc" "?= gcc"
+  '';
+
+  enableParallelBuilding = true;
+
+  makeFlags = [ "BINDIR=$(out)/bin" ];
+
+  meta = with 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..5ff56b2bd299
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py
@@ -0,0 +1,68 @@
+#!/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
+
+# openjdk15 is only for bootstrapping openjdk
+releases = ("openjdk8", "openjdk11", "openjdk13", "openjdk14", "openjdk15", "openjdk16", "openjdk17")
+oses = ("mac", "linux", "alpine_linux")
+types = ("jre", "jdk")
+impls = ("hotspot", "openj9")
+
+arch_to_nixos = {
+    "x64": ("x86_64",),
+    "aarch64": ("aarch64",),
+    "arm": ("armv6l", "armv7l"),
+    "ppc64le": ("powerpc64le",),
+}
+
+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.status_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)
+    f.write('\n')
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..68d33b657c68
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix
@@ -0,0 +1,66 @@
+{ sourcePerArch, knownVulnerabilities ? [] }:
+
+{ swingSupport ? true # not used for now
+, lib, stdenv
+, fetchurl
+, setJavaClassPath
+}:
+
+assert (stdenv.isDarwin && stdenv.isx86_64);
+
+let cpuName = stdenv.hostPlatform.parsed.cpu.name;
+    result = stdenv.mkDerivation {
+  pname = if sourcePerArch.packageType == "jdk"
+    then "adoptopenjdk-${sourcePerArch.vmType}-bin"
+    else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin";
+  version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
+
+  src = fetchurl {
+    inherit (sourcePerArch.${cpuName}) url sha256;
+  };
+
+  # See: https://github.com/NixOS/patchelf/issues/10
+  dontStrip = 1;
+
+  installPhase = ''
+    cd ..
+
+    mv $sourceRoot $out
+
+    # jni.h expects jni_md.h to be in the header search path.
+    ln -s $out/Contents/Home/include/darwin/*_md.h $out/Contents/Home/include/
+
+    rm -rf $out/Home/demo
+
+    # Remove some broken manpages.
+    rm -rf $out/Home/man/ja*
+
+    ln -s $out/Contents/Home/* $out/
+
+    # 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
+
+    # 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 lib; {
+    license = licenses.gpl2Classpath;
+    description = "AdoptOpenJDK, prebuilt OpenJDK binary";
+    platforms = [ "x86_64-darwin" ]; # some inherit jre.meta.platforms
+    maintainers = with lib.maintainers; [ taku0 ];
+    inherit knownVulnerabilities;
+    mainProgram = "java";
+  };
+
+}; 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..712efc2f6e4b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
@@ -0,0 +1,123 @@
+{ sourcePerArch, knownVulnerabilities ? [] }:
+
+{ stdenv
+, lib
+, fetchurl
+, autoPatchelfHook
+, makeWrapper
+, setJavaClassPath
+# minimum dependencies
+, alsa-lib
+, fontconfig
+, freetype
+, libffi
+, xorg
+, zlib
+# runtime dependencies
+, cups
+# runtime dependencies for GTK+ Look and Feel
+, gtkSupport ? true
+, cairo
+, glib
+, gtk3
+}:
+
+let
+  cpuName = stdenv.hostPlatform.parsed.cpu.name;
+  runtimeDependencies = [
+    cups
+  ] ++ lib.optionals gtkSupport [
+    cairo glib gtk3
+  ];
+  runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
+in
+
+let result = stdenv.mkDerivation rec {
+  pname = if sourcePerArch.packageType == "jdk"
+    then "adoptopenjdk-${sourcePerArch.vmType}-bin"
+    else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin";
+
+  version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
+
+  src = fetchurl {
+    inherit (sourcePerArch.${cpuName}) url sha256;
+  };
+
+  buildInputs = [
+    alsa-lib # libasound.so wanted by lib/libjsound.so
+    fontconfig
+    freetype
+    stdenv.cc.cc.lib # libstdc++.so.6
+    xorg.libX11
+    xorg.libXext
+    xorg.libXi
+    xorg.libXrender
+    xorg.libXtst
+    zlib
+  ] ++ lib.optional stdenv.isAarch32 libffi;
+
+  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+
+  # See: https://github.com/NixOS/patchelf/issues/10
+  dontStrip = 1;
+
+  installPhase = ''
+    cd ..
+
+    mv $sourceRoot $out
+
+    # jni.h expects jni_md.h to be in the header search path.
+    ln -s $out/include/linux/*_md.h $out/include/
+
+    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
+
+    # 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
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> "$out/nix-support/setup-hook"
+    if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+    EOF
+
+    # We cannot use -exec since wrapProgram is a function but not a command.
+    #
+    # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it
+    # breaks building OpenJDK (#114495).
+    for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
+      if patchelf --print-interpreter "$bin" &> /dev/null; then
+        wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
+      fi
+    done
+  '';
+
+  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 lib; {
+    license = licenses.gpl2Classpath;
+    sourceProvenance = with sourceTypes; [ binaryNativeCode binaryBytecode ];
+    description = "AdoptOpenJDK, prebuilt OpenJDK binary";
+    platforms = lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
+    maintainers = with lib.maintainers; [ taku0 ];
+    inherit knownVulnerabilities;
+    mainProgram = "java";
+  };
+
+}; 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..1fd2fd8dc09e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-darwin.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jdk.hotspot; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jre.hotspot; };
+  jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jdk.openj9; };
+  jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = 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..fcad50017dba
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-linux.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.${variant}.jdk.hotspot; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.${variant}.jre.hotspot; };
+  jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.${variant}.jdk.openj9; };
+  jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.${variant}.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..fdde25bd361d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-darwin.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
+  jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jre.openj9; knownVulnerabilities = ["Support ended"]; };
+}
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..6c57b542e65b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-linux.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.${variant}.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.${variant}.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.${variant}.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
+  jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.${variant}.jre.openj9; knownVulnerabilities = ["Support ended"]; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-darwin.nix
new file mode 100644
index 000000000000..1c776f69e2db
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-darwin.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
+  jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jre.openj9; knownVulnerabilities = ["Support ended"]; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-linux.nix
new file mode 100644
index 000000000000..573fc17b51be
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk14-linux.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.${variant}.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.${variant}.jre.hotspot; knownVulnerabilities = ["Support ended"]; };
+  jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.${variant}.jdk.openj9; knownVulnerabilities = ["Support ended"]; };
+  jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.${variant}.jre.openj9; knownVulnerabilities = ["Support ended"]; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-darwin.nix
new file mode 100644
index 000000000000..b9d706653065
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-darwin.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jdk.hotspot; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jre.hotspot; };
+  jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jdk.openj9; };
+  jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jre.openj9; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-linux.nix
new file mode 100644
index 000000000000..7c6d1d36021e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk15-linux.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.${variant}.jdk.hotspot; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.${variant}.jre.hotspot; };
+  jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.${variant}.jdk.openj9; };
+  jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.${variant}.jre.openj9; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-darwin.nix
new file mode 100644
index 000000000000..a7473710d14b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-darwin.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jdk.hotspot; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jre.hotspot; };
+  jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jdk.openj9; };
+  jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jre.openj9; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-linux.nix
new file mode 100644
index 000000000000..3d803901d341
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk16-linux.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.${variant}.jdk.hotspot; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.${variant}.jre.hotspot; };
+  jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.${variant}.jdk.openj9; };
+  jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.${variant}.jre.openj9; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-darwin.nix
new file mode 100644
index 000000000000..d9309d9ce0b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-darwin.nix
@@ -0,0 +1,9 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk17.mac.jdk.hotspot; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk17.mac.jre.hotspot; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-linux.nix
new file mode 100644
index 000000000000..e069a8521d72
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk17-linux.nix
@@ -0,0 +1,10 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk17.${variant}.jdk.hotspot; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk17.${variant}.jre.hotspot; };
+}
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..846870869910
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+let
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jdk.hotspot; };
+  jre-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jre.hotspot; };
+  jdk-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jdk.openj9; };
+  jre-openj9 = import ./jdk-darwin-base.nix { sourcePerArch = 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..2b0cac664983
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine_linux" else "linux";
+  sources = lib.importJSON ./sources.json;
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.${variant}.jdk.hotspot; };
+  jre-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.${variant}.jre.hotspot; };
+  jdk-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.${variant}.jdk.openj9; };
+  jre-openj9 = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.${variant}.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..18b8e683bc94
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/sources.json
@@ -0,0 +1,1192 @@
+{
+  "openjdk11": {
+    "alpine_linux": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "45f56d75da2f55b29e7307cc790958e379abbe6b5f160a3824dc26e320c718e5",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "b5d71cdf3032040e7d2a577712bf525e32e87686af3430219308a39878b98851",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_x64_alpine-linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          }
+        }
+      }
+    },
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "0c7763a19b4af4ef5fbae831781b5184e988d6f131d264482399eeaf51b6e254",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "be07af349f0d2e1ffb7e01e1e8bac8bffd76e22f6cc1354e5b627222e3395f41",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "be07af349f0d2e1ffb7e01e1e8bac8bffd76e22f6cc1354e5b627222e3395f41",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "1e3704c8e155f8f894953c2a6708a52e6f449bbf5a85450be6fbb2ec76581700",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "5f19fb28aea3e28fcc402b73ce72f62b602992d48769502effe81c52ca39a581",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "31242e10bb826679aae3ed303be17ad3ef3c2551afbbd19f031ada87dd73258f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_aarch64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11-ea"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "691f2b252b5be5e36079177d56ff7b516e3058277f0ba852a16a9a0cd9668224",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_ppc64le_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "a605ab06f76533d44ce0828bd96836cc9c0e71ec3df3f8672052ea98dcbcca22",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "1fe4b20d808f393422610818711c728331992a4455eeeb061d3d05b45412771d",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "cb754b055177381f9f6852b7e5469904a15edddd7f8e136043c28b1e33aee47c",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_arm_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "cb754b055177381f9f6852b7e5469904a15edddd7f8e136043c28b1e33aee47c",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_arm_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "8019d938e5525938ec8e68e2989c4413263b0d9b7b3f20fe0c45f6d967919cfb",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_ppc64le_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "32dcf760664f93531594b72ce9226e9216567de5705a23c9ff5a77c797948054",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_x64_linux_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "434219d233bdb8f1bee024b1ca5accfc3f1f832320b5221ded715eed101e705f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_aarch64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11-ea"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "f11ae15da7f2809caeeca70a7cf3b9e7f943848869f498f1b73efc10ef7170f0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_ppc64le_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "152bf992d965ed018e9e1c3c2eb2c1771f92e0b6485b9a1f2c6d84d282117715",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_x64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "f3b416ecccf51f45cc8c986975eb7bd35e7e1ad953656ab0a807125963fcf73b",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "fc34c4f0e590071dcd65a0f93540913466ccac3aa8caa984826713b67afb696d",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "797cee6b9f6e18bcc026ee9dcebbce81d62ca897038402d247630b25d41efe15",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "78a07bd60c278f65bafd0df93890d909ff60259ccbd22ad71a1c3b312906508e",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_aarch64_mac_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "87e439b2193e1a2cf1a8782168bba83b558f54e2708f88ea8296184ea2735c89",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jre_x64_mac_hotspot_11.0.19_7.tar.gz",
+            "version": "11.0.19"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "80a0c03f0b603d6008e29c651f884878743fcaa90fc05aef15f3411749da94e7",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jre_x64_mac_openj9_11.0.11_9_openj9-0.26.0.tar.gz",
+            "version": "11.0.11"
+          }
+        }
+      }
+    }
+  },
+  "openjdk13": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "8.1",
+            "sha256": "0e6081cb51f8a6f3062bef4f4c45dbe1fccfd3f3b4b5d52522a3edb76581e3af",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_aarch64_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          },
+          "armv6l": {
+            "build": "8.1",
+            "sha256": "9beec080f2b2a7f6883b024272f4e8d5a0b027325e83647be318215781af1d1a",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_arm_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          },
+          "armv7l": {
+            "build": "8.1",
+            "sha256": "9beec080f2b2a7f6883b024272f4e8d5a0b027325e83647be318215781af1d1a",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_arm_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "8.1",
+            "sha256": "fb3362e34aac091a4682394d20dcdc3daea51995d369d62c28424573e0fc04aa",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_ppc64le_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "9ccc063569f19899fd08e41466f8c4cd4e05058abdb5178fa374cb365dcf5998",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "8.1",
+            "sha256": "f71513e525172dfef695b7c27b25e151f232e05b2281648c2b794650c4970832",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_ppc64le_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
+            "version": "13.0.2"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "aeecf6d30d0c847db81d07793cf97e5dc44890c29366d7d9f8f9f397f6c52590",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_x64_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
+            "version": "13.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "8.1",
+            "sha256": "6c4b69d1609f4c65c576c80d6aa101de80048f8ce5566f890e8fff5349228bae",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_aarch64_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "8.1",
+            "sha256": "43d6fb71bdf7b6ad9295087c46dfc9b00bf26db1b5cdcff0c418cbe43b49904a",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_ppc64le_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "897f16fe8e056395209e35d2384013bd1ff250e717465769079e3f4793628c34",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_x64_linux_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "8.1",
+            "sha256": "7bf8dc4c3b95e87b154f7bc2f9388a6539413fe76d49b362bba878217ccb7ed7",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jre_ppc64le_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
+            "version": "13.0.2"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "a0ab38607811e282f64082edc68a2dea3fa6a5113391efb124a6d7d02883110a",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jre_x64_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
+            "version": "13.0.2"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "0ddb24efdf5aab541898d19b7667b149a1a64a8bd039b708fc58ee0284fa7e07",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "dd8d92eec98a3455ec5cd065a0a6672cc1aef280c6a68c507c372ccc1d98fbaa",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_x64_mac_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
+            "version": "13.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "3149b9ebf0db1eaf2dc152df9efae82003e7971efb1cf550060e6a4798fe8c5c",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jre_x64_mac_hotspot_13.0.2_8.tar.gz",
+            "version": "13.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8.1",
+            "sha256": "6a8a636fca4c7e368241e232a37cd73c9867cdec8f0869fd158b1f58c6128cc2",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jre_x64_mac_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
+            "version": "13.0.2"
+          }
+        }
+      }
+    }
+  },
+  "openjdk14": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "ee87e9f03b1fbe6f328429b78fe1a9f44900026d220c90dfd747fe0bcd62d904",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_aarch64_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "armv6l": {
+            "build": "12",
+            "sha256": "65f193496c6977ba7aed1563edc4b5be091b5ff03e3d790074bb4e389a034b36",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_arm_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "armv7l": {
+            "build": "12",
+            "sha256": "65f193496c6977ba7aed1563edc4b5be091b5ff03e3d790074bb4e389a034b36",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_arm_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "12",
+            "sha256": "465a3b8e931896b8d95e452d479615c4bf543535c05b6ea246323ae114e67d7d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_ppc64le_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "7d5ee7e06909b8a99c0d029f512f67b092597aa5b0e78c109bd59405bbfa74fe",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "12",
+            "sha256": "177fd161ae14df92203d70cd618559daf889ec0c172d6ee615859352f68a2371",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_ppc64le_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
+            "version": "14.0.2"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "12",
+            "sha256": "306f7138cdb65daaf2596ec36cafbde72088144c83b2e964f0193662e6caf3be",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
+            "version": "14.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "2b749ceead19d68dd7e3c28b143dc4f94bb0916378a98b7346e851318ea4da84",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_aarch64_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "armv6l": {
+            "build": "12",
+            "sha256": "4468ecf74956783ae41a46e8ba023c003c69e4d111622944aad1af764a1bc4af",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_arm_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "armv7l": {
+            "build": "12",
+            "sha256": "4468ecf74956783ae41a46e8ba023c003c69e4d111622944aad1af764a1bc4af",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_arm_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "12",
+            "sha256": "0f96998be562cfbe8a4114581349dbd2609d0a23091e538fe142dcd9c83e70cf",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_ppc64le_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "1107845947da56e6bdad0da0b79210a079a74ec5c806f815ec5db9d09e1a9236",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_x64_linux_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "12",
+            "sha256": "ad7a55a3669878c0c7d7c66faafe7c626d4341374719b6fdd81d2986c6e80945",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jre_ppc64le_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
+            "version": "14.0.2"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "12",
+            "sha256": "3a137146a7b0bd8b029e72beb37c5fbb09dcfb9e33a10125076fff1555227cfd",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jre_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
+            "version": "14.0.2"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "09b7e6ab5d5eb4b73813f4caa793a0b616d33794a17988fa6a6b7c972e8f3dd3",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "12",
+            "sha256": "95e6abcc12dde676ccd5ba65ab86f06ddaa22749dde00e31f4c6d3ea95277359",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_x64_mac_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
+            "version": "14.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "e8b5196de8ecb2b136a28494c2888784b9d9e22e29d2c38528892fb7d0c95260",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_x64_mac_hotspot_14.0.2_12.tar.gz",
+            "version": "14.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "12",
+            "sha256": "2562a442d7278409358f474071db34df4ba9c555925f28d0270139f97133c8d5",
+            "url": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jre_x64_mac_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
+            "version": "14.0.2"
+          }
+        }
+      }
+    }
+  },
+  "openjdk15": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "6e8b6b037148cf20a284b5b257ec7bfdf9cc31ccc87778d0dfd95a2fddf228d4",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_aarch64_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "ff39c0380224e419d940382c4d651cb1e6297a794854e0cc459c1fd4973b3368",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_arm_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "ff39c0380224e419d940382c4d651cb1e6297a794854e0cc459c1fd4973b3368",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_arm_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "486f2aad94c5580c0b27c9007beebadfccd4677c0bd9565a77ca5c34af5319f9",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_ppc64le_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "94f20ca8ea97773571492e622563883b8869438a015d02df6028180dd9acc24d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "b69a4bc87ed2e985d252cff02d53f1a11b8d83d39e0800cd4a1cab4521375314",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_aarch64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2-ea"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "5b2158268de0be247801b7823ee3e7f739254d77718a1879848627181feee2f4",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_ppc64le_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "5515ccd79b1b5e8d8a615b80d5fe1272f7bb41100e46d94fb78ee611ea014816",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_x64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "1c1fc968d76004b0be0042027712835dcbe3570a6fc3a208157a4ab6adabbef2",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_aarch64_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "304be224952dbea7000cda6223b2978b3eefdf2e3749032c3b381a213c8d9c5e",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_arm_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "304be224952dbea7000cda6223b2978b3eefdf2e3749032c3b381a213c8d9c5e",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_arm_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "dc2480948ac3e6b192fb77c9d37227510f44482e52a330002d6e7497a62a7d67",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_ppc64le_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "31af7efdb1cc0ffd001bc145c3d255266889ad6b502133283ae8bf233d11334c",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_x64_linux_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "37492012e75d75021dfb2b25fe5cc73664c03fee85532cec30ce4f5a4e5389c6",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_aarch64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2-ea"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "79f657141f1cd0e4a70d041b9215b8b00140d479ce73ed71bc4f3dd015157958",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_ppc64le_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "a4ae1b7275fcfd6d87a3387edacc8e353dc95ee44f00ca5a348ea90331ec2084",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_x64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "d358a7ff03905282348c6c80562a4da2e04eb377b60ad2152be4c90f8d580b7f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "1336ae5529af3a0e35ae569e4188944831aeed7080a482f2490fc619380cbe53",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_x64_mac_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "6a7150fa3ca8277394ff5bae6f56a70f61d2144a5dbbea4f008d86a3e5498795",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jre_x64_mac_hotspot_15.0.2_7.tar.gz",
+            "version": "15.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "2c0ba5e66764d660037343db4bf32f1ed75ad27661e54e9a4df23d40cae448b0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jre_x64_mac_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
+            "version": "15.0.2"
+          }
+        }
+      }
+    }
+  },
+  "openjdk16": {
+    "alpine_linux": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "85788b1a1f470ca7ddc576028f29abbc3bc3b08f82dd811a3e24371689d7dc0f",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_alpine-linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "5f10ffc12056b735f5fe505ec6c481fff94de27e80c1d77ea9f9e2830669cc1d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_alpine-linux_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          }
+        }
+      }
+    },
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "cb77d9d126f97898dfdc8b5fb694d1e0e5d93d13a0a6cb2aeda76f8635384340",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_aarch64_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "7721ef81416af8122a28448f3d661eb4bda40a9f78d400e4ecc55b58e627a00c",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_arm_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "7721ef81416af8122a28448f3d661eb4bda40a9f78d400e4ecc55b58e627a00c",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_arm_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "36ebe6c72f2fc19b8b17371f731390e15fa3aab08c28b55b9a8b71d0a578adc9",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_ppc64le_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "323d6d7474a359a28eff7ddd0df8e65bd61554a8ed12ef42fd9365349e573c2c",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "abc56cd266b4acc96cc700b166ad016907dac97d7a593bd5c369d54efc4b4acd",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_aarch64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1-ea"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "9200acc9ddb6b0d4facf3ea44b17d3a10035316a379b4b148382b25cacf2bb83",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_ppc64le_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "7395aaa479a7410bbe5bd5efc43d2669718c61ba146b06657315dbd467b98bf1",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_x64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "4e47f1cbf46190727be74cd73445ec2b693f5ba4a74542c554d6b3285811cab5",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_aarch64_linux_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          },
+          "armv6l": {
+            "build": "9",
+            "sha256": "c1f88f3ce955cb2e9a4236a916cc6660ef55231d29c4390b1a4398ebbca358b7",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_arm_linux_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          },
+          "armv7l": {
+            "build": "9",
+            "sha256": "c1f88f3ce955cb2e9a4236a916cc6660ef55231d29c4390b1a4398ebbca358b7",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_arm_linux_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "495805e2e9bcabeac0d8271623b6c92604440608286f4ce411ea48f582854930",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_ppc64le_linux_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "5eca19d406c6d130e9c3a4b932b9cb0a6e9cd45932450668c3e911bded4bcf40",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_linux_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "01d8337d1069b8bfdcdf096b30cc24d1df42ffeede676da99fed77bef2670454",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_aarch64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1-ea"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "f9734c100f0e85ac63b9f9327b77135221a905e1d743cd9cd4edc0ea0e0fe8d9",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_ppc64le_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "fab572dd1a2ef00fd18ad4f5a4c373d0cf140045e61f9104cd5b8dbf6b3a517d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_x64_linux_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "27975d9e695cfbb93861540926f9f7bcac973a254ceecbee549706a99cbbdf95",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_mac_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "6d4241c6ede2167fb71bd57f7a770a74564ee007c06bcae98e1abc3c1de4756f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jdk_x64_mac_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "33eeccbeea75e70b09610ba12e9591386a0e42248525b8358c9ae683bce82779",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_mac_hotspot_16.0.1_9.tar.gz",
+            "version": "16.0.1"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "9",
+            "sha256": "f57a6f04cf21a8470bb6f9488c57031d89db73c8b24997d74812855372f4e6b8",
+            "url": "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9_openj9-0.26.0/OpenJDK16U-jre_x64_mac_openj9_16.0.1_9_openj9-0.26.0.tar.gz",
+            "version": "16.0.1"
+          }
+        }
+      }
+    }
+  },
+  "openjdk17": {
+    "alpine_linux": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "b6edac2fa669876ef16b4895b36b61d01066626e7a69feba2acc19760c8d18cb",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "711f837bacf8222dee9e8cd7f39941a4a0acf869243f03e6038ca3ba189f66ca",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_x64_alpine-linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          }
+        }
+      }
+    },
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "0084272404b89442871e0a1f112779844090532978ad4d4191b8d03fc6adfade",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "e7a84c3e59704588510d7e6cce1f732f397b54a3b558c521912a18a1b4d0abdc",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_arm_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "e7a84c3e59704588510d7e6cce1f732f397b54a3b558c521912a18a1b4d0abdc",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_arm_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "8f4366ff1eddb548b1744cd82a1a56ceee60abebbcbad446bfb3ead7ac0f0f85",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "e9458b38e97358850902c2936a1bb5f35f6cffc59da9fcd28c63eab8dbbfbc3b",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "2ff6a4fd1fa354047c93ba8c3179967156162f27bd683aee1f6e52a480bcbe6a",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_aarch64_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "5b0401199c7c9163b8395ebf25195ed395fec7b7ef7158c36302420cf993825a",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_arm_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "5b0401199c7c9163b8395ebf25195ed395fec7b7ef7158c36302420cf993825a",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_arm_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "cc25e74c0817cd4d943bba056b256b86e0e9148bf41d7600c5ec2e1eadb2e470",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_ppc64le_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "bb025133b96266f6415d5084bb9b260340a813968007f1d2d14690f20bd021ca",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_x64_linux_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "1d6aeb55b47341e8ec33cc1644d58b88dfdcce17aa003a858baa7460550e6ff9",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "50d0e9840113c93916418068ba6c845f1a72ed0dab80a8a1f7977b0e658b65fb",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "625d070a297a3c856badbaa5c65adaaa1adb3ea3813363fb8335c47709b69140",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_aarch64_mac_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "62559a927a8dbac2ea1d7879f590a62fea87d61bfaa92894e578d2045b8d921b",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jre_x64_mac_hotspot_17.0.7_7.tar.gz",
+            "version": "17.0.7"
+          }
+        }
+      }
+    }
+  },
+  "openjdk8": {
+    "alpine_linux": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "cfdf8e07c8eeb087b7a2895b90fc0a19986bcff85006f1e2b708e3964909aa8e",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_x64_alpine-linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "95d8cb8b5375ec00a064ed728eb60d925d44c1a79fe92f6ca7385b5863d4f78c",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_x64_alpine-linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          }
+        }
+      }
+    },
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "195808eb42ab73535c84de05188914a52a47c1ac784e4bf66de95fe1fd315a5a",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_aarch64_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "3f4848700a4bf856d3c138dc9c2b305b978879c8fbef5aa7df34a7c2fe1b64b8",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_arm_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "3f4848700a4bf856d3c138dc9c2b305b978879c8fbef5aa7df34a7c2fe1b64b8",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_arm_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "bb85303848fe402d4f1004f748f80ccb39cb11f356f50a513555d1083c3913b8",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "78a0b3547d6f3d46227f2ad8c774248425f20f1cd63f399b713f0cdde2cc376c",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "10",
+            "sha256": "b168245ddc18b85135c15ed6baea5cbcc06192b49af04dcfa698458373efc061",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_aarch64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292-ea"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "10",
+            "sha256": "bc88be757a884b90a2bb91365b7e922c0e7d0fea991cd69d1f74c59b2257a4b5",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_ppc64le_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "06d6c9421778575cf59d50f69b7ac6a7bb237485b3a3c2f89cfb61a056c7b2de",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_x64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "f8e440273c8feb3fcfaca88ba18fec291deae18a548adde8a37cd1db08107b95",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_aarch64_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "e58e017012838ae4f0db78293e3246cc09958e6ea9a2393c5947ec003bf736dd",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_arm_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "e58e017012838ae4f0db78293e3246cc09958e6ea9a2393c5947ec003bf736dd",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_arm_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "ba5f8141a16722e39576bf42b69d2b8ebf95fc2c05441e3200f609af4dd9f1ea",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_ppc64le_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "b6fdfe32085a884c11b31f66aa67ac62811df7112fb6fb08beea61376a86fbb4",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_x64_linux_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          }
+        },
+        "openj9": {
+          "aarch64": {
+            "build": "10",
+            "sha256": "f87f90673e25c3ce9e868e96a6059b22665f12d05e389813f75dfbc95d970393",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_aarch64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292-ea"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "10",
+            "sha256": "b75216f7905cff08432a9200a78a2694a4074279f79d859d27f82a998ca1b1e9",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_ppc64le_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292"
+          },
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "6d5b67979e0935febe893895b622647bf8a59df6093ae57074db11d2ac9373ea",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_x64_linux_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "9c33db312cc46b6bfe705770fdc5c08edb7d790ba70be4e8b12a98e79da5f4a1",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_x64_mac_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "d262bc226895e80b7e80d61905e65fe043ca0a3e3b930f7b88ddfacb8835e939",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jdk_x64_mac_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "6c876ea7bfa778ae78ec5a976e557b2b981a592a3639eb0d3dc3c8d3dda8d321",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_x64_mac_hotspot_8u372b07.tar.gz",
+            "version": "8.0.372"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "50cbc5ef48d0167d649d3ba2c2b8d71553541bffb98914418f4a26e0c5f69aca",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10_openj9-0.26.0/OpenJDK8U-jre_x64_mac_openj9_8u292b10_openj9-0.26.0.tar.gz",
+            "version": "8.0.292"
+          }
+        }
+      }
+    }
+  }
+}
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..f5645f563de3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, firefox-unwrapped, zip, pkg-config, npapi_sdk, bash, bc }:
+
+stdenv.mkDerivation rec {
+  pname = "adoptopenjdk-icedtea-web";
+
+  version = "1.8.8";
+
+  src = fetchFromGitHub {
+    owner = "AdoptOpenJDK";
+    repo = "IcedTea-Web";
+    rev = "icedtea-web-${version}";
+    sha256 = "sha256-hpEVWG9ltNDL/0EFJjgQRRce+BLcCO4ZERULYZxyC1o=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config bc ];
+  buildInputs = [ cargo rustc glib firefox-unwrapped 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 = 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/alan/2.nix b/nixpkgs/pkgs/development/compilers/alan/2.nix
new file mode 100644
index 000000000000..a80b6ab35cb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/alan/2.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "alan2";
+  version = "2.8.7";
+
+  src = fetchFromGitHub {
+    owner = "alan-if";
+    repo = "alan";
+    rev = "71f23ec79f7f5d66aa5ae9fd3f9b8dae41a89f15";
+    sha256 = "066jknqz1v6sismvfxjfffl35h14v8qwgcq99ibhp08dy2fwraln";
+  };
+
+  makefile = "Makefile.unix";
+
+  # Add a workarounf for -fno-common tollchains like upstream gcc-10.
+  # alan-3 is already fixed, but the backport is nontrivial.
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/alan2
+    cp compiler/alan $out/bin/alan2
+    cp interpreter/arun $out/bin/arun2
+    cp alan.readme ChangeLog $out/share/alan2
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.alanif.se/";
+    description = "The Alan interactive fiction language (legacy version)";
+    license = licenses.artistic2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ neilmayhew ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/alan/default.nix b/nixpkgs/pkgs/development/compilers/alan/default.nix
new file mode 100644
index 000000000000..61f7b1c0f7b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/alan/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, lib, fetchFromGitHub
+, cgreen, openjdk, pkg-config, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "alan";
+  version = "3.0beta8";
+
+  src = fetchFromGitHub {
+    owner = "alan-if";
+    repo = "alan";
+    rev = "v${version}";
+    sha256 = "0zfg1frmb4yl39hk8h733bmlwk4rkikzfhvv7j34cxpdpsp7spzl";
+  };
+
+  postPatch = ''
+    patchShebangs --build bin
+    # The Makefiles have complex CFLAGS that don't allow separate control of optimization
+    sed -i 's/-O0/-O2/g' compiler/Makefile.common
+    sed -i 's/-Og/-O2/g' interpreter/Makefile.common
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/alan/examples
+    # Build the release tarball
+    make package
+    # The release tarball isn't split up into subdirectories
+    tar -xf alan*.tgz --strip-components=1 -C $out/share/alan
+    mv $out/share/alan/*.alan $out/share/alan/examples
+    chmod a-x $out/share/alan/examples/*.alan
+    mv $out/share/alan/{alan,arun} $out/bin
+    # a2a3 isn't included in the release tarball
+    cp bin/a2a3 $out/bin
+  '';
+
+  nativeBuildInputs = [
+    cgreen
+    openjdk pkg-config which
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.alanif.se/";
+    description = "The Alan interactive fiction language";
+    license = licenses.artistic2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ neilmayhew ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ante/Cargo.lock b/nixpkgs/pkgs/development/compilers/ante/Cargo.lock
new file mode 100644
index 000000000000..a3ffcbfbdaf4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ante/Cargo.lock
@@ -0,0 +1,970 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "ahash"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd"
+dependencies = [
+ "getrandom",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+dependencies = [
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "ante"
+version = "0.1.1"
+dependencies = [
+ "clap",
+ "clap_complete",
+ "colored",
+ "cranelift",
+ "cranelift-jit",
+ "cranelift-module",
+ "cranelift-object",
+ "difference",
+ "goldentests",
+ "inkwell",
+ "mimalloc",
+ "petgraph",
+ "target-lexicon",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "cc"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "clap"
+version = "4.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_complete"
+version = "4.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae"
+dependencies = [
+ "clap",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "colored"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"
+dependencies = [
+ "is-terminal",
+ "lazy_static",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "cranelift"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd96bba738454eb373087df6d6891b18009361123fef90930def4978e3837448"
+dependencies = [
+ "cranelift-codegen",
+ "cranelift-frontend",
+]
+
+[[package]]
+name = "cranelift-bforest"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "529ffacce2249ac60edba2941672dfedf3d96558b415d0d8083cd007456e0f55"
+dependencies = [
+ "cranelift-entity",
+]
+
+[[package]]
+name = "cranelift-codegen"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "427d105f617efc8cb55f8d036a7fded2e227892d8780b4985e5551f8d27c4a92"
+dependencies = [
+ "cranelift-bforest",
+ "cranelift-codegen-meta",
+ "cranelift-codegen-shared",
+ "cranelift-entity",
+ "cranelift-isle",
+ "log",
+ "regalloc2",
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cranelift-codegen-meta"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "551674bed85b838d45358e3eab4f0ffaa6790c70dc08184204b9a54b41cdb7d1"
+dependencies = [
+ "cranelift-codegen-shared",
+]
+
+[[package]]
+name = "cranelift-codegen-shared"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b3a63ae57498c3eb495360944a33571754241e15e47e3bcae6082f40fec5866"
+
+[[package]]
+name = "cranelift-entity"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11aa8aa624c72cc1c94ea3d0739fa61248260b5b14d3646f51593a88d67f3e6e"
+
+[[package]]
+name = "cranelift-frontend"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "544ee8f4d1c9559c9aa6d46e7aaeac4a13856d620561094f35527356c7d21bd0"
+dependencies = [
+ "cranelift-codegen",
+ "log",
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cranelift-isle"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed16b14363d929b8c37e3c557d0a7396791b383ecc302141643c054343170aad"
+
+[[package]]
+name = "cranelift-jit"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0308e7418208639fb96c1a3dc04955fa41c4bc92dfce9106635185f71d5caf46"
+dependencies = [
+ "anyhow",
+ "cranelift-codegen",
+ "cranelift-entity",
+ "cranelift-module",
+ "cranelift-native",
+ "libc",
+ "log",
+ "region",
+ "target-lexicon",
+ "windows-sys 0.36.1",
+]
+
+[[package]]
+name = "cranelift-module"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76979aac10dbcf0c222cd5902565bc93597ac30bbe9d879a2aa5f2402d1561f2"
+dependencies = [
+ "anyhow",
+ "cranelift-codegen",
+]
+
+[[package]]
+name = "cranelift-native"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51617cf8744634f2ed3c989c3c40cd6444f63377c6d994adab0d85807f3eb682"
+dependencies = [
+ "cranelift-codegen",
+ "libc",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cranelift-object"
+version = "0.86.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e649a13f3951ad3b8cb13a3a774481c12159a98eb386b04583573c57d7cf56"
+dependencies = [
+ "anyhow",
+ "cranelift-codegen",
+ "cranelift-module",
+ "log",
+ "object",
+ "target-lexicon",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "difference"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
+
+[[package]]
+name = "either"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "errno"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8"
+dependencies = [
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "fixedbitset"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "goldentests"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8476785a67758ffc17be1d41009468ef27fb96b5211c9d375a4356bf891dcbc5"
+dependencies = [
+ "colored",
+ "rayon",
+ "shlex",
+ "similar",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.14.2",
+]
+
+[[package]]
+name = "inkwell"
+version = "0.2.0"
+source = "git+https://github.com/TheDan64/inkwell?branch=master#7a09ad8a5f3b1fc416f95b5e1c97d33df0ab3f06"
+dependencies = [
+ "either",
+ "inkwell_internals",
+ "libc",
+ "llvm-sys",
+ "once_cell",
+ "thiserror",
+]
+
+[[package]]
+name = "inkwell_internals"
+version = "0.8.0"
+source = "git+https://github.com/TheDan64/inkwell?branch=master#7a09ad8a5f3b1fc416f95b5e1c97d33df0ab3f06"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
+dependencies = [
+ "hermit-abi",
+ "rustix",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.150"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
+
+[[package]]
+name = "libmimalloc-sys"
+version = "0.1.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
+
+[[package]]
+name = "llvm-sys"
+version = "160.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf51981ac0622b10fe4790763e3de1f3d68a0ee4222e03accaaab6731bd508d"
+dependencies = [
+ "cc",
+ "lazy_static",
+ "libc",
+ "regex",
+ "semver",
+]
+
+[[package]]
+name = "log"
+version = "0.4.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+
+[[package]]
+name = "mach"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "memchr"
+version = "2.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
+
+[[package]]
+name = "memoffset"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mimalloc"
+version = "0.1.39"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c"
+dependencies = [
+ "libmimalloc-sys",
+]
+
+[[package]]
+name = "object"
+version = "0.28.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424"
+dependencies = [
+ "crc32fast",
+ "hashbrown 0.11.2",
+ "indexmap 1.9.3",
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+
+[[package]]
+name = "petgraph"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
+dependencies = [
+ "fixedbitset",
+ "indexmap 2.1.0",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rayon"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "regalloc2"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779"
+dependencies = [
+ "fxhash",
+ "log",
+ "slice-group-by",
+ "smallvec",
+]
+
+[[package]]
+name = "regex"
+version = "1.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+
+[[package]]
+name = "region"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0"
+dependencies = [
+ "bitflags 1.3.2",
+ "libc",
+ "mach",
+ "winapi",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e"
+dependencies = [
+ "bitflags 2.4.1",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "semver"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
+
+[[package]]
+name = "shlex"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380"
+
+[[package]]
+name = "similar"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597"
+
+[[package]]
+name = "slice-group-by"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
+
+[[package]]
+name = "smallvec"
+version = "1.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "syn"
+version = "2.0.39"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a"
+
+[[package]]
+name = "thiserror"
+version = "1.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
+dependencies = [
+ "windows_aarch64_msvc 0.36.1",
+ "windows_i686_gnu 0.36.1",
+ "windows_i686_msvc 0.36.1",
+ "windows_x86_64_gnu 0.36.1",
+ "windows_x86_64_msvc 0.36.1",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
diff --git a/nixpkgs/pkgs/development/compilers/ante/default.nix b/nixpkgs/pkgs/development/compilers/ante/default.nix
new file mode 100644
index 000000000000..ebd70475d0fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ante/default.nix
@@ -0,0 +1,58 @@
+{ fetchFromGitHub
+, lib
+, libffi
+, libxml2
+, llvmPackages_16
+, ncurses
+, rustPlatform
+}:
+
+rustPlatform.buildRustPackage {
+  pname = "ante";
+  version = "unstable-2023-12-18";
+  src = fetchFromGitHub {
+    owner = "jfecher";
+    repo = "ante";
+    rev = "e38231ffa51b84a2ca53b4b0439d1ca5e0dea32a";
+    hash = "sha256-UKEoOm+Jc0YUwO74Tn038MLeX/c3d2z8I0cTBVfX61U=";
+  };
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "inkwell-0.2.0" = "sha256-eMoclRtekg8v+m5KsTcjB3zCdPkcJy42NALEEuT/fw8=";
+    };
+  };
+
+  /*
+     https://crates.io/crates/llvm-sys#llvm-compatibility
+     llvm-sys requires a specific version of llvmPackages,
+     that is not the same as the one included by default with rustPlatform.
+  */
+  nativeBuildInputs = [ llvmPackages_16.llvm ];
+  buildInputs = [ libffi libxml2 ncurses ];
+
+  postPatch = ''
+    substituteInPlace tests/golden_tests.rs --replace \
+      'target/debug' "target/$(rustc -vV | sed -n 's|host: ||p')/release"
+  '';
+  preBuild =
+    let
+      major = lib.versions.major llvmPackages_16.llvm.version;
+      minor = lib.versions.minor llvmPackages_16.llvm.version;
+      llvm-sys-ver = "${major}${builtins.substring 0 1 minor}";
+    in
+    ''
+      # On some architectures llvm-sys is not using the package listed inside nativeBuildInputs
+      export LLVM_SYS_${llvm-sys-ver}_PREFIX=${llvmPackages_16.llvm.dev}
+      export ANTE_STDLIB_DIR=$out/lib
+      mkdir -p $ANTE_STDLIB_DIR
+      cp -r $src/stdlib/* $ANTE_STDLIB_DIR
+    '';
+
+  meta = with lib; {
+    homepage = "https://antelang.org/";
+    description = "A low-level functional language for exploring refinement types, lifetime inference, and algebraic effects";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ ehllie ];
+  };
+}
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..527b800551eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/apache-flex-sdk/default.nix
@@ -0,0 +1,56 @@
+{ lib, 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 = "mirror://apache/flex/${version}/binaries/${pname}-${version}-bin.tar.gz";
+    sha256 = "13iq16dqvgcpb0p35x66hzxsq5pkbr2lbwr766nnqiryinnagz8p";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [ jre ];
+
+  dontBuild = true;
+
+  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
+  '';
+
+  dontFixup = true;
+
+  meta = with 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..a08ad91c4a1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/arachne-pnr/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, icestorm }:
+
+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"
+  ];
+
+  postPatch = ''
+    substituteInPlace ./Makefile \
+      --replace 'echo UNKNOWN' 'echo ${lib.substring 0 10 src.rev}'
+  '';
+
+  meta = with lib; {
+    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 = licenses.mit;
+    maintainers = with maintainers; [ shell thoughtpolice ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/armips/default.nix b/nixpkgs/pkgs/development/compilers/armips/default.nix
new file mode 100644
index 000000000000..b6fbb5ef34c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/armips/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "armips";
+  version = "0.11.0";
+
+  src = fetchFromGitHub {
+    owner = "Kingcom";
+    repo = "armips";
+    rev = "v${version}";
+    sha256 = "sha256-L+Uxww/WtvDJn1xZqoqA6Pkzq/98sy1qTxZbv6eEjbA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp armips $out/bin
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Kingcom/armips";
+    description = "Assembler for various ARM and MIPS platforms.";
+    license = licenses.mit;
+    maintainers = with maintainers; [ marius851000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/as31/0000-getline-break.patch b/nixpkgs/pkgs/development/compilers/as31/0000-getline-break.patch
new file mode 100644
index 000000000000..c53f6587f8ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/as31/0000-getline-break.patch
@@ -0,0 +1,24 @@
+diff --git old/as31/run.c new/as31/run.c
+index 28c5317..9e5263b 100644
+--- old/as31/run.c
++++ new/as31/run.c
+@@ -113,7 +113,8 @@ int run_as31(const char *infile, int lst, int use_stdout,
+ 	}
+ 
+ 	while (!feof(finPre)) {
+-		getline(&lineBuffer,&sizeBuf,finPre);
++		if (getline(&lineBuffer,&sizeBuf,finPre) == -1)
++			break;
+ 		if ((includePtr=strstr(lineBuffer,INC_CMD))) {
+ 			includePtr=includePtr+strlen(INC_CMD);
+ 			while ((*includePtr==' ')||		//move includePtr to filename
+@@ -138,7 +139,8 @@ int run_as31(const char *infile, int lst, int use_stdout,
+ 				mesg_f("Cannot open include file: %s\n",includePtr);
+ 			} else {
+ 				while (!feof(includeFile)) {
+-					getline(&incLineBuffer,&incSizeBuf,includeFile);
++					if (getline(&incLineBuffer,&incSizeBuf,includeFile) == -1)
++						break;
+ 					fprintf(fin,"%s",incLineBuffer);
+ 					if (strlen(incLineBuffer)) {
+ 						incLineCount++;
diff --git a/nixpkgs/pkgs/development/compilers/as31/default.nix b/nixpkgs/pkgs/development/compilers/as31/default.nix
new file mode 100644
index 000000000000..c76b8a03312e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/as31/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchurl
+, bison
+}:
+
+stdenv.mkDerivation rec {
+  pname = "as31";
+  version = "2.3.1";
+
+  src = fetchurl {
+    url = "http://wiki.erazor-zone.de/_media/wiki:projects:linux:as31:${pname}-${version}.tar.gz";
+    name = "${pname}-${version}.tar.gz";
+    hash = "sha256-zSEyWHFon5nyq717Mpmdv1XZ5Hz0e8ZABqsP8M83c1U=";
+  };
+
+  patches = [
+    # Check return value of getline in run.c
+    ./0000-getline-break.patch
+  ];
+
+  postPatch = ''
+    # parser.c is generated from parser.y; it is better to generate it via bison
+    # instead of using the prebuilt one, especially in x86_64
+    rm -f as31/parser.c
+  '';
+
+  preConfigure = ''
+    chmod +x configure
+  '';
+
+  nativeBuildInputs = [
+    bison
+  ];
+
+  meta = with lib; {
+    homepage = "http://wiki.erazor-zone.de/wiki:projects:linux:as31";
+    description = "An 8031/8051 assembler";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/asl/Makefile-nixos.def b/nixpkgs/pkgs/development/compilers/asl/Makefile-nixos.def
new file mode 100644
index 000000000000..0f41510733c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/asl/Makefile-nixos.def
@@ -0,0 +1,31 @@
+# -------------------------------------------------------------------------
+# choose your compiler (must be ANSI-compliant!) and linker command, plus
+# any additionally needed flags
+
+OBJDIR = .objdir/
+CC = cc
+CFLAGS = -g -fomit-frame-pointer -Wall
+HOST_OBJEXTENSION = .o
+LD = $(CC)
+LDFLAGS =
+HOST_EXEXTENSION =
+
+# no cross build
+
+TARG_OBJDIR = $(OBJDIR)
+TARG_CC = $(CC)
+TARG_CFLAGS = $(CFLAGS)
+TARG_OBJEXTENSION = $(HOST_OBJEXTENSION)
+TARG_LD = $(LD)
+TARG_LDFLAGS = $(LDFLAGS)
+TARG_EXEXTENSION = $(HOST_EXEXTENSION)
+
+# -------------------------------------------------------------------------
+# directories where binaries, includes, and manpages should go during
+# installation
+
+BINDIR = @bindir@
+INCDIR = @incdir@
+MANDIR = @mandir@
+LIBDIR = @libdir@
+DOCDIR = @docdir@
diff --git a/nixpkgs/pkgs/development/compilers/asl/default.nix b/nixpkgs/pkgs/development/compilers/asl/default.nix
new file mode 100644
index 000000000000..5a7ca869278a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/asl/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchzip
+, texliveMedium
+, buildDocs ? false
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "asl";
+  version = "142-bld232";
+
+  src = let inherit (finalAttrs) pname version; in fetchzip {
+    name = "${pname}-${version}";
+    url = "http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/asl-current-${version}.tar.bz2";
+    hash = "sha256-Q50GzXBxFMhbt5s9OgHPNH4bdqz2hhEmTnMmKowVn2E=";
+  };
+
+  outputs = [ "out" "doc" "man" ];
+
+  nativeBuildInputs = lib.optionals buildDocs [ texliveMedium ];
+
+  postPatch = lib.optionalString (!buildDocs) ''
+    substituteInPlace Makefile --replace "all: binaries docs" "all: binaries"
+  '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
+    substituteInPlace sysdefs.h --replace "x86_64" "aarch64"
+  '';
+
+  dontConfigure = true;
+
+  preBuild = ''
+    bindir="${placeholder "out"}/bin" \
+    docdir="${placeholder "doc"}/share/doc/asl" \
+    incdir="${placeholder "out"}/include/asl" \
+    libdir="${placeholder "out"}/lib/asl" \
+    mandir="${placeholder "man"}/share/man" \
+    substituteAll ${./Makefile-nixos.def} Makefile.def
+    mkdir -p .objdir
+  '';
+
+  meta = with lib; {
+    homepage = "http://john.ccac.rwth-aachen.de:8000/as/index.html";
+    description = "Portable macro cross assembler";
+    longDescription = ''
+      AS is a portable macro cross assembler for a variety of microprocessors
+      and -controllers. Though it is mainly targeted at embedded processors and
+      single-board computers, you also find CPU families in the target list that
+      are used in workstations and PCs.
+    '';
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+})
+# TODO: cross-compilation support
+# TODO: customize TeX input
+# TODO: report upstream about `mkdir -p .objdir/`
+# TODO: suggest upstream about building docs as an option
diff --git a/nixpkgs/pkgs/development/compilers/asn1c/default.nix b/nixpkgs/pkgs/development/compilers/asn1c/default.nix
new file mode 100644
index 000000000000..bcaab6fae867
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/asn1c/default.nix
@@ -0,0 +1,33 @@
+{ lib, 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 lib; {
+    homepage = "http://lionet.info/asn1c/compiler.html";
+    description = "Open Source ASN.1 Compiler";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.numinit ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/aspectj/builder.sh b/nixpkgs/pkgs/development/compilers/aspectj/builder.sh
new file mode 100755
index 000000000000..31ec97942e52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aspectj/builder.sh
@@ -0,0 +1,28 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+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..ee5528953c41
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aspectj/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl, jre}:
+
+stdenv.mkDerivation rec {
+  pname = "aspectj";
+  version = "1.9.21";
+  builder = ./builder.sh;
+
+  src = let
+    versionSnakeCase = builtins.replaceStrings ["."] ["_"] version;
+  in fetchurl {
+    url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
+    sha256 = "sha256-/cdfEpUrK39ssVualCKWdGhpymIhq7y2oRxYJAENhU0=";
+  };
+
+  inherit jre;
+  buildInputs = [jre];
+
+  meta = {
+    homepage = "https://www.eclipse.org/aspectj/";
+    description = "A seamless aspect-oriented extension to the Java programming language";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    platforms = lib.platforms.unix;
+    license = lib.licenses.epl10;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/assemblyscript/default.nix b/nixpkgs/pkgs/development/compilers/assemblyscript/default.nix
new file mode 100644
index 000000000000..b0fd15d47941
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/assemblyscript/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+}:
+
+buildNpmPackage rec {
+  pname = "assemblyscript";
+  version = "0.27.23";
+
+  src = fetchFromGitHub {
+    owner = "AssemblyScript";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-pKb46AfL5MGKiH1AjyPeHw7ZeLnIiPYmf8b2bOkuRe0=";
+  };
+
+  npmDepsHash = "sha256-io/3T0LE1kupjtMg8rpQlRmIn048X0jqhKKj/W7Ilo0=";
+
+  meta = with lib; {
+    homepage = "https://github.com/AssemblyScript/${pname}";
+    description = "A TypeScript-like language for WebAssembly";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ lucperkins ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/atasm/0000-file-not-found.diff b/nixpkgs/pkgs/development/compilers/atasm/0000-file-not-found.diff
new file mode 100644
index 000000000000..39caaf304174
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/atasm/0000-file-not-found.diff
@@ -0,0 +1,16 @@
+diff -Naur atasm109-old/src/Makefile atasm109-new/src/Makefile
+--- atasm109-old/src/Makefile	2021-09-08 09:53:25.581598063 -0300
++++ atasm109-new/src/Makefile	2021-09-08 09:55:20.366131338 -0300
+@@ -55,9 +55,9 @@
+ 	chown root.root $(DESTDIR)/atasm || true
+ 	chmod 711 $(DESTDIR)/atasm
+ 	mkdir $(DOCDIR) >/dev/null 2>&1 || echo $(DOCDIR) already exists
+-	cp ../atasm.txt $(DOCDIR)
+-	chown root.root $(DOCDIR)/atasm.txt || true
+-	chmod 644 $(DOCDIR)/atasm.txt
++	# cp ../atasm.txt $(DOCDIR)
++	# chown root.root $(DOCDIR)/atasm.txt || true
++	# chmod 644 $(DOCDIR)/atasm.txt
+ 	sed -e 's,%%DOCDIR%%,$(DOCDIR),g' < atasm.1.in > atasm.1
+ 	cp atasm.1 $(MANDIR)
+ 	chown root.root $(MANDIR)/atasm.1 || true
diff --git a/nixpkgs/pkgs/development/compilers/atasm/0001-select-flags.diff b/nixpkgs/pkgs/development/compilers/atasm/0001-select-flags.diff
new file mode 100644
index 000000000000..b8fce38fcf28
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/atasm/0001-select-flags.diff
@@ -0,0 +1,14 @@
+diff -Naur atasm109-old/src/Makefile atasm109-new/src/Makefile
+--- atasm109-old/src/Makefile	2021-09-08 09:53:25.581598063 -0300
++++ atasm109-new/src/Makefile	2021-09-08 09:55:20.366131338 -0300
+@@ -16,8 +16,8 @@
+ UNIX    = -DUNIX
+ 
+ # Compiler flags, if you are using egcs, pgcs, or gcc >2.8.1 use:
+-#CFLAGS  = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH)
+-CFLAGS  = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH)
++CFLAGS  = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH)
++#CFLAGS  = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH)
+ 
+ L       =  $(ZLIB)
+ CC      = gcc
diff --git a/nixpkgs/pkgs/development/compilers/atasm/default.nix b/nixpkgs/pkgs/development/compilers/atasm/default.nix
new file mode 100644
index 000000000000..74f54d8d03cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/atasm/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchurl
+, unzip
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "atasm";
+  version = "1.09";
+
+  src = fetchurl {
+    url = "https://atari.miribilist.com/${pname}/${pname}${builtins.replaceStrings ["."] [""] version}.zip";
+    hash = "sha256-26shhw2r30GZIPz6S1rf6dOLKRpgpLwrqCRZX3+8PvA=";
+  };
+
+  patches = [
+    # make install fails because atasm.txt was moved; report to upstream
+    ./0000-file-not-found.diff
+    # select flags for compilation
+    ./0001-select-flags.diff
+  ];
+
+  dontConfigure = true;
+
+  nativeBuildInputs = [
+    unzip
+  ];
+
+  buildInputs = [
+    zlib
+  ];
+
+  preBuild = ''
+    makeFlagsArray+=(
+      -C ./src
+      CC=cc
+      USEZ="-DZLIB_CAPABLE -I${zlib}/include"
+      ZLIB="-L${zlib}/lib -lz"
+      UNIX="-DUNIX"
+    )
+  '';
+
+  preInstall = ''
+    install -d $out/share/doc/${pname} $out/man/man1
+    installFlagsArray+=(
+      DESTDIR=$out
+      DOCDIR=$out/share/doc/${pname}
+      MANDIR=$out/man/man1
+    )
+  '';
+
+  postInstall = ''
+    mv docs/* $out/share/doc/${pname}
+  '';
+
+  meta = with lib; {
+    homepage = "https://atari.miribilist.com/atasm/";
+    description = "A commandline 6502 assembler compatible with Mac/65";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ats/default.nix b/nixpkgs/pkgs/development/compilers/ats/default.nix
new file mode 100644
index 000000000000..35e1b1dd1058
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats/default.nix
@@ -0,0 +1,25 @@
+{ lib, 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     = lib.licenses.gpl3Plus;
+    # TODO: it looks like ATS requires gcc specifically. Someone with more knowledge
+    # will need to experiment.
+    platforms   = lib.platforms.linux;
+    maintainers = [ 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..f9ba2e1ac417
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats2/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchurl, gmp
+, withEmacsSupport ? true
+, withContrib ? true }:
+
+let
+  versionPkg = "0.4.2";
+
+  contrib = fetchurl {
+    url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz";
+    hash = "sha256-m0hfBLsaNiLaIktcioK+ZtWUsWht3IDSJ6CzgJmS06c=";
+  };
+
+  postInstallContrib = lib.optionalString withContrib
+  ''
+    local contribDir=$out/lib/ats2-postiats-*/ ;
+    mkdir -p $contribDir ;
+    tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
+  '';
+
+  postInstallEmacs = 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";
+    hash = "sha256-UWgDjFojPBYgykrCrJyYvVWY+Gc5d4aRGjTWjc528AM=";
+  };
+
+  postPatch = lib.optionalString stdenv.cc.isClang ''
+    sed -i 's/gcc/clang/g' utils/*/DATS/atscc_util.dats
+  '';
+
+  buildInputs = [ gmp ];
+
+  # Disable parallel build, errors:
+  #  *** No rule to make target 'patscc.dats', needed by 'patscc_dats.c'.  Stop.
+  enableParallelBuilding = false;
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CCOMP=${stdenv.cc.targetPrefix}cc"
+  ];
+
+  setupHook = with 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 lib; {
+    description = "Functional programming language with dependent types";
+    homepage    = "http://www.ats-lang.org";
+    license     = licenses.gpl3Plus;
+    platforms   = platforms.unix;
+    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/august/default.nix b/nixpkgs/pkgs/development/compilers/august/default.nix
new file mode 100644
index 000000000000..4dcb9038f078
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/august/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+}:
+
+rustPlatform.buildRustPackage {
+  pname = "august";
+  version = "unstable-2023-08-13";
+
+  src = fetchFromGitHub {
+    owner = "yoav-lavi";
+    repo = "august";
+    rev = "42b8a1bf5ca079aca1769d92315f70b193a9cd4a";
+    hash = "sha256-58DZMoRH9PBbM4sok/XbUcwSXBeqUAmFZpffdMKQ+dE=";
+  };
+
+  cargoHash = "sha256-/GvBbsSL0dZ0xTystIpb8sk1nNg5hmP4yceCHlh7EQE=";
+
+  postInstall = ''
+    mv $out/bin/{august-cli,ag}
+  '';
+
+  meta = with lib; {
+    description = "An Emmet-like language that produces JSON, TOML, or YAML";
+    homepage = "https://github.com/yoav-lavi/august";
+    license = with licenses; [ asl20 mit ];
+    maintainers = with maintainers; [ figsoda ];
+    mainProgram = "ag";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/avra/default.nix b/nixpkgs/pkgs/development/compilers/avra/default.nix
new file mode 100644
index 000000000000..f3bc33516a3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/avra/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "avra";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "Ro5bert";
+    repo = pname;
+    rev = version;
+    hash = "sha256-joOj89WZ9Si5fcu1w1VHj5fOcnB9N2313Yb29A+nCCY=";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Assembler for the Atmel AVR microcontroller family";
+    homepage = "https://github.com/Ro5bert/avra";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ballerina/default.nix b/nixpkgs/pkgs/development/compilers/ballerina/default.nix
new file mode 100644
index 000000000000..c979b0225298
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ballerina/default.nix
@@ -0,0 +1,45 @@
+{ ballerina, lib, writeText, runCommand, makeWrapper, fetchzip, stdenv, openjdk }:
+let
+  version = "2201.8.4";
+  codeName = "swan-lake";
+in stdenv.mkDerivation {
+  pname = "ballerina";
+  inherit version;
+
+  src = fetchzip {
+    url = "https://dist.ballerina.io/downloads/${version}/ballerina-${version}-${codeName}.zip";
+    hash = "sha256-9+h5tK77ebbob1fOIB98mi9t6QJFB230yJMba6o+yEI=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+    cp -rv distributions/ballerina-${version} $out
+    runHook postInstall
+  '';
+  preFixup = ''
+    wrapProgram $out/bin/bal --set JAVA_HOME ${openjdk}
+  '';
+
+  passthru.tests.smokeTest = let
+    helloWorld = writeText "hello-world.bal" ''
+      import ballerina/io;
+      public function main() {
+        io:println("Hello, World!");
+      }
+    '';
+  in runCommand "ballerina-${version}-smoketest" { } ''
+    ${ballerina}/bin/bal run ${helloWorld} >$out
+    read result <$out
+    [[ $result = "Hello, World!" ]]
+  '';
+
+  meta = with lib; {
+    description = "An open-source programming language for the cloud";
+    license = licenses.asl20;
+    platforms = openjdk.meta.platforms;
+    maintainers = with maintainers; [ eigengrau ];
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bfc/default.nix b/nixpkgs/pkgs/development/compilers/bfc/default.nix
new file mode 100644
index 000000000000..2ebf02b18138
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bfc/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, llvmPackages_13
+, libxml2
+, ncurses
+, zlib
+, stdenv
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "bfc";
+  version = "1.12.0";
+
+  src = fetchFromGitHub {
+    owner = "Wilfred";
+    repo = "bfc";
+    rev = version;
+    hash = "sha256-5pcvwCtXWEexvV3TS62dZ6Opg8ANP2L8B0Z8u/OQENU=";
+  };
+
+  cargoHash = "sha256-1w/jPBO1TZpa0ju+O/NxQ/oMyzIvYVoXpj+ZLcIpQoU=";
+
+  buildInputs = [
+    libxml2
+    ncurses
+    zlib
+  ];
+
+  env = {
+    LLVM_SYS_130_PREFIX = llvmPackages_13.llvm.dev;
+  } // lib.optionalAttrs stdenv.cc.isClang {
+    # Work around https://github.com/NixOS/nixpkgs/issues/166205.
+    NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
+  };
+
+  # process didn't exit successfully: <...> SIGSEGV
+  doCheck = false;
+
+  meta = with lib; {
+    description = "An industrial-grade brainfuck compiler";
+    homepage = "https://bfc.wilfred.me.uk";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ figsoda ];
+    broken = stdenv.isAarch64 && stdenv.isLinux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bigloo/default.nix b/nixpkgs/pkgs/development/compilers/bigloo/default.nix
new file mode 100644
index 000000000000..9bf22ba6dcf2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bigloo/default.nix
@@ -0,0 +1,77 @@
+{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp
+, darwin, libunistring
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bigloo";
+  version = "4.4b";
+
+  src = fetchurl {
+    url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz";
+    sha256 = "sha256-oxOSJwKWmwo7PYAwmeoFrKaYdYvmvQquWXyutolc488=";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.ApplicationServices
+    libunistring
+  ];
+
+  propagatedBuildInputs = [ gmp ];
+
+  preConfigure =
+    # For libuv on darwin
+    lib.optionalString stdenv.isDarwin ''
+      export LIBTOOLIZE=libtoolize
+    '' +
+    # 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";
+
+  # remove forbidden references to $TMPDIR
+  preFixup = lib.optionalString stdenv.isLinux ''
+    for f in "$out"/bin/*; do
+      if isELF "$f"; then
+        patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
+      fi
+    done
+  '';
+
+  meta = {
+    description = "Efficient Scheme compiler";
+    homepage    = "http://www-sop.inria.fr/indes/fp/Bigloo/";
+    license     = lib.licenses.gpl2Plus;
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ thoughtpolice ];
+    broken      = stdenv.isDarwin && stdenv.isAarch64; # segfault during build
+
+    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/default.nix b/nixpkgs/pkgs/development/compilers/binaryen/default.nix
new file mode 100644
index 000000000000..bd59b66f51fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/binaryen/default.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv, cmake, python3, fetchFromGitHub, fetchpatch, emscripten,
+  gtest, lit, nodejs, filecheck
+}:
+
+stdenv.mkDerivation rec {
+  pname = "binaryen";
+  version = "116";
+
+  src = fetchFromGitHub {
+    owner = "WebAssembly";
+    repo = "binaryen";
+    rev = "version_${version}";
+    hash = "sha256-gMwbWiP+YDCVafQMBWhTuJGWmkYtnhEdn/oofKaUT08=";
+  };
+
+  # FIXME: remove for next release
+  patches = [
+    (fetchpatch {
+      name = "nodejs-20.patch";
+      url = "https://github.com/WebAssembly/binaryen/commit/889422e0c92552ff484659f9b41e777ba7ab35c1.patch";
+      hash = "sha256-acM8mytL9nhm4np9tpUbd1X0wJ7y308HV2fvgcAW1lY=";
+    })
+
+    # Fix fmin tests on gcc-13: https://github.com/WebAssembly/binaryen/pull/5994
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/WebAssembly/binaryen/commit/1e17dfb695a19d5d41f1f88411fbcbc5f2408c8f.patch";
+      hash = "sha256-5JZh15CXkg5XdTG8eRJXPwO+zmymYeFjKbHutRPTmlU=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  preConfigure = ''
+    if [ $doCheck -eq 1 ]; then
+      sed -i '/googletest/d' third_party/CMakeLists.txt
+    else
+      cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
+    fi
+  '';
+
+  nativeCheckInputs = [ gtest lit nodejs filecheck ];
+  checkPhase = ''
+    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
+  '';
+
+  tests = [
+    "version" "wasm-opt" "wasm-dis"
+    "crash" "dylink" "ctor-eval"
+    "wasm-metadce" "wasm-reduce" "spec"
+    "lld" "wasm2js" "validator"
+    "example" "unit"
+    # "binaryenjs" "binaryenjs_wasm" # not building this
+    "lit" "gtest"
+  ];
+  doCheck = stdenv.isLinux;
+
+  meta = with 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;
+  };
+
+  passthru.tests = {
+    inherit emscripten;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/blueprint/default.nix b/nixpkgs/pkgs/development/compilers/blueprint/default.nix
new file mode 100644
index 000000000000..856fcaa5d5ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/blueprint/default.nix
@@ -0,0 +1,72 @@
+{ dbus
+, fetchFromGitLab
+, gobject-introspection
+, lib
+, libadwaita
+, meson
+, ninja
+, python3
+, stdenv
+, testers
+, xvfb-run
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "blueprint-compiler";
+  version = "0.10.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "jwestman";
+    repo = "blueprint-compiler";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-pPrQc2ID84N+50j/A6VAJAOK+D1hjaokhFckOnOaeTw=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+  ];
+
+  buildInputs = [
+    libadwaita
+    (python3.withPackages (ps: with ps; [
+      pygobject3
+    ]))
+  ];
+
+  propagatedBuildInputs = [
+    # For setup hook, so that the compiler can find typelib files
+    gobject-introspection
+  ];
+
+  nativeCheckInputs = [
+    dbus
+    xvfb-run
+  ];
+
+  # requires xvfb-run
+  doCheck = !stdenv.isDarwin
+  && false;  # tests time out
+
+  checkPhase = ''
+    runHook preCheck
+
+    xvfb-run dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      meson test --no-rebuild --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A markup language for GTK user interface files";
+    homepage = "https://gitlab.gnome.org/jwestman/blueprint-compiler";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ benediktbroich ranfdev ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/bluespec/default.nix b/nixpkgs/pkgs/development/compilers/bluespec/default.nix
new file mode 100644
index 000000000000..6776ad1ee673
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bluespec/default.nix
@@ -0,0 +1,133 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchurl
+, autoconf
+, automake
+, fontconfig
+, libX11
+, perl
+, flex
+, bison
+, pkg-config
+, tcl
+, tk
+, xorg
+, yices
+, zlib
+, ghc
+, gmp-static
+, verilog
+, asciidoctor
+, texliveFull
+, which
+}:
+
+let
+  ghcWithPackages = ghc.withPackages (g: (with g; [ old-time regex-compat syb split ]));
+
+in stdenv.mkDerivation rec {
+  pname = "bluespec";
+  version = "2023.01";
+
+  src = fetchFromGitHub {
+    owner = "B-Lang-org";
+    repo = "bsc";
+    rev = version;
+    sha256 = "sha256-kFHQtRaQmZiHo+IQ+mwbW23i3kbdAh/XH0OE7P/ibd0=";
+  };
+
+  yices-src = fetchurl {
+    url = "https://github.com/B-Lang-org/bsc/releases/download/${version}/yices-src-for-bsc-${version}.tar.gz";
+    sha256 = "sha256-pyEdCJvmgwOYPMZEtw7aro76tSn/Y/2GcKTyARmIh4E=";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  # https://github.com/B-Lang-org/bsc/pull/278
+  patches = [ ./libstp_stub_makefile.patch ];
+
+  postUnpack = ''
+    tar -C $sourceRoot/ -xf ${yices-src}
+    chmod -R +rwX $sourceRoot/src/vendor/yices/v2.6/yices2
+  '';
+
+  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'
+
+    # allow running bsc to bootstrap
+    export LD_LIBRARY_PATH=$PWD/inst/lib/SAT
+  '';
+
+  buildInputs = yices.buildInputs ++ [
+    fontconfig
+    libX11 # tcltk
+    tcl
+    tk
+    which
+    xorg.libXft
+    zlib
+  ];
+
+  nativeBuildInputs = [
+    automake
+    autoconf
+    asciidoctor
+    bison
+    flex
+    ghcWithPackages
+    perl
+    pkg-config
+    texliveFull
+  ];
+
+  makeFlags = [
+    "release"
+    "NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices-src instead of the subrepo)
+    "NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12
+    "LDCONFIG=ldconfig" # https://github.com/B-Lang-org/bsc/pull/43
+    "STP_STUB=1"
+  ];
+
+  doCheck = true;
+
+  nativeCheckInputs = [
+    gmp-static
+    verilog
+  ];
+
+  checkTarget = "check-smoke";
+
+  installPhase = ''
+    mkdir -p $out
+    mv inst/bin $out
+    mv inst/lib $out
+
+    # fragile, I know..
+    mkdir -p $doc/share/doc/bsc
+    mv inst/README $doc/share/doc/bsc
+    mv inst/ReleaseNotes.* $doc/share/doc/bsc
+    mv inst/doc/*.pdf $doc/share/doc/bsc
+  '';
+
+  meta = {
+    description = "Toolchain for the Bluespec Hardware Definition Language";
+    homepage = "https://github.com/B-Lang-org/bsc";
+    license = lib.licenses.bsd3;
+    platforms = [ "x86_64-linux" ];
+    mainProgram = "bsc";
+    # 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 lib.maintainers; [ jcumming thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bluespec/libstp_stub_makefile.patch b/nixpkgs/pkgs/development/compilers/bluespec/libstp_stub_makefile.patch
new file mode 100644
index 000000000000..c714afc670c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bluespec/libstp_stub_makefile.patch
@@ -0,0 +1,28 @@
+diff -ru bsc-orig/src/vendor/stp/Makefile bsc-new/src/vendor/stp/Makefile
+--- bsc-orig/src/vendor/stp/Makefile	1969-12-31 16:00:01.000000000 -0800
++++ bsc-new/src/vendor/stp/Makefile	2020-11-12 17:42:40.115143035 -0800
+@@ -9,12 +9,13 @@
+ SRC = src
+ else
+ SRC = src_stub
++SNAME += lib/libstp_stub.so
+ endif
+ 
+ ifeq ($(OSTYPE), Darwin)
+-SNAME=libstp.dylib
++SNAME = lib/libstp.dylib
+ else
+-SNAME=libstp.so.1
++SNAME += lib/libstp.so.1
+ endif
+ 
+ all: install
+@@ -23,7 +24,7 @@
+ 	$(MAKE) -C $(SRC) install
+ 	ln -fsn HaskellIfc include_hs
+ 	install -m 755 -d $(PREFIX)/lib/SAT
+-	install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
++	install -m 644 $(SNAME) $(PREFIX)/lib/SAT
+ 
+ clean:
+ 	$(MAKE) -C $(SRC) clean
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..c73bb72b9d0f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/build-bs-platform.nix
@@ -0,0 +1,65 @@
+# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
+# to make potential future updates simpler
+
+{ lib, stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
+  ocaml-version, version, src,
+  patches ? [],
+  ocaml ? (import ./ocaml.nix {
+    version = ocaml-version;
+    inherit lib 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 patches;
+  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 ];
+
+  prePatch = ''
+    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
+    npm run postinstall
+  '';
+
+  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..ea56b85dec9e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
+let
+  build-bs-platform = import ./build-bs-platform.nix;
+in
+(build-bs-platform rec {
+  inherit lib stdenv runCommand fetchFromGitHub ninja nodejs python3;
+  version = "8.2.0";
+  ocaml-version = "4.06.1";
+
+  patches = [ ./jscomp-release-ninja.patch ];
+
+  src = fetchFromGitHub {
+    owner = "BuckleScript";
+    repo = "bucklescript";
+    rev = version;
+    sha256 = "1hql7sxps1k17zmwyha6idq6nw20abpq770l55ry722birclmsmf";
+    fetchSubmodules = true;
+  };
+}).overrideAttrs (attrs: {
+  meta = with 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 ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch b/nixpkgs/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch
new file mode 100644
index 000000000000..96235f921317
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch
@@ -0,0 +1,16 @@
+ jscomp/others/release.ninja | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jscomp/others/release.ninja b/jscomp/others/release.ninja
+index 9ea6d11c5..a91ed9c80 100644
+--- a/jscomp/others/release.ninja
++++ b/jscomp/others/release.ninja
+@@ -30,7 +30,7 @@ build others/js_json.cmj : cc_cmi others/js_json.ml | others/js_array2.cmj other
+ build others/js_json.cmi : cc others/js_json.mli | others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi runtime
+ build others/js_list.cmj : cc_cmi others/js_list.ml | others/js_array2.cmj others/js_list.cmi others/js_vector.cmj runtime
+ build others/js_list.cmi : cc others/js_list.mli | others/js_vector.cmi runtime
+-build others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/js_mapperRt.cmi runtime
++build others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/js_array2.cmj others/js_mapperRt.cmi runtime
+ build others/js_mapperRt.cmi : cc others/js_mapperRt.mli | runtime
+ build others/js_math.cmi others/js_math.cmj : cc others/js_math.ml | others/js_int.cmj runtime
+ build others/js_null.cmj : cc_cmi others/js_null.ml | others/js_exn.cmj others/js_null.cmi runtime
\ No newline at end of file
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..206a3aff61cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/ocaml.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, src, version }:
+stdenv.mkDerivation rec {
+  inherit src version;
+  pname = "ocaml-bs";
+  configurePhase = ''
+    ./configure -prefix $out
+  '';
+
+  # Workaround ocaml-4.06 limitation of duplicate definitions.
+  #   ld: libcamlrun.a(minor_gc.o):/build/ocaml/byterun/caml/major_gc.h:67: multiple definition of
+  #     `caml_major_ring'; libcamlrun.a(stacks.o):/build/ocaml/byterun/caml/major_gc.h:67: first defined here
+  # Match -fcommon workaround in ocaml-4.06 itself.
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  buildPhase = ''
+    make -j9 world.opt
+  '';
+
+  meta = with 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..947a154a3d3c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bupc/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, perl, coreutils }:
+
+stdenv.mkDerivation rec {
+  pname = "berkeley_upc";
+  version = "2020.12.0";
+
+  src = fetchurl {
+    url = "http://upc.lbl.gov/download/release/berkeley_upc-${version}.tar.gz";
+    sha256 = "sha256-JdpFORlXHpCQE+TivoQQnjQlxQN7C8BNfHvTOSwXbYQ=";
+  };
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  # Used during the configure phase
+  ENVCMD = "${coreutils}/bin/env";
+
+  buildInputs = [ perl ];
+
+  meta = with 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 = platforms.linux;
+    maintainers = with maintainers; [ zimbatm ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/c0/default.nix b/nixpkgs/pkgs/development/compilers/c0/default.nix
new file mode 100644
index 000000000000..179326cfeb83
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/c0/default.nix
@@ -0,0 +1,85 @@
+{ lib
+, stdenv
+, fetchFromBitbucket
+, mlton
+, pkg-config
+, getopt
+, boehmgc
+, darwin
+, libbacktrace
+, libpng
+, ncurses
+, readline
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "c0";
+  version = "unstable-2023-09-05";
+
+  src = fetchFromBitbucket {
+    owner = "c0-lang";
+    repo = "c0";
+    rev = "608f97eef5d81bb85963d66f955730dd93996f67";
+    hash = "sha256-lRIEtclx+NKxAO72nsvnxVeEGCEe6glC6w8MXh1HEwY=";
+  };
+
+  patches = [
+    ./use-system-libraries.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace cc0/Makefile \
+      --replace '$(shell ./get_version.sh)' '${version}'
+    substituteInPlace cc0/compiler/bin/buildid \
+      --replace '`../get_version.sh`' '${version}' \
+      --replace '`date`' '1970-01-01T00:00:00Z' \
+      --replace '`hostname`' 'nixpkgs'
+  '' + lib.optionalString stdenv.isDarwin ''
+    for f in cc0/compiler/bin/coin-o0-support cc0/compiler/bin/cc0-o0-support; do
+      substituteInPlace $f --replace '$(brew --prefix gnu-getopt)' '${getopt}'
+    done
+  '';
+
+  preConfigure = ''
+    cd cc0/
+  '';
+
+  nativeBuildInputs = [
+    getopt
+    mlton
+    pkg-config
+  ] ++ lib.optionals stdenv.isDarwin [ darwin.sigtool ];
+
+  buildInputs = [
+    boehmgc
+    libbacktrace
+    libpng
+    ncurses
+    readline
+  ];
+
+  strictDeps = true;
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  postInstall = ''
+    mkdir -p $out/share/emacs/site-lisp
+    mv $out/c0-mode/ $out/share/emacs/site-lisp/
+  '';
+
+  passthru.updateScript = unstableGitUpdater {
+    url = "https://bitbucket.org/c0-lang/c0.git";
+  };
+
+  meta = with lib; {
+    description = "A small safe subset of the C programming language, augmented with contracts";
+    homepage = "https://c0.cs.cmu.edu/";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.unix;
+    # line 1: ../../bin/wrappergen: cannot execute: required file not found
+    # make[2]: *** [../../lib.mk:83:
+    broken = stdenv.isLinux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/c0/use-system-libraries.patch b/nixpkgs/pkgs/development/compilers/c0/use-system-libraries.patch
new file mode 100644
index 000000000000..cc15ef368f33
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/c0/use-system-libraries.patch
@@ -0,0 +1,53 @@
+Use system libraries
+
+--- a/cc0/Makefile
++++ b/cc0/Makefile
+@@ -22,12 +22,12 @@ MLTON_BASIC = mlton $(MLTON_FLAGS) -verbose $(MLTON_VERB)  -output
+ MLTON_NATIVE := mlton -default-ann "redundantMatch error" -default-ann "sequenceNonUnit error"
+ MLTON_NATIVE += -link-opt "-lpthread -ldl -rdynamic" -cc-opt "-Iinclude" -default-ann "allowFFI true"
+ MLTON_NATIVE += -cc-opt "-I../externals/"
+-MLTON_NATIVE += -link-opt "../externals/readline/libreadline.a ../externals/readline/libhistory.a"
++MLTON_NATIVE += -link-opt "$(shell pkg-config readline --libs)"
+ MLTON_NATIVE += -link-opt "$(shell pkg-config libpng --libs)"
+ 
+ # libreadline dependencies
+ ifeq ($(PLATFORM),osx)
+-MLTON_NATIVE += -link-opt "-ltermcap"
++MLTON_NATIVE += -link-opt "-lncurses"
+ else
+ # (Assuming Linux)
+ MLTON_NATIVE += -link-opt "-ltinfo"
+@@ -122,9 +122,9 @@ endef
+ 
+ $(foreach rt,$(RUNTIMES),$(eval $(call runtime_template,$(rt))))
+ 
+-c0rt/$(call dllname,c0rt): gc libbacktrace
++c0rt/$(call dllname,c0rt):
+ 
+-unsafe/$(call dllname,unsafe): gc
++unsafe/$(call dllname,unsafe):
+ 
+ 
+ ### cc0 - the C0 compiler
+@@ -222,7 +222,6 @@ NATIVE_COIN    = $(NATIVE_CYMBOL) $(NATIVE_CALLING)
+ NATIVE_COIN += coin/c0readline.c
+ 
+ COIN_DEPS = $(CC0_DEPS) $(NATIVE_COIN) cymbol/cymbol*.cm cymbol/*.sml cymbol/*.mlb coin/coin*.cm coin/*.sml coin/*.sml
+-COIN_DEPS += readline
+ 
+ .PHONY: coin
+ coin: bin/coin
+--- a/cc0/lib.mk
++++ b/cc0/lib.mk
+@@ -15,9 +15,9 @@ TARGET = $(call dllname,$(LIBNAME))
+ endif
+ 
+ # These libs are handled specially by this file
+-NATIVELIBS = gc ncurses backtrace
++NATIVELIBS =
+ C0LIBS = $(filter-out $(NATIVELIBS),$(REQUIRES))
+-LIBS = -L$(abspath $(DEPTH)/lib) $(patsubst %,$(DEPTH)/lib/$(call dllname,%),$(C0LIBS))
++LIBS = -L$(abspath $(DEPTH)/lib)
+ LDFLAGS = 
+ 
+ # -fPIC is not supported on Windows and is not necessary there because we link statically
diff --git a/nixpkgs/pkgs/development/compilers/c3c/default.nix b/nixpkgs/pkgs/development/compilers/c3c/default.nix
new file mode 100644
index 000000000000..b68ffc045f64
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/c3c/default.nix
@@ -0,0 +1,47 @@
+{ llvmPackages
+, lib
+, fetchFromGitHub
+, cmake
+, python3
+}:
+
+llvmPackages.stdenv.mkDerivation rec {
+  pname = "c3c";
+  version = "unstable-2021-07-30";
+
+  src = fetchFromGitHub {
+    owner = "c3lang";
+    repo = pname;
+    rev = "2246b641b16e581aec9059c8358858e10a548d94";
+    sha256 = "VdMKdQsedDQCnsmTxO4HnBj5GH/EThspnotvrAscSqE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    llvmPackages.llvm
+    llvmPackages.lld
+  ];
+
+  nativeCheckInputs = [ python3 ];
+
+  doCheck = true;
+
+  checkPhase = ''
+    ( cd ../resources/testproject; ../../build/c3c build )
+    ( cd ../test; python src/tester.py ../build/c3c test_suite )
+  '';
+
+  installPhase = ''
+    install -Dm755 c3c $out/bin/c3c
+    cp -r lib $out
+  '';
+
+  meta = with lib; {
+    description = "Compiler for the C3 language";
+    homepage = "https://github.com/c3lang/c3c";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ luc65r ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/cairo/default.nix b/nixpkgs/pkgs/development/compilers/cairo/default.nix
new file mode 100644
index 000000000000..0e7283e52caa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cairo/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, rustfmt
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "cairo";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "starkware-libs";
+    repo = "cairo";
+    rev = "v${version}";
+    hash = "sha256-5bCPklk9u21/9cZYisszK0Lo7is9+iFrQxve41Fy5hg=";
+  };
+
+  cargoPatches = [
+    # Upstream Cargo.lock is not up-to-date.
+    # https://github.com/starkware-libs/cairo/issues/4530
+    ./ensure-consistency-of-cargo-lock.patch
+  ];
+  cargoHash = "sha256-YCW6nwmUXMiP65QHCH6k29672gIkuz+MCmTqI+qaOyA=";
+
+  nativeCheckInputs = [
+    rustfmt
+  ];
+
+  checkFlags = [
+    # Requires a mythical rustfmt 2.0 or a nightly compiler
+    "--skip=golden_test::sourcegen_ast"
+  ];
+
+  postInstall = ''
+    # The core library is needed for compilation.
+    cp -r corelib $out/
+  '';
+
+  meta = with lib; {
+    description = "Turing-complete language for creating provable programs for general computation";
+    homepage = "https://github.com/starkware-libs/cairo";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ raitobezarius ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/cairo/ensure-consistency-of-cargo-lock.patch b/nixpkgs/pkgs/development/compilers/cairo/ensure-consistency-of-cargo-lock.patch
new file mode 100644
index 000000000000..c2c9a7ed7be3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cairo/ensure-consistency-of-cargo-lock.patch
@@ -0,0 +1,1165 @@
+From c99824dd005062d1df8c6df79a36dc4e368159f3 Mon Sep 17 00:00:00 2001
+From: Raito Bezarius <masterancpp@gmail.com>
+Date: Fri, 8 Dec 2023 23:32:20 +0100
+Subject: [PATCH] packaging: ensure consistency of Cargo.lock with Cargo.toml
+
+2.4.0 failed to generate a consistent Cargo.lock, which made impossible
+offline installs of Cairo 2.4.0.
+---
+ Cargo.lock | 384 +++++++++++++++++++++++++++++++----------------------
+ 1 file changed, 223 insertions(+), 161 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 17d139184..67c438c18 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -57,9 +57,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
+ 
+ [[package]]
+ name = "anstream"
+-version = "0.6.4"
++version = "0.6.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
++checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6"
+ dependencies = [
+  "anstyle",
+  "anstyle-parse",
+@@ -77,30 +77,30 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
+ 
+ [[package]]
+ name = "anstyle-parse"
+-version = "0.2.2"
++version = "0.2.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"
++checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
+ dependencies = [
+  "utf8parse",
+ ]
+ 
+ [[package]]
+ name = "anstyle-query"
+-version = "1.0.0"
++version = "1.0.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
++checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
+ dependencies = [
+- "windows-sys 0.48.0",
++ "windows-sys 0.52.0",
+ ]
+ 
+ [[package]]
+ name = "anstyle-wincon"
+-version = "3.0.1"
++version = "3.0.2"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
++checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
+ dependencies = [
+  "anstyle",
+- "windows-sys 0.48.0",
++ "windows-sys 0.52.0",
+ ]
+ 
+ [[package]]
+@@ -395,7 +395,7 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+ 
+ [[package]]
+ name = "cairo-compile"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-compiler",
+@@ -419,7 +419,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-format"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-formatter",
+@@ -432,7 +432,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-casm"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-utils",
+  "env_logger",
+@@ -452,7 +452,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-compiler"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-defs",
+@@ -473,7 +473,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-debug"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-proc-macros",
+  "cairo-lang-utils",
+@@ -484,7 +484,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-defs"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-diagnostics",
+@@ -504,7 +504,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-diagnostics"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-filesystem",
+@@ -518,7 +518,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-eq-solver"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-utils",
+  "env_logger",
+@@ -528,7 +528,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-filesystem"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-utils",
+@@ -543,7 +543,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-formatter"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-diagnostics",
+@@ -563,7 +563,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-language-server"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-compiler",
+@@ -591,7 +591,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-lowering"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-defs",
+@@ -621,7 +621,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-parser"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-diagnostics",
+  "cairo-lang-filesystem",
+@@ -643,7 +643,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-plugins"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-defs",
+@@ -665,7 +665,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-proc-macros"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "quote",
+@@ -674,7 +674,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-project"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-filesystem",
+  "cairo-lang-utils",
+@@ -687,7 +687,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-runner"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "ark-ff",
+  "ark-secp256k1",
+@@ -714,7 +714,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-semantic"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-defs",
+@@ -742,7 +742,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-sierra"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "bimap",
+@@ -772,7 +772,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-sierra-ap-change"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-eq-solver",
+  "cairo-lang-sierra",
+@@ -785,7 +785,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-sierra-gas"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-eq-solver",
+  "cairo-lang-sierra",
+@@ -803,7 +803,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-sierra-generator"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-defs",
+@@ -833,7 +833,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-sierra-to-casm"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "assert_matches",
+  "cairo-felt",
+@@ -856,7 +856,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-sierra-type-size"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-sierra",
+  "cairo-lang-utils",
+@@ -864,7 +864,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-starknet"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-felt",
+@@ -905,7 +905,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-syntax"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-debug",
+  "cairo-lang-filesystem",
+@@ -922,7 +922,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-syntax-codegen"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "env_logger",
+  "genco",
+@@ -932,7 +932,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-test-plugin"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-felt",
+@@ -957,7 +957,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-test-runner"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-felt",
+@@ -978,7 +978,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-test-utils"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-utils",
+  "colored",
+@@ -990,7 +990,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-lang-utils"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "env_logger",
+  "indexmap 2.1.0",
+@@ -1009,7 +1009,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-language-server"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-language-server",
+  "cairo-lang-utils",
+@@ -1019,7 +1019,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-run"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-compiler",
+@@ -1032,7 +1032,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "cairo-test"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-compiler",
+@@ -1051,7 +1051,7 @@ dependencies = [
+  "bitvec",
+  "cairo-felt",
+  "generic-array",
+- "hashbrown 0.14.2",
++ "hashbrown 0.14.3",
+  "hex",
+  "keccak",
+  "lazy_static",
+@@ -1081,9 +1081,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "cc"
+-version = "1.0.84"
++version = "1.0.83"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856"
++checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+ dependencies = [
+  "libc",
+ ]
+@@ -1096,9 +1096,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+ 
+ [[package]]
+ name = "clap"
+-version = "4.4.8"
++version = "4.4.11"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
++checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2"
+ dependencies = [
+  "clap_builder",
+  "clap_derive",
+@@ -1106,9 +1106,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "clap_builder"
+-version = "4.4.8"
++version = "4.4.11"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
++checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb"
+ dependencies = [
+  "anstream",
+  "anstyle",
+@@ -1249,9 +1249,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+ 
+ [[package]]
+ name = "crypto-bigint"
+-version = "0.5.3"
++version = "0.5.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124"
++checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
+ dependencies = [
+  "generic-array",
+  "subtle",
+@@ -1275,7 +1275,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
+ dependencies = [
+  "cfg-if",
+- "hashbrown 0.14.2",
++ "hashbrown 0.14.3",
+  "lock_api",
+  "once_cell",
+  "parking_lot_core 0.9.9",
+@@ -1283,9 +1283,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "deranged"
+-version = "0.3.9"
++version = "0.3.10"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
++checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc"
+ dependencies = [
+  "powerfmt",
+ ]
+@@ -1396,12 +1396,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+ 
+ [[package]]
+ name = "errno"
+-version = "0.3.6"
++version = "0.3.8"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e"
++checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+ dependencies = [
+  "libc",
+- "windows-sys 0.48.0",
++ "windows-sys 0.52.0",
+ ]
+ 
+ [[package]]
+@@ -1418,9 +1418,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+ 
+ [[package]]
+ name = "form_urlencoded"
+-version = "1.2.0"
++version = "1.2.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
++checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+ dependencies = [
+  "percent-encoding",
+ ]
+@@ -1550,7 +1550,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "generate-syntax"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "cairo-lang-syntax-codegen",
+  "cairo-lang-utils",
+@@ -1582,9 +1582,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "gimli"
+-version = "0.28.0"
++version = "0.28.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
++checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+ 
+ [[package]]
+ name = "glob"
+@@ -1594,15 +1594,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+ 
+ [[package]]
+ name = "globset"
+-version = "0.4.13"
++version = "0.4.14"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d"
++checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1"
+ dependencies = [
+  "aho-corasick",
+  "bstr",
+- "fnv",
+  "log",
+- "regex",
++ "regex-automata",
++ "regex-syntax 0.8.2",
+ ]
+ 
+ [[package]]
+@@ -1635,9 +1635,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "hashbrown"
+-version = "0.14.2"
++version = "0.14.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
++checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+ dependencies = [
+  "ahash 0.8.6",
+  "allocator-api2",
+@@ -1700,9 +1700,9 @@ checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
+ 
+ [[package]]
+ name = "idna"
+-version = "0.4.0"
++version = "0.5.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
++checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+ dependencies = [
+  "unicode-bidi",
+  "unicode-normalization",
+@@ -1710,17 +1710,16 @@ dependencies = [
+ 
+ [[package]]
+ name = "ignore"
+-version = "0.4.20"
++version = "0.4.21"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492"
++checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060"
+ dependencies = [
++ "crossbeam-deque",
+  "globset",
+- "lazy_static",
+  "log",
+  "memchr",
+- "regex",
++ "regex-automata",
+  "same-file",
+- "thread_local",
+  "walkdir",
+  "winapi-util",
+ ]
+@@ -1760,7 +1759,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
+ dependencies = [
+  "equivalent",
+- "hashbrown 0.14.2",
++ "hashbrown 0.14.3",
+  "serde",
+ ]
+ 
+@@ -1829,9 +1828,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+ 
+ [[package]]
+ name = "js-sys"
+-version = "0.3.65"
++version = "0.3.66"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8"
++checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca"
+ dependencies = [
+  "wasm-bindgen",
+ ]
+@@ -1915,9 +1914,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "linux-raw-sys"
+-version = "0.4.11"
++version = "0.4.12"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
++checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
+ 
+ [[package]]
+ name = "lock_api"
+@@ -2017,9 +2016,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "mio"
+-version = "0.8.9"
++version = "0.8.10"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
++checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
+ dependencies = [
+  "libc",
+  "wasi",
+@@ -2179,9 +2178,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "once_cell"
+-version = "1.18.0"
++version = "1.19.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
++checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+ 
+ [[package]]
+ name = "oorandom"
+@@ -2197,9 +2196,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+ 
+ [[package]]
+ name = "parity-scale-codec"
+-version = "3.6.5"
++version = "3.6.9"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb"
++checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe"
+ dependencies = [
+  "arrayvec",
+  "bitvec",
+@@ -2210,9 +2209,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "parity-scale-codec-derive"
+-version = "3.6.5"
++version = "3.6.9"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260"
++checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b"
+ dependencies = [
+  "proc-macro-crate",
+  "proc-macro2",
+@@ -2282,9 +2281,9 @@ checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef"
+ 
+ [[package]]
+ name = "percent-encoding"
+-version = "2.3.0"
++version = "2.3.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
++checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+ 
+ [[package]]
+ name = "petgraph"
+@@ -2345,9 +2344,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+ 
+ [[package]]
+ name = "portable-atomic"
+-version = "1.5.1"
++version = "1.6.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b"
++checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
+ 
+ [[package]]
+ name = "powerfmt"
+@@ -2379,12 +2378,11 @@ dependencies = [
+ 
+ [[package]]
+ name = "proc-macro-crate"
+-version = "1.3.1"
++version = "2.0.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
++checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
+ dependencies = [
+- "once_cell",
+- "toml_edit 0.19.15",
++ "toml_edit 0.20.7",
+ ]
+ 
+ [[package]]
+@@ -2413,9 +2411,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "proc-macro2"
+-version = "1.0.69"
++version = "1.0.70"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
++checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b"
+ dependencies = [
+  "unicode-ident",
+ ]
+@@ -2623,15 +2621,15 @@ dependencies = [
+ 
+ [[package]]
+ name = "rustix"
+-version = "0.38.21"
++version = "0.38.27"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3"
++checksum = "bfeae074e687625746172d639330f1de242a178bf3189b51e35a7a21573513ac"
+ dependencies = [
+  "bitflags 2.4.1",
+  "errno",
+  "libc",
+  "linux-raw-sys",
+- "windows-sys 0.48.0",
++ "windows-sys 0.52.0",
+ ]
+ 
+ [[package]]
+@@ -2739,18 +2737,18 @@ dependencies = [
+ 
+ [[package]]
+ name = "serde"
+-version = "1.0.192"
++version = "1.0.193"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
++checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
+ dependencies = [
+  "serde_derive",
+ ]
+ 
+ [[package]]
+ name = "serde_derive"
+-version = "1.0.192"
++version = "1.0.193"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
++checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
+ dependencies = [
+  "proc-macro2",
+  "quote",
+@@ -2822,7 +2820,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "sierra-compile"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-sierra",
+@@ -2901,7 +2899,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "starknet-compile"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-compiler",
+@@ -2992,7 +2990,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "starknet-sierra-compile"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-sierra",
+@@ -3005,7 +3003,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "starknet-sierra-extract-code"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-starknet",
+@@ -3015,7 +3013,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "starknet-sierra-upgrade-validate"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "anyhow",
+  "cairo-lang-starknet",
+@@ -3093,30 +3091,29 @@ dependencies = [
+ 
+ [[package]]
+ name = "termcolor"
+-version = "1.3.0"
++version = "1.4.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
++checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449"
+ dependencies = [
+  "winapi-util",
+ ]
+ 
+ [[package]]
+ name = "test-case"
+-version = "3.2.1"
++version = "3.3.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "c8f1e820b7f1d95a0cdbf97a5df9de10e1be731983ab943e56703ac1b8e9d425"
++checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8"
+ dependencies = [
+  "test-case-macros",
+ ]
+ 
+ [[package]]
+ name = "test-case-core"
+-version = "3.2.1"
++version = "3.3.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "54c25e2cb8f5fcd7318157634e8838aa6f7e4715c96637f969fabaccd1ef5462"
++checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f"
+ dependencies = [
+  "cfg-if",
+- "proc-macro-error",
+  "proc-macro2",
+  "quote",
+  "syn 2.0.39",
+@@ -3124,11 +3121,10 @@ dependencies = [
+ 
+ [[package]]
+ name = "test-case-macros"
+-version = "3.2.1"
++version = "3.3.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "37cfd7bbc88a0104e304229fba519bdc45501a30b760fb72240342f1289ad257"
++checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"
+ dependencies = [
+- "proc-macro-error",
+  "proc-macro2",
+  "quote",
+  "syn 2.0.39",
+@@ -3137,9 +3133,19 @@ dependencies = [
+ 
+ [[package]]
+ name = "test-log"
+-version = "0.2.13"
++version = "0.2.14"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "f66edd6b6cd810743c0c71e1d085e92b01ce6a72782032e3f794c8284fe4bcdd"
++checksum = "6159ab4116165c99fc88cce31f99fa2c9dbe08d3691cb38da02fc3b45f357d2b"
++dependencies = [
++ "env_logger",
++ "test-log-macros",
++]
++
++[[package]]
++name = "test-log-macros"
++version = "0.2.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7ba277e77219e9eea169e8508942db1bf5d8a41ff2db9b20aab5a5aadc9fa25d"
+ dependencies = [
+  "proc-macro2",
+  "quote",
+@@ -3148,7 +3154,7 @@ dependencies = [
+ 
+ [[package]]
+ name = "tests"
+-version = "2.4.0-rc5"
++version = "2.4.0"
+ dependencies = [
+  "assert_matches",
+  "cairo-felt",
+@@ -3220,16 +3226,6 @@ dependencies = [
+  "thiserror-impl-no-std",
+ ]
+ 
+-[[package]]
+-name = "thread_local"
+-version = "1.1.7"
+-source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+-dependencies = [
+- "cfg-if",
+- "once_cell",
+-]
+-
+ [[package]]
+ name = "time"
+ version = "0.3.30"
+@@ -3352,9 +3348,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "toml_edit"
+-version = "0.19.15"
++version = "0.20.7"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
++checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
+ dependencies = [
+  "indexmap 2.1.0",
+  "toml_datetime",
+@@ -3473,18 +3469,18 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+ 
+ [[package]]
+ name = "unescaper"
+-version = "0.1.2"
++version = "0.1.3"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "a96a44ae11e25afb520af4534fd7b0bd8cd613e35a78def813b8cf41631fa3c8"
++checksum = "d8f0f68e58d297ba8b22b8b5a96a87b863ba6bb46aaf51e19a4b02c5a6dd5b7f"
+ dependencies = [
+  "thiserror",
+ ]
+ 
+ [[package]]
+ name = "unicode-bidi"
+-version = "0.3.13"
++version = "0.3.14"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
++checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416"
+ 
+ [[package]]
+ name = "unicode-ident"
+@@ -3521,9 +3517,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+ 
+ [[package]]
+ name = "url"
+-version = "2.4.1"
++version = "2.5.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
++checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
+ dependencies = [
+  "form_urlencoded",
+  "idna",
+@@ -3561,9 +3557,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+ 
+ [[package]]
+ name = "wasm-bindgen"
+-version = "0.2.88"
++version = "0.2.89"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce"
++checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e"
+ dependencies = [
+  "cfg-if",
+  "wasm-bindgen-macro",
+@@ -3571,9 +3567,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "wasm-bindgen-backend"
+-version = "0.2.88"
++version = "0.2.89"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217"
++checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826"
+ dependencies = [
+  "bumpalo",
+  "log",
+@@ -3586,9 +3582,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "wasm-bindgen-macro"
+-version = "0.2.88"
++version = "0.2.89"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2"
++checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2"
+ dependencies = [
+  "quote",
+  "wasm-bindgen-macro-support",
+@@ -3596,9 +3592,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "wasm-bindgen-macro-support"
+-version = "0.2.88"
++version = "0.2.89"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907"
++checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
+ dependencies = [
+  "proc-macro2",
+  "quote",
+@@ -3609,9 +3605,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "wasm-bindgen-shared"
+-version = "0.2.88"
++version = "0.2.89"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b"
++checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f"
+ 
+ [[package]]
+ name = "winapi"
+@@ -3662,6 +3658,15 @@ dependencies = [
+  "windows-targets 0.48.5",
+ ]
+ 
++[[package]]
++name = "windows-sys"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
++dependencies = [
++ "windows-targets 0.52.0",
++]
++
+ [[package]]
+ name = "windows-targets"
+ version = "0.42.2"
+@@ -3692,6 +3697,21 @@ dependencies = [
+  "windows_x86_64_msvc 0.48.5",
+ ]
+ 
++[[package]]
++name = "windows-targets"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
++dependencies = [
++ "windows_aarch64_gnullvm 0.52.0",
++ "windows_aarch64_msvc 0.52.0",
++ "windows_i686_gnu 0.52.0",
++ "windows_i686_msvc 0.52.0",
++ "windows_x86_64_gnu 0.52.0",
++ "windows_x86_64_gnullvm 0.52.0",
++ "windows_x86_64_msvc 0.52.0",
++]
++
+ [[package]]
+ name = "windows_aarch64_gnullvm"
+ version = "0.42.2"
+@@ -3704,6 +3724,12 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+ 
++[[package]]
++name = "windows_aarch64_gnullvm"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
++
+ [[package]]
+ name = "windows_aarch64_msvc"
+ version = "0.42.2"
+@@ -3716,6 +3742,12 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+ 
++[[package]]
++name = "windows_aarch64_msvc"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
++
+ [[package]]
+ name = "windows_i686_gnu"
+ version = "0.42.2"
+@@ -3728,6 +3760,12 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+ 
++[[package]]
++name = "windows_i686_gnu"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
++
+ [[package]]
+ name = "windows_i686_msvc"
+ version = "0.42.2"
+@@ -3740,6 +3778,12 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+ 
++[[package]]
++name = "windows_i686_msvc"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
++
+ [[package]]
+ name = "windows_x86_64_gnu"
+ version = "0.42.2"
+@@ -3752,6 +3796,12 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+ 
++[[package]]
++name = "windows_x86_64_gnu"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
++
+ [[package]]
+ name = "windows_x86_64_gnullvm"
+ version = "0.42.2"
+@@ -3764,6 +3814,12 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+ 
++[[package]]
++name = "windows_x86_64_gnullvm"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
++
+ [[package]]
+ name = "windows_x86_64_msvc"
+ version = "0.42.2"
+@@ -3776,11 +3832,17 @@ version = "0.48.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+ 
++[[package]]
++name = "windows_x86_64_msvc"
++version = "0.52.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
++
+ [[package]]
+ name = "winnow"
+-version = "0.5.19"
++version = "0.5.26"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
++checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff"
+ dependencies = [
+  "memchr",
+ ]
+@@ -3817,18 +3879,18 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
+ 
+ [[package]]
+ name = "zerocopy"
+-version = "0.7.25"
++version = "0.7.30"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557"
++checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7"
+ dependencies = [
+  "zerocopy-derive",
+ ]
+ 
+ [[package]]
+ name = "zerocopy-derive"
+-version = "0.7.25"
++version = "0.7.30"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b"
++checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba"
+ dependencies = [
+  "proc-macro2",
+  "quote",
+@@ -3837,9 +3899,9 @@ dependencies = [
+ 
+ [[package]]
+ name = "zeroize"
+-version = "1.6.0"
++version = "1.7.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
++checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+ dependencies = [
+  "zeroize_derive",
+ ]
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/compilers/cakelisp/default.nix b/nixpkgs/pkgs/development/compilers/cakelisp/default.nix
new file mode 100644
index 000000000000..52e486c4ee60
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cakelisp/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchgit, gcc }:
+
+stdenv.mkDerivation rec {
+  pname = "cakelisp";
+  version = "0.1.0";
+
+  src = fetchgit {
+    url = "https://macoy.me/code/macoy/cakelisp";
+    rev = "v${version}";
+    sha256 = "sha256-r7Yg8+2U8qQTYRP3KFET7oBRCZHIZS6Y8TsfL1NR24g=";
+  };
+
+  buildInputs = [ gcc ];
+
+  postPatch = ''
+    substituteInPlace runtime/HotReloading.cake \
+        --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
+    substituteInPlace src/ModuleManager.cpp \
+        --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic'
+    substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic'
+    substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic'
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    ./Build.sh
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm755 bin/cakelisp -t $out/bin
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A performance-oriented Lisp-like language";
+    homepage = "https://macoy.me/code/macoy/cakelisp";
+    license = licenses.gpl3Plus;
+    platforms = platforms.darwin ++ platforms.linux;
+    maintainers = [ maintainers.sbond75 ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/carp/default.nix b/nixpkgs/pkgs/development/compilers/carp/default.nix
new file mode 100644
index 000000000000..5abb9b3fe641
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/carp/default.nix
@@ -0,0 +1,62 @@
+{ lib, fetchFromGitHub, fetchpatch, makeWrapper, clang, haskellPackages }:
+
+haskellPackages.mkDerivation rec {
+  pname = "carp";
+  version = "0.5.5";
+
+  src = fetchFromGitHub {
+    owner = "carp-lang";
+    repo = "Carp";
+    rev = "v${version}";
+    sha256 = "sha256-B7SBzjegFzL2gGivIJE6BZcLD3f0Bsh8yndjScG2TZI=";
+  };
+
+  patches = [
+    # Compat with GHC 9.2 / Stackage LTS 20, can be dropped at the next release
+    # https://github.com/carp-lang/Carp/pull/1449
+    (fetchpatch {
+      name = "carp-lts-20.patch";
+      url = "https://github.com/carp-lang/Carp/commit/25f50c92a57cc91b6cb4ec48df658439f936b641.patch";
+      sha256 = "14yjv0hcvw1qyjmrhksrj6chac3n14d1f1gcaxldfa05llrbfqk0";
+    })
+  ];
+
+  # -Werror breaks build with GHC >= 9.0
+  # https://github.com/carp-lang/Carp/issues/1386
+  postPatch = ''
+    substituteInPlace CarpHask.cabal --replace "-Werror" ""
+  '';
+
+  buildTools = [ makeWrapper ];
+
+  executableHaskellDepends = with haskellPackages; [
+    HUnit blaze-markup blaze-html split ansi-terminal cmark
+    edit-distance hashable open-browser optparse-applicative
+  ];
+
+  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     = lib.licenses.asl20;
+  maintainers = with lib.maintainers; [ jluttine ];
+
+  # Windows not (yet) supported.
+  platforms   = with lib.platforms; unix ++ darwin;
+}
diff --git a/nixpkgs/pkgs/development/compilers/cc65/default.nix b/nixpkgs/pkgs/development/compilers/cc65/default.nix
new file mode 100644
index 000000000000..cb2410ba06a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cc65/default.nix
@@ -0,0 +1,58 @@
+{ lib, gccStdenv, fetchFromGitHub }:
+
+gccStdenv.mkDerivation rec {
+  pname = "cc65";
+  version = "2.19";
+
+  src = fetchFromGitHub {
+    owner = "cc65";
+    repo = pname;
+    rev = "V${version}";
+    sha256 = "01a15yvs455qp20hri2pbg2wqvcip0d50kb7dibi9427hqk9cnj4";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://cc65.github.io/";
+    description = "C compiler for processors of 6502 family";
+    longDescription = ''
+      cc65 is a complete cross development package for 65(C)02 systems,
+      including a powerful macro assembler, a C compiler, linker, librarian and
+      several other tools.
+
+      cc65 has C and runtime library support for many of the old 6502 machines,
+      including the following Commodore machines:
+
+      - VIC20
+      - C16/C116 and Plus/4
+      - C64
+      - C128
+      - CBM 510 (aka P500)
+      - the 600/700 family
+      - newer PET machines (not 2001).
+      - the Apple ][+ and successors.
+      - the Atari 8-bit machines.
+      - the Atari 2600 console.
+      - the Atari 5200 console.
+      - GEOS for the C64, C128 and Apple //e.
+      - the Bit Corporation Gamate console.
+      - the NEC PC-Engine (aka TurboGrafx-16) console.
+      - the Nintendo Entertainment System (NES) console.
+      - the Watara Supervision console.
+      - the VTech Creativision console.
+      - the Oric Atmos.
+      - the Oric Telestrat.
+      - the Lynx console.
+      - the Ohio Scientific Challenger 1P.
+
+      The libraries are fairly portable, so creating a version for other 6502s
+      shouldn't be too much work.
+    '';
+    license = licenses.zlib;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ccl/default.nix b/nixpkgs/pkgs/development/compilers/ccl/default.nix
new file mode 100644
index 000000000000..332e0b1bccf4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ccl/default.nix
@@ -0,0 +1,94 @@
+{ lib, stdenv, fetchurl, fetchpatch, runCommand, bootstrap_cmds, coreutils, glibc, m4, runtimeShell }:
+
+let
+  options = rec {
+    # TODO: there are also FreeBSD and Windows versions
+    x86_64-linux = {
+      arch = "linuxx86";
+      sha256 = "0mhmm8zbk42p2b9amy702365m687k5p0xnz010yqrki6mwyxlkx9";
+      runtime = "lx86cl64";
+      kernel = "linuxx8664";
+    };
+    i686-linux = {
+      arch = "linuxx86";
+      sha256 = x86_64-linux.sha256;
+      runtime = "lx86cl";
+      kernel = "linuxx8632";
+    };
+    armv7l-linux = {
+      arch = "linuxarm";
+      sha256 = "1a4y07cmmn1r88b4hl4msb0bvr2fxd2vw9lf7h4j9f7a5rpq7124";
+      runtime = "armcl";
+      kernel = "linuxarm";
+    };
+    x86_64-darwin = {
+      arch = "darwinx86";
+      sha256 = "1xclnik6pqhkmr15cbqa2n1ddzdf0rs452lyiln3c42nmkf9jjb6";
+      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.12.2";
+
+  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 lib; {
+    description = "Clozure Common Lisp";
+    homepage    = "https://ccl.clozure.com/";
+    maintainers = lib.teams.lisp.members;
+    platforms   = attrNames options;
+    # assembler failures during build, x86_64-darwin broken since 2020-10-14
+    broken      = (stdenv.isDarwin && stdenv.isx86_64);
+    license     = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chez-racket/default.nix b/nixpkgs/pkgs/development/compilers/chez-racket/default.nix
new file mode 100644
index 000000000000..158dfa052933
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chez-racket/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, buildPackages, callPackage }:
+
+let
+  chezArch =
+    /**/ if stdenv.hostPlatform.isAarch then "arm${toString stdenv.hostPlatform.parsed.cpu.bits}"
+    else if stdenv.hostPlatform.isx86_32 then "i3"
+    else if stdenv.hostPlatform.isx86_64 then "a6"
+    else if stdenv.hostPlatform.isPower then "ppc${toString stdenv.hostPlatform.parsed.cpu.bits}"
+    else throw "Add ${stdenv.hostPlatform.parsed.cpu.arch} to chezArch to enable building chez-racket";
+
+  chezOs =
+    /**/ if stdenv.hostPlatform.isDarwin then "osx"
+    else if stdenv.hostPlatform.isFreeBSD then "fb"
+    else if stdenv.hostPlatform.isLinux then "le"
+    else if stdenv.hostPlatform.isNetBSD then "nb"
+    else if stdenv.hostPlatform.isOpenBSD then "ob"
+    else throw "Add ${stdenv.hostPlatform.uname.system} to chezOs to enable building chez-racket";
+
+  inherit (stdenv.hostPlatform) system;
+  chezSystem = "t${chezArch}${chezOs}";
+  # Chez Scheme uses an ad-hoc `configure`, hence we don't use the usual
+  # stdenv abstractions.
+  forBoot = {
+    pname = "chez-scheme-racket-boot";
+    configurePhase = ''
+      runHook preConfigure
+      ./configure --pb ZLIB=$ZLIB LZ4=$LZ4
+      runHook postConfigure
+    '';
+    makeFlags = [ "${chezSystem}.bootquick" ];
+    installPhase = ''
+      runHook preInstall
+      mkdir -p $out
+      pushd boot
+      mv $(ls -1 | grep -v "^pb$") -t $out
+      popd
+      runHook postInstall
+    '';
+  };
+  boot = buildPackages.callPackage (import ./shared.nix forBoot) {};
+  forFinal = {
+    pname = "chez-scheme-racket";
+    configurePhase = ''
+      runHook preConfigure
+      cp -r ${boot}/* -t ./boot
+      ./configure -m=${chezSystem} --installprefix=$out --installman=$out/share/man ZLIB=$ZLIB LZ4=$LZ4
+      runHook postConfigure
+    '';
+    preBuild = ''
+      pushd ${chezSystem}/c
+    '';
+    postBuild = ''
+      popd
+    '';
+    setupHook = ./setup-hook.sh;
+  };
+  final = callPackage (import ./shared.nix forFinal) {};
+in
+final
diff --git a/nixpkgs/pkgs/development/compilers/chez-racket/setup-hook.sh b/nixpkgs/pkgs/development/compilers/chez-racket/setup-hook.sh
new file mode 100644
index 000000000000..1d81489bd4e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chez-racket/setup-hook.sh
@@ -0,0 +1,5 @@
+addChezLibraryPath() {
+  addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site"
+}
+
+addEnvHooks "$targetOffset" addChezLibraryPath
diff --git a/nixpkgs/pkgs/development/compilers/chez-racket/shared.nix b/nixpkgs/pkgs/development/compilers/chez-racket/shared.nix
new file mode 100644
index 000000000000..46f53204309b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chez-racket/shared.nix
@@ -0,0 +1,40 @@
+args:
+{ stdenv, lib, fetchFromGitHub, coreutils, darwin
+, ncurses, libiconv, libX11, zlib, lz4
+}:
+
+stdenv.mkDerivation (args // {
+  version = "unstable-2021-12-11";
+
+  src = fetchFromGitHub {
+    owner  = "racket";
+    repo   = "ChezScheme";
+    rev    = "8846c96b08561f05a937d5ecfe4edc96cc99be39";
+    sha256 = "IYJQzT88T8kFahx2BusDOyzz6lQDCbZIfSz9rZoNF7A=";
+    fetchSubmodules = true;
+  };
+
+  prePatch = ''
+    rm -rf zlib/*.c lz4/lib/*.c
+  '';
+
+  postPatch = ''
+    export ZLIB="$(find ${zlib.out}/lib -type f | sort | head -n1)"
+    export LZ4="$(find ${lz4.out}/lib -type f | sort | head -n1)"
+  '';
+
+  nativeBuildInputs = lib.optionals stdenv.isDarwin (with darwin; [ cctools autoSignDarwinBinariesHook ]);
+  buildInputs = [ libiconv libX11 lz4 ncurses zlib ];
+
+  enableParallelBuilding = true;
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
+
+  meta = {
+    description  = "Fork of Chez Scheme for Racket";
+    homepage     = "https://github.com/racket/ChezScheme";
+    license      = lib.licenses.asl20;
+    maintainers  = with lib.maintainers; [ l-as ];
+    platforms    = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/chez/default.nix b/nixpkgs/pkgs/development/compilers/chez/default.nix
new file mode 100644
index 000000000000..fc7dfa78cefe
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chez/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchurl
+, coreutils, cctools
+, ncurses, libiconv, libX11, libuuid
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "chez-scheme";
+  version = "9.6.4";
+
+  src = fetchurl {
+    url = "https://github.com/cisco/ChezScheme/releases/download/v${finalAttrs.version}/csv${finalAttrs.version}.tar.gz";
+    hash = "sha256-9YJ2gvolnEeXX/4Hh4X7Vh5KXFT3ZDMe9mwyEyhDaF0=";
+  };
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin cctools;
+  buildInputs = [ ncurses libiconv libX11 libuuid ];
+
+  enableParallelBuilding = true;
+
+  env.NIX_CFLAGS_COMPILE = 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${finalAttrs.version}/examples
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    description  = "A powerful and incredibly fast R6RS Scheme compiler";
+    homepage     = "https://cisco.github.io/ChezScheme/";
+    license      = lib.licenses.asl20;
+    maintainers  = with lib.maintainers; [ thoughtpolice ];
+    platforms    = lib.platforms.unix;
+    badPlatforms = [ "aarch64-linux" "aarch64-darwin" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/chez/setup-hook.sh b/nixpkgs/pkgs/development/compilers/chez/setup-hook.sh
new file mode 100644
index 000000000000..1d81489bd4e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chez/setup-hook.sh
@@ -0,0 +1,5 @@
+addChezLibraryPath() {
+  addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site"
+}
+
+addEnvHooks "$targetOffset" addChezLibraryPath
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..29cf5b115b30
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/chicken.nix
@@ -0,0 +1,96 @@
+{ lib, stdenv, fetchurl, makeWrapper, darwin, 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
+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";
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    # There is not enough space in the load command to accomodate a full path to the store,
+    # so use `@executable_path` to specify a relative path to chicken’s lib folder.
+    sed -e '/POSTINSTALL_PROGRAM_FLAGS = /{s|$(LIBDIR)|@executable_path/../lib|}' \
+      -i Makefile.macosx
+  '';
+
+  setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh;
+
+  # -fno-strict-overflow is not a supported argument in clang on darwin
+  hardeningDisable = lib.optionals stdenv.isDarwin ["strictoverflow"];
+
+  makeFlags = [
+    "PLATFORM=${platform}" "PREFIX=$(out)"
+    "VARDIR=$(out)/var/lib"
+  ] ++ (lib.optionals stdenv.isDarwin [
+    "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
+    "C_COMPILER=$(CC)"
+    "POSTINSTALL_PROGRAM=${stdenv.cc.targetPrefix}install_name_tool"
+  ]);
+
+  # We need a bootstrap-chicken to regenerate the c-files after
+  # applying a patch to add support for CHICKEN_REPOSITORY_EXTRA
+  patches = lib.optionals (bootstrap-chicken != null) [
+    ./0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
+  ];
+
+  nativeBuildInputs = [
+    makeWrapper
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    darwin.autoSignDarwinBinariesHook
+  ];
+
+  buildInputs = lib.optionals (bootstrap-chicken != null) [
+    bootstrap-chicken
+  ];
+
+  preBuild = lib.optionalString (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 $makeFlags
+
+    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 = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ corngood ];
+    platforms = lib.platforms.linux ++ lib.platforms.darwin; # Maybe other 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..7502a7a9f1e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/default.nix
@@ -0,0 +1,21 @@
+{ lib, newScope } :
+let
+  callPackage = newScope self;
+
+  self = {
+    pkgs = self // { recurseForDerivations = false; };
+
+    fetchegg = callPackage ./fetchegg { };
+
+    eggDerivation = callPackage ./eggDerivation.nix { };
+
+    chicken = callPackage ./chicken.nix {
+      bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
+    };
+
+    chickenEggs = lib.recurseIntoAttrs (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..dfbec7442ed4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/egg2nix.nix
@@ -0,0 +1,28 @@
+{ lib, eggDerivation, fetchFromGitHub, chickenEggs }:
+
+# Note: This mostly reimplements the default.nix already contained in
+# the tarball. Is there a nicer way than duplicating code?
+
+eggDerivation rec {
+  name = "egg2nix-${version}";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    owner = "the-kenny";
+    repo = "egg2nix";
+    rev = version;
+    sha256 = "sha256-5ov2SWVyTUQ6NHnZNPRywd9e7oIxHlVWv4uWbsNaj/s=";
+  };
+
+  buildInputs = with chickenEggs; [
+    matchable http-client
+  ];
+
+  meta = {
+    description = "Generate nix-expression from CHICKEN scheme eggs";
+    homepage = "https://github.com/the-kenny/egg2nix";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+    maintainers = with 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..96b3612b34ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/eggDerivation.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, chicken, makeWrapper }:
+{ name, src
+, buildInputs ? []
+, chickenInstallFlags ? []
+, cscOptions          ? []
+, ...} @ args:
+
+let
+  libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
+  overrides = import ./overrides.nix;
+  baseName = lib.getName name;
+  override = if builtins.hasAttr baseName overrides
+   then
+     builtins.getAttr baseName overrides
+   else
+     {};
+in
+stdenv.mkDerivation ({
+  name = "chicken-${name}";
+  propagatedBuildInputs = buildInputs;
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ chicken ];
+
+  CSC_OPTIONS = lib.concatStringsSep " " cscOptions;
+
+  CHICKEN_REPOSITORY = libPath;
+  CHICKEN_INSTALL_PREFIX = "$out";
+
+  installPhase = ''
+    runHook preInstall
+
+    chicken-install -p $out ${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
+  '';
+
+  meta = {
+    inherit (chicken.meta) platforms;
+  } // args.meta or {};
+} // (builtins.removeAttrs args ["name" "buildInputs" "meta"]) // 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..8c96caca2623
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/eggs.nix
@@ -0,0 +1,138 @@
+{ pkgs }:
+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..78535382a7ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/builder.sh
@@ -0,0 +1,8 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+source $stdenv/setup
+
+echo "exporting egg ${eggName} (version $version) into $out"
+
+mkdir -p $out
+chicken-install -r "${eggName}:${version}"
+cp -r ${eggName}/* $out/
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..23c5760b4bce
--- /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
+
+{ lib, 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 = 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..11ae3e521093
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/chicken.nix
@@ -0,0 +1,83 @@
+{ lib, stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null, testers }:
+
+let
+  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
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "chicken";
+  version = "5.3.0";
+
+  binaryVersion = 11;
+
+  src = fetchurl {
+    url = "https://code.call-cc.org/releases/${finalAttrs.version}/chicken-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-w62Z2PnhftgQkS75gaw7DC4vRvsOzAM7XDttyhvbDXY=";
+  };
+
+  # Disable two broken tests: "static link" and "linking tests"
+  postPatch = ''
+    sed -i tests/runtests.sh -e "/static link/,+4 { s/^/# / }"
+    sed -i tests/runtests.sh -e "/linking tests/,+11 { s/^/# / }"
+  '';
+
+  setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh;
+
+  # -fno-strict-overflow is not a supported argument in clang
+  hardeningDisable = lib.optionals stdenv.cc.isClang [ "strictoverflow" ];
+
+  makeFlags = [
+    "PLATFORM=${platform}"
+    "PREFIX=$(out)"
+    "C_COMPILER=$(CC)"
+    "CXX_COMPILER=$(CXX)"
+  ] ++ (lib.optionals stdenv.isDarwin [
+    "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
+    "LINKER_OPTIONS=-headerpad_max_install_names"
+    "POSTINSTALL_PROGRAM=install_name_tool"
+  ]) ++ (lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "HOSTSYSTEM=${stdenv.hostPlatform.config}"
+    "TARGET_C_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
+    "TARGET_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"
+  ]);
+
+  nativeBuildInputs = [
+    makeWrapper
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    darwin.autoSignDarwinBinariesHook
+  ];
+
+  buildInputs = lib.optionals (bootstrap-chicken != null) [
+    bootstrap-chicken
+  ];
+
+  doCheck = !stdenv.isDarwin;
+  postCheck = ''
+    ./csi -R chicken.pathname -R chicken.platform \
+       -p "(assert (equal? \"${toString finalAttrs.binaryVersion}\" (pathname-file (car (repository-path)))))"
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = finalAttrs.finalPackage;
+    command = "csi -version";
+  };
+
+  meta = {
+    homepage = "https://call-cc.org/";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ corngood nagy konst-aa ];
+    platforms = lib.platforms.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..61bf45dd54ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/default.nix
@@ -0,0 +1,59 @@
+{ lib, newScope, fetchurl }:
+
+lib.makeScope newScope (self: {
+
+  fetchegg = { pname, version, sha256, ... }:
+    fetchurl {
+      inherit sha256;
+      url =
+        "https://code.call-cc.org/egg-tarballs/5/${pname}/${pname}-${version}.tar.gz";
+    };
+
+  eggDerivation = self.callPackage ./eggDerivation.nix { };
+
+  chicken = self.callPackage ./chicken.nix {
+    bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
+  };
+
+  chickenEggs = lib.recurseIntoAttrs (lib.makeScope self.newScope (eggself:
+    (lib.mapAttrs
+      (pname:
+        eggData@{ version, synopsis, dependencies, license, ... }:
+        self.eggDerivation {
+          name = "${pname}-${version}";
+          src = self.fetchegg (eggData // { inherit pname; });
+          buildInputs = map (x: eggself.${x}) dependencies;
+          meta.homepage =
+            "https://code.call-cc.org/cgi-bin/gitweb.cgi?p=eggs-5-latest.git;a=tree;f=${pname}/${version}";
+          meta.description = synopsis;
+          meta.license = (lib.licenses // {
+            "agpl" = lib.licenses.agpl3Only;
+            "artistic" = lib.licenses.artistic2;
+            "bsd" = lib.licenses.bsd3;
+            "bsd-1-clause" = lib.licenses.bsd1;
+            "bsd-2-clause" = lib.licenses.bsd2;
+            "bsd-3-clause" = lib.licenses.bsd3;
+            "gpl" = lib.licenses.gpl3Only;
+            "gpl-2" = lib.licenses.gpl2Only;
+            "gplv2" = lib.licenses.gpl2Only;
+            "gpl-3" = lib.licenses.gpl3Only;
+            "gpl-3.0" = lib.licenses.gpl3Only;
+            "gplv3" = lib.licenses.gpl3Only;
+            "lgpl" = lib.licenses.lgpl3Only;
+            "lgpl-2" = lib.licenses.lgpl2Only;
+            "lgpl-2.0+" = lib.licenses.lgpl2Plus;
+            "lgpl-2.1" = lib.licenses.lgpl21Only;
+            "lgpl-2.1-or-later" = lib.licenses.lgpl21Plus;
+            "lgpl-3" = lib.licenses.lgpl3Only;
+            "lgplv3" = lib.licenses.lgpl3Only;
+            "public-domain" = lib.licenses.publicDomain;
+            "srfi" = lib.licenses.bsd3;
+            "unicode" = lib.licenses.ucd;
+            "zlib-acknowledgement" = lib.licenses.zlib;
+          }).${license} or license;
+        })
+      (lib.importTOML ./deps.toml))));
+
+  egg2nix = self.callPackage ./egg2nix.nix { };
+
+})
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/deps.toml b/nixpkgs/pkgs/development/compilers/chicken/5/deps.toml
new file mode 100644
index 000000000000..743da0b0cfe4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/deps.toml
@@ -0,0 +1,3998 @@
+# THIS IS A GENERATED FILE.  DO NOT EDIT!
+[7off]
+dependencies = ["anaphora", "define-options", "lowdown", "matchable", "srfi-1", "sxml-transforms", "sxpath", "utf8", "srfi-42", "srfi-69", "strse", "uri-common"]
+license = "agpl"
+sha256 = "0hsqxva92k3yasrlgl7bbq3z3d2d2nd3r3i2v6vimv7mp2chfkdr"
+synopsis = "Markdown to Gemini text"
+version = "1.31"
+
+[F-operator]
+dependencies = ["miscmacros", "datatype", "box"]
+license = "bsd"
+sha256 = "0i7yfc8pxszvsgls871s2bwy11yxyxr4sqbl8gc21g29xm7vjivq"
+synopsis = "Shift/Reset Control Operators"
+version = "4.1.4"
+
+[abnf]
+dependencies = ["srfi-1", "utf8", "lexgen"]
+license = "gpl-3"
+sha256 = "08lmhd9ifhyhy73w7z25l6d5w036xa59sykwhlbar5rqs46pf019"
+synopsis = "Parser combinators for Augmented BNF grammars (RFC 4234)."
+version = "8.3"
+
+[accents-substitute]
+dependencies = []
+license = "bsd"
+sha256 = "1fbvm18m6ik1x4wn1q226lhv03pvhzgcdzzy4i0xns3c9pyqi7g0"
+synopsis = "Substitute accented characters in strings"
+version = "0.7"
+
+[acetone]
+dependencies = ["match-generics", "srfi-1", "brev-separate"]
+license = "bsd-1-clause"
+sha256 = "0qyvv15zd3pfcyg8p6pgb3nn4sx0h0lsyiljwvb4lpb5p6xwygz8"
+synopsis = "A simple parser"
+version = "1.2"
+
+[address-info]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0vzrbzalqx3bv5nzq9rykfyhnrgnf2hlh55hi67pgync9z06v3jy"
+synopsis = "Network address information access"
+version = "1.0.5"
+
+[advice]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0sc9lwkc8pa06v30vhi1srfjsgxn4c4g57zbj6wk1y9adyvda9x7"
+synopsis = "'advise' functionality"
+version = "0.4"
+
+[aes]
+dependencies = []
+license = "bsd"
+sha256 = "01bwykr6ryv036pyjc95qhqmrj0p7wisb0dhnf7f7nw858phr4av"
+synopsis = "A self-contained implementation of the AES / Rijndael encryption algorithm"
+version = "1.5"
+
+[agrep]
+dependencies = ["datatype", "srfi-1", "srfi-14"]
+license = "gpl-3"
+sha256 = "1anh4dkcdh3w5akd45n11v62kl3jpj7n78zfwaia99yd9dd5i9ww"
+synopsis = "Approximate grep.."
+version = "1.7"
+
+[alist-lib]
+dependencies = ["hahn", "matchable", "srfi-1"]
+license = "bsd"
+sha256 = "0v8aab5wknj736rxb83gjlwlaxlg7lz5cxpsngniz7ilrs2b3fdl"
+synopsis = "SRFI-69-like library for alists"
+version = "0.3.0"
+
+[allegro]
+dependencies = ["foreigners"]
+license = "bsd"
+sha256 = "14w7q0iwskrqbqfjspf5wxnxb8wn56q9xbpc0vz518azm9ndf63p"
+synopsis = "Allegro"
+version = "3.0.0"
+
+[amb]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0ggwmsd4igg099ikn5qja5nkqmrnsw0byyk3q9y04ygvzalqyb36"
+synopsis = "The non-deterministic backtracking ambivalence operator"
+version = "3.0.9"
+
+[amqp]
+dependencies = ["bitstring", "mailbox", "srfi-18", "uri-generic"]
+license = "bsd"
+sha256 = "0mwnjcsrcm024qrip9h3fap93n72slkrib1la075ra0zx0j6yc53"
+synopsis = "AMPQ"
+version = "1.0.0"
+
+[anaphora]
+dependencies = []
+license = "bsd"
+sha256 = "1yzm92qjpgga8722jdy3xx8gzq0ijass06aqyncccawjzshq7zy1"
+synopsis = "Some anaphoric and named macros"
+version = "1.0.1"
+
+[ansi-escape-sequences]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1693zqbcva4h3562x3hmy7xpijc20yv1bmglz1hzr8jfm30hrc2p"
+synopsis = "Procedures to generate ANSI escape sequences"
+version = "0.6"
+
+[apropos]
+dependencies = ["srfi-1", "utf8", "string-utils", "symbol-utils", "check-errors"]
+license = "bsd"
+sha256 = "01zdifhqc0jfm810106sh87w0fmpchf4dph0k8v1lyjzbj1ivmi4"
+synopsis = "CHICKEN apropos"
+version = "3.8.3"
+
+[arcadedb]
+dependencies = ["uri-common", "medea"]
+license = "zlib-acknowledgement"
+sha256 = "1w2iqylz0wfn7is8vss5dkwmi3pxhbh2h7ywzg39x45z2c91sd28"
+synopsis = "An ArcadeDB database driver for CHICKEN Scheme."
+version = "0.7"
+
+[args]
+dependencies = ["srfi-1", "srfi-13", "srfi-37"]
+license = "bsd"
+sha256 = "0knkg31d4dq9a8rq9g3ycmj0z6j9l7zp93qa9cnqc8ixd6jsymkm"
+synopsis = "Command-line argument handling, on top of SRFI 37"
+version = "1.6.2"
+
+[arrays]
+dependencies = []
+license = "bsd"
+sha256 = "15ccg54vfimz8pn6rzvr7p2wgs8jarszkcs5wqahy7vy7w4r1pfr"
+synopsis = "Functional arrays and sets"
+version = "1.0.2"
+
+[atom]
+dependencies = ["matchable", "ssax", "sxml-serializer", "regex"]
+license = "bsd"
+sha256 = "0apb3g551n0qi594m1sl2vamcb0p3w36dyxk6lpj9q1fshgg4mym"
+synopsis = "Atom 1.0 feed reader and writer"
+version = "0.1.5"
+
+[autocompile]
+dependencies = ["matchable"]
+license = "public-domain"
+sha256 = "1yq819vbb813svxvxad4h99vrhvf7rs8cv9dsnj85rcvi60w7299"
+synopsis = "Automatically compile Scheme scripts on demand"
+version = "1.1.0"
+
+[awful-main]
+dependencies = ["awful", "spiffy", "define-options"]
+license = "bsd"
+sha256 = "1zpnk3xjkn2pdfw953ximq6i0d3v3mak8ydl6a3nb2zz1daq7044"
+synopsis = "Turn awful web applications into static executables"
+version = "0.1.0"
+
+[awful-path-matchers]
+dependencies = []
+license = "bsd"
+sha256 = "12y90z3rlvjid6lxnhwg8f5x0wcm4qiq2nqvpg5klp1rmwsibbzh"
+synopsis = "Path matchers for awful"
+version = "0.0.2"
+
+[awful-postgresql]
+dependencies = ["awful", "postgresql"]
+license = "bsd"
+sha256 = "084n39rz3m2sjpah3hq03iybdf1z2af64cv5fb8kphqr6cb3m5d8"
+synopsis = "Postgresql support for awful"
+version = "0.7.0"
+
+[awful-salmonella-tar]
+dependencies = ["awful", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "1zqzhafsbc64y344pax7z68vxfigwd8rcmgafqp6knn948lamrb3"
+synopsis = "Serve salmonella report files out of tar archives"
+version = "0.0.4"
+
+[awful-sql-de-lite]
+dependencies = ["awful", "sql-de-lite"]
+license = "bsd"
+sha256 = "15jhsp0bgrav2xy82fl7csgzvnchhm04ayr3wjr2dv1ki3fl430v"
+synopsis = "sql-de-lite support for awful"
+version = "0.7.1"
+
+[awful-sqlite3]
+dependencies = ["awful", "sqlite3"]
+license = "bsd"
+sha256 = "1gvn7x8q822sq48zllbnpqw88898rjmkvy8qin9mzzf86y08ky8g"
+synopsis = "Sqlite3 support for awful"
+version = "0.7.0"
+
+[awful-sse]
+dependencies = ["awful", "spiffy", "intarweb"]
+license = "bsd"
+sha256 = "0jmrccwhq14j0ga8ac7vn2rkm3yyskaw3chhzvr8y3j4vsb0kala"
+synopsis = "Server-Sent Events module for Awful"
+version = "0.3"
+
+[awful-ssl]
+dependencies = ["awful", "openssl"]
+license = "bsd"
+sha256 = "1grfh0jlxmnhs4ic4qpiq2xaqwprmr52xwkl9r8mnhcw5d2ygwfc"
+synopsis = "SSL support for awful"
+version = "0.3"
+
+[awful-static-pages]
+dependencies = ["awful", "srfi-1", "srfi-13", "srfi-69"]
+license = "bsd"
+sha256 = "1v4micnkci3lkknx0x1ph7apvlq2zzzjxgr2h13i7l0zm0bhf1nl"
+synopsis = "Tool to generate static pages out of awful applications"
+version = "0.1.6"
+
+[awful]
+dependencies = ["json", "http-session", "spiffy", "spiffy-cookies", "spiffy-request-vars", "sxml-transforms", "srfi-1", "srfi-13", "srfi-69"]
+license = "bsd"
+sha256 = "1i20ib8kx2hjggi18xn72lwxaa2q38bmmffsm06s1cxrfh58s5gz"
+synopsis = "awful provides an application and an extension to ease the development of web-based applications."
+version = "1.0.3"
+
+[base64]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "102431jlwkgqjmx3qnsdiz52f7f6r74fh7z0svlnsia6nphsj4cw"
+synopsis = "Encoding and decoding of base64 strings"
+version = "1.0"
+
+[beaker]
+dependencies = ["begin-syntax", "debugger-protocol", "schematic", "srfi-1", "srfi-13", "srfi-14", "srfi-69", "vector-lib", "with-current-directory", "module-declarations"]
+license = "bsd"
+sha256 = "1nxzqjwh3bi2zyifdpn0wb86352rizjpfl3lfi34f3g6m95avmmg"
+synopsis = "Lab supplies for CHICKEN development"
+version = "0.0.22"
+
+[begin-syntax]
+dependencies = ["matchable", "module-declarations"]
+license = "bsd"
+sha256 = "10xdikbpilxibjvmdnshjdwhp56lh0w6414cwgiwva2vqr7930zj"
+synopsis = "Convenience macro for inline syntax expansion"
+version = "0.2.1"
+
+[bencode]
+dependencies = ["miscmacros", "vector-lib"]
+license = "bsd"
+sha256 = "1sxjf16vfp8wxjyr9jxldmb495vdy334b2jgxj6ji7mdfizrldiq"
+synopsis = "Bencoding parser and serializer"
+version = "1.3.1"
+
+[big-chicken]
+dependencies = []
+license = "bsd"
+sha256 = "1f36y05mz4hwp1jkkl9wawn72rql13cz7q6394zfpf008dizq69z"
+synopsis = "Wrapper module for all core modules"
+version = "1.1"
+
+[biglists]
+dependencies = []
+license = "bsd"
+sha256 = "08qc2vsbc42c8108z50v2izkiwn5gd5hk7mjf8gbwy28p92gqh2x"
+synopsis = "a uniform interface to lists and lazy-lists"
+version = "0.4.1"
+
+[binary-search]
+dependencies = []
+license = "bsd"
+sha256 = "0hycs33782xvcc4p0jl2a716fi388v8vbvf9isgrnl9ahqnk9kia"
+synopsis = "Binary search algorithm"
+version = "0.2"
+
+[bind]
+dependencies = ["silex", "matchable", "coops", "srfi-1", "regex"]
+license = "public-domain"
+sha256 = "02j8i4w3dzfnfcyckk6y228shwfxk5pgap3zsha86am53gw05aj0"
+synopsis = "Automatically generate bindings from C/C++ declarations"
+version = "1.2.6"
+
+[bindings]
+dependencies = ["simple-sequences"]
+license = "bsd"
+sha256 = "1r193n8h8bbq8yx8xwgpfd0yxwipn58skhi258y64hnb88pzjfy3"
+synopsis = "Pattern matching with destructuring bindings and setters"
+version = "5.0"
+
+[bitstring]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "102w2fbh3slksh55sb718wg2mimjgzb0xrchdl711w8lrxbrfjf8"
+synopsis = "Binary pattern matching"
+version = "1.37"
+
+[bitwise-utils]
+dependencies = []
+license = "public-domain"
+sha256 = "065q6ha8wsj6qhg7zxkaj2qrj5sm3iz2v7shcp5wh7j3fqwbs5q5"
+synopsis = "Bitwise utilities"
+version = "1.3.0"
+
+[blas]
+dependencies = ["bind", "compile-file", "srfi-13"]
+license = "bsd"
+sha256 = "1gx22ycqc3jpcmv16644ay9cygh535di4j7znqjqxn2dyq29dmkm"
+synopsis = "An interface to level 1, 2 and 3 BLAS routines"
+version = "4.5"
+
+[blob-utils]
+dependencies = ["string-utils", "check-errors"]
+license = "bsd"
+sha256 = "0qp696595b46gygwf1cf0096sv5rxysgcn9yqwmbp8lxnl59p42n"
+synopsis = "Blob Utilities"
+version = "2.0.4"
+
+[bloom-filter]
+dependencies = ["iset", "message-digest-primitive", "message-digest-type", "message-digest-utils", "check-errors"]
+license = "bsd"
+sha256 = "1ljak0xscrywyl1sbv8yx9qkw1r2m94gyw3ag73p3z8m618valy3"
+synopsis = "Bloom Filter"
+version = "2.3.4"
+
+[blosc]
+dependencies = ["srfi-13", "compile-file"]
+license = "bsd"
+sha256 = "0m78rb2q0znixpiflcrndlk708g4mbw7yh1ynkvk3zzvln0d3wgi"
+synopsis = "Bindings to the Blosc multi-threaded meta-compressor library"
+version = "1.1"
+
+[botan]
+dependencies = ["srfi-1", "srfi-13", "srfi-14"]
+license = "bsd-2-clause"
+sha256 = "1j2h6hhvwdr7d7kgm5b0nc5nmx23a35av7rvwcajlxxv9iafmdh2"
+synopsis = "Bindings to the Botan cryptographic library"
+version = "2.13.20191214-0"
+
+[box]
+dependencies = []
+license = "bsd"
+sha256 = "131k73q72v658mkxhj34988kwh8yxjq00gf4sn3f1y837n6kp9yd"
+synopsis = "Boxing"
+version = "3.6.0"
+
+[breadcrumbs]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1n60k0ryp447fh4f1an7ki8c1kc2ll1v1cbhgrxvmwcx3v03d767"
+synopsis = "Breadcrumbs for web pages"
+version = "1.2"
+
+[breadline]
+dependencies = ["apropos", "srfi-18"]
+license = "gpl-3"
+sha256 = "1rvppf2aci4dxn6a74nzzj1iw7is65ad38fbvrr9harazfx6j4jy"
+synopsis = "Bindings to readline"
+version = "0.11"
+
+[brev-separate]
+dependencies = ["matchable", "miscmacros", "srfi-1", "srfi-69"]
+license = "bsd-1-clause"
+sha256 = "0ycm95vcf1dj6m3kqii7b2a5kxyd1m6lzksz77ispay14srgw8rd"
+synopsis = "Hodge podge of macros and combinators"
+version = "1.95"
+
+[brev]
+dependencies = ["anaphora", "brev-separate", "clojurian", "combinators", "define-options", "dwim-sort", "fix-me-now", "acetone", "html-parser", "match-generics", "http-client", "matchable", "miscmacros", "scsh-process", "sequences", "srfi-1", "srfi-42", "srfi-69", "strse", "sxml-serializer", "sxml-transforms", "sxpath", "tree", "uri-common"]
+license = "public-domain"
+sha256 = "1kbphbz21rlrsfcfqg77hm1vv7wh9z1gcwh5lb2hlrqp2yl7m7yc"
+synopsis = "A huge pile of batteries and shortcuts"
+version = "1.41"
+
+[byte-blob]
+dependencies = ["srfi-1"]
+license = "lgpl-3"
+sha256 = "18zppf0ikpj5mrc0kpgxbkcrk259xsl2s46snw1q73f7qnh0k8hv"
+synopsis = "Byte array utility procedures for blobs."
+version = "2.3"
+
+[cairo]
+dependencies = ["srfi-1"]
+license = "lgpl-2.1"
+sha256 = "1x69i4aysn8mf93ic36947p6gvgglk8c0vg2m6vdhimf6y65szi1"
+synopsis = "Chicken bindings for Cairo, a vector graphics library"
+version = "0.1.18"
+
+[call-table-generics]
+dependencies = ["brev-separate"]
+license = "bsd-1-clause"
+sha256 = "1pkhgzwpl2k0lsshxmhy11v126nbpk28hjwv2d5fcnfam2lzf6kq"
+synopsis = "cond generics"
+version = "1.2"
+
+[callable-data-structures]
+dependencies = ["srfi-69"]
+license = "bsd"
+sha256 = "1qqs3ycqg0bnq5ia3plw86vdv6fnk5d8c2l9bk06c0j4wqx4g9mp"
+synopsis = "\"Callable\" data structures"
+version = "1.0.3"
+
+[callable-sequences]
+dependencies = []
+license = "bsd"
+sha256 = "13sw9f3187h0f2dsjql8j3jij16w5jjdfd7d5wmihhh09n6fma1l"
+synopsis = "Common functional interface to sequential- and random-access sequences"
+version = "1.3"
+
+[canvas-draw]
+dependencies = ["srfi-1", "srfi-13", "miscmacros"]
+license = "bsd"
+sha256 = "0pyk20rd1170h5k88jnm23qimwp37zq3kx94fvc3cpwk9cg1h7vd"
+synopsis = "Bindings to the CD graphics library"
+version = "1.1.2"
+
+[chalk]
+dependencies = ["srfi-1", "srfi-13", "getopt-long"]
+license = "bsd"
+sha256 = "0p1lzxpbqyk8vqpc4600mjiaf3bvm2hlw1w6789b9l3fm972mp5m"
+synopsis = "Simple hahn-style in-source documentation"
+version = "0.3.5"
+
+[char-set-literals]
+dependencies = ["srfi-14"]
+license = "bsd"
+sha256 = "1im25d5wvw7c913k5rq7axq457mg6z4yg64mk74g95x5r177x45i"
+synopsis = "A reader extension providing Gauche style literals for SRFI-14 char-sets"
+version = "0.4"
+
+[check-errors]
+dependencies = []
+license = "bsd"
+sha256 = "09ffyffrv3gamjsjgbisn3yxb40wbqy5pfrs6dxw20n1ffimgfw5"
+synopsis = "Argument checks & errors"
+version = "3.8.0"
+
+[checks]
+dependencies = ["simple-exceptions"]
+license = "bsd"
+sha256 = "16m7s2iab5kvbkgkgyhnaclychx4pf8ar11ghdsflvnhm15yl9vq"
+synopsis = "easy to use procondition and postcondition checks of procedures"
+version = "1.4"
+
+[chibi-generic]
+dependencies = []
+license = "bsd"
+sha256 = "04048cksqnhyn0zcq0sdn426cj3fqfrj7xq464961jl72x8xqc5w"
+synopsis = "Chibi Scheme's simple generic function interface"
+version = "0.1.3"
+
+[chickadee]
+dependencies = ["matchable", "uri-common", "uri-generic", "intarweb", "simple-sha1", "spiffy", "spiffy-request-vars", "sxml-transforms", "chicken-doc", "chicken-doc-admin", "chicken-doc-html", "srfi-18"]
+license = "bsd"
+sha256 = "0blbxy2l7kii85glczrxrqc8n7794qxswq67v0vl6hxajwij197i"
+synopsis = "chicken-doc web server"
+version = "0.12.2"
+
+[chicken-belt]
+dependencies = ["matchable", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "0xxq4383gircmnaqyjwx1ckr07x5m51h1rx6dbxvsb79pn53cpv9"
+synopsis = "A utility belt for managing your CHICKEN coop"
+version = "0.1.0"
+
+[chicken-doc-admin]
+dependencies = ["matchable", "chicken-doc", "html-parser", "sxml-transforms", "svnwiki-sxml", "srfi-1", "srfi-13", "srfi-69", "regex"]
+license = "bsd"
+sha256 = "0jv9809cxhw5qj21w0ja12dqv9qavl3d8084rcd4dn8mia382qmk"
+synopsis = "Administer Chicken documentation locally"
+version = "0.5.0"
+
+[chicken-doc-html]
+dependencies = ["regex", "matchable", "sxml-transforms", "colorize", "svnwiki-sxml", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "0pl2fid82jx7h34y9fwfn8bwgjkh8rk13hd7mbqnrv74ga46l5yf"
+synopsis = "Generate HTML from (svn)wiki SXML"
+version = "0.3.1"
+
+[chicken-doc]
+dependencies = ["matchable", "fmt", "sxml-transforms", "srfi-1", "srfi-13", "srfi-69"]
+license = "bsd"
+sha256 = "1p7i5dsi9x8kfchh3xdw9ww9pz2p861v8vynqzwmbclpqjrspllh"
+synopsis = "Explore Chicken documentation locally"
+version = "0.7.0"
+
+[chicken-update]
+dependencies = ["srfi-1", "srfi-13", "fmt", "sxpath", "http-client", "uri-common", "optimism", "ssax"]
+license = "public-domain"
+sha256 = "1kbxk93k7p9x2594q4zsya93m7rzpnhixksvdvmiwq42dj72hyid"
+synopsis = "Update installed eggs"
+version = "0.1.6"
+
+[cis]
+dependencies = []
+license = "lgpl-3"
+sha256 = "0cipkar25s3gzgzg6sy5547b6da665ln610c71zscz37f4q6wjm8"
+synopsis = "Compact integer sets."
+version = "1.4"
+
+[cjson]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0hw8c9wm6d3l02bxsyhv3v6br47yq6azqpd3r55dwni6mma33b5y"
+synopsis = "JSON parsing done in C. Sometimes a good idea."
+version = "5.0.3"
+
+[ck-macros]
+dependencies = []
+license = "public-domain"
+sha256 = "1x2d1f0fnzz5h871qgw4hkdffhd7rv7w59lq7r1y0r0jzl2rv83j"
+synopsis = "Composable macros based on the CK abstract machine"
+version = "0.3.0"
+
+[clojurian]
+dependencies = ["srfi-18"]
+license = "bsd"
+sha256 = "0zmpld6j3zv91r8jwq83sz61495agddnmzqnx4qkclnb3wzvjw3f"
+synopsis = "Syntax and utility functions inspired by Clojure"
+version = "3"
+
+[cluckcheck]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1k8310b9c03rjb3cmfk3744nsjshh1yqdpycmlbzhnrdjivzm898"
+synopsis = "A Chicken Scheme port of the QuickCheck unit test framework"
+version = "0.0"
+
+[clucker]
+dependencies = ["oauth", "uri-common", "rest-bind"]
+license = "bsd"
+sha256 = "0b61yfh4m3xigipwjrp476nx1i8xyhwdv1cpyiaz9pfzfhmfd59x"
+synopsis = "Twitter API for Chicken Scheme"
+version = "0.12"
+
+[cmark]
+dependencies = []
+license = "mit"
+sha256 = "1rxyr6di07zqfjzbb0kgdx43m2b1zpjrkaph8x078jgqawyblc6v"
+synopsis = "A chicken wrapper for cmark with markdown to sxml capabilities"
+version = "0.1.0"
+
+[coin-change]
+dependencies = ["srfi-1"]
+license = "unlicense"
+sha256 = "09p83afsh2dx4y2cpyi55bf2br03ysdpq9xrqik7fmks3913kxmk"
+synopsis = "Greedy solver for the coin change problem"
+version = "1.0.2"
+
+[color]
+dependencies = ["fmt", "records", "srfi-13"]
+license = "bsd"
+sha256 = "1pxc66arxkzyfqfyv7myzfvqwqakh643cjb3n8pqxgmvmrmfwgfr"
+synopsis = "The SLIB color library"
+version = "1.1"
+
+[colorize]
+dependencies = ["srfi-13", "srfi-1"]
+license = "mit"
+sha256 = "1js0lrs9vksjk40acm29409k3837987iacim790lbsrhcr9cjb2v"
+synopsis = "Colorize programming code as HTML"
+version = "0.5"
+
+[combinators]
+dependencies = ["srfi-1"]
+license = "public-domain"
+sha256 = "054bik2zrdw4crdamarph11bk353aj8afk63wlivi6jx02bqq7zk"
+synopsis = "Combinators"
+version = "1.2.2"
+
+[comic-snarfer]
+dependencies = ["anaphora", "brev-separate", "define-options", "http-client", "html-parser", "mathh", "srfi-42", "sxpath", "strse", "uri-generic"]
+license = "gplv3"
+sha256 = "1pa566vfgwxl5nr56brn7rwkj63m2mgpqw1ma2228g4wyya7c8qn"
+synopsis = "Download files (such as web comic images) by recursing on XPath"
+version = "1.23"
+
+[commands]
+dependencies = []
+license = "bsd"
+sha256 = "13y49vrkd9rs98s9fk10g8w056xb9nnqxwn1372sayw64789i3ib"
+synopsis = "Helpers for programs that dispatch commands"
+version = "1.0.0"
+
+[comparse]
+dependencies = ["lazy-seq", "trie", "matchable", "srfi-1", "srfi-13", "srfi-14", "srfi-69"]
+license = "bsd"
+sha256 = "1marysqqvriycky83s6zh1nwiryrdwwi69l1jl0n090lg817mnzn"
+synopsis = "Schemely parser combinators"
+version = "3"
+
+[compile-file]
+dependencies = []
+license = "bsd"
+sha256 = "1029i5ifr48vb3clvl8n50iq23rzc42szdcsl9320qmj1ksg9y93"
+synopsis = "Programmatic compiler invocation"
+version = "1.3"
+
+[concurrent-native-callbacks]
+dependencies = ["typed-records", "matchable", "bind", "miscmacros", "srfi-18", "srfi-69"]
+license = "bsd"
+sha256 = "1v333c7wm51bj24s52h5vr2yvznm4hzg9gjqg5sssjnnq08pfwym"
+synopsis = "Invoke callbacks from other native threads"
+version = "1.0"
+
+[condition-utils]
+dependencies = ["srfi-1", "srfi-69", "check-errors"]
+license = "bsd"
+sha256 = "11mkmbyciyrqyakp1gyfvmbfayglhzx2x6j6zyp9kj31vhi2y4hd"
+synopsis = "SRFI 12 Condition Utilities"
+version = "2.2.3"
+
+[continuations]
+dependencies = []
+license = "bsd"
+sha256 = "1grsf94zv8l3s1ypbc8qcwqvqan26s523x4cs0kpd3symm5b5xwk"
+synopsis = "two continuation interfaces"
+version = "1.2"
+
+[coops-utils]
+dependencies = ["srfi-1", "srfi-13", "check-errors", "coops"]
+license = "bsd"
+sha256 = "1ywxc7r1l5a930rfp0fv99dcfg2gbvg93rp4jih4rnlpwys6gpv4"
+synopsis = "coops utilities"
+version = "2.2.3"
+
+[coops]
+dependencies = ["matchable", "miscmacros", "record-variants", "srfi-1"]
+license = "bsd"
+sha256 = "183pp1g5m06ss94ba1rq2rs4hqj92v6qz7ik3kzvl3b2aq77jk3z"
+synopsis = "A featureful object system"
+version = "1.3"
+
+[crc]
+dependencies = []
+license = "bsd"
+sha256 = "085ggy01wvb6sf33r65m7d8kmh65h3zax4nsijsd9v1ax7m2lsm4"
+synopsis = "Computes CRC checksum"
+version = "1.0.2"
+
+[crypt]
+dependencies = ["compile-file"]
+license = "public-domain"
+sha256 = "1x7il9qz6m8kicgz57iw2yykfn9x6pa56m33rp5z70z4yfkrxqwz"
+synopsis = "Secure password hashing through the Unix crypt() function"
+version = "1.0.1"
+
+[crypto-tools]
+dependencies = []
+license = "bsd"
+sha256 = "0ajf0qfnhp99f4x1dll2fhlxrsxamgrrwyksc7rrym77xmv8f1pd"
+synopsis = "Useful cryptographic primitives"
+version = "1.4"
+
+[csm]
+dependencies = ["matchable", "srfi-1", "srfi-13", "srfi-14", "miscmacros"]
+license = "bsd"
+sha256 = "1bvawrbslsfzxlhal5abyss0nj0jddqbs5ran58nygfc1myn3vfs"
+synopsis = "a build system"
+version = "0.5"
+
+[cst]
+dependencies = ["brev-separate", "srfi-1", "define-options", "match-generics"]
+license = "bsd-1-clause"
+sha256 = "1r7vc6rwc75di72v5h9s4cdakm5a2hywpayl1xpw4vbq8fdn7zc0"
+synopsis = "Visualize sexps as trees via Graphviz"
+version = "1.5"
+
+[csv-abnf]
+dependencies = ["regex", "utf8", "abnf", "yasos"]
+license = "gpl-3"
+sha256 = "1pqkk40c4i1lxhdwp6ghigmjxdn735j9m4b5ysswj39ypmx6d4i4"
+synopsis = "Parsing and formatting of comma-separated values (CSV)."
+version = "6.1"
+
+[daemon]
+dependencies = []
+license = "unlicense"
+sha256 = "1kqryy1jq9qz0y3c58qlwr8mvgdn2jyr7a6anqb32dipp9ylqkim"
+synopsis = "Create daemon processes"
+version = "0.0.1"
+
+[dataframe]
+dependencies = ["srfi-1", "srfi-25", "srfi-69", "srfi-127", "utf8", "vector-lib", "yasos", "rb-tree", "fmt", "statistics"]
+license = "gpl-3"
+sha256 = "0wkm3hpv2wjqwwsnwnm2fsr3pcxxv4qxlb52wih5yk9rvrnafnb5"
+synopsis = "Tabular data structure for data analysis"
+version = "0.5"
+
+[datatype]
+dependencies = []
+license = "bsd"
+sha256 = "09l14hiaas7mdibnh0i3a9jgpvgsy67m37zp948d3c5l16f3c826"
+synopsis = "A facility for creating and deconstructing variant records (from EOPL)"
+version = "1.6"
+
+[dbus]
+dependencies = ["miscmacros", "srfi-18", "foreigners"]
+license = "mit"
+sha256 = "0a1850gark0xjn8cw1gwxgqjpk17zjmk6wc5g23ikjh9gib8ry1q"
+synopsis = "A binding for libdbus, the IPC mechanism"
+version = "0.97"
+
+[debugger-protocol]
+dependencies = ["matchable"]
+license = "bsd"
+sha256 = "02iq3s4j2ar6hrqds6k3m9h4s3a6viwm4gj4m6fkrw0bpcyb6cny"
+synopsis = "Low-level interface to debugger-protocol"
+version = "0.4"
+
+[define-er-syntax]
+dependencies = ["matchable", "quasiwalk"]
+license = "bsd-1-clause"
+sha256 = "1chkfqzkx1v82knwx72nxgnaham1765gphlvyq4bv14nfd1syqjv"
+synopsis = "explicitly implicit renaming"
+version = "1.2"
+
+[define-options]
+dependencies = ["brev-separate", "getopt-long", "matchable", "quasiwalk", "srfi-1"]
+license = "lgpl"
+sha256 = "1j9lj5kj3j8jhclxnxrrc2wn6qn9j0bhr2y9fydg05an9q7jmrh0"
+synopsis = "Conveniently bind to getopt-long options"
+version = "1.23"
+
+[define-record-and-printer]
+dependencies = ["hahn", "matchable"]
+license = "bsd"
+sha256 = "1iz0j13bnjxbz2dck3bnc1q43dvx5np8lllws4bg9rgmn2x584x1"
+synopsis = "Trivial macro to define records and appropriate printers"
+version = "0.2.0"
+
+[defstruct]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1n8qy9bxlnacdq9gr4z4zjkwqsh9m34ij66qffah5nvqwskcavfy"
+synopsis = "A more convenient form of define-record"
+version = "2.0"
+
+[digraph]
+dependencies = ["dyn-vector", "matchable", "yasos", "srfi-1"]
+license = "gpl-3"
+sha256 = "0dkagz0rs27zh6cfmfqld18wb63pq3acylwidky3v01maw36c41r"
+synopsis = "Directed graph in adjacency list format."
+version = "2.0"
+
+[directory-utils]
+dependencies = ["srfi-1", "srfi-13", "miscmacros", "moremacros", "list-utils", "stack", "check-errors"]
+license = "bsd"
+sha256 = "0jaj7pi27d65wz1zpfxiphkdnk4an5yahhhxs28svsqprq0v0ay1"
+synopsis = "directory-utils"
+version = "2.2.6"
+
+[disjoint-set]
+dependencies = []
+license = "unlicense"
+sha256 = "0d1nfp2rd6nah5l07ijdhbzajnyvnrpfxd0kkph6kz6gc8v50qh7"
+synopsis = "Disjoint set implementation based on Scheme vectors and their indexes"
+version = "0.1.0"
+
+[doctype]
+dependencies = []
+license = "public-domain"
+sha256 = "1k3wabdnlyavdmpgdfyz8msr9s2y0kllvp3kw9hmjdlwlyfzw1ag"
+synopsis = "Exports strings corresponding to standard XML (XHTML, HTML) doctypes"
+version = "2.2"
+
+[dollar]
+dependencies = []
+license = "bsd"
+sha256 = "1nlsjri7fbf8jcxghvd47imqhc24rdfkik985md8h5d1h2j2mdqn"
+synopsis = "FFI convenience macro"
+version = "3.0.0"
+
+[dot-locking]
+dependencies = ["srfi-13", "srfi-18"]
+license = "bsd"
+sha256 = "13fndcyk4xavn694k1a8kcv3c02a2scxn0z3s56mya2nw4wns88z"
+synopsis = "advisory locking mechanism based on standard file operations"
+version = "0.4"
+
+[dotted-lambdas]
+dependencies = []
+license = "bsd"
+sha256 = "0wxg56c1ywi77xvk1xjpmdnz93mk21dqzhjc3pdm5mnvc49j5nnk"
+synopsis = "lambda equivalents with dots as trailing symbols"
+version = "1.3.1"
+
+[dust]
+dependencies = ["http-client", "memory-mapped-files", "openssl", "posix-groups", "begin-syntax", "matchable", "module-declarations"]
+license = "bsd"
+sha256 = "1r4yfs78az2p7szgsnlcnlfrqkivj9am7vm1sh2b29rjffkqnhp3"
+synopsis = "Fetch and install CHICKEN versions"
+version = "0.0.16"
+
+[dwim-sort]
+dependencies = ["brev-separate", "sequences", "srfi-1", "match-generics"]
+license = "bsd-1-clause"
+sha256 = "07xvngm9k3rlnhbgr0675xha3szyg4wn4y7x811fxycps9kq9lwn"
+synopsis = "dwimmy sort"
+version = "1.4"
+
+[dyn-vector]
+dependencies = ["srfi-1", "vector-lib"]
+license = "lgpl-3"
+sha256 = "0bjzldp0jxks200ciyp1pslmg3rbh7s1cx835qgmfd47qpyds8mb"
+synopsis = "Dynamic (dense) vectors based on SRFI-43."
+version = "2.1"
+
+[dynamic-import]
+dependencies = []
+license = "public-domain"
+sha256 = "17n0z551p7kr83afpjhg3q93q10nlwf7rjc3qmff1g026yhxnvwc"
+synopsis = "Dynamic Import"
+version = "1.0.2"
+
+[edn]
+dependencies = ["r7rs", "srfi-69", "srfi-1", "chalk"]
+license = "bsd"
+sha256 = "166qm2vx5gj7bc57s1bnnbp55zhv19hnimmivhhdhsnq32wi3511"
+synopsis = "EDN data reader/writer."
+version = "1.0"
+
+[edward]
+dependencies = ["r7rs", "srfi-1", "srfi-14", "srfi-37", "matchable", "posix-regex"]
+license = "gplv3"
+sha256 = "0gfvjgg6c6hl2xmh63067xkh0sd2vmczwisirgglcm2inz4hjll3"
+synopsis = "An extensible implementation of the ed text editor as defined in POSIX.1-2008"
+version = "1.0.1"
+
+[egg-tarballs]
+dependencies = ["simple-sha1", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "0sribz131y1q9x86zfgwjqpjhmz62f2jn41cv8d5s1q4bfpv4xkw"
+synopsis = "Creates tarballs for eggs in henrietta cache"
+version = "0.10.0"
+
+[elliptic-curves]
+dependencies = ["srfi-1", "srfi-99", "matchable", "modular-arithmetic"]
+license = "bsd"
+sha256 = "05jr977kx11dbs1lfxpkghi38hn37s9z526kg523ca5r1vamqzgh"
+synopsis = "Arithmetic and Cryptography on Elliptic Curve Groups over Finite Fields"
+version = "1.0.4"
+
+[endian-blob]
+dependencies = ["byte-blob"]
+license = "gpl-3"
+sha256 = "04f4d3kjagd9d12pigcwydyf39i1q3pbf6c88h9gs1ddfz13arq1"
+synopsis = "Endian-specific procedures for converting blobs to numeric values and vectors."
+version = "2.1"
+
+[endian-port]
+dependencies = ["iset", "endian-blob"]
+license = "gpl-3"
+sha256 = "15lxd1k6c3dxr7hx5gg8x2hd9ss49dc2h8ixm85jkl91bws757rc"
+synopsis = "An I/O port that supports different endian formats."
+version = "4.0"
+
+[envsubst]
+dependencies = ["matchable"]
+license = "bsd"
+sha256 = "1wvfdkafhqi2m1qdap8da5yf6148yy2mrcmjl8lb811rvffbqld7"
+synopsis = "Simple templating with parameter expansion"
+version = "1.0.0"
+
+[ephem]
+dependencies = ["foreigners"]
+license = "gplv3"
+sha256 = "0mg43ynh2s8r335sz1938wqjssz1wfk1mkicrg56nmkhc74p9181"
+synopsis = "A wrapper for libnova a 'general purpose, double precision, Celestial Mechanics, Astrometry and Astrodynamics library.'"
+version = "v1.1"
+
+[epoxy]
+dependencies = ["bind"]
+license = "bsd"
+sha256 = "036h1jm37chkcxzs95ypvsz3363qkszv1pr1sby3z4izck5039rl"
+synopsis = "Bindings to OpenGL and OpenGL ES through the Epoxy library"
+version = "0.2.2"
+
+[error-utils]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1s58jisckjzjf0v1cmr67ajzzs6dc67w0kzmynqpk9kwxd01asr5"
+synopsis = "Error Utilities"
+version = "2.1.0"
+
+[ersatz]
+dependencies = ["datatype", "silex", "lalr", "utf8", "uri-generic", "srfi-1"]
+license = "lgpl-3"
+sha256 = "0lrrqvgz4zpv1qkc45g0dnjmvkhyxh338wn009cmhj1ingv57yg0"
+synopsis = "A template engine inspired by Jinja2 and Jingoo."
+version = "1.28"
+
+[espeak]
+dependencies = ["utf8", "foreigners", "srfi-18"]
+license = "gpl-3.0"
+sha256 = "0cd0viivrvjz3qq8v9nrlix2jryghyg338g9ihnc43xsmmgfdcz9"
+synopsis = "Chicken bindings for espeak-ng's speak_lib.h"
+version = "0.1.7"
+
+[estraier-client]
+dependencies = ["http-client", "uri-common", "intarweb"]
+license = "bsd"
+sha256 = "12ng7wqdf0l2vdg96i19xpj5wsh9ppjrh0r7ip7kv8afpl8kqj6p"
+synopsis = "A pure Scheme Hyper Estraier client library"
+version = "1.0"
+
+[exif]
+dependencies = ["foreigners", "srfi-13"]
+license = "bsd"
+sha256 = "1gqlkxabpzb951fkrq2lgdq55sds8713iawdqvf3sqj25qbkz3j4"
+synopsis = "Binding to libexif, reading EXIF meta data from digital camera images."
+version = "1.2"
+
+[expand-full]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "072c5xvmsgkbz5wj4ihj0y4k5fvx9lsz5vjydvzmhnmwd613cg46"
+synopsis = "Full macro expansion"
+version = "2.1.3"
+
+[expat]
+dependencies = ["bind", "silex"]
+license = "bsd"
+sha256 = "162z5mblii6lk2n67ya3zgsgpi1dbfyzcq8r4gxld36j05w39bpb"
+synopsis = "An interface to James Clark's Expat XML parser"
+version = "2.2"
+
+[ezd]
+dependencies = ["srfi-1", "srfi-18", "scheme2c-compatibility", "xlib"]
+license = "bsd"
+sha256 = "1a7212xv4pr44hmz6z9gn3hv7j7v51p69jj30c6x05p4lip8myh3"
+synopsis = "easy drawing for programs on X displays"
+version = "2020.01.26"
+
+[ezxdisp]
+dependencies = ["bind"]
+license = "lgpl-2"
+sha256 = "0aqa7z8gir1kz6s8azj508hav80ymrp2adwpxa44hw6bbalgfdh8"
+synopsis = "A simple 2D and 3D graphics library for X11"
+version = "3.0"
+
+[fancypants]
+dependencies = ["srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "1pibvw1qzsb27411gajhk5m1kr8jvhdxk1l0dxhysd8kx5xjj862"
+synopsis = "Automatic ASCII smart quotes and ligature handling for SXML"
+version = "0.5"
+
+[fast-generic]
+dependencies = ["srfi-1", "matchable"]
+license = "bsd"
+sha256 = "0rm0x6ncsjvjcqkcqhpn9p3fwsbmfsf0p06biiy5ljf71w67q37v"
+synopsis = "fast-generic functions"
+version = "0.7"
+
+[fcp]
+dependencies = ["srfi-1", "srfi-18", "srfi-69", "base64", "regex", "matchable"]
+license = "bsd"
+sha256 = "0kbqghyf1qjmhs6vx6pkzq3m0y4yv2wan69sxpry8h0dj2lmw5jb"
+synopsis = "Very basic interface to freenet FCP"
+version = "v0.4"
+
+[feature-test]
+dependencies = []
+license = "bsd"
+sha256 = "1m9p5zhgj8g1n604pwp7fyd73jbra8fpjqcsz3a4mrgmc5sjvba1"
+synopsis = "Foreign feature testing"
+version = "0.2.0"
+
+[filepath]
+dependencies = ["matchable", "srfi-1", "srfi-13", "srfi-14"]
+license = "bsd"
+sha256 = "14mrpq6g4hirj2qsirnxpj4b9b48m8fk80r23wm95wrcir9cjqmr"
+synopsis = "Cross-platform file path manipulation."
+version = "1.6"
+
+[fix-me-now]
+dependencies = ["strse", "srfi-1", "sxml-transforms"]
+license = "bsd-1-clause"
+sha256 = "1acp5bdqd9k0gdjvnv41q77v0f1dkjxqmyvqq9xsgrm9xpv0mzw8"
+synopsis = "Make tweaks and changes to sexp trees"
+version = "1.5"
+
+[fmt]
+dependencies = ["srfi-1", "srfi-13", "srfi-69", "utf8"]
+license = "bsd"
+sha256 = "0w04zfkhh8cnns6n0m1s9zh8jn7nvm3h4nzvfzxiih84i6y13yx1"
+synopsis = "Combinator Formatting"
+version = "0.8.11.2"
+
+[foof-loop]
+dependencies = []
+license = "public-domain"
+sha256 = "1d6h1l2f5ihw1qb788cyn2lgdyyir4w79vbdbdz6imchs8mnr6xn"
+synopsis = "Extensible looping macros (originally based on Alex Shinn's)"
+version = "9.0"
+
+[forcible]
+dependencies = ["srfi-18", "pigeon-hole", "simple-timer"]
+license = "bsd"
+sha256 = "0vsgfk5x247grwmn6vky0d43s76qiys8sd41bvk4gqv6yww4y1a7"
+synopsis = "Thread- and exception aware, lazy-looking synchronization with timeouts - extending srfi-45"
+version = "0.3.10"
+
+[foreigners]
+dependencies = ["matchable"]
+license = "bsd"
+sha256 = "1jl1cdd34qwsd9x7vqw2aqqgd2m2mii898ilg2vkb39nqfvg35b5"
+synopsis = "Foreign helper macros"
+version = "1.5"
+
+[format]
+dependencies = ["srfi-13"]
+license = "public-domain"
+sha256 = "0jrllvm63850q42w7kcc4zl0537fa7iffbj4mk336r4rfgp9yxxk"
+synopsis = "Common-Lisp style formatted output"
+version = "3.2.3"
+
+[fp-utils]
+dependencies = ["fx-utils"]
+license = "bsd"
+sha256 = "02k8ayj30gh36cz0p2xirjnvbb845ng43yxb2b7x8ih39jyps9py"
+synopsis = "fp utilities"
+version = "4.2.0"
+
+[freetype]
+dependencies = ["srfi-1", "srfi-13", "foreigners", "matchable"]
+license = "bsd"
+sha256 = "0h072r758yjqz9msq49plkrgqm9xxlmx8fd15gvv9pkpiwp8jf41"
+synopsis = "Freetype2 Interface"
+version = "0.3"
+
+[ftl]
+dependencies = []
+license = "lgpl-2.1"
+sha256 = "0qqpf0sng3g5wrp6038b5h757naw4g58cfzn3j67kywbl9ai3kjr"
+synopsis = "Interface based sequence library"
+version = "0.9"
+
+[fuse]
+dependencies = ["srfi-18", "foreigners", "matchable", "module-declarations"]
+license = "bsd"
+sha256 = "1ywgjrhkr45837xf5vnb2i3aacby7yjkhm62drdf70c09za860dd"
+synopsis = "Filesystems in Userspace"
+version = "0.1.1"
+
+[fx-utils]
+dependencies = []
+license = "bsd"
+sha256 = "0kbk7cm5ss00582nvgfq25zcgf07z417c5jf0flva4csm37rb6hf"
+synopsis = "fx utilities"
+version = "4.0.3"
+
+[gemini-client]
+dependencies = ["openssl", "r7rs", "uri-generic"]
+license = "isc"
+sha256 = "0l4rs91jsczjnna0yf8d1bsi9k1789jhjqcnhci2i63ls93p2iww"
+synopsis = "Client library for the gemini:// protocol"
+version = "0.1"
+
+[gemini]
+dependencies = ["openssl", "r7rs", "uri-generic"]
+license = "isc"
+sha256 = "1kx70kp1r1dz23wcpqdrgjh49vcn2lhl50cg4b48v3rc37rpa4vz"
+synopsis = "Client library for the gemini:// protocol"
+version = "0.2.1"
+
+[geminih]
+dependencies = ["clojurian", "acetone", "anaphora", "html-parser", "strse", "match-generics", "brev-separate", "srfi-1"]
+license = "bsd-1-clause"
+sha256 = "1i2nmzk61szkpg0a2r4i6gx00hnj78b3dqkk34y349h29dm2jv56"
+synopsis = "Gemtext to SXML"
+version = "1.13"
+
+[gemrefinder]
+dependencies = ["scsh-process", "srfi-1", "srfi-42", "define-options", "combinators", "brev-separate", "match-generics", "strse"]
+license = "agpl"
+sha256 = "0zb0yxmiz513c2fxy2kgv454kgynavwlxryfgrzgiamz04sca2r3"
+synopsis = "Checks Gemini space for replies to your posts"
+version = "1.5"
+
+[genann]
+dependencies = []
+license = "zlib"
+sha256 = "15q4ybxb04y4alkik99dkl5i3brh8dazahgmwjn51xk2s389gba1"
+synopsis = "Chicken bindings to genann - a simple neural network library in ANSI C"
+version = "0.2.2"
+
+[generalized-arrays]
+dependencies = ["check-errors", "matchable", "srfi-133", "typed-records"]
+license = "bsd3"
+sha256 = "0d9n1njd1mrcpqz8xim0m5x0yz94b8xyvwzyvsfq4l7q3km44v3k"
+synopsis = "An implementation providing generalized arrays and storage classes for CHICKEN Scheme."
+version = "0.0.7"
+
+[generics]
+dependencies = ["simple-cells"]
+license = "bsd"
+sha256 = "1fklbb5yjg8j56cvqbijirb2d0h5jqscp7219f67aln3lpq06dz6"
+synopsis = "an implementation of generic functions and a lot of helpers"
+version = "2.0.3"
+
+[geo-utils]
+dependencies = ["srfi-1", "vector-lib", "mathh", "check-errors", "symbol-utils"]
+license = "bsd"
+sha256 = "0n0fsfna4amxqkfcrqmr7b468xqhs2m7pmqyxs0zllmpf9wn0hd7"
+synopsis = "Geographic Utilities"
+version = "1.2.2"
+
+[getopt-long]
+dependencies = ["srfi-1", "srfi-13", "srfi-14", "matchable"]
+license = "lgpl-3"
+sha256 = "0qp4wdpxmjbk14i80qn8g4lpppwy7qmazk3113m7ill60jz3459m"
+synopsis = "Command line option parsing."
+version = "1.21"
+
+[getopt-utils]
+dependencies = ["utf8", "srfi-1", "getopt-long"]
+license = "bsd"
+sha256 = "0i17fj29zbbm05x68h7fy524ypk8vbr62gq6jkrwf18371l0l767"
+synopsis = "Utilities for getopt-long"
+version = "1.1.1"
+
+[git]
+dependencies = ["srfi-69", "foreigners", "module-declarations", "srfi-1"]
+license = "bsd"
+sha256 = "0cgab5wbcqqcxx771xvbyd06c3dz3ib8v2mpv21d2z6b48c9qin8"
+synopsis = "libgit2 bindings"
+version = "0.2.0"
+
+[gl-math]
+dependencies = ["srfi-1", "matchable"]
+license = "bsd"
+sha256 = "043587v0mm9lisy7vacg0z18fnabviwj5cmk1gd2y05d3zqbf4dz"
+synopsis = "A small gamedev-oriented math library"
+version = "0.9.1"
+
+[gl-type]
+dependencies = ["freetype", "miscmacros", "epoxy", "gl-utils", "srfi-1", "srfi-13", "srfi-14"]
+license = "bsd"
+sha256 = "1x5krxmvkpv52qnyp241x1vs6ws67lgb79zs0v5p0hbdh8mr8h4r"
+synopsis = "Freetype font rendering in OpenGL"
+version = "0.4.0"
+
+[gl-utils]
+dependencies = ["srfi-1", "z3", "matchable", "miscmacros", "srfi-99", "srfi-42", "epoxy", "gl-math"]
+license = "bsd"
+sha256 = "1krm8qs0h9vn6sp62imv6arwr6l1pg5amimkci35l4n4jsrmd6ag"
+synopsis = "High(er) level tools for OpenGL"
+version = "0.8.0"
+
+[glfw3]
+dependencies = ["bind"]
+license = "bsd"
+sha256 = "0vfjd3j908cclxnkkrj8g8ql8vhbfrs6ll4ryar6132yi1fs91ba"
+synopsis = "Bindings to the GLFW3 OpenGL window and event management library"
+version = "0.7.1"
+
+[glls]
+dependencies = ["epoxy", "gl-utils", "miscmacros", "matchable", "fmt", "srfi-1", "srfi-42", "srfi-69"]
+license = "bsd"
+sha256 = "0mx2lpj4mly86fgnlkv7kw1xmabqkzxmjdahp9p0387v4a8nwzas"
+synopsis = "A compiler for a Scheme-like language targeting the GLSL"
+version = "0.12.2"
+
+[gmi]
+dependencies = []
+license = "unlicense"
+sha256 = "08c89r4cz4nh66crkfsxwdj1lxjmbxr2lls92ncnqlxd0mnmplq0"
+synopsis = "Gemtext reader and writer"
+version = "0.0.7"
+
+[gnuplot-pipe]
+dependencies = ["srfi-1", "srfi-13"]
+license = "gpl-3"
+sha256 = "10mnxnm91wji6glpc4bg2hhchgpj7ilgvskj5d5b3j9i5hd5xkzn"
+synopsis = "A simple interface to Gnuplot"
+version = "0.4.2"
+
+[gochan]
+dependencies = ["matchable", "srfi-18", "queues"]
+license = "bsd"
+sha256 = "1pyzr387zbbw7x9zk524qcs368hzxv4c46p24cz3x2nl30y84d5h"
+synopsis = "golang channels in CHICKEN"
+version = "5.2.10"
+
+[graph-bfs]
+dependencies = ["srfi-1", "iset", "matchable", "yasos", "digraph"]
+license = "gpl-3"
+sha256 = "0kw1xszqnph2b2p8mzf8gskd6g3v3a5shvm7bndwwkly2l8p178a"
+synopsis = "Breadth-first search in a graph."
+version = "2.1"
+
+[graph-cycles]
+dependencies = ["srfi-1", "iset", "matchable", "yasos", "digraph", "graph-scc"]
+license = "gpl-3"
+sha256 = "084hfzx8m9vy3z3l7ipvbsp0j4rs80yx43zajbhnj0p5h38vkz90"
+synopsis = "Enumerate all simple cycles in a graph."
+version = "2.0"
+
+[graph-dfs]
+dependencies = ["srfi-1", "iset", "matchable", "yasos", "digraph"]
+license = "gpl-3"
+sha256 = "13v9bg4isf707ldid13bz2vrnklwr8vnjlma08p51la6y71cy196"
+synopsis = "Depth-first search in a graph."
+version = "2.0"
+
+[graph-scc]
+dependencies = ["queues", "iset", "matchable", "yasos", "digraph"]
+license = "gpl-3"
+sha256 = "0i5fpryziv0i2vwa8bjqbdvxzakhflra4z3amafjwsgrpc1x908a"
+synopsis = "Compute strongly-connected components (SCC) of a graph."
+version = "2.0"
+
+[graph-separators]
+dependencies = ["srfi-1", "yasos", "digraph"]
+license = "gpl-3"
+sha256 = "18w16lwxq4285ms4lm6j55wm14ggprsh3al106rx3480qz5wkvh0"
+synopsis = "Determine the separation vertices of a graph."
+version = "2.1"
+
+[gtk-server]
+dependencies = []
+license = "gpl3"
+sha256 = "1c5gwypmhs2r6lcd30vycabqcccma5vgagrdxcfskfpzychv7lnk"
+synopsis = "GTK-server binding"
+version = "0.1"
+
+[hahn]
+dependencies = []
+license = "bsd"
+sha256 = "1p7i8vmh4pg9q0k1ml2n8wbrl7hq8b7x9xgxz5jsb8ywwax74fk4"
+synopsis = "In-source documentation"
+version = "0.10.1"
+
+[hash-trie]
+dependencies = []
+license = "mit"
+sha256 = "1860bp5h3kh0ra6b2qvb5pccylajq1x2hng0skqnv8ik068lnfr0"
+synopsis = "hash-trie"
+version = "1.1.8"
+
+[heap-o-rama]
+dependencies = ["srfi-18"]
+license = "bsd"
+sha256 = "10jys007s16cr3sz9ca5ip93gz7m29mjxsifpaafsyfbpg4n9p88"
+synopsis = "..."
+version = "0.4"
+
+[henrietta-cache-git]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0mmx7b0xi0b95gz0z2j93r6fmm04y3m22x4n0n1klq8vm71vg5rx"
+synopsis = "A tool to convert and keep henrietta's cache in a git repository"
+version = "0.0.1"
+
+[henrietta-cache]
+dependencies = ["http-client", "matchable", "srfi-1"]
+license = "bsd"
+sha256 = "0lkjrvldxps7ld4fv2c8p1vaw1nb4lbk85agq529j0ix7nzwfwxm"
+synopsis = "Fetch and cache extensions from various sources for Henrietta to consume"
+version = "1.6.1"
+
+[henrietta]
+dependencies = ["regex", "srfi-1"]
+license = "bsd"
+sha256 = "17ibkk6pq81hw2ydwd00jgg0zzbrcfzcbni60x95479c1xnzdb64"
+synopsis = "Serve extensions over HTTP"
+version = "1.5"
+
+[hmac]
+dependencies = ["message-digest"]
+license = "bsd"
+sha256 = "005xj5cndfxzwr7l7xiaybzgghzwp4b4812i3vw090igg7sl8mlg"
+synopsis = "HMAC provides a HMAC using the message-digest interface."
+version = "7.2.0"
+
+[holes]
+dependencies = []
+license = "bsd"
+sha256 = "01zgr5w3msk7s45y7s3js3nwfa6j3wfxf9ijn6ymlrkac96jmiv3"
+synopsis = "partial expressions as procedures with named parameters"
+version = "1.2.1"
+
+[hopefully]
+dependencies = ["srfi-1", "srfi-18", "miscmacros"]
+license = "bsd"
+sha256 = "1f0jas0liwbsd2gr7iirmxx357hykxjy0c2zw9d3j92g2c59xk77"
+synopsis = "Simple software transactional memory."
+version = "0.2.6"
+
+[html-parser]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "0qa09xnszyp3hfalacawr4hwlaxrr0g1iq617wxna036mjifg1rs"
+synopsis = "A permissive, scalable HTML parser."
+version = "0.3"
+
+[http-client]
+dependencies = ["intarweb", "uri-common", "simple-md5", "sendfile", "srfi-1", "srfi-13", "srfi-18", "srfi-69"]
+license = "bsd"
+sha256 = "0d24dpi8c45rvwfm31hd033rpyghx9xps1qdki8czcl6500bcy7y"
+synopsis = "High-level HTTP client library"
+version = "1.2.1"
+
+[http-session]
+dependencies = ["intarweb", "simple-sha1", "spiffy", "srfi-1", "srfi-18", "srfi-69", "uri-common"]
+license = "bsd"
+sha256 = "1yjzkax2m3jz05640la0ry11vafrqwdhn2sd1jr0w8yhgbwwfprs"
+synopsis = "Facilities for managing HTTP sessions"
+version = "2.10"
+
+[hyde]
+dependencies = ["sxml-transforms", "doctype", "matchable", "scss", "spiffy", "colorize", "intarweb", "uri-common", "svnwiki-sxml", "defstruct", "sxpath", "html-parser", "atom", "rfc3339", "srfi-1", "srfi-13", "srfi-18", "srfi-69"]
+license = "bsd"
+sha256 = "1wb0qla9bbr55iw3z502b6chfb7vzjf3h0b5hy2anl7vic4dn8ar"
+synopsis = "A static website compiler"
+version = "4"
+
+[hypergiant]
+dependencies = ["glfw3", "glls", "epoxy", "gl-math", "gl-utils", "gl-type", "hyperscene", "noise", "soil", "miscmacros", "srfi-18", "srfi-42", "srfi-99", "bitstring"]
+license = "bsd-2-clause"
+sha256 = "0a4slm7rdjcqdvq36vb1q6b8fabqd9375hb53y2q1a3vi6xldwwr"
+synopsis = "Game library"
+version = "0.5.3"
+
+[hyperscene]
+dependencies = ["miscmacros"]
+license = "bsd"
+sha256 = "1v2l36f5ymvc3bslh462lcmnjdkv26xmlqr3fr2rifc0yrwry6bp"
+synopsis = "Scene graph and spatial partitioning"
+version = "0.4.0"
+
+[iconv]
+dependencies = []
+license = "public-domain"
+sha256 = "0bwna3hnimad68hp11mpdi74sv971iqrzdayzidwb2qslzd1b3kr"
+synopsis = "Character-set conversions"
+version = "2.0"
+
+[icu]
+dependencies = ["utf8", "srfi-13", "srfi-1", "foreigners", "chalk"]
+license = "unicode"
+sha256 = "1hii4n3mraqaznaiwznwbx06yy99157pxxarkj558zarkn43k82y"
+synopsis = "Chicken bindings to the ICU unicode library"
+version = "0.3.3"
+
+[image-dimensions]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "0f451j8y8hyhbda12b8jj68gxjqmg24piwwk7vk8p66y0n7mslhk"
+synopsis = "Detect image dimensions for common formats"
+version = "1.0.1"
+
+[imlib2]
+dependencies = ["foreigners"]
+license = "bsd"
+sha256 = "0vgn8dczhlmjgzhlpsmzk69l4h33yxhmjmqnjg7zi77h2canv5sk"
+synopsis = "Chicken bindings for the Imlib2 image library"
+version = "1.2"
+
+[inotify]
+dependencies = ["miscmacros", "queues", "srfi-18", "srfi-69"]
+license = "mit"
+sha256 = "0sr17i3sq85y90y005v6wrfnmchhmrmwz8cj74b0zl997ayla0jd"
+synopsis = "Bindings to inotify"
+version = "1.1"
+
+[input-parse]
+dependencies = ["srfi-13"]
+license = "public-domain"
+sha256 = "195ghf8qk3w7wxvdra3gi653p57y3hdadngjz599ym14rcfxq61q"
+synopsis = "input-stream tokenizing and parsing routines."
+version = "1.2"
+
+[intarweb]
+dependencies = ["srfi-1", "srfi-13", "srfi-14", "defstruct", "uri-common", "base64"]
+license = "bsd"
+sha256 = "0khzz6w8dh8sbiaqw3b68p0v8lv4bjwxipkb9cqj2q9r7zl84555"
+synopsis = "A more convenient HTTP library"
+version = "2.1.0"
+
+[integer-map]
+dependencies = ["srfi-1", "srfi-128", "srfi-143", "srfi-158"]
+license = "mit"
+sha256 = "093d3dz892g3jw77fzdk5ayjz7qjs7mzd2knil7ci9zs5i8flxyi"
+synopsis = "SRFI 224 integer mappings"
+version = "1.0.3"
+
+[interfaces]
+dependencies = ["srfi-1"]
+license = "public-domain"
+sha256 = "08yjwfy2cmk23j60p611gnjz4kgph1rl583xkp80vy2fsg01dnqv"
+synopsis = "Simple interface/implementation abstraction"
+version = "0.4.1"
+
+[internet-message]
+dependencies = ["yasos", "utf8", "abnf"]
+license = "gpl-3"
+sha256 = "0h2avknylg7kyhi7z7vpvs9qzw7kh5k7yrwqv6lgqdsdzbjygni9"
+synopsis = "Parser combinators for Internet Message Format (RFC 5322)."
+version = "7.1"
+
+[introspect]
+dependencies = []
+license = "bsd"
+sha256 = "0r8fcqrzq2cj3vcr484v0k7f706pnylv7mq9lq3ra5pv079fblz3"
+synopsis = "Module introspection"
+version = "0.2"
+
+[ioctl]
+dependencies = ["foreigners"]
+license = "bsd"
+sha256 = "0qs2daw16zw4jpqnb0q2nnb0qanki7nl0k437b9m4a7qslhdqw6r"
+synopsis = "ioctl system call interface"
+version = "0.4"
+
+[ipfs]
+dependencies = ["http-client", "intarweb", "medea", "srfi-1", "srfi-13", "srfi-189", "srfi-197", "uri-common"]
+license = "unlicense"
+sha256 = "1mw6z3piddy9xz494kv0243jhhirlb1dp15dph2p1ks4bhipbr4m"
+synopsis = "IPFS HTTP API for Scheme"
+version = "0.0.13"
+
+[irc]
+dependencies = ["matchable", "regex", "srfi-1"]
+license = "bsd"
+sha256 = "0dxlfp0mn96pgimb6wf3mzqlm4jqz3f79sn9akqp03v9pqpszgyh"
+synopsis = "A simple IRC client"
+version = "1.9.9"
+
+[isaac]
+dependencies = ["module-declarations"]
+license = "bsd"
+sha256 = "0hmqm5ag457q0zryaj8b2zx25hgg9pq4l1gxd5vf4xb4s79i1wxb"
+synopsis = "Bindings to the ISAAC CSPRNG"
+version = "1.0.0"
+
+[iset]
+dependencies = []
+license = "bsd"
+sha256 = "1z59w289416wpf7i62gry6fyglgn6cip4zvffxd64yw9wgyzcjzc"
+synopsis = "Integer sets"
+version = "2.2"
+
+[iterators]
+dependencies = []
+license = "bsd"
+sha256 = "0aji2ycbqykqqy2911gwfsyp1g8sry2k7w7ap80gq41xravknawf"
+synopsis = "Iterators and coroutines"
+version = "0.1.1"
+
+[iup]
+dependencies = ["srfi-1", "srfi-13", "srfi-42", "srfi-69", "miscmacros"]
+license = "bsd"
+sha256 = "1b7pqkmqkavzjaf7hiyvyvqizrkx3l9j7dk449cnas27p5sczsgn"
+synopsis = "Bindings to the IUP GUI library"
+version = "1.9.5"
+
+[jsmin]
+dependencies = []
+license = "bsd"
+sha256 = "0spkddwisamn8mwjl4ayqy8g233vcmsrgar8aqk83dv3p5ax8kmi"
+synopsis = "Implementation of Douglas Crockford's JavaScript minifier in CHICKEN Scheme"
+version = "2.2"
+
+[json-abnf]
+dependencies = ["abnf", "utf8", "srfi-1"]
+license = "gpl-3"
+sha256 = "1fi5k13pmjx008xq9ny7rz1h48gjdrrx99sm8jhwaivcsg8bikqd"
+synopsis = "Parser combinators for JavaScript Object Notation (JSON)."
+version = "7.0"
+
+[json-rpc]
+dependencies = ["r7rs", "srfi-1", "srfi-18", "srfi-69", "srfi-180", "utf8"]
+license = "mit"
+sha256 = "10f2iw93fhc0vha6axqzd27akh0ys7a6q0vwhpl0jzw4s48h3ss3"
+synopsis = "A JSON RPC library for R7RS scheme."
+version = "0.4.5a"
+
+[json-utils]
+dependencies = ["utf8", "srfi-1", "srfi-69", "vector-lib", "miscmacros", "moremacros"]
+license = "bsd"
+sha256 = "1m67ri4b2awnmsmva1613cnsp94v0w73qxw4myyhglrnkam4xlcc"
+synopsis = "JSON Utilities"
+version = "1.1.1"
+
+[json]
+dependencies = ["packrat", "srfi-1", "srfi-69"]
+license = "mit"
+sha256 = "1h27h6z7awadijk9w51df9dyk3wma27fp180j7xwl27sbw7h76wz"
+synopsis = "A JSON library"
+version = "1.6"
+
+[kd-tree]
+dependencies = ["srfi-1", "datatype", "yasos"]
+license = "gpl-3"
+sha256 = "14b1v6smk3gx1n0mqldnfjr5n6r9xhs56c8gvrssh5k0a41nk8j4"
+synopsis = "K-D tree spatial indexing structure."
+version = "6.1"
+
+[kiwi]
+dependencies = ["srfi-1", "srfi-69", "clojurian", "matchable"]
+license = "zlib"
+sha256 = "00r9020pz5x6w9zca4qx9n6n2sj9yny0zn41fnr47gsx91mxv2qb"
+synopsis = "Bindings to the KiWi library"
+version = "1.0.2"
+
+[lalr]
+dependencies = ["srfi-1"]
+license = "lgpl-3"
+sha256 = "1v4v2xzax7izhl6gnc2lpm8bw2igbp7m4d7n6c2iibm4422mv3nc"
+synopsis = "An efficient LALR(1) parser generator"
+version = "2.5.2"
+
+[latch]
+dependencies = ["matchable"]
+license = "public-domain"
+sha256 = "0sl8i18g03cl8qpaqbrfkcx7xd28jyxcb183873s9yq7max4zryr"
+synopsis = "Evaluate expressions once"
+version = "0.3"
+
+[lazy-ffi]
+dependencies = ["bind", "srfi-1", "srfi-69"]
+license = "bsd"
+sha256 = "07fqnpa8jlalgasi0w859qry84qfdg0pb4892cjazsfl72ii5yhw"
+synopsis = "A foreign function interface for lazy programmers"
+version = "1.8.6"
+
+[lazy-seq]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "12gz8999g73fa20v067gs4v6zs65w8qajwjfsngbcdaqadv2733g"
+synopsis = "Clojure-like lazy sequences"
+version = "2"
+
+[ldif-sexpr]
+dependencies = ["uri-common", "base64", "srfi-1", "srfi-13", "srfi-14", "matchable"]
+license = "bsd"
+sha256 = "123d95vxkn11zdqfy73l2n26f6i8zcj97zhcc6yhia6f1x4qb61n"
+synopsis = "Convert (parse&write) LDIF, rfc4514 and LDAP filters (rfc2254) into S-expressions."
+version = "0.3.2"
+
+[leveldb]
+dependencies = []
+license = "bsd"
+sha256 = "14wjgiaclxm6f3m88fakg5hdpxd1f8d8yzm6vgwv01dd6izqpvfv"
+synopsis = "Bindings to Google's LevelDB Key-Value Store"
+version = "1.2"
+
+[levenshtein]
+dependencies = ["srfi-1", "srfi-13", "srfi-63", "srfi-69", "vector-lib", "utf8", "miscmacros", "record-variants", "check-errors"]
+license = "bsd"
+sha256 = "07jwz006c6yhibg7d9nb35rif04810820pss5mg7c7mbn2nzmq1q"
+synopsis = "Levenshtein edit distance"
+version = "2.4.0"
+
+[lexgen]
+dependencies = ["srfi-1", "utf8", "srfi-127"]
+license = "gpl-3"
+sha256 = "1dbvs2g5772w8nvh62rvnsqsmivr76ypkbncbs8l0rx9qi8ir9fn"
+synopsis = "Lexer combinators"
+version = "8.2"
+
+[linenoise]
+dependencies = []
+license = "bsd"
+sha256 = "0is9j6hq6nmnsrn2g01ssxg8hwndc3y6fx02hsvfdsqqzj8qzjvr"
+synopsis = "A minimal, zero-config, BSD licensed, readline replacement."
+version = "1.0"
+
+[list-comprehensions]
+dependencies = []
+license = "bsd"
+sha256 = "09v0k4wx4i456hdpsnani9i6ky7cy4sja4p57y4aqc5y5n1zaf0w"
+synopsis = "Some list creating routines"
+version = "1.2.1"
+
+[list-utils]
+dependencies = ["utf8", "srfi-1", "check-errors"]
+license = "bsd"
+sha256 = "1llnf0qrssw4vpwvp17ir7558q0d1xyyb14zydcrnb9nhbzly5jr"
+synopsis = "list-utils"
+version = "2.6.0"
+
+[live-define]
+dependencies = ["matchable"]
+license = "public-domain"
+sha256 = "07jlsrw0v9d1584zqn6clbyc5qawmibqjnzpn7vb6z65smk4036j"
+synopsis = "Hack that replaces “define” with a version that mutates existing procedures."
+version = "1.1"
+
+[llrb-syntax]
+dependencies = []
+license = "bsd"
+sha256 = "1yn9ilxdx4cx1famay0rxkzljxs7vfdcqsv74lidqd84z39swy2c"
+synopsis = "Expands LLRB code customized to data structures."
+version = "0.2"
+
+[llrb-tree]
+dependencies = ["srfi-128", "miscmacros", "llrb-syntax"]
+license = "bsd"
+sha256 = "13qsba89mra5bs2gsv313dy6gvm3mzccl31gjh41wyk81xzaq434"
+synopsis = "LLRB tree general and customized to key types."
+version = "0.3.8"
+
+[lmdb-ht]
+dependencies = ["rabbit", "srfi-69", "srfi-13", "compile-file"]
+license = "bsd"
+sha256 = "1ragkv9xpgsq9lfz0p6aknw54m4rynby2vq6xlhrlhwwq0g5v1ld"
+synopsis = "Hashtable-like interface to the LMDB key-value database."
+version = "3.4"
+
+[lmdb]
+dependencies = ["srfi-1"]
+license = "openldap"
+sha256 = "1ymy7ji9q7zvy8708f4zzavxkvajmq8l8m1z6v6873qkxgv6jkw8"
+synopsis = "Bindings to LMDB"
+version = "1.0.6"
+
+[locale]
+dependencies = ["srfi-1", "utf8", "check-errors"]
+license = "bsd"
+sha256 = "1mqdr1bw5w6nnrg5dxzc4m5qnbrvvkk9v8nm3a6y0qmpscaim9z5"
+synopsis = "Provides locale operations"
+version = "0.9.2"
+
+[locals]
+dependencies = []
+license = "bsd"
+sha256 = "15wpww2qjv87k0j8lqvf4za16y7ip4s2949ax1h9ibfb4g21c11b"
+synopsis = "local declarations inspired by ML"
+version = "1.0.1"
+
+[loop]
+dependencies = ["srfi-1"]
+license = "gpl-2"
+sha256 = "1i4k4sy7hjc2djk1h0j46hzv3vn4qp280dzv7w3j9lx2pcpjs4gs"
+synopsis = "The Common Lisp LOOP macro"
+version = "1.5"
+
+[lowdown]
+dependencies = ["char-set-literals", "clojurian", "comparse", "fancypants", "srfi-1", "srfi-13", "srfi-14", "srfi-69", "sxml-transforms"]
+license = "bsd"
+sha256 = "0ihnsnjr2mfac2z053ra5167791c3jzz11wvj1fz2jz688pdr6rg"
+synopsis = "A pure Chicken Markdown parser"
+version = "3"
+
+[lsp-server]
+dependencies = ["apropos", "chicken-doc", "json-rpc", "nrepl", "r7rs", "srfi-1", "srfi-18", "srfi-69", "srfi-130", "srfi-133", "srfi-180", "uri-generic", "utf8"]
+license = "mit"
+sha256 = "09fak8d29qmxynh4361prhfg971j74mha6pw311a6kmz88h9zp0h"
+synopsis = "LSP Server for CHICKEN."
+version = "0.4.4"
+
+[macaw]
+dependencies = []
+license = "bsd"
+sha256 = "1zc9prn3n4rac6ibgbfg0fcdl0czf31qhx8v2276m49i7hizvan4"
+synopsis = "Efficient color types and math"
+version = "0.1.1"
+
+[magic]
+dependencies = []
+license = "bsd"
+sha256 = "17j25ckrhpm1k2ivl7qa1k87kylid466bb23ic96h64n111qhhdk"
+synopsis = "libmagic bindings"
+version = "0.1.0"
+
+[mailbox]
+dependencies = ["srfi-1", "srfi-18"]
+license = "bsd"
+sha256 = "1g1fxkydd8wkqpvfv4md2ilk5vf4276ks5153da7mph2i6hbzr4a"
+synopsis = "Thread-safe queues with timeout"
+version = "3.3.10"
+
+[make-tests]
+dependencies = ["brev-separate", "srfi-1", "uri-common"]
+license = "public-domain"
+sha256 = "174nbjy27iiz29g906p9rsg036mgwjnl7ll0qc2clqzq1svkgqc7"
+synopsis = "Create unit tests from a file of expressions"
+version = "1.12"
+
+[make]
+dependencies = ["srfi-1"]
+license = "lgpl-2.0+"
+sha256 = "0dhw7jf6f67y6wpcs2vq9b7jwhkkb2z9gwf1z036yvhfyir6l2z8"
+synopsis = "The PLT 'make' macro"
+version = "1.9"
+
+[manual-labor]
+dependencies = ["regex", "matchable", "svnwiki-sxml", "srfi-1", "uri-generic", "chicken-doc-html"]
+license = "bsd"
+sha256 = "1v8af7p0np2fphp5mi8kk1872lcqpka211j51dw6010db2262pbm"
+synopsis = "Generate static HTML manual from wiki docs"
+version = "0.3"
+
+[markdown-svnwiki]
+dependencies = ["lowdown", "sxml-transforms", "miscmacros", "srfi-1", "srfi-13", "srfi-37"]
+license = "bsd"
+sha256 = "1iw63ki41f1gr2b89k0ligwyljxfx8ysaacfnf70wgz4j70mh282"
+synopsis = "Convert Markdown to svnwiki"
+version = "0.3.1"
+
+[match-generics]
+dependencies = ["brev-separate", "matchable", "quasiwalk", "srfi-1"]
+license = "bsd-1-clause"
+sha256 = "1js4kq8hp6n8182mzyrs7q7aa6hf9q5y8q3zp2lkplpp862x2sks"
+synopsis = "matchable generics"
+version = "2.8"
+
+[matchable]
+dependencies = []
+license = "public-domain"
+sha256 = "0bizkac4a926lbk0v2m05ysq359mzhfsqh973m72jc4gcj4azr5p"
+synopsis = "Hygienic MATCH replacement"
+version = "1.1"
+
+[math]
+dependencies = ["srfi-1", "r6rs-bytevectors", "miscmacros", "srfi-133", "srfi-42"]
+license = "gpl-3.0"
+sha256 = "0q4996hf2wi043vni1006gm4xkj0rk76f505k158ggdv0ihqg5l7"
+synopsis = "Chicken port of Racket's math library"
+version = "0.3.4"
+
+[mathh]
+dependencies = []
+license = "public-domain"
+sha256 = "1zdm58a950vslyjkw4w04c70vhjwf5bdxw79mp3cq65ik474gi8d"
+synopsis = "ISO C math functions, miscellaneous math utilities, and constants"
+version = "4.6.4"
+
+[matrico]
+dependencies = []
+license = "zlib-acknowledgement"
+sha256 = "0ng09xbk8229nhq4s8f8rxgrgigf81qr685mggvk2lm5p7kckpjq"
+synopsis = "A flonum matrix module for CHICKEN Scheme."
+version = "0.5rel"
+
+[md5]
+dependencies = ["message-digest-primitive"]
+license = "public-domain"
+sha256 = "1crpkb0vzg26rk1w9xmswmx53bsira02hkixjspmfrrssdkvh5gv"
+synopsis = "Computes MD5 (RFC1321) checksums"
+version = "4.1.3"
+
+[mdh]
+dependencies = []
+license = "gpl"
+sha256 = "0xkrjq9ng0rxcxllmn9nvjqilkdgmliwaw9pbrgyqsxdi9s9z7z3"
+synopsis = "interface to the MDH database"
+version = "0.2"
+
+[medea]
+dependencies = ["comparse", "srfi-1", "srfi-13", "srfi-14", "srfi-69"]
+license = "bsd"
+sha256 = "1ad7x1sziynjjgxiv70ghbabc1mwa15mdx38wazfzn3nl7ma1hm6"
+synopsis = "A JSON parser (and emitter) built with comparse"
+version = "4"
+
+[memcached]
+dependencies = ["base64", "srfi-13", "srfi-14"]
+license = "bsd"
+sha256 = "1n6y2bgwc7bxcd8mv6zrq4d09659bx664m8v6zvj4c67dqrcrrd8"
+synopsis = "Client interface to the Memcached protocol."
+version = "1.5"
+
+[memoize]
+dependencies = ["srfi-69"]
+license = "bsd"
+sha256 = "1xh9cfxbr28x2kmsr4n54ynmpz9z5wl9b0rc455mhb6ilsl5nyzi"
+synopsis = "Procedures memoization"
+version = "0.3"
+
+[memory-mapped-files]
+dependencies = []
+license = "bsd"
+sha256 = "08vk7j2bfykcfwxl7g06qpbnr287i7d2l5nkpbaiyhi2ws1nhjl9"
+synopsis = "Memory-mapped file access for UNIX and Windows"
+version = "0.4"
+
+[message-digest-primitive]
+dependencies = ["check-errors"]
+license = "bsd"
+sha256 = "1yc7b5zkwrqz4pc6y9fz4qgj8cgvmnfb30ad6slb5rl1vb6g5gjg"
+synopsis = "Message Digest Primitive"
+version = "4.3.8"
+
+[message-digest-type]
+dependencies = ["blob-utils", "string-utils", "message-digest-primitive", "check-errors"]
+license = "bsd"
+sha256 = "0njvcflhafs5pqvhnm31alp66v1szg2y08fdlwnwq2bzzpaq83id"
+synopsis = "Message Digest Type"
+version = "4.3.5"
+
+[message-digest-utils]
+dependencies = ["blob-utils", "string-utils", "memory-mapped-files", "message-digest-primitive", "message-digest-type", "check-errors"]
+license = "bsd"
+sha256 = "004da7czv5mqxz8cif2nc0shx1xxj266alqm2370h13wbdl369c3"
+synopsis = "Message Digest Support"
+version = "4.3.5"
+
+[message-digest]
+dependencies = ["message-digest-primitive", "message-digest-type", "message-digest-utils"]
+license = "bsd"
+sha256 = "0fv3w34rqs2v4rh2haa0r9kfk1s2fzxrvsn33jsnzxxkdhm3zz4m"
+synopsis = "Message Digest (omnibus)"
+version = "4.3.0"
+
+[messages]
+dependencies = ["bindings"]
+license = "bsd"
+sha256 = "08mnsyh7w0dvcx7qy21b4a91hnb4k8pam7jcscgpv8psflaaz27j"
+synopsis = "Creating algebraic- and abstract-types based on vectors"
+version = "0.7"
+
+[micro-benchmark]
+dependencies = ["micro-stats", "srfi-1"]
+license = "gplv3"
+sha256 = "022fkwr1wm1im40rgk3g5dz8n4rvlw1zdmskqsh9idv31gbfi456"
+synopsis = "Easily create micro-benchmarks"
+version = "0.0.20"
+
+[micro-stats]
+dependencies = ["srfi-1", "sequences", "sequences-utils"]
+license = "gplv3"
+sha256 = "1y4lh2g8fvfi3wz9k0x00nq0n0w80rfrc69pmxhjrbg1w0arl83h"
+synopsis = "Easily create micro-stats"
+version = "0.1.2"
+
+[mini-kanren]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "036i34dzdnpb62951n7qh253q7gzg0rwhjj7nw1c43zn1hb5zw5j"
+synopsis = "Packages the canonical miniKanren implementation for CHICKEN Scheme."
+version = "1.2.0"
+
+[minissh]
+dependencies = ["tweetnacl", "matchable", "gochan", "base64", "queues", "srfi-13", "srfi-18", "srfi-69", "message-digest-utils", "sha2"]
+license = "bsd"
+sha256 = "1s1yy4wzwcg3g32dhz8al6h56mjnl34fzccl41513v0shlgmkk6q"
+synopsis = "An SSH-2 server and client implementation"
+version = "1.0.0"
+
+[miscmacros]
+dependencies = []
+license = "bsd"
+sha256 = "0xs8ksnbpxm0a1s2bcqybliaqpr5agin4ksn3hyjwniqhzx4qzg8"
+synopsis = "Various helper macros"
+version = "1.0"
+
+[mistie]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0qfz8zc41wm2afwwbg1c8gmpzlph07nsj4r86lx01af9s03nvpfa"
+synopsis = "A programmable filter"
+version = "1.9"
+
+[modular-arithmetic]
+dependencies = ["srfi-1", "matchable"]
+license = "bsd"
+sha256 = "0gh4017knjkqhp4rcvjwiw727235yhpmn0dybd3v0cckbsxhic1a"
+synopsis = "Modular Arithmetic on Finite Fields"
+version = "1.0.3"
+
+[module-declarations]
+dependencies = ["matchable", "srfi-1"]
+license = "bsd"
+sha256 = "079zs0cc7bmc1macvsh79q1x4rbjqw25hcvlcis8xxg3952vlqfg"
+synopsis = "Module declarations"
+version = "0.3.1"
+
+[monad]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1xd24plxnwi9yssmw2in008biv2xf4iwwln6xswx781ankppqpg9"
+synopsis = "Monads"
+version = "5.0"
+
+[monocypher]
+dependencies = []
+license = "bsd-2-clause"
+sha256 = "09q33a6b8v306j93kd67wk5gisca7sij0p98i7pd10xnimllc5hh"
+synopsis = "Monocypher cryptographic library"
+version = "4.0.1"
+
+[moremacros]
+dependencies = ["srfi-69", "miscmacros", "check-errors"]
+license = "bsd"
+sha256 = "09kc4wmhwkdhspk8g0i357qdq9mp1xcalgnqi8z9yasfy2k6gk1h"
+synopsis = "More miscellaneous macros"
+version = "2.5.0"
+
+[mosquitto]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "0v03hljm71hl6xr1pffzcpk2izil9w2sp9k68a7iirvpcvqg9iph"
+synopsis = "Bindings to mosquitto MQTT client library"
+version = "0.1.3"
+
+[mpd-client]
+dependencies = ["regex", "srfi-1"]
+license = "bsd"
+sha256 = "059dbm63cklnfvycas7zi7n8hbl3c82k07b6z4rni9jqg3cbs879"
+synopsis = "Interface to Music Player Daemon"
+version = "2.1"
+
+[mpi]
+dependencies = ["srfi-1", "srfi-13", "srfi-14", "srfi-1", "compile-file"]
+license = "gpl-3"
+sha256 = "0ca91ny4cqgd69f62l0slg8f9dvnchy6c289nmik7wnnr8ns1g13"
+synopsis = "Message-passing Interface (MPI)"
+version = "2.5"
+
+[msgpack]
+dependencies = ["matchable", "srfi-1", "srfi-69"]
+license = "bsd"
+sha256 = "1plmvyy274c1qg2d3x44wpddjkj4hz6lglkkg1km4jn4h7f81gwq"
+synopsis = "MessagePack implementation for CHICKEN"
+version = "1.0.3"
+
+[multipart-form-data]
+dependencies = ["intarweb", "comparse", "records"]
+license = "bsd"
+sha256 = "10ik64k5hi7i78nwnc3q9ms49zvn794n6k3imnjr6hhvi9hxy0vy"
+synopsis = "Reads & decodes HTTP multipart/form-data requests."
+version = "0.2"
+
+[nanomsg]
+dependencies = ["foreigners", "srfi-18"]
+license = "mit"
+sha256 = "01ma6cxmbc0bmk4598q3ag28pnbqlmcfq11mbs4c87ir82bkvz7h"
+synopsis = ""
+version = "1.0.0.6"
+
+[nanosleep]
+dependencies = []
+license = "bsd"
+sha256 = "1nynvd6sv8ffxk0jlvr77mgm0r1rww4c1n5k5m799b36w4gs6df9"
+synopsis = "Interface to POSIX nanosleep"
+version = "0.3.0"
+
+[natural-sort]
+dependencies = []
+license = "mit"
+sha256 = "002xxdqydn20aynsimgi3p5m7cm28c1cdyqmwxg6k59pd5c2djpx"
+synopsis = "Natural sorting procedures"
+version = "1.1"
+
+[ncurses]
+dependencies = ["bind"]
+license = "bsd"
+sha256 = "1cdkicn3zmb8vcnqwd4rk19ywc7kfj3zsmi2wl6g41b4gdyd3xw8"
+synopsis = "An interface to the UNIX ncurses package"
+version = "2.0"
+
+[noise]
+dependencies = ["glls"]
+license = "bsd"
+sha256 = "10m0mfr02qx439mdniljsr98wgz26vz7dxpzw6wrv7rrkhsmsy6c"
+synopsis = "Noise generation functions on the GPU"
+version = "0.2.0"
+
+[npdiff]
+dependencies = ["srfi-1", "datatype", "yasos"]
+license = "gpl-3"
+sha256 = "08s172bggsa7hnfqyfbkvx9qz6q26qbaanhm86s3mcg6pf0bx10k"
+synopsis = "Compute the longest common subsequence of two sequences"
+version = "2.0"
+
+[nrepl]
+dependencies = ["srfi-18"]
+license = "bsd"
+sha256 = "0d4pl1j1wayqsdryc5v8la5v5p9nifwva86z48vlss3s388na208"
+synopsis = "Simple networked REPL over TCP"
+version = "5.0.8"
+
+[number-limits]
+dependencies = []
+license = "bsd"
+sha256 = "02nz5sicimp6bmka9lcbafpf7v8xxp3sml47s85wccmr0rky575q"
+synopsis = "Limit constants for numbers"
+version = "3.0.3"
+
+[oauth]
+dependencies = ["srfi-1", "srfi-13", "uri-common", "intarweb", "http-client", "hmac", "sha1", "base64"]
+license = "bsd"
+sha256 = "1afqv4acx1682ph81ggkpa6rrv0wyzg9094ab4xx12ygkiib8g2f"
+synopsis = "OAuth 1.0, 1.0a, RFC 5849"
+version = "0.3"
+
+[object-evict]
+dependencies = ["srfi-69"]
+license = "bsd"
+sha256 = "1g0vzz1j7p6h0y994hqpdrqydssyakyizf2in41crwkn3b7d8b8f"
+synopsis = "Evict data to unmanaged memory"
+version = "0.1.1"
+
+[opencl]
+dependencies = []
+license = "bsd"
+sha256 = "18xbnw47abkxyqm8irlk38qak8m2zmnw3z53ixzck97260hyy03y"
+synopsis = "Bindings to OpenCL"
+version = "1.3"
+
+[opengl]
+dependencies = ["bind", "silex"]
+license = "bsd"
+sha256 = "0sd75k8bm68w2c1n1jlb6yn67xsij49wfgvdakpm4aldqpi79cks"
+synopsis = "OpenGL bindings"
+version = "1.21"
+
+[openssl]
+dependencies = ["srfi-1", "srfi-13", "srfi-18", "address-info"]
+license = "bsd"
+sha256 = "018x80cxs7glvqn7nhjcfbvw36bn3pf4y24a6cn7mz25z6597vg0"
+synopsis = "Bindings to the OpenSSL SSL/TLS library"
+version = "2.2.5"
+
+[operations]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0zqcvbc4f6576y61kmyd9xz99pkj09fnb2mjdb8dfnxn5w3s8i86"
+synopsis = "The T object system"
+version = "0.6"
+
+[optimism]
+dependencies = []
+license = "public-domain"
+sha256 = "0sw7sxx530bpgl8spxq0k9ry044k8nsn85y4xip0vhwcprjkqhmk"
+synopsis = "Command line option handling"
+version = "0.1.0"
+
+[packrat]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "0d7ly5zvswg07gzm504min730qy16yafz3acyq45smd7q52s47fp"
+synopsis = "A packrat parsing library"
+version = "1.5"
+
+[pandoc]
+dependencies = ["cjson", "http-client", "medea", "r7rs", "scsh-process"]
+license = "mit"
+sha256 = "034gmrir5bfffz7mybmd0b4k3yjvrc19gc5a086pxzcg6ijzbcyr"
+synopsis = "Call upon Pandoc to parse documents into SXML"
+version = "0.2.3"
+
+[parley]
+dependencies = ["miscmacros", "srfi-1", "srfi-13", "srfi-18", "srfi-71", "stty"]
+license = "bsd"
+sha256 = "10hb7a40lcy0mamwh2hcncdjracf5llq1pppafmgg9fcj8iav2pw"
+synopsis = "A readline replacement written in scheme based on linenoise."
+version = "1.0.1"
+
+[pastiche]
+dependencies = ["awful", "awful-sql-de-lite", "simple-sha1", "intarweb", "html-parser", "colorize", "miscmacros", "utf8"]
+license = "bsd"
+sha256 = "1y5bi6zghymz3k3ynj21by4p6550qc2sk2a2xxgbiifz56pkh786"
+synopsis = "A small awful app implementing a pastebin service"
+version = "1.3"
+
+[patch]
+dependencies = ["srfi-1", "regex"]
+license = "mit"
+sha256 = "1qgbk91zbq4rxc2kvmczlflkjsym1x09i4g1bmcyfa2cds5rkmgx"
+synopsis = "Simple source patch utility"
+version = "1.15"
+
+[pathname-expand]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "1dywjbim23k12fcvdiypq2g5p8wyljgq7zmsvlf8h2anaaq34sm1"
+synopsis = ""
+version = "0.3"
+
+[pdf]
+dependencies = ["srfi-1", "regex", "format"]
+license = "bsd"
+sha256 = "1klqq78pcdg2r8simcyjkdjb9664h5cz2indksjdlpj3ma3zb3ax"
+synopsis = "A library for PDF generation."
+version = "1.1"
+
+[pigeon-hole]
+dependencies = ["srfi-18"]
+license = "bsd"
+sha256 = "0sz97xznai8a2gsfc2f2aink8rhmksz7iqbl7k061wfgf4w8vrvk"
+synopsis = "A mailbox constrained by capacity."
+version = "0.2.8"
+
+[pipes]
+dependencies = []
+license = "bsd"
+sha256 = "1bljwlb3s47hcllm05am8bj5clpywchffnkk2ajx572vl5b0qs92"
+synopsis = "sequencing partial combinations"
+version = "1.0.1"
+
+[pkg-config]
+dependencies = ["posix-utils"]
+license = "bsd"
+sha256 = "0q2zjfcywgqjv13cl1mjbl7n1csyq9rzkk20kky8ra0j3mkdql03"
+synopsis = "Wrapper around pkg-config"
+version = "0.1.2"
+
+[pledge]
+dependencies = ["module-declarations"]
+license = "bsd"
+sha256 = "1fj53zvsld6n2sasp3lwnjxsmn11z5zf53928gygh6rb84mfhq22"
+synopsis = "Bindings for OpenBSD's pledge(2)"
+version = "0.1.0"
+
+[plot]
+dependencies = ["srfi-1", "srfi-13", "datatype", "matchable", "compile-file"]
+license = "gpl-3"
+sha256 = "12f0jrj0xhaj6yggf8d89iqznc30j4bhivl25p5b4vrdkd4mac2v"
+synopsis = "An interface to GNU libplot, a library for device-independent two-dimensional vector graphics."
+version = "2.1"
+
+[posix-groups]
+dependencies = []
+license = "bsd"
+sha256 = "0s2gdq2kkpik7l3cms3mp15x7j15dp22pcrfrkap77hfl6xpyh8z"
+synopsis = "Access POSIX group information"
+version = "0.2.1"
+
+[posix-mq]
+dependencies = ["srfi-1", "compile-file"]
+license = "bsd"
+sha256 = "19la5grxxrlx853kcgnr47987yrrbmh1l5kbs5x6absj45ivzllk"
+synopsis = "POSIX message queues API"
+version = "1.1"
+
+[posix-regex]
+dependencies = ["r7rs"]
+license = "gpl-3"
+sha256 = "1zswh1d96q24271mkzx7fc8802z9h9bkcb8nmakpf8prl1d2yjvg"
+synopsis = "A thin wrapper around POSIX regular expression matching"
+version = "0.1.0"
+
+[posix-shm]
+dependencies = ["srfi-1", "compile-file"]
+license = "bsd"
+sha256 = "12rljfwpq1jax439jhcvmyjz6ijra1wis8nysi0sbnmdzlm3w3gd"
+synopsis = "POSIX shared memory API"
+version = "1.4"
+
+[posix-utils]
+dependencies = ["srfi-1", "utf8", "check-errors"]
+license = "bsd"
+sha256 = "0l9yd1cqlj3wpddnky38lqiisq2m88gjyc053xmazsdbakg6622h"
+synopsis = "posix-utils"
+version = "2.1.1"
+
+[postgresql]
+dependencies = ["sql-null", "srfi-1", "srfi-13", "srfi-69"]
+license = "bsd"
+sha256 = "06sqn5gz5n2zfdk5z2c20mz4r6w9mslxvlanvmq1wdzr5qnvkh9s"
+synopsis = "Bindings for PostgreSQL's C-api"
+version = "4.1.4"
+
+[premodules]
+dependencies = ["simple-tests"]
+license = "bsd"
+sha256 = "1ajip86bq872k8k7jra7nsm76vp3zzwwcy5n6467pvr3z16nsw2h"
+synopsis = "Converting a premodule into module, test and doc files"
+version = "0.7"
+
+[preserve]
+dependencies = ["brev-separate"]
+license = "public-domain"
+sha256 = "0nabvcf0aqz66x8vjbf6j7q1mpl65xbk8i55crydxnwnaq4jnf8r"
+synopsis = "Cache a procedure for a set time"
+version = "1.1"
+
+[procedural-macros]
+dependencies = ["bindings"]
+license = "bsd"
+sha256 = "0770cpzd75jky6pjn57z9f8gg7jiy5a4lng798ndcqhzfqvmbfdi"
+synopsis = "procedural-macros made easy"
+version = "3.0.1"
+
+[protobj]
+dependencies = []
+license = "lgpl-2.1"
+sha256 = "181cdk8w2346i1x7yj77kzs7zlv2617m6drbacjf7zlv7jjb59sv"
+synopsis = "A prototype-delegation object model"
+version = "0.5"
+
+[protobuf]
+dependencies = ["srfi-13", "srfi-18", "srfi-42", "srfi-69", "srfi-99"]
+license = "bsd"
+sha256 = "0qwc8akm3ig6dxv7f0xp1cp19pcz4064bcndg24jjcf7bwq32b71"
+synopsis = "Protocol buffer serialization"
+version = "1.2.3"
+
+[pseudo-meta-egg-info]
+dependencies = ["spiffy", "uri-common", "svn-client"]
+license = "public-domain"
+sha256 = "0dmhxm851vbzfcf14sqqxqpmigxvi0195ih9zb25nbxnsdcmy684"
+synopsis = "Provide automatically generated release-info and a pseudo-\"meta\"-file for eggs in svn"
+version = "1.1"
+
+[pseudolists]
+dependencies = []
+license = "bsd"
+sha256 = "0x9pgg0wfk7c9by77s2kf72vksgqmfdk5rzsx0shc5rwr4k3jn6c"
+synopsis = "pseudolists as a generalisation of ordinary lists"
+version = "3.0"
+
+[pstk]
+dependencies = ["srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "11z0ssdrpyal1px6x5qwxyabxs4y2q7glbz7mnwq0i01imwv1c2v"
+synopsis = "PS/Tk: Portable Scheme interface to Tk"
+version = "1.4.0"
+
+[pthreads]
+dependencies = ["srfi-18"]
+license = "bsd"
+sha256 = "0972hryj13av238dwp02ich3sdydk4nivrqf3qkp3pvrlalpy5rl"
+synopsis = "Maintain and talk to a pthread pool."
+version = "0.2"
+
+[pwdb]
+dependencies = ["stty", "tweetnacl", "args", "srfi-1", "srfi-13", "srfi-69", "matchable"]
+license = "bsd"
+sha256 = "0pj5s6xb34026mg5qajrsanvn4f05qh4zdj69900md1rm4d033na"
+synopsis = "A command-line-based password manager"
+version = "1.4"
+
+[pyffi]
+dependencies = ["srfi-1", "srfi-69", "bind", "utf8", "compile-file", "pkg-config", "srfi-13"]
+license = "gpl-3"
+sha256 = "1a62kd4qscl16hqmbj94yvnwhfgh5dkpqkrrlpw9pa0ngfb8854v"
+synopsis = "An interface to the Python programming language."
+version = "3.14"
+
+[qt-light]
+dependencies = ["bind", "protobj", "matchable", "miscmacros", "shell"]
+license = "bsd"
+sha256 = "1m84b11ak23z6vpi3hqs5b4v5c1n1yq5p4l31m8v8ajqayi6n0rm"
+synopsis = "A lightweight Qt 5 interface"
+version = "1.0"
+
+[quasiwalk]
+dependencies = ["matchable", "brev-separate"]
+license = "bsd-1-clause"
+sha256 = "1w9lvcqdipsmxzpg8ka7y2yy46vklbzad9lzkml873ijfn23bw27"
+synopsis = "A tree map that respects quote, quasiquote, and unquote"
+version = "1.10"
+
+[queues]
+dependencies = []
+license = "public-domain"
+sha256 = "0i7ywz4p5fhninfgf0fk8h6cdqdp4hdqb76y5cgnzspnmv5qpg26"
+synopsis = "A queue data structure"
+version = "0.1"
+
+[qwiki]
+dependencies = ["intarweb", "uri-common", "spiffy", "sxml-transforms", "svn-client", "estraier-client", "sxpath", "simple-sha1", "svnwiki-sxml", "html-parser", "colorize", "srfi-1", "srfi-13", "srfi-14"]
+license = "bsd"
+sha256 = "14m75v6a2bfqag646zx95hqhn6g16dm921klkmj1xvf8f19nf2mb"
+synopsis = "qwiki - the quick wiki"
+version = "2.2"
+
+[r6rs-bytevectors]
+dependencies = ["utf8"]
+license = "mit"
+sha256 = "1qah1bym1q3ww0fkyqvz048q9brv7ffsz2x3cqpx0cp7yk41by9m"
+synopsis = "An implementation of r6rs bytevectors"
+version = "0.1.7"
+
+[r7rs-tools]
+dependencies = ["r7rs", "srfi-1"]
+license = "public-domain"
+sha256 = "09l2h810av8l2ql0jv08jghdk3wvswddx6qxsxibv2frz1mplqi0"
+synopsis = "\"Pure\" r7rs compiler and interpreter"
+version = "0.1.1"
+
+[r7rs]
+dependencies = ["matchable", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "1rwx52mjsylvbkmpg0z7jbawaf87dsxdgwgq8z5nh8k5nb03b6v5"
+synopsis = "R7RS compatibility"
+version = "1.0.9"
+
+[rabbit]
+dependencies = ["srfi-1"]
+license = "public-domain"
+sha256 = "16iics3fiv0i9c011lcx3mqbf692gmk8chclrnx645s08gm75660"
+synopsis = "Rabbit stream cipher."
+version = "2.1"
+
+[random-mtzig]
+dependencies = ["bind"]
+license = "bsd"
+sha256 = "0swkhz2ifg2f5cwpi4njfgjfzvdhr0crkz4w77bnsk4fip86vk6h"
+synopsis = "MT19937 random number generator with Marsaglia and Tang's Ziggurat algorithm to generate random numbers from a non-uniform distribution."
+version = "5.1"
+
+[rb-tree]
+dependencies = ["datatype", "matchable", "yasos", "srfi-1"]
+license = "gpl-3"
+sha256 = "0nnmm6yixfwz2qfzygxrgpi822cxaqrd7gzaz91klb7vwgx7zxqf"
+synopsis = "A sorted dictionary data structure based on red-black trees."
+version = "6.2"
+
+[rbf]
+dependencies = []
+license = "gpl-3"
+sha256 = "1r41kpsw4syarj9fnajazhs4q1z8hxvh0zd4wf8q5yjv2jgc6pls"
+synopsis = "Bindings for the Radial Basis Function interpolation routines by John Burkardt."
+version = "1.1"
+
+[record-variants]
+dependencies = []
+license = "bsd"
+sha256 = "1ha392k88389ls5yj08mf7gnnlysy5vzcz30ndiihlcwk2q49sq5"
+synopsis = "Optimized record access"
+version = "1.1"
+
+[records]
+dependencies = ["srfi-1"]
+license = "public-domain"
+sha256 = "00nk7gyk8ikp6z5vlxb0my1a3b4fb9ym8x2dfqlh4gkf0r97rb61"
+synopsis = "Procedural record-type interface"
+version = "1.4"
+
+[redis]
+dependencies = ["r7rs", "srfi-34", "srfi-35", "srfi-69", "srfi-99", "srfi-113", "srfi-128", "srfi-133", "srfi-152", "srfi-158"]
+license = "bsd"
+sha256 = "1z8pr6dgz652h14zn1vkdm3av48lifk4vf7jzacrq0f0k14i5bc2"
+synopsis = "A Redis client library for Chicken Scheme"
+version = "0.5"
+
+[regex-case]
+dependencies = ["regex"]
+license = "bsd"
+sha256 = "1w6hs81ibjl0bc51c3sm9h5knkws5665mbhwi9akazfflfjgia5p"
+synopsis = "Provides an easy to use <code>case</code> construct for regular expression matching"
+version = "1.3"
+
+[regex]
+dependencies = []
+license = "bsd"
+sha256 = "1hxkva5jvk08wnj3x4lnyxhhyr5vkbs7q99qzpnwmfphbrzmmqzr"
+synopsis = "Compatibility library for old regular expression API"
+version = "2.0"
+
+[remote-mailbox]
+dependencies = ["tcp-server", "s11n", "mailbox", "srfi-18", "synch", "miscmacros", "moremacros", "llrb-tree", "condition-utils", "check-errors"]
+license = "bsd"
+sha256 = "1jm9ybxji5i06vdrh39biiwyhk8cyxxhh4gnbxa66xv7h5n5dmhn"
+synopsis = "Remote Mailbox"
+version = "1.0.7"
+
+[rest-bind]
+dependencies = ["intarweb", "uri-common"]
+license = "bsd"
+sha256 = "04c3rh2xjm6qrl0swlyh697r8f02rrfkiccajdvbngbq9c2cjk39"
+synopsis = "Generates wrappers to REST-like HTTP APIs."
+version = "0.6"
+
+[rfc3339]
+dependencies = ["matchable", "regex"]
+license = "bsd"
+sha256 = "0gfwz46jjs2jffax8xl3cd0bmja36mhcxikn45prbgafsam30y1l"
+synopsis = "RFC3339 datetime parser"
+version = "0.1.3"
+
+[ripemd]
+dependencies = ["message-digest-primitive"]
+license = "bsd"
+sha256 = "18d0f37a13nsknay6vw27xvr1k0s4p4ss2dc29fhx89hsv5ycjsq"
+synopsis = "RIPE Message Digest"
+version = "2.1.2"
+
+[rlimit]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "1yxdn9y11i8s9mj5dknlpz588d48bklylxcq73v0s48a5m7vfpwp"
+synopsis = "Setting resource limits"
+version = "1.0.2"
+
+[rocksdb]
+dependencies = []
+license = "bsd"
+sha256 = "1yrsclyzapyb96s46095xfd8yshp0rvxf3j5h9jbdqm93sqg2aic"
+synopsis = "Bindings to Facebooks's RocksDB Key-Value Store"
+version = "1.0"
+
+[rope]
+dependencies = ["srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "0pif66a3hj29var419pd4rdcisyz36ny9w9jrkkjdwig57qiawww"
+synopsis = "Heavyweight alternative to strings"
+version = "0.1.0"
+
+[rss]
+dependencies = ["matchable", "srfi-1", "ssax"]
+license = "bsd"
+sha256 = "1xk5v3cz1wvsryd3vkckqz0iw03l4w564y22dq0i5275vvyvb64w"
+synopsis = "A RSS parser"
+version = "1.7"
+
+[s11n]
+dependencies = ["miscmacros", "matchable", "srfi-69"]
+license = "bsd"
+sha256 = "1vngrvh2b7rv5n5zvksfg27zikpc7d8xb8n1kd0pyfr7hna00wf9"
+synopsis = "Serialization of arbitrary data."
+version = "0.9.12"
+
+[s9fes-char-graphics]
+dependencies = ["srfi-1", "utf8", "format"]
+license = "public-domain"
+sha256 = "1ysz8vrx7zwfv4drx955ca28avmdfilafd9a20sl67y5vwb47i8m"
+synopsis = "Scheme 9 from Empty Space Char Graphics"
+version = "1.4.2"
+
+[salmonella-diff]
+dependencies = ["salmonella", "salmonella-html-report", "srfi-1", "srfi-13", "sxml-transforms"]
+license = "bsd"
+sha256 = "1w5qzsmx2i9cpjd2d9kkfhw6627xg19x5w6jck9gba6vgcf2s6ca"
+synopsis = "A tool to diff salmonella log files"
+version = "1.1.0"
+
+[salmonella-feeds]
+dependencies = ["atom", "rfc3339", "salmonella", "salmonella-diff", "srfi-1"]
+license = "bsd"
+sha256 = "00p5j9sz862djl4xpj64cs2glxc6z8v3ifrsw1lzgxpv4flk9w03"
+synopsis = "A tool to generate atom feeds out of salmonella log files"
+version = "0.1.1"
+
+[salmonella-html-report]
+dependencies = ["salmonella", "srfi-1", "srfi-13", "sxml-transforms"]
+license = "bsd"
+sha256 = "107n7sgzk91s25ih3k40y649fnv9n37xnf7igkkn5c642hjmfr6d"
+synopsis = "A tool to generate HTML ouput out of salmonella log files"
+version = "1.7.1"
+
+[salmonella]
+dependencies = []
+license = "bsd"
+sha256 = "1r60dlr1qcjlirbwqpn23aphczlkhrhskgqmw51973w46ww839nf"
+synopsis = "A tool for testing eggs"
+version = "3.1.1"
+
+[salt]
+dependencies = ["datatype", "matchable", "make", "mathh", "lalr", "datatype", "unitconv", "fmt"]
+license = "gpl-3"
+sha256 = "17vzsip5xyfqhyrhsrzda0bkqp6pxfday3idrgjqxm5lnm0wbzns"
+synopsis = "Hybrid dynamical systems modeling."
+version = "0.28"
+
+[sandbox]
+dependencies = ["matchable", "defstruct"]
+license = "bsd"
+sha256 = "1vsr4nx20rgdszkrrsyl23lw1mf3qldyqcxlnf56s8swzfxcss3y"
+synopsis = "A safe evaluation environment"
+version = "1.91"
+
+[scan-input-lines]
+dependencies = []
+license = "bsd"
+sha256 = "16pkx339r5s877np1k0dhs29zdcmrz0smcwmcpw23c540sq9jb2z"
+synopsis = "Scan lines until a regex or predicate matches"
+version = "0.2"
+
+[schematic]
+dependencies = ["optimism", "r7rs"]
+license = "bsd"
+sha256 = "03nn90fi18gn29vxvslyi5zxhl5hx2m7f7ikfy9a3ypnkw1bh8qk"
+synopsis = "Tools for Scheme development"
+version = "0.3.2"
+
+[scheme-indent]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0brwmphr724shd32dcixsn9wz9zqrhg27g7rjbiz96885maj6nwf"
+synopsis = "A Scheme code indenter"
+version = "0.5"
+
+[scheme2c-compatibility]
+dependencies = ["srfi-1", "srfi-13", "srfi-14", "traversal", "foreigners", "xlib"]
+license = "lgpl"
+sha256 = "1xj5j63bq1p69cily4dciqa105nkaj6gcfxf4d0r5ci8n7pwysv2"
+synopsis = "Scheme->c compatibility package"
+version = "1.8"
+
+[scm2wiki]
+dependencies = ["srfi-1", "srfi-13", "srfi-14", "args", "comparse"]
+license = "mit"
+sha256 = "0f8zwxkskzlillnbyngzgaqqgxviimn52rscj6vxx9hgl2yw3mkk"
+synopsis = "An auto-documentation tool for CHICKEN Scheme."
+version = "0.3.2"
+
+[scmfmt]
+dependencies = []
+license = "bsd"
+sha256 = "0vpixxbil8ckmhsvfc9szv5gsvc2a1m88n2vv5cab5paarl26rhg"
+synopsis = "Chicken Scheme code formattor to use from stdin/stdout"
+version = "0.1"
+
+[scsh-process]
+dependencies = ["srfi-18", "llrb-tree"]
+license = "bsd"
+sha256 = "1fn99ncj7d4qgj92pmm77mvmar2ki5q8k8qgsi8nfs56xr7gr5lm"
+synopsis = "A reimplementation for CHICKEN of SCSH's process notation."
+version = "1.6.0"
+
+[scss]
+dependencies = ["srfi-1", "matchable"]
+license = "bsd"
+sha256 = "0asc4lp83ylx2qz5y0svfdws2adm88vbhb69z0lflakbdj9mrqax"
+synopsis = ""
+version = "4"
+
+[sdl-base]
+dependencies = ["srfi-1", "srfi-13"]
+license = "lgpl-2.1"
+sha256 = "17kgjy2mmhvnm07kvavp2injvbjsn57kz72b9krkm5p4q3jvlvjf"
+synopsis = "Basic SDL support"
+version = "0.9.2"
+
+[sdl2-image]
+dependencies = ["sdl2"]
+license = "bsd"
+sha256 = "08kxmx97rw760vlqsfl6s89mjb2gxzynk2fvc6dd0s7spdjvjk34"
+synopsis = "Bindings to SDL_image 2"
+version = "0.2.0"
+
+[sdl2-ttf]
+dependencies = ["sdl2", "miscmacros", "srfi-1"]
+license = "bsd"
+sha256 = "0sbj9dib5dx9gc8wayg3a74ag028spysqnl70r2x9hrvdh7pyclj"
+synopsis = "Bindings to SDL_ttf 2"
+version = "0.2.0"
+
+[sdl2]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "0is0x43273413jk7d8y80q27vc0yi8rpa7r72nb9rlzxwcazl5zn"
+synopsis = "Bindings to Simple DirectMedia Layer 2 (SDL2)"
+version = "0.4.1"
+
+[semantic-version]
+dependencies = ["utf8", "srfi-1", "vector-lib", "srfi-69", "srfi-128", "record-variants"]
+license = "bsd"
+sha256 = "02y7d0lpkrn77ypk2dx8nm70lpbszz5w2cy177s4gvy88dx5qgmq"
+synopsis = "Semantic Version Utilities"
+version = "0.0.13"
+
+[sendfile]
+dependencies = ["memory-mapped-files"]
+license = "bsd"
+sha256 = "1vi5i8df146j2gh4x7s8fry0bdzfm57f7v62zd5sd0x45h72lffw"
+synopsis = "Sending a file over the network"
+version = "2.0"
+
+[sequences-utils]
+dependencies = ["srfi-1", "srfi-69", "sequences"]
+license = "bsd"
+sha256 = "1r3wbvi502wm82zn78a2kw2dv1ya0msphhx42gb9wllxdhzz0d6l"
+synopsis = "(More) Generic sequence operators"
+version = "0.5.1"
+
+[sequences]
+dependencies = ["fast-generic", "srfi-42"]
+license = "bsd"
+sha256 = "1pg1y49r6mb68vky4vq1izvdk9aq911czc5sk8xyyyz3n1qg7dpl"
+synopsis = "Generic sequence operators"
+version = "0.6.1"
+
+[server-test]
+dependencies = []
+license = "bsd"
+sha256 = "1k3k9mkildbi9i8vgj26rj5nidrm0zif8pqf9zm5ahwn4kcp9drx"
+synopsis = "Utilities to help testing servers"
+version = "0.6"
+
+[sexpc]
+dependencies = ["brev-separate", "fmt", "tree"]
+license = "bsd-1-clause"
+sha256 = "1qr93xrdxz0fl46j20rqfcqyx20mk3bsm5qcgxa93fpx9mgr1z02"
+synopsis = "Unix filter that turns sexps into C syntax"
+version = "1.4"
+
+[sha1]
+dependencies = ["message-digest-primitive"]
+license = "public-domain"
+sha256 = "0p48vv59lr1ydrn529fkpd7ybny9h4hggaav0b7zwyvpkhyd565q"
+synopsis = "Computes SHA1 (FIPS-180-1) checksums"
+version = "4.1.7"
+
+[sha2]
+dependencies = ["message-digest-primitive"]
+license = "bsd"
+sha256 = "054bjn8wqqxn142cryp0jm18axr237lq9w6gip6hw37y66wpc6h6"
+synopsis = "Computes 256-, 385- and 512-bit SHA2 checksums"
+version = "4.2.5"
+
+[shell]
+dependencies = []
+license = "public-domain"
+sha256 = "04gn93nsf3g8bxd7jb498qr629y7ql6j548s4c46wfwc5f4gjn5c"
+synopsis = "Convenient shell-command invocation"
+version = "0.4"
+
+[shen]
+dependencies = ["args", "srfi-1", "srfi-13", "srfi-69"]
+license = "bsd"
+sha256 = "1pdqfsi3n4g3glj9dw705l30vf5rgnjqfysz1hlf7pahr1sn3983"
+synopsis = "Port of the Shen language for Chicken Scheme"
+version = "0.1"
+
+[silex]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "0ck8mgs2alvsial3ay9638ia2kl4zs63x6rc480p24sxhil6klg8"
+synopsis = "An efficient and powerful lexer generator"
+version = "1.0"
+
+[simple-cells]
+dependencies = ["checks"]
+license = "bsd"
+sha256 = "1x9gajg12f03zz50bxypw08w801r3i1yrkvap8mb948wx0f8y0cg"
+synopsis = "Implementation of typed cells to replace general set! operators"
+version = "1.2.2"
+
+[simple-contracts]
+dependencies = ["checks"]
+license = "bsd"
+sha256 = "0x0fzvnkzbzf1qr40xg8zi8qj5b889d3hs6b6cvdh46456zvzxka"
+synopsis = "Design by contract for procedures"
+version = "1.0.2"
+
+[simple-exceptions]
+dependencies = []
+license = "bsd"
+sha256 = "0phsfz2263yiy9z33sf7qjf4i8kh51n5yf1g2wmb0pb63vcdqy8n"
+synopsis = "Some user-friendly exception routines"
+version = "1.3.1"
+
+[simple-logger]
+dependencies = []
+license = "bsd"
+sha256 = "05d9fjn6m9m8c4n2blig844vhv9cp1rmyrcxnkzxfxxiw9y4wfhf"
+synopsis = "A very simple logger"
+version = "1.0.0"
+
+[simple-loops]
+dependencies = []
+license = "bsd"
+sha256 = "1mlya8mgpsf4irwba2ybv4s6z0y2hr4xfv4ghs8j0nifndzy18zf"
+synopsis = "Some simple looping macros"
+version = "2.0"
+
+[simple-md5]
+dependencies = ["memory-mapped-files", "srfi-13"]
+license = "public-domain"
+sha256 = "1aq7iqbh1jb3j61nylsrzf7rcmf204v1jl2l559q0jdycij6yn5z"
+synopsis = "Computes MD5 (RFC1321) checksums"
+version = "0.1.1"
+
+[simple-sequences]
+dependencies = []
+license = "bsd"
+sha256 = "06z122b53q32x4wzdhq71ksc51ydj6bwg7xxkmgdmsffv2pyyq1z"
+synopsis = "A common interface to sequences"
+version = "1.0"
+
+[simple-sha1]
+dependencies = ["memory-mapped-files"]
+license = "public-domain"
+sha256 = "0bmjxa5hwx5xsicf1l5wgmk000pc275d8l6jcy5mi4g80rwvjddl"
+synopsis = "A fast and simple SHA1 implementation with minimal dependencies"
+version = "1.2"
+
+[simple-tests]
+dependencies = []
+license = "bsd"
+sha256 = "168n51hkmzxx5rl9qf8l739nbr1xcf7rrsngqj9sqygra4kgya0m"
+synopsis = "Some simple test routines"
+version = "3.1"
+
+[simple-timer]
+dependencies = ["srfi-18", "pigeon-hole", "llrb-tree"]
+license = "bsd"
+sha256 = "1xnkf4xd7hx1lki1nxzkdpwynxx1zry6j8a8cyxk9hb72ygcd9p0"
+synopsis = "Simple, cancel-able, efficient timer API"
+version = "0.1.2"
+
+[siphash]
+dependencies = []
+license = "bsd"
+sha256 = "0g2is573xvli6cs6n8cppr9d5aq0dksa51n5d4cj983phnpylai5"
+synopsis = "The SipHash family of hash functions"
+version = "0.1.0"
+
+[skiplists]
+dependencies = []
+license = "bsd"
+sha256 = "0fi7x7yxavvjmg7nw0fzzba4sifvpifzxs5d1if93fiwbb0fmwc6"
+synopsis = "An implementation of skiplists"
+version = "1.0.2"
+
+[slib-arraymap]
+dependencies = ["srfi-1", "srfi-63", "slib-compat"]
+license = "bsd"
+sha256 = "08djsc0j6kacf07a59f58clka94wq4lp8ry3p8203sx3lbx1s8qw"
+synopsis = "The SLIB applicative routines for the arrays library"
+version = "1.1.4"
+
+[slib-charplot]
+dependencies = ["slib-arraymap", "srfi-63", "slib-compat"]
+license = "artistic"
+sha256 = "1ijcvs9y2vxmxg5834s4mprkinxhky0xdl3yksysmg9h9p82il2z"
+synopsis = "The SLIB character plotting library"
+version = "1.2.2"
+
+[slib-compat]
+dependencies = ["srfi-1"]
+license = "artistic"
+sha256 = "0pk00087wbxwyyrn0qa1261ry2c55mxz9jgh95adl6lvgdvajchy"
+synopsis = "CHICKEN SLIB compatibility library"
+version = "1.0.0"
+
+[slib-wt-tree]
+dependencies = ["typed-records"]
+license = "gplv2"
+sha256 = "0np2nc8z5ddvf3248zq91f6qmv71x8vink8rswlvjb5vidvcf3kp"
+synopsis = "Weight-balanced trees"
+version = "0.1.6"
+
+[slice]
+dependencies = ["srfi-1", "utf8"]
+license = "bsd"
+sha256 = "1cdgs1fhir777909qp43990xbn2a1xhp5rbakjyvcaf8y0m082w0"
+synopsis = "A slicer procedure for lists, strings and vectors"
+version = "1.3"
+
+[smtp]
+dependencies = ["matchable", "datatype", "utf8", "abnf"]
+license = "gpl-3"
+sha256 = "122f454xw3f99x71m11i3p593h17mac5xnglmr1fzalfdd1b4909"
+synopsis = "Parser combinators and state machine for Simple Mail Transfer Protocol (RFC 5321)."
+version = "5.2"
+
+[snowtar]
+dependencies = ["miscmacros"]
+license = "lgpl-2.1-or-later"
+sha256 = "00m1s8i4d46ibbav5dqiwflm6xa2d5kydss1jsxx0sv8948c8iyc"
+synopsis = "TAR file format packing and unpacking."
+version = "1.1"
+
+[socket]
+dependencies = ["srfi-13", "srfi-18", "foreigners", "feature-test"]
+license = "bsd"
+sha256 = "0s4d1m3h22raihjyyy1lbz942bra7izy5b370pwbrrp0ybg4rs8x"
+synopsis = "Interface to the BSD socket API"
+version = "0.3.3"
+
+[soil]
+dependencies = []
+license = "bsd"
+sha256 = "0h562n1ql23kjwkx5dvsxrzpyc3rnfp61i1mss88kcnrwy6hk6ad"
+synopsis = "Lightweight, simple library for loading image files into OpenGL-friendly format."
+version = "1.6.0"
+
+[sourcehut]
+dependencies = ["http-client", "intarweb", "medea", "openssl", "optimism", "simple-exceptions", "srfi-1", "srfi-133", "begin-syntax", "module-declarations"]
+license = "bsd"
+sha256 = "1l7cc6kynh54qanqr8z8v38b7c3whb79hsdrdia5cvxcig2vzvfk"
+synopsis = "Bindings and CLI for the sr.ht REST API"
+version = "0.3.3"
+
+[sparse-vectors]
+dependencies = ["srfi-1", "record-variants"]
+license = "bsd"
+sha256 = "0nmk6c9mhls38lyp0d8a9f3xh94jbl2dqbmqr9pab23pnx4hha1j"
+synopsis = "Arbitrarily large vectors"
+version = "1.1.0"
+
+[spiffy-cgi-handlers]
+dependencies = ["spiffy", "intarweb", "uri-common", "socket", "records", "srfi-1", "srfi-18", "srfi-13", "miscmacros"]
+license = "bsd"
+sha256 = "0hy22mk56g039ykmqgdl5n5x9d7g9ihbf6qkzxazdff66ib19kz1"
+synopsis = "CGI and FastCGI handlers for a small but powerful web server."
+version = "0.7"
+
+[spiffy-cookies]
+dependencies = ["spiffy", "intarweb"]
+license = "bsd"
+sha256 = "1jf0g1i8sz09gwmvrvhp9kq0dr0cv2g4j1jhqf5z0177506z9x0j"
+synopsis = "Procedures for managing cookies"
+version = "1.2"
+
+[spiffy-directory-listing]
+dependencies = ["spiffy", "sxml-transforms"]
+license = "bsd"
+sha256 = "1jpvskqc2vx7f01vc4wj3kl2kqb53b6x33xm6qi6v947k8has49y"
+synopsis = "Flexible directory listing for Spiffy"
+version = "0.3"
+
+[spiffy-request-vars]
+dependencies = ["intarweb", "srfi-1", "srfi-13", "srfi-69", "spiffy", "uri-common"]
+license = "bsd"
+sha256 = "06wzpmwnn7djr7iz9v8qqn6nrxcddqi4d751ym7g7na4aqypcc80"
+synopsis = "Easy access to variables from HTTP requests"
+version = "0.19"
+
+[spiffy-sexpr-log]
+dependencies = ["spiffy", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "0z2sxvjgnri80rvlgyajx6hbwdhs6qrxvida05j8dh25xj5kyiyj"
+synopsis = "Symbolic expression log format for Spiffy"
+version = "0.3.2"
+
+[spiffy-uri-match]
+dependencies = ["uri-match", "spiffy", "uri-common", "intarweb"]
+license = "bsd"
+sha256 = "0hqr1m4zd0i5ajnyhr4892sdrd2nfm81hjsjvl3ydrygwma8znbn"
+synopsis = "uri-match integration for spiffy"
+version = "1.0"
+
+[spiffy]
+dependencies = ["intarweb", "uri-common", "uri-generic", "sendfile", "srfi-1", "srfi-13", "srfi-14", "srfi-18"]
+license = "bsd"
+sha256 = "1nfxygrscvldmayr5sm8vqqvzv2wk63yh7pksp7v5gkffd0yhnzs"
+synopsis = "A small but powerful web server"
+version = "6.3"
+
+[spock]
+dependencies = ["jsmin", "matchable", "make"]
+license = "bsd"
+sha256 = "0m17x7nbfp237mkn0l8nrcaqpf8nfkqcg5ws3p3jjdvr0zwaxjj3"
+synopsis = "A compiler and runtime system for R5RS Scheme on top of JavaScript"
+version = "0.2"
+
+[sq]
+dependencies = ["optimism", "r7rs", "simple-exceptions", "srfi-18", "srfi-60", "srfi-145", "begin-syntax", "matchable", "miscmacros", "module-declarations"]
+license = "bsd"
+sha256 = "0pcxy8l8qlb085pbxp9plxzzrs4wb2pfpx840rydwhpsjmrfx1zp"
+synopsis = "Scheme jq wrapper for processing S-expressions"
+version = "0.2"
+
+[sql-de-lite]
+dependencies = ["foreigners", "object-evict", "srfi-1", "srfi-18", "srfi-69"]
+license = "bsd"
+sha256 = "1vx7j1y6b1wkhf3wn3bgf62a3zn3wk9clcygn80k4cjpma2p8ig5"
+synopsis = "SQLite 3 interface"
+version = "0.10.1"
+
+[sql-null]
+dependencies = []
+license = "public-domain"
+sha256 = "0700qryzi38rah26fzrh04njd4r88ksi366mf2259zilwzmlf2nh"
+synopsis = "A convenience extension for representing SQL NULL values"
+version = "2.0"
+
+[sqlite3]
+dependencies = ["srfi-1", "srfi-13", "srfi-18", "srfi-69", "object-evict", "check-errors", "synch", "miscmacros", "matchable", "sql-null"]
+license = "bsd"
+sha256 = "1i9387ph1l7ky30in2v9y8zqc4rqzl0xmzb4hqjpipsxv6haa98s"
+synopsis = "Bindings to version 3.x of the SQLite API"
+version = "3.7.2"
+
+[sqlite3pth]
+dependencies = ["pthreads", "srfi-34", "llrb-tree", "miscmacros", "srfi-1"]
+license = "bsd"
+sha256 = "0panyvq2s1frp9cbqfj7a5b374nadlx8wg0wkpz9f15jjdpsx4in"
+synopsis = "Run SQLite queries asynchronously in pthreads.  Supports calling Scheme from SQLite's VFS to supply database block storage."
+version = "0.2.6"
+
+[srfi-1]
+dependencies = []
+license = "bsd"
+sha256 = "03cjp5dvclwkqxr7kp486smagfh44jzzs5k61wkk1k8p7qhcm4k5"
+synopsis = "SRFI-1 list library"
+version = "0.5.1"
+
+[srfi-101]
+dependencies = ["srfi-1", "srfi-69", "vector-lib"]
+license = "bsd"
+sha256 = "0jfkprl6jxyh2s241x0cmxnqdb3s1bl32jyfqyqzpadbbvrixm56"
+synopsis = "SRFI 101"
+version = "0.0.3"
+
+[srfi-105]
+dependencies = ["srfi-13", "srfi-1", "srfi-123"]
+license = "mit"
+sha256 = "0wf57aiam3ym5qjhsz4sckdqsfp8lfqasb8jbgjblx77xzb3b3ad"
+synopsis = "SRFI-105 - curly infix expressions"
+version = "0.1.7"
+
+[srfi-111]
+dependencies = ["box"]
+license = "mit"
+sha256 = "09nng5irszi02ly9gscczi1pjnffxl3s9sv9hn48iij7lqw2b47j"
+synopsis = "SRFI-111: Boxes"
+version = "0.5"
+
+[srfi-113]
+dependencies = ["r7rs", "srfi-69", "srfi-128"]
+license = "bsd"
+sha256 = "0ripxgwfwizj9mzb04lsbvavvy7qima81cyqm830j59sixj6ldc2"
+synopsis = "SRFI-113: Sets and Bags"
+version = "1.2.0"
+
+[srfi-115]
+dependencies = ["srfi-14", "srfi-152"]
+license = "mit"
+sha256 = "19vy0rbvmq7si758zlqqys94c2dicl8546fv3xhlpagas38wb4lb"
+synopsis = "SRFI 115: Scheme Regular Expressions"
+version = "0.3.2"
+
+[srfi-116]
+dependencies = ["srfi-128"]
+license = "bsd"
+sha256 = "0jwpav26shl9isi4i3xi01am7s472kk9jxlzj8fb1afjj3kmwgar"
+synopsis = "SRFI-116: Immutable Lists."
+version = "1.7"
+
+[srfi-117]
+dependencies = []
+license = "bsd"
+sha256 = "0pshy2rh32xskvi4pbbbxwzyw73jwn0j2r6gv683kdll3piz6zag"
+synopsis = "SRFI-117: Mutable Queues"
+version = "1.4"
+
+[srfi-121]
+dependencies = ["srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "1jsf5h8yf53qygj8mygs0hdy89442d7cv19vmmaklylq2g0xq7ii"
+synopsis = "SRFI-121: Generators"
+version = "1.8"
+
+[srfi-123]
+dependencies = ["srfi-99", "box", "r7rs"]
+license = "mit"
+sha256 = "1kr576bs2yj72ay4445jd7872sd872k9b31b4rli33lprkgxj1pg"
+synopsis = "SRFI-123 - Generic accessor and modifier operations"
+version = "0.2.1"
+
+[srfi-127]
+dependencies = []
+license = "bsd"
+sha256 = "0gjzz7q7frzd97i9skxragznm3as1423nng3kmgpgk1wmi4jmsi5"
+synopsis = "SRFI-127: Lazy Sequences"
+version = "1.3"
+
+[srfi-128]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "00rb21x0fgli80gzs5hjszrwix198mp7az2c34m44sb3rjb9h3xw"
+synopsis = "SRFI-128: Comparators (reduced)"
+version = "0.11"
+
+[srfi-13]
+dependencies = ["srfi-14"]
+license = "bsd"
+sha256 = "11d8qlvsykp2mz2vwxmk19x1zl5b5fymhvgznsrfjl429z5xai94"
+synopsis = "SRFI-13 string library"
+version = "0.3.4"
+
+[srfi-130]
+dependencies = ["srfi-1", "srfi-13", "typed-records", "utf8"]
+license = "mit"
+sha256 = "1ks5l3f41d6fn49cjk7dz1wbv10x5aa7cmyg2cm49scyr7gixi9a"
+synopsis = "SRFI-130: Cursor-based string library"
+version = "2.0.1"
+
+[srfi-132]
+dependencies = ["srfi-133"]
+license = "bsd"
+sha256 = "1dp4m60zj8y8x4a6624xd1nk5kbdfyfb9alzp71yrna78ddmvikr"
+synopsis = "SRFI-132: Sort Libraries"
+version = "1.0.0"
+
+[srfi-133]
+dependencies = []
+license = "bsd"
+sha256 = "02ixzvl2a858zd1x0xiz7ygg5vj47fj720mn57jgpa1b8qskqf2c"
+synopsis = "SRFI-133: Vector Library (R7RS-compatible)"
+version = "1.6.1"
+
+[srfi-134]
+dependencies = ["srfi-1", "srfi-41", "typed-records"]
+license = "mit"
+sha256 = "0nzingih2pjsi3ysk3qhp9wc52lsk1wpdgypsf67prnz3cllz90p"
+synopsis = "SRFI 134: Immutable deques"
+version = "1.1.1"
+
+[srfi-135]
+dependencies = ["r7rs", "utf8", "srfi-141", "typed-records"]
+license = "mit"
+sha256 = "0iwhh3m99d2wl2wzcl6xzynyx2c5g62ck0svrlah5x7vh7vh8f9p"
+synopsis = "SRFI 135: Immutable Texts"
+version = "1.0.2"
+
+[srfi-137]
+dependencies = []
+license = "mit"
+sha256 = "10cdlzpr1yid8549d0zfzkmrw9k7qwgy0k5rs744vy65bfmq0k4g"
+synopsis = "SRFI-137: Minimal Unique Types"
+version = "0.2"
+
+[srfi-14]
+dependencies = []
+license = "bsd"
+sha256 = "1sjcnkn08knbcy7hvqsqiin693a73hw0r159xi7l5l6hgvlml4qp"
+synopsis = "SRFI-14 character-sets library"
+version = "0.2.1"
+
+[srfi-141]
+dependencies = []
+license = "bsd"
+sha256 = "1d4glc5zw7aidv2c294acvd18vjvmrrffd2dk0gchpaab93l24mg"
+synopsis = "SRFI 141: Integer division"
+version = "1.0.0"
+
+[srfi-143]
+dependencies = []
+license = "mit"
+sha256 = "0a30ysddklf2mndh5chhkdx5zqlkgyxggwxypgn7znmny23zlrja"
+synopsis = "SRFI 143: Fixnums"
+version = "0.4.1"
+
+[srfi-144]
+dependencies = ["r7rs"]
+license = "mit"
+sha256 = "08fjhasdxmmb48c5nx632wjr6ikyhwgsyzxx49jz9hzns4ld526g"
+synopsis = "SRFI 144: Flonums"
+version = "0.1.3"
+
+[srfi-145]
+dependencies = []
+license = "mit"
+sha256 = "1jxabczdgw3dd49rvg5gdhghhcw0iclvdpm1j9psl80r2brjwnxr"
+synopsis = "SRFI 145: Assumptions"
+version = "0.1"
+
+[srfi-146]
+dependencies = ["hash-trie", "srfi-1", "srfi-128", "srfi-145", "srfi-158"]
+license = "mit"
+sha256 = "0pdlcfhmy50nigi9q3rdy9hhrhw4jmrm5rcdl30d402yaj8fq5q6"
+synopsis = "SRFI 146: Mappings"
+version = "0.1"
+
+[srfi-151]
+dependencies = []
+license = "mit"
+sha256 = "0hscg2342wl2bzbnwl5d0ij1vr7nxn0ly9aqp3n5yh6j9x3hd29i"
+synopsis = "SRFI 151: Bitwise Operations"
+version = "1.0.2"
+
+[srfi-152]
+dependencies = ["utf8"]
+license = "mit"
+sha256 = "1flkxwcznxb4r5n88iam8wf47dqdps8a368mqs93shzy2v0rfmrc"
+synopsis = "String library (reduced)"
+version = "1.0"
+
+[srfi-158]
+dependencies = []
+license = "mit"
+sha256 = "02ayjw2rd8p0iiw97z2fvbxaq3v0x48afwsdcc9gahdl5bwvg2qd"
+synopsis = "SRFI 158: Generators and Accumulators"
+version = "0.1"
+
+[srfi-160]
+dependencies = ["srfi-128"]
+license = "mit"
+sha256 = "1zwvc79q46rdb06p3skvqb7v0akgj80z56g8hhbk9qni6hjkq938"
+synopsis = "SRFI 160: Homogeneous numeric vector libraries"
+version = "0.5.3"
+
+[srfi-171]
+dependencies = ["r6rs-bytevectors", "vector-lib", "srfi-1", "srfi-69"]
+license = "mit"
+sha256 = "0q951jn8zcrh9snpz95bfqicgsmfznlxcq4qhr2rdp0k2h6pwjyb"
+synopsis = "SRFI-171: Transducers"
+version = "0.2"
+
+[srfi-173]
+dependencies = []
+license = "mit"
+sha256 = "14m763qmx7xdsqv5gkf4xqxvi0nnr5ykwhn3g9mmgazab5g32i0s"
+synopsis = "SRFI-173 Hooks"
+version = "0.1"
+
+[srfi-174]
+dependencies = ["r7rs", "srfi-19"]
+license = "mit"
+sha256 = "0kl9x7q1wcy7jzjkajmqpf748aqfjysh0ygdvnbvg5bxzdfs4gh9"
+synopsis = "srfi-174"
+version = "1.0.2"
+
+[srfi-178]
+dependencies = ["srfi-151", "srfi-160", "srfi-141"]
+license = "mit"
+sha256 = "1njgn227ihvci6nbabmrbhdldpbar4yrs6cph7fbsw9h13cgbl50"
+synopsis = "SRFI 178: Bitvector library"
+version = "1.0.2"
+
+[srfi-179]
+dependencies = ["srfi-1", "srfi-133", "srfi-160"]
+license = "mit"
+sha256 = "0y5y6sr0flmhnkfbazihi72hyc3cs067i00c0zcd6jcpr28ki103"
+synopsis = "SRFI-179: Nonempty Intervals and Generalized Arrays (Updated)"
+version = "0.2.3"
+
+[srfi-18]
+dependencies = []
+license = "bsd"
+sha256 = "0mkg3g045md9v74p4ac24q0c4xvvinz1nggakyg7wlg7c176i2l9"
+synopsis = "SRFI-18 thread library"
+version = "0.1.7"
+
+[srfi-180]
+dependencies = ["r7rs", "srfi-60", "srfi-145", "srfi-121"]
+license = "mit"
+sha256 = "0agky55bn26967nqcaa3n2a3rsr79brybizcivh34qna15gahq39"
+synopsis = "This library describes a JavaScript Object Notation (JSON) parser and printer. It supports JSON that may be bigger than memory."
+version = "1.0.0"
+
+[srfi-189]
+dependencies = ["srfi-1", "typed-records"]
+license = "mit"
+sha256 = "0vdp1sia7anpnvj2rryb1j933n62flwq34iladxymfwgx178fmaa"
+synopsis = "SRFI 189: Maybe and Either"
+version = "1.0.3"
+
+[srfi-19]
+dependencies = ["srfi-1", "utf8", "srfi-18", "srfi-29", "miscmacros", "locale", "record-variants", "check-errors"]
+license = "bsd"
+sha256 = "1m2pyp5mv09inli9jq7fm9q55nhg2xwp50f7s6cgndpp2w2kb38v"
+synopsis = "Time Data Types and Procedures"
+version = "4.9.5"
+
+[srfi-193]
+dependencies = []
+license = "isc"
+sha256 = "18raq9r8nvs6dvb9fq7095bi9sxh655pjs4k7jwj486369jn90di"
+synopsis = "SRFI 193: Command line"
+version = "0.1.3"
+
+[srfi-196]
+dependencies = ["srfi-1", "srfi-133", "typed-records", "utf8"]
+license = "mit"
+sha256 = "0nhkd3n4rx5ibqbxbz36braih5szw4x4221jx0yg3v04vnv81cab"
+synopsis = "SRFI-196: Range Objects"
+version = "1.0.1"
+
+[srfi-197]
+dependencies = []
+license = "mit"
+sha256 = "19lxc4id9k7hqi1d8fm2mxn32gh18lv35xiash018r6cscz9hh01"
+synopsis = "SRFI-197: Pipeline Operators"
+version = "0.2.0"
+
+[srfi-203]
+dependencies = []
+license = "bsd"
+sha256 = "0f31r0722h5nhw5xc3695ccps54jv5jl160s78c4gpjps3rlqfga"
+synopsis = "SRFI 203: A Simple Picture Language in the Style of SICP"
+version = "0.1"
+
+[srfi-207]
+dependencies = ["srfi-1", "srfi-13", "srfi-151", "r7rs"]
+license = "mit"
+sha256 = "124gl45p6i3mnjlq8hys9m0smc9qnizv0r9lch1sf3qi8pj3v648"
+synopsis = "SRFI-207: String-notated bytevectors"
+version = "2.0.0"
+
+[srfi-209]
+dependencies = ["srfi-1", "srfi-69", "srfi-113", "srfi-128", "srfi-178", "typed-records"]
+license = "mit"
+sha256 = "04fghjk0rfcz0fp71dvwvlxmxshrbmrs85g4l5cx8sp74y047qlv"
+synopsis = "SRFI 209: Enums and enum sets"
+version = "1.3.1"
+
+[srfi-216]
+dependencies = ["srfi-18"]
+license = "mit"
+sha256 = "0mq8frv16bx8jvvj0j0yvbnpwwh5kixvzhdnp427vvxhsfvrjk70"
+synopsis = "SRFI 216: SICP Prerequisites"
+version = "0.1"
+
+[srfi-217]
+dependencies = ["srfi-1", "srfi-143", "typed-records"]
+license = "mit"
+sha256 = "0ynasgp03kqd6nhqmcnp4cjf87p3pkjaqi2x860hma79xsslyp8n"
+synopsis = "SRFI 217: Integer Sets"
+version = "0.2"
+
+[srfi-227]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "0vrpgqdmwdaphy0szskxyl2x6xhwycgvi6flwi5v6m2zi5cd3j1c"
+synopsis = "SRFI 227: Optional Arguments"
+version = "1.1"
+
+[srfi-232]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "07639jfqa4y4c6prh3w364mmlyvi0z3pqcr3ampaabsmz527rxpg"
+synopsis = "SRFI 232: Flexible curried procedures"
+version = "0.1"
+
+[srfi-25]
+dependencies = []
+license = "srfi"
+sha256 = "0vf6f0f6jm4frpz995kxjzydg3p7vjn58shmv6s2p34hmfsjcm04"
+synopsis = "Multidimensional arrays"
+version = "1.3"
+
+[srfi-27]
+dependencies = ["srfi-1", "vector-lib", "timed-resource", "miscmacros", "check-errors"]
+license = "bsd"
+sha256 = "11hb0hxhm74yjg7d95nj1wxjpi3hgkns7zy64as3xl3jbq3wlh60"
+synopsis = "Sources of Random Bits"
+version = "4.2.3"
+
+[srfi-29]
+dependencies = ["srfi-1", "srfi-69", "utf8", "locale", "posix-utils", "condition-utils", "check-errors"]
+license = "bsd"
+sha256 = "1pz31xrfja4y43ci5n8gplhdnasbyxx0kwlmcjzycs1js4b66ld1"
+synopsis = "Localization"
+version = "3.0.8"
+
+[srfi-34]
+dependencies = []
+license = "srfi"
+sha256 = "1f4jkj0s0ackppbjz2ysnzpms9y7jhz2sc0w6qwxq8cmb8ga1vbc"
+synopsis = "SRFI-34: Exception Handling for Programs"
+version = "0.7"
+
+[srfi-35]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "13xgssgyrhcakg94lk04pkk38fr5ggfyf4r3sf0abansr6wxrahh"
+synopsis = "SRFI-35 Conditions"
+version = "0.1"
+
+[srfi-37]
+dependencies = []
+license = "srfi"
+sha256 = "10n2qyyv7n4r0m20wyzd8y6s6knc67kdh9i8gp8jgz8b05p7xy8g"
+synopsis = "A simple and flexible command-line option parsing facility"
+version = "1.4"
+
+[srfi-38]
+dependencies = []
+license = "public-domain"
+sha256 = "0pbys0xrzjdsvlwzpvm4sgca9ynxzw6ncmp8gbdxhmwbm1qf71l2"
+synopsis = "A Chicken version of the SRFI-38 reference implementation"
+version = "0.9"
+
+[srfi-4-comprehensions]
+dependencies = ["srfi-42"]
+license = "srfi"
+sha256 = "1j2xabk6fjsh2wnwgzanmqv3pwb72imzfyiiwm8a9y45xyx6513l"
+synopsis = "SRFI-42 Comprehensions for SRFI-4 Vectors"
+version = "1.5"
+
+[srfi-41]
+dependencies = ["srfi-1", "record-variants", "check-errors"]
+license = "bsd"
+sha256 = "017qpy23mq2h7pd70j5wgq570z29qpnl8fw0j272kr6g5ndhmbbp"
+synopsis = "SRFI 41 (Streams)"
+version = "2.1.5"
+
+[srfi-42]
+dependencies = ["srfi-1", "srfi-13"]
+license = "srfi"
+sha256 = "1s43an2yqzx123zlf8k1xny6wr3s5kx61hrik8bkn4wcr6w4rqla"
+synopsis = "SRFI-42 (Eager comprehensions)"
+version = "1.76"
+
+[srfi-45]
+dependencies = ["record-variants", "check-errors"]
+license = "bsd"
+sha256 = "0sygx2pd8d2j8q9n9xz4hdlbnn7amm7za4ibpk0wssyf02r6y5a3"
+synopsis = "SRFI-45: Primitives for Expressing Iterative Lazy Algorithms"
+version = "4.0.7"
+
+[srfi-47]
+dependencies = []
+license = "bsd"
+sha256 = "1kjvqza95qwkwr6basar56vph9lpmm6y4ayp49wd3n1jnfdxkj1d"
+synopsis = "SRFI-47: Arrays"
+version = "2.0"
+
+[srfi-48]
+dependencies = ["srfi-38"]
+license = "mit"
+sha256 = "153ipqaz7740vr50sq639vk5vs8wxd8lmfpa0vk17qzw5skmnhp6"
+synopsis = "SRFI-48: Intermediate Format Strings"
+version = "1.0.0"
+
+[srfi-5]
+dependencies = []
+license = "mit"
+sha256 = "0n50xzkwq4mainjlzjihiqiknbyzx9js1d8d796hvcy9v613vivk"
+synopsis = "SRFI-5: A compatible let form with signatures and rest arguments"
+version = "0.3.2"
+
+[srfi-51]
+dependencies = ["srfi-1"]
+license = "mit"
+sha256 = "17iv2n9pcdgsdqj5j96akmbnlz1rxc3l57yg9yrjp7fkh4gi02i8"
+synopsis = "SRFI-51: Handling rest list"
+version = "0.2"
+
+[srfi-60]
+dependencies = ["bitwise-utils"]
+license = "mit"
+sha256 = "18cfqkq5pfgfh21c1m1n6m10imqnpfljmwzzzy15wrzgbqw04z8n"
+synopsis = "SRFI 60: Integers as bits"
+version = "0.7.1"
+
+[srfi-63]
+dependencies = ["records"]
+license = "artistic"
+sha256 = "1iszd74yfv215zmpr8i00cbhx4yni47zic14f7qvd0jp1pplhrlk"
+synopsis = "Homogeneous and heterogeneous arrays"
+version = "0.5"
+
+[srfi-64]
+dependencies = []
+license = "srfi"
+sha256 = "0ga9qksagm3fcvg3427w7zhl7g9lbxfb6sb98vl8b0swwz8wz8hr"
+synopsis = "SRFI 64:\"A Scheme API for test suites\" implementation"
+version = "1.0.5"
+
+[srfi-66]
+dependencies = []
+license = "mit"
+sha256 = "0bin3cmgr4r7m3kp6amapqsxaizav3d4alijcfl3q9ahx23di67m"
+synopsis = "SRFI-66: Octet Vectors"
+version = "0.1"
+
+[srfi-67]
+dependencies = ["srfi-27"]
+license = "mit"
+sha256 = "0vi8l6nmbv14mfqqyyck1ayr5xdiiqypr2bcwvawfi6aanfl6xxb"
+synopsis = "SRFI-67: Compare Procedures"
+version = "0.1"
+
+[srfi-69]
+dependencies = []
+license = "bsd"
+sha256 = "12qgj5wqj9xxkh0ff48a540v4gd8a91w4rvay6ri5sv8piq8nnzx"
+synopsis = "SRFI-69 hash-table library"
+version = "0.4.3"
+
+[srfi-71]
+dependencies = []
+license = "srfi"
+sha256 = "0v10ylzd5r61l2f6b2v3j4mpxf50pwmrlaqrhx66bw2fps3n32qp"
+synopsis = "SRFI-71: Extended LET-syntax for multiple values"
+version = "0.2"
+
+[srfi-74]
+dependencies = ["srfi-60", "srfi-66"]
+license = "mit"
+sha256 = "1ymcad82vf89660i8km8568xnkpiz35inil348arqkp44804q1rz"
+synopsis = "SRFI-74: Octet-Addressed Binary Blocks"
+version = "0.1"
+
+[srfi-78]
+dependencies = ["srfi-42"]
+license = "mit"
+sha256 = "0x50wcb0nsi5p355y0kma23y8wbikk3as2wlspwgfmp25g9ld0il"
+synopsis = "SRFI-78: Lightweight testing"
+version = "0.5"
+
+[srfi-94]
+dependencies = ["srfi-60"]
+license = "mit"
+sha256 = "1vz8g09csl9jlr0828p9z1p4mxrnlzz0qq4rwkadidcmr9mjfbwp"
+synopsis = "SRFI 94: Type-Restricted Numerical Functions"
+version = "0.1"
+
+[srfi-95]
+dependencies = ["srfi-63"]
+license = "public-domain"
+sha256 = "0qya20jn78zwhl89q3jp5jx5iasl0gwjwl8acmq3hlgl5d3nivcd"
+synopsis = "SRFI-95: Sorting and merging"
+version = "2.0"
+
+[srfi-99]
+dependencies = ["srfi-1", "srfi-69", "miscmacros"]
+license = "bsd"
+sha256 = "033hid04aaph0xmsc68r417dnjyswfqyd20y5cl4q3v8izqi54ks"
+synopsis = "SRFI-99 record types"
+version = "1.4.5"
+
+[ssax]
+dependencies = ["input-parse", "srfi-1", "srfi-13"]
+license = "public-domain"
+sha256 = "1yfaxi9wxsjj6mlf5m6zh7x1xafgglyzq3fbhx1zlf13zhvadjsj"
+synopsis = "Oleg Kiselyov's XML parser"
+version = "5.1.0"
+
+[ssql]
+dependencies = ["matchable", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "1ps7kawzhg1yln0pn2jg1ka7nbcpi84k2cl8mnza6nza3g0bplwm"
+synopsis = "SQL as S-expressions"
+version = "0.3"
+
+[stack]
+dependencies = ["record-variants", "check-errors"]
+license = "bsd"
+sha256 = "0fcpsh9rgibkz807jwr062bcjzz7x93pv5x9xniycpjp6i3s5r2x"
+synopsis = "Provides LIFO queue (stack) operations"
+version = "3.1.0"
+
+[stalin]
+dependencies = []
+license = "gpl-2"
+sha256 = "034mc1rgmp6r44bycknja6c4snvs3li75f1kr686g0lgzg1n0jjq"
+synopsis = "An aggressively optimizing Scheme->C compiler"
+version = "0.11.11"
+
+[states]
+dependencies = ["advice"]
+license = "public-domain"
+sha256 = "1l4h4l318rzrkfbq2s1cbinjwqxazclfpy1zznb03s3r0x3h9zrc"
+synopsis = "Simple Finite State Machine library"
+version = "1.0"
+
+[statistics]
+dependencies = ["srfi-1", "srfi-25", "srfi-69", "vector-lib", "random-mtzig", "yasos", "compile-file", "srfi-13"]
+license = "gpl-3"
+sha256 = "0s659vg9na72brl1bs336vbv7jxy3blf113mifax7ya5vpvxnl71"
+synopsis = "Statistics library"
+version = "0.13"
+
+[stb-image-resize]
+dependencies = []
+license = "public-domain"
+sha256 = "1lajh5gfwvxzi9x7jwzzfdq462ns5nvpqcdwr44v8j0fqcgjrdcb"
+synopsis = "resize raw u8/u16/u32/f32-vector images"
+version = "0.3"
+
+[stb-image-write]
+dependencies = []
+license = "public-domain"
+sha256 = "0477v02icjgvbsna0wh3hqapiz1hpggwrm3wi11104kin8jh0kl1"
+synopsis = "write png/jpg/tga/bmp images"
+version = "0.3"
+
+[stb-image]
+dependencies = []
+license = "public-domain"
+sha256 = "0h8a8212miihqnd93s6svj3gs5yw7ix787mpzj7bgd34vx5srbsy"
+synopsis = "read png/jpg/tga/bmp/psd/gif/hdr/pic/pnm images into pixels"
+version = "0.6"
+
+[stemmer]
+dependencies = []
+license = "bsd"
+sha256 = "17b9f9dswsd2zwhxwxigcaqpjyj7ppzxzk20ip5nh0884s976j6m"
+synopsis = "Bindings for the Snowball project's libstemmer"
+version = "0.0.2"
+
+[stfl]
+dependencies = []
+license = "gpl-3"
+sha256 = "1j63kcj1sq8mr6hb37xskd8c6807nzgs2wf97i8yaxw456s1v57k"
+synopsis = "Bindings to the STFL curses widget library"
+version = "1.1"
+
+[string-utils]
+dependencies = ["utf8", "srfi-1", "srfi-13", "srfi-69", "miscmacros", "check-errors"]
+license = "bsd"
+sha256 = "0f9m63flywcx7b6rhb7d562v26xilnxl0zcd8c6c4rfjsr0bdgjr"
+synopsis = "String Utilities"
+version = "2.7.3"
+
+[strse]
+dependencies = ["matchable", "srfi-13", "miscmacros"]
+license = "bsd-1-clause"
+sha256 = "1abwb27l8ms7cwdc03wfa51jdqngjdfxdfayjynsvbhw5hp4rxmf"
+synopsis = "A string DSL"
+version = "1.39"
+
+[stty]
+dependencies = ["foreigners", "srfi-69"]
+license = "bsd"
+sha256 = "195qkj1ckji115ih9ccfsn52hg8cbbwn19vblcggv3g0xmpncdak"
+synopsis = "stty-style interface to termios"
+version = "0.6"
+
+[sundials]
+dependencies = ["srfi-1", "srfi-69", "srfi-13", "compile-file"]
+license = "bsd"
+sha256 = "0v9bxclbm11glbv47pqbwi2gxx9555c04njy1cxigs6wyrvg54yh"
+synopsis = "An interface to SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)."
+version = "2.17"
+
+[svgpath]
+dependencies = ["brev-separate", "clojurian", "match-generics", "miscmacros", "srfi-1", "srfi-69", "strse", "sxpath", "tree"]
+license = "lgpl"
+sha256 = "0017w5vc9qpz5gcghhlsw6fzla2vxkvykm9rvriiqm9zywq48wlh"
+synopsis = "Parse, normalize, and write SVG path data"
+version = "1.7"
+
+[svn-client]
+dependencies = []
+license = "public-domain"
+sha256 = "0xxnk0pnvv6n8zf7wz720nzj03yx15xdiczpkwvhr87rafy02smy"
+synopsis = "A wrapper around Subversion's libsvn_client C library."
+version = "1.2"
+
+[svnwiki-sxml]
+dependencies = ["matchable", "html-parser", "sxml-transforms", "srfi-13", "srfi-1", "regex"]
+license = "bsd"
+sha256 = "12pb7liy0g9kkhc5gci9q7569qy92m5cgkp9x09mpzxna4n0b18z"
+synopsis = "Parse svnwiki to sxml"
+version = "0.2.14"
+
+[svnwiki2html]
+dependencies = ["qwiki", "svnwiki-sxml", "sxml-transforms", "srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "014401nlkpz19bk8yk906p9i0b7ycs79rn7yq0zks8z09rgr9ghk"
+synopsis = "A program to convert svnwiki syntax to HTML"
+version = "0.0.2"
+
+[sxml-modifications]
+dependencies = ["srfi-1", "sxpath"]
+license = "public-domain"
+sha256 = "0g9j8v0fqj6066rxn6fs8qg13bc4hi1bygf9bxx49hfwhh06178v"
+synopsis = "The sxml-modification bits of sxml-tools from the SSAX project at Sourceforge"
+version = "0.3.1"
+
+[sxml-serializer]
+dependencies = ["srfi-1", "srfi-13"]
+license = "bsd"
+sha256 = "1q34n5akg7dc2ylvwbwlahmrdhbxjv9i9lhbfx4p32vsxaay8bib"
+synopsis = "Serialize SXML to XML and HTML"
+version = "0.5"
+
+[sxml-transforms]
+dependencies = ["srfi-13"]
+license = "public-domain"
+sha256 = "0cvpqgjwz1p5vg8jwjr2p1l3hx9s02f083g84v16wv88y3d5rsbg"
+synopsis = "The SXML transformations (to XML, SXML, and HTML) from the SSAX project at Sourceforge"
+version = "1.4.3"
+
+[sxpath]
+dependencies = ["srfi-13"]
+license = "public-domain"
+sha256 = "177wjyz5pj4m783pfhwk070qll2b9iw9m0lh3nyyf6mp2w803ylf"
+synopsis = "The sxpath bits of sxml-tools from the SSAX project at Sourceforge"
+version = "1.0"
+
+[symbol-utils]
+dependencies = ["utf8"]
+license = "bsd"
+sha256 = "0mxcdlf1i0xn70h9l5grgx1yvkbgq9rcvil02gdp9by5qqcqmklh"
+synopsis = "Symbol Utilities"
+version = "2.5.0"
+
+[synch]
+dependencies = ["srfi-18", "check-errors"]
+license = "bsd"
+sha256 = "0hqwk1xfrslcyigjj9z28lki8xdb1x1ccvss225mnmahpdn42pp8"
+synopsis = "Synchronization Forms"
+version = "3.3.8"
+
+[sysexits]
+dependencies = []
+license = "public-domain"
+sha256 = "00hymhdqwn3s2wqmaw3182kkp392hxx6h1xicqga4nxjjm4rnw24"
+synopsis = "Exit status codes for system programs"
+version = "1.0.0"
+
+[system-information]
+dependencies = []
+license = "bsd"
+sha256 = "04974zimmahsbvk73bj487rj75ca6g91mr9b882859awbmc00d4g"
+synopsis = "Obtaining system and host information"
+version = "0.1"
+
+[system]
+dependencies = ["coops", "shell", "compile-file", "srfi-1"]
+license = "bsd"
+sha256 = "18sp0r0qsq8aw3ff9f4cv5a3n6p7yh5jlwf0s22x8bswi4377a76"
+synopsis = "load and compile groups of files"
+version = "0.8"
+
+[tabular]
+dependencies = ["srfi-1", "srfi-127", "utf8", "matchable"]
+license = "gpl-3"
+sha256 = "155h58aphs1m29fq152fp08q1jkf7sibyi2ynqza6y5z846gf9gj"
+synopsis = "Parsing and formatting of tabular text data such as comma- and delimiter-separated values (CSV and DSV)."
+version = "1.4"
+
+[taglib]
+dependencies = []
+license = "lgpl"
+sha256 = "0hasfwd414n7g29jp3d2m5djrl2f8mvzmhh9fhs23q2bspyxpdjb"
+synopsis = "Bindings to taglib"
+version = "0.2.5"
+
+[tcp-server]
+dependencies = ["srfi-18"]
+license = "bsd"
+sha256 = "1lm7gd7s57d6vdb0xyd1mk3z213w8fisj7fl3cw1cbhmnqvfzqbf"
+synopsis = "A simple generic multithreaded tcp-server"
+version = "1.5"
+
+[tcp6]
+dependencies = ["socket", "srfi-1"]
+license = "bsd"
+sha256 = "03amc9wfpk2r3aybm8llh0l89kiqi5bri132987jj59d4qvmv1rq"
+synopsis = "Interface to TCP over IPv4 and IPv6"
+version = "0.2.1"
+
+[termbox]
+dependencies = []
+license = "mit"
+sha256 = "0d6zz6fr1nqznm1b10fyz0q71533qh7056ggx17flrnjlvxayb5f"
+synopsis = "Minimal text based user interfaces. Bindings for nsf/termbox"
+version = "0.3"
+
+[test-generative]
+dependencies = ["test", "srfi-1"]
+license = "gplv3"
+sha256 = "1r7sx789ha7ajnpb3zgjryhjfmhy6i1dpblkjfxdbmk2sz4py9lf"
+synopsis = "Allows quickcheck like testing for pure code with the test egg"
+version = "0.0.6"
+
+[test-new-egg]
+dependencies = ["henrietta-cache", "salmonella", "srfi-1"]
+license = "bsd"
+sha256 = "01m7bi646f0ypv5j1zpsw16fk4rzw3lmycxlhkzzb11ghlgl2vqq"
+synopsis = "A tool to test new eggs before they are added to the official CHICKEN repository"
+version = "1.0.4"
+
+[test-utils]
+dependencies = ["test"]
+license = "bsd"
+sha256 = "0c4zj3i4g1iq38ifdgzhrl5lz0v97qzphsyg1d2a6ps6zr7jwgbf"
+synopsis = "Test Utilities (for test egg)"
+version = "1.0.5"
+
+[test]
+dependencies = []
+license = "bsd"
+sha256 = "1l88lb8cnb0i49qvpdj1rnlj06srp5myg0vhs0fv23gzrzjspxh8"
+synopsis = "Yet Another Testing Utility"
+version = "1.2"
+
+[this]
+dependencies = []
+license = "bsd"
+sha256 = "1gl2p50nc0zzpzwm6h9gxkpdhwnqmm92grsvr26cb2wrrxzj2ffy"
+synopsis = "Python's \"this\" module ported to CHICKEN"
+version = "0.1"
+
+[thread-utils]
+dependencies = ["queues", "srfi-1", "srfi-18", "miscmacros", "moremacros", "record-variants", "check-errors", "synch"]
+license = "bsd"
+sha256 = "0avr7r6caacmbr3gbb8rp23ddi0g74yz2jc2w2bbhxrqr01vqj0l"
+synopsis = "Thread Utilities"
+version = "2.2.8"
+
+[tiger-hash]
+dependencies = ["message-digest-primitive"]
+license = "bsd"
+sha256 = "0hcmp58byk2wg0nbmb5zh2zc7z670dhva21qjpix6l8hqgrf0151"
+synopsis = "Tiger/192 Message Digest"
+version = "4.1.2"
+
+[timed-resource]
+dependencies = ["record-variants", "check-errors", "thread-utils", "srfi-1", "srfi-18", "synch", "miscmacros"]
+license = "bsd"
+sha256 = "1jycpy7vxl8d3acnjyz531nqyhgy4n8baqjzd5af1kxy69qvmzgs"
+synopsis = "Resource w/ Timeout"
+version = "2.4.2"
+
+[tiny-prolog]
+dependencies = ["srfi-69"]
+license = "bsd"
+sha256 = "0zz468zvr7v1dh2sg48kmlq43dbim66md3dv2dchdpzfjg378w8k"
+synopsis = "Tiny PROLOG interpreter."
+version = "2.1"
+
+[tokyocabinet]
+dependencies = []
+license = "bsd"
+sha256 = "0x285jydmkgx46gqwnjxczmbbpmbv17jpqf7k6k4jiix6x54q5vg"
+synopsis = "Tokyo Cabinet hash database interface"
+version = "0.1.0"
+
+[toml]
+dependencies = ["r7rs", "rfc3339", "coops"]
+license = "mit"
+sha256 = "10isk4rxcjabm16g59nxafm2vx0vidjq1alaxbih3gw9w2kc11l4"
+synopsis = "A Chicken binding to read TOML configuration files"
+version = "0.7"
+
+[topham]
+dependencies = ["http-client", "intarweb", "medea", "openssl", "optimism", "simple-exceptions", "srfi-1", "module-declarations"]
+license = "bsd"
+sha256 = "18p3gjbzi95djyn1rm230ag5g4n4q70pqi670b215icjx91za63i"
+synopsis = "Bindings for the sr.ht REST API"
+version = "0.1.7"
+
+[trace]
+dependencies = ["srfi-1", "advice", "miscmacros"]
+license = "public-domain"
+sha256 = "1dcfpwnlmmmnfmzr7byml0ja9b36d6mggnw9mmrdv51q74pzkww3"
+synopsis = "tracing and breakpoints"
+version = "2.0"
+
+[transducers]
+dependencies = ["r7rs", "srfi-1", "srfi-128", "srfi-133", "srfi-146", "srfi-160", "check-errors"]
+license = "mit"
+sha256 = "1bz05dy7kjypk85yck3a8h6iji6kkmnb48kpqdqvj9nm0kvg2nwd"
+synopsis = "Transducers for working with foldable data types."
+version = "0.5.4"
+
+[transmission]
+dependencies = ["http-client", "intarweb", "medea", "r7rs", "srfi-1", "srfi-189", "uri-common"]
+license = "unlicense"
+sha256 = "1483d5kz13zvrqpacvb7lfvc178x3j9236vmdv37ndsvjfy7m6fc"
+synopsis = "Transmission RPC"
+version = "0.3.0"
+
+[traversal]
+dependencies = ["srfi-1", "vector-lib"]
+license = "lgpl"
+sha256 = "172inmqlz2pqbks5gyfnbll5qnnk4545jrb3xbsp9qxcmmayamiw"
+synopsis = "Various list operations"
+version = "1.7"
+
+[tree-walkers]
+dependencies = []
+license = "bsd"
+sha256 = "1if8njjaac4i23126jlmzw67y7hcr2hs842nwsgyzi2hi780pzvk"
+synopsis = "replacement of car, cdr and consorts"
+version = "1.0"
+
+[tree]
+dependencies = ["srfi-1", "srfi-42", "srfi-69", "srfi-71"]
+license = "mit"
+sha256 = "1bmipwxg1r5fyxfskgrpr5ivprc3s70vdcc5vm8i6mp2cfn8dmxz"
+synopsis = "A tree utility library"
+version = "1.50"
+
+[trie]
+dependencies = ["srfi-1"]
+license = "bsd"
+sha256 = "1k7hq31px236s25wqfqh22wb4kpm97hl2kcvj4amsyvlxc1y4w96"
+synopsis = "A trie (prefix tree) implementation"
+version = "2"
+
+[tweetnacl]
+dependencies = []
+license = "bsd"
+sha256 = "0ba8xz39qgc8ixq7s21pdf5sw5hwxriakdhq7pxc47na2q2pr1dy"
+synopsis = "TweetNaCl cryptographic library"
+version = "1.4.2"
+
+[type-extensions]
+dependencies = ["matchable"]
+license = "bsd"
+sha256 = "0l4hp89v0x10is29fczhr6y89qrsd16bgdgbl2pf2l36pmlgqfmr"
+synopsis = "Miscellaneous type system extensions"
+version = "0.1.0"
+
+[typeclass]
+dependencies = ["srfi-1", "matchable"]
+license = "mit"
+sha256 = "1zpf8dvyh8wfrilvnwmna8223g64brp6pvxpz9gx5vb9nb8yq7jk"
+synopsis = "Type classes"
+version = "1.5"
+
+[typed-records]
+dependencies = ["defstruct"]
+license = "bsd"
+sha256 = "0giy38ra6s6cq2qnpy7ljgal2wq3ckgxs9w81wivckyz66r5x6il"
+synopsis = "Typed variants of various record-definition macros"
+version = "0.82"
+
+[udp]
+dependencies = ["srfi-1", "srfi-18"]
+license = "bsd"
+sha256 = "1f4m1jj0r5wm5akd6q7cfnc0fwgw0kwkqr4l5n40vbgcwp8gvm7k"
+synopsis = "An interface to User Datagram Protocol sockets"
+version = "1.18"
+
+[udp6]
+dependencies = ["socket"]
+license = "bsd"
+sha256 = "1fm8khkfw22iwsnlyj5jpipfkp70y35pk2y3i4bzmp6iq84gxjrm"
+synopsis = "Interface to UDP over IPv4 and IPv6"
+version = "0.2.0"
+
+[unitconv]
+dependencies = ["matchable"]
+license = "lgpl-3"
+sha256 = "0lkz79dzds0vjjgfbi4sy9gq34xrdrlc3l57gzgbcd42jhbp0xaz"
+synopsis = "Conversion of units of measurement"
+version = "4.0"
+
+[unitex-named-chars]
+dependencies = []
+license = "bsd"
+sha256 = "00i7bax8mgw2r8l61iwvircxpynjf2d2yjxlaaa4l4m1mc12bzsv"
+synopsis = "Unicode & LaTeX Named Chars"
+version = "0.0.4"
+
+[unsafe]
+dependencies = []
+license = "bsd"
+sha256 = "0nainz77q0a1pzac92dp4nbmpq4g20vqa4qxzaqg86rhy7rpr01x"
+synopsis = "Unsafe operations"
+version = "1.0"
+
+[unveil]
+dependencies = []
+license = "isc"
+sha256 = "0v9s6qaf5lcvdn881bpibazy77fajm8fj7h6v54425lx35164rbf"
+synopsis = "unveil(2) support for CHICKEN"
+version = "0.2"
+
+[uri-common]
+dependencies = ["uri-generic", "defstruct", "matchable", "srfi-1", "srfi-13", "srfi-14"]
+license = "bsd"
+sha256 = "0zpdwzsiys6y3vb7mh6ca55qzn3l86m1b0f4kjd7v9y9d47pywl3"
+synopsis = "Parser for common URI schemes"
+version = "2.0"
+
+[uri-generic]
+dependencies = ["matchable", "srfi-1", "srfi-14"]
+license = "bsd"
+sha256 = "11k6qczmia6m77jgk80lphz83h12hd5h5cfzj8mllf7kv50il69g"
+synopsis = "URI generic syntax (RFC 3986) parsing and manipulation."
+version = "3.3"
+
+[uri-match]
+dependencies = ["uri-common"]
+license = "bsd"
+sha256 = "0bkl82wjhiihk4ll1m5zddzcmhwswgp9n26gig7c606wyi76yw7s"
+synopsis = "A flexible URI matcher"
+version = "1.0"
+
+[utf8]
+dependencies = ["srfi-69", "iset", "regex"]
+license = "bsd"
+sha256 = "0vpf2vw4k7b1f7afgminnvkgiq9m973rxi1w2y63jgg8vr7i027p"
+synopsis = "Unicode support"
+version = "3.6.3"
+
+[uuid-lib]
+dependencies = ["record-variants"]
+license = "bsd"
+sha256 = "16b03b6d29mjn8bcil0ln0vq85dxxvzlxrpnpblf68n7l9ix8qnc"
+synopsis = "OSF DCE 1.1 UUID"
+version = "0.0.15"
+
+[uuid]
+dependencies = []
+license = "bsd"
+sha256 = "0iv8z83zdpwxrvjrxjnvflqy5hj4x03ivm3f2dmcf82ylhvx0gd8"
+synopsis = "native chicken uuid library"
+version = "0.1"
+
+[vector-lib]
+dependencies = []
+license = "bsd"
+sha256 = "071nx5m5q7j55mv4ikikffd1b2m7xfkbm21rjffg8gz6qwqa851z"
+synopsis = "Port of the SRFI-43 reference implementation"
+version = "2.1.1"
+
+[vectr]
+dependencies = ["coops"]
+license = "gplv3"
+sha256 = "0a97mg94l03npnlds7c8f63d9nhvr2rfjnk0p1mgqpmvq396kf0g"
+synopsis = "A linear vectr library."
+version = "0.1"
+
+[vlist]
+dependencies = ["srfi-1", "srfi-69"]
+license = "lgpl-3"
+sha256 = "0vmxll3x7b4inp3jwzvkzjkvqw79imkmsaygwvn9r3l1hzypxmas"
+synopsis = "An implementation of vlists, a functional list-like data structure."
+version = "1.1"
+
+[web-colors]
+dependencies = ["srfi-13"]
+license = "bsd"
+sha256 = "05q5rrw4dmnswrb2sfzyvn970s9xclwhcvzybs0qdb15qq89g4jn"
+synopsis = "Parse and write HTML/CSS color strings"
+version = "1.0.0"
+
+[webview]
+dependencies = ["srfi-1", "srfi-13", "srfi-18", "srfi-69", "utf8"]
+license = "bsd"
+sha256 = "1xd7h0z2j5vfhckw28s52y752lyx77q8gqj9cwlrgxhhirylh5n6"
+synopsis = "Multi-platform HTML user interface shell"
+version = "1.0.1"
+
+[with-current-directory]
+dependencies = ["module-declarations"]
+license = "bsd"
+sha256 = "1ryl7l2jw5m34fmvv1nr0rf2mwkxrds8xkz7msfzi4gy36i5zja9"
+synopsis = "Convenience procedure for temporarily changing directories"
+version = "1.0.0"
+
+[ws-client]
+dependencies = ["srfi-1", "foreigners", "string-utils", "base64", "simple-sha1", "uri-common", "intarweb", "openssl"]
+license = "bsd"
+sha256 = "1w6cpf52ipw0irx7xhh9gnz13hp6h9babi7ymiwwn9k798mhc063"
+synopsis = "websocket client library"
+version = "1.0.0"
+
+[x11-colors]
+dependencies = ["srfi-1", "srfi-13", "matchable"]
+license = "bsd"
+sha256 = "1fj8swh4s4gwif2dp59ls0vbdi2d5w50b2q2q00yiyvlr7smm4hs"
+synopsis = "named standard colors as available in X11"
+version = "1.1"
+
+[xj]
+dependencies = ["fmt", "html-parser", "srfi-1", "utf8", "brev-separate"]
+license = "bsd-3-clause"
+sha256 = "15a7p9qq33mlxa3h50s142zy9zchpdpkdkx51kfcadh0rbj0x7bi"
+synopsis = "Unix filter that turns XML into JSON"
+version = "1.29"
+
+[xlib]
+dependencies = ["matchable", "srfi-13"]
+license = "unknown"
+sha256 = "17r7w5w7fwmhr5n37zq0yhg4s8pm8505lzal4mq7i2m6y591xfc0"
+synopsis = "Xlib bindings"
+version = "1.3"
+
+[xml-rpc]
+dependencies = ["base64", "http-client", "intarweb", "ssax", "sxpath", "srfi-1", "srfi-13", "srfi-18", "srfi-69"]
+license = "bsd"
+sha256 = "05qn5fd872q3zh0ic9gq32j8rnvpg6l1p5bj86pdyan1iqxypnsq"
+synopsis = "XML-RPC client/server"
+version = "3.0.1"
+
+[yaml]
+dependencies = ["sql-null", "srfi-13", "srfi-69"]
+license = "mit"
+sha256 = "0h80jim818a3ks0qa6q123hj9gabky9zyvam724sglvx3zj897is"
+synopsis = "Bindings to libyaml"
+version = "0.2.2"
+
+[yasos]
+dependencies = ["srfi-69", "srfi-127"]
+license = "bsd"
+sha256 = "0q8cl3bvslk76l89k0vf836cb3xmd4kwvhgak38afsnrvirwiamn"
+synopsis = "A very simple OOP system"
+version = "1.14"
+
+[z3]
+dependencies = ["bind"]
+license = "bsd"
+sha256 = "147f2401ngpgg6pg0gf60vkj1gvhgmbjc3l8v5mqkyd47p5zjxgl"
+synopsis = "A gzip (RFC1952) compression and decompression library"
+version = "2.0"
+
+[zlib]
+dependencies = ["foreigners", "miscmacros"]
+license = "gpl-3"
+sha256 = "0m3kkspj2l4ssl82gx058h747xmbhm66cxc1z0908b0pjkw5byx7"
+synopsis = "Bindings for zlib"
+version = "0.7.0"
+
+[zmq]
+dependencies = ["srfi-1", "srfi-13", "srfi-18", "foreigners"]
+license = "lgpl"
+sha256 = "04iyk76fi557r3y7wxhgr2kra0764qgcc84dar5pz3qjlql33bhq"
+synopsis = "Bindings for the ZeroMQ API"
+version = "0.2"
+
+[zshbrev]
+dependencies = ["brev"]
+license = "lgplv3"
+sha256 = "1zmb84z22p8gv1bk05x7daqpl5h1z71hpivkyc1wbjfxyymmyaxj"
+synopsis = "Access Chicken functions from any shell and access zsh functions from Chicken"
+version = "1.21"
+
+[zstd]
+dependencies = []
+license = "bsd"
+sha256 = "06gvbk03xbrs5hihrysl2qaf7aag7zk3nvsyaqvfiaa6zg5y80mk"
+synopsis = "ZStandard bindings"
+version = "1.2"
+
+[zxcvbn]
+dependencies = []
+license = "bsd"
+sha256 = "0hqhzlwlmngwd9sgkrrhmvfaq8gc7dc2c719y6h2ys3ahym4iaxn"
+synopsis = "zxcvbn password entropy estimation"
+version = "1.0.0"
+
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..62b634eb6370
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/egg2nix.nix
@@ -0,0 +1,29 @@
+{ lib, 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 = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+    maintainers = with 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..2d2462355928
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/eggDerivation.nix
@@ -0,0 +1,56 @@
+{ callPackage, lib, stdenv, chicken, makeWrapper }:
+{ name, src
+, buildInputs ? []
+, chickenInstallFlags ? []
+, cscOptions          ? []
+, ...} @ args:
+
+let
+  overrides = callPackage ./overrides.nix { };
+  baseName = lib.getName name;
+  override = if builtins.hasAttr baseName overrides
+   then
+     builtins.getAttr baseName overrides
+   else
+     lib.id;
+in
+(stdenv.mkDerivation ({
+  name = "chicken-${name}";
+  propagatedBuildInputs = buildInputs;
+  nativeBuildInputs = [ chicken makeWrapper ];
+  buildInputs = [ chicken ];
+
+  strictDeps = true;
+
+  CSC_OPTIONS = lib.concatStringsSep " " cscOptions;
+
+  buildPhase = ''
+    runHook preBuild
+    chicken-install -cached -no-install -host ${lib.escapeShellArgs chickenInstallFlags}
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    export CHICKEN_INSTALL_PREFIX=$out
+    export CHICKEN_INSTALL_REPOSITORY=$out/lib/chicken/${toString chicken.binaryVersion}
+    chicken-install -cached -host ${lib.escapeShellArgs 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
+  '';
+
+  dontConfigure = true;
+
+  meta = {
+    inherit (chicken.meta) platforms;
+  } // args.meta or {};
+} // builtins.removeAttrs args ["name" "buildInputs" "meta"]) ).overrideAttrs override
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..adaad31b52bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/overrides.nix
@@ -0,0 +1,177 @@
+{ stdenv, pkgs, lib, chickenEggs }:
+let
+  inherit (lib) addMetaAttrs;
+  addToNativeBuildInputs = pkg: old: {
+    nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ lib.toList pkg;
+  };
+  addToBuildInputs = pkg: old: {
+    buildInputs = (old.buildInputs or [ ]) ++ lib.toList pkg;
+  };
+  addToPropagatedBuildInputs = pkg: old: {
+    propagatedBuildInputs = (old.propagatedBuildInputs or [ ])
+      ++ lib.toList pkg;
+  };
+  addPkgConfig = old: {
+    nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
+  };
+  addToBuildInputsWithPkgConfig = pkg: old:
+    (addPkgConfig old) // (addToBuildInputs pkg old);
+  addToPropagatedBuildInputsWithPkgConfig = pkg: old:
+    (addPkgConfig old) // (addToPropagatedBuildInputs pkg old);
+  broken = addMetaAttrs { broken = true; };
+  brokenOnDarwin = addMetaAttrs { broken = stdenv.isDarwin; };
+  addToCscOptions = opt: old: {
+    CSC_OPTIONS = lib.concatStringsSep " " ([ old.CSC_OPTIONS or "" ] ++ lib.toList opt);
+  };
+in
+{
+  allegro = addToBuildInputsWithPkgConfig ([ pkgs.allegro5 pkgs.libglvnd ]
+    ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenGL ]);
+  breadline = addToBuildInputs pkgs.readline;
+  blas = addToBuildInputsWithPkgConfig pkgs.blas;
+  blosc = addToBuildInputs pkgs.c-blosc;
+  botan = addToBuildInputsWithPkgConfig pkgs.botan2;
+  cairo = old:
+    (addToBuildInputsWithPkgConfig pkgs.cairo old)
+    // (addToPropagatedBuildInputs (with chickenEggs; [ srfi-1 srfi-13 ]) old);
+  cmark = addToBuildInputs pkgs.cmark;
+  dbus = addToBuildInputsWithPkgConfig pkgs.dbus;
+  epoxy = addToPropagatedBuildInputsWithPkgConfig pkgs.libepoxy;
+  espeak = addToBuildInputsWithPkgConfig pkgs.espeak-ng;
+  exif = addToBuildInputsWithPkgConfig pkgs.libexif;
+  expat = addToBuildInputsWithPkgConfig pkgs.expat;
+  ezxdisp = addToBuildInputsWithPkgConfig pkgs.xorg.libX11;
+  freetype = addToBuildInputsWithPkgConfig pkgs.freetype;
+  fuse = addToBuildInputsWithPkgConfig pkgs.fuse;
+  gl-utils = addPkgConfig;
+  glfw3 = addToBuildInputsWithPkgConfig pkgs.glfw3;
+  glls = addPkgConfig;
+  iconv = addToBuildInputs (lib.optional stdenv.isDarwin pkgs.libiconv);
+  icu = addToBuildInputsWithPkgConfig pkgs.icu;
+  imlib2 = addToBuildInputsWithPkgConfig pkgs.imlib2;
+  inotify = old:
+    (addToBuildInputs (lib.optional stdenv.isDarwin pkgs.libinotify-kqueue) old)
+    // lib.optionalAttrs stdenv.isDarwin (addToCscOptions "-L -linotify" old);
+  leveldb = addToBuildInputs pkgs.leveldb;
+  magic = addToBuildInputs pkgs.file;
+  mdh = addToBuildInputs pkgs.pcre;
+  # missing dependency in upstream egg
+  mistie = addToPropagatedBuildInputs (with chickenEggs; [ srfi-1 ]);
+  mosquitto = addToPropagatedBuildInputs ([ pkgs.mosquitto ]);
+  nanomsg = addToBuildInputs pkgs.nanomsg;
+  ncurses = addToBuildInputsWithPkgConfig [ pkgs.ncurses ];
+  opencl = addToBuildInputs ([ pkgs.opencl-headers pkgs.ocl-icd ]
+    ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenCL ]);
+  openssl = addToBuildInputs pkgs.openssl;
+  plot = addToBuildInputs pkgs.plotutils;
+  postgresql = addToBuildInputsWithPkgConfig pkgs.postgresql;
+  rocksdb = addToBuildInputs pkgs.rocksdb;
+  scheme2c-compatibility = old:
+    addToNativeBuildInputs (lib.optionals (stdenv.system == "x86_64-darwin") [ pkgs.memorymappingHook ])
+      (addPkgConfig old);
+  sdl-base = old:
+    ((addToPropagatedBuildInputsWithPkgConfig pkgs.SDL old) //
+      # needed for sdl-config to be in PATH
+      (addToNativeBuildInputs pkgs.SDL old));
+  sdl2 = old:
+    ((addToPropagatedBuildInputsWithPkgConfig pkgs.SDL2 old) //
+      # needed for sdl2-config to be in PATH
+      (addToNativeBuildInputs pkgs.SDL2 old));
+  sdl2-image = old:
+    ((addToPropagatedBuildInputsWithPkgConfig pkgs.SDL2_image old) //
+      # needed for sdl2-config to be in PATH
+      (addToNativeBuildInputs pkgs.SDL2 old));
+  sdl2-ttf = old:
+    ((addToPropagatedBuildInputsWithPkgConfig pkgs.SDL2_ttf old) //
+      # needed for sdl2-config to be in PATH
+      (addToNativeBuildInputs pkgs.SDL2 old));
+  soil = addToPropagatedBuildInputsWithPkgConfig pkgs.libepoxy;
+  sqlite3 = addToBuildInputs pkgs.sqlite;
+  stemmer = old:
+    (addToBuildInputs pkgs.libstemmer old)
+    // (addToCscOptions "-L -lstemmer" old);
+  stfl = old:
+    (addToBuildInputs [ pkgs.ncurses pkgs.stfl ] old)
+    // (addToCscOptions "-L -lncurses" old);
+  taglib = old:
+    (addToBuildInputs [ pkgs.zlib pkgs.taglib ] old) // (
+      # needed for tablib-config to be in PATH
+      addToNativeBuildInputs pkgs.taglib old);
+  uuid-lib = addToBuildInputs pkgs.libuuid;
+  ws-client = addToBuildInputs pkgs.zlib;
+  xlib = addToPropagatedBuildInputs pkgs.xorg.libX11;
+  yaml = addToBuildInputs pkgs.libyaml;
+  zlib = addToBuildInputs pkgs.zlib;
+  zmq = addToBuildInputs pkgs.zeromq;
+  zstd = addToBuildInputs pkgs.zstd;
+
+  # less trivial fixes, should be upstreamed
+  git = old: (addToBuildInputsWithPkgConfig pkgs.libgit2 old) // {
+    postPatch = ''
+      substituteInPlace libgit2.scm \
+        --replace "asize" "reserved"
+    '';
+  };
+  lazy-ffi = old: (addToBuildInputs pkgs.libffi old) // {
+    postPatch = ''
+      substituteInPlace lazy-ffi.scm \
+        --replace "ffi/ffi.h" "ffi.h"
+    '';
+  };
+  opengl = old:
+    (addToBuildInputsWithPkgConfig
+      (lib.optionals (!stdenv.isDarwin) [ pkgs.libGL pkgs.libGLU ]
+      ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Foundation pkgs.darwin.apple_sdk.frameworks.OpenGL ])
+      old)
+    // {
+      postPatch = ''
+        substituteInPlace opengl.egg \
+          --replace 'framework ' 'framework" "'
+      '';
+    };
+  posix-shm = old: {
+    postPatch = lib.optionalString stdenv.isDarwin ''
+      substituteInPlace build.scm \
+        --replace "-lrt" ""
+    '';
+  };
+
+  # platform changes
+  pledge = addMetaAttrs { platforms = lib.platforms.openbsd; };
+  unveil = addMetaAttrs { platforms = lib.platforms.openbsd; };
+
+  # mark broken
+  "ephem-v1.1" = broken;
+  F-operator = broken;
+  atom = broken;
+  begin-syntax = broken;
+  canvas-draw = broken;
+  chicken-doc-admin = broken;
+  comparse = broken;
+  coops-utils = broken;
+  crypt = broken;
+  hypergiant = broken;
+  iup = broken;
+  kiwi = broken;
+  lmdb-ht = broken;
+  lsp-server = broken;
+  mpi = broken;
+  pyffi = broken;
+  qt-light = broken;
+  salmonella-html-report = broken;
+  sundials = broken;
+  svn-client = broken;
+  system = broken;
+  tokyocabinet = broken;
+  transducers = broken;
+  webview = broken;
+
+  # mark broken darwin
+
+  # fatal error: 'mqueue.h' file not found
+  posix-mq = brokenOnDarwin;
+  # Undefined symbols for architecture arm64: "_pthread_setschedprio"
+  pthreads = brokenOnDarwin;
+  # error: use of undeclared identifier 'B4000000'
+  stty = brokenOnDarwin;
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/read-egg.scm b/nixpkgs/pkgs/development/compilers/chicken/5/read-egg.scm
new file mode 100755
index 000000000000..b5e3d5c3d05a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/read-egg.scm
@@ -0,0 +1,43 @@
+(import (chicken process-context)
+        (chicken format)
+        (chicken string))
+
+(define env-var get-environment-variable)
+(define ref alist-ref)
+
+(define egg (read))
+
+(printf "[~A]\n" (env-var "EGG_NAME"))
+
+(define dependencies
+  (map (lambda (dep)
+         (->string (if (list? dep)
+                       (car dep)
+                       dep)))
+       (append
+        (ref 'dependencies egg eqv? '())
+        ;; TODO separate this into `buildInputs` and `propagatedBuildInputs`
+        (ref 'build-dependencies egg eqv? '()))))
+(printf "dependencies = [~A]\n"
+        (string-intersperse (map (lambda (dep) (sprintf "~S" dep))
+                                 dependencies)
+                            ", "))
+
+(define license (ref 'license egg))
+(printf "license = ~S\n"
+        (if (not license)
+            ""
+            (string-translate (->string (car license))
+                              "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
+                              "abcdefghijklmnopqrstuvwxyz-")))
+
+(printf "sha256 = ~S\n" (env-var "EGG_SHA256"))
+
+(define synopsis (ref 'synopsis egg))
+(printf "synopsis = ~S\n"
+        (if (not synopsis)
+            ""
+            (car synopsis)))
+
+(printf "version = ~S\n" (env-var "EGG_VERSION"))
+(print)
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/chicken/5/update.sh b/nixpkgs/pkgs/development/compilers/chicken/5/update.sh
new file mode 100755
index 000000000000..59f5337dbb6d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/update.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -I nixpkgs=../../../../.. -i oil -p oil chicken
+
+export URL_PREFIX="https://code.call-cc.org/egg-tarballs/5/"
+cd $(nix-prefetch-url \
+     'https://code.call-cc.org/cgi-bin/gitweb.cgi?p=eggs-5-latest.git;a=snapshot;h=master;sf=tgz' \
+     --name chicken-eggs-5-latest --unpack --print-path | tail -1)
+
+echo "# THIS IS A GENERATED FILE.  DO NOT EDIT!" > $_this_dir/deps.toml
+for i, item in */*/*.egg {
+  var EGG_NAME=$(dirname $(dirname $item))
+  var EGG_VERSION=$(basename $(dirname $item))
+  var EGG_URL="${URL_PREFIX}${EGG_NAME}/${EGG_NAME}-${EGG_VERSION}.tar.gz"
+  var EGG_SHA256=$(nix-prefetch-url $EGG_URL)
+  export EGG_NAME
+  export EGG_VERSION
+  export EGG_SHA256
+  csi -s $_this_dir/read-egg.scm < $item
+} >> $_this_dir/deps.toml
diff --git a/nixpkgs/pkgs/development/compilers/ciao/default.nix b/nixpkgs/pkgs/development/compilers/ciao/default.nix
new file mode 100644
index 000000000000..bc85f6e1009f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ciao/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ciao";
+  version = "1.22.0-m7";
+  src = fetchFromGitHub {
+    owner = "ciao-lang";
+    repo = "ciao";
+    rev = "v${version}";
+    sha256 = "sha256-5LX+NVDAtdffQeLTD4Camp5aNm0K3Cwmavh7OF5XcZU=";
+  };
+
+  configurePhase = ''
+    ./ciao-boot.sh configure --instype=global --prefix=$prefix
+  '';
+
+  buildPhase = ''
+    ./ciao-boot.sh build
+  '';
+
+  installPhase = ''
+    ./ciao-boot.sh install
+  '';
+
+  meta = with 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;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/ciao.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix b/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix
new file mode 100644
index 000000000000..b3005af55fbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, cmake
+, ninja
+, circt
+, llvm
+, python3
+}: stdenv.mkDerivation {
+  pname = circt.pname + "-llvm";
+  inherit (circt) version src;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+
+  preConfigure = ''
+    cd llvm/llvm
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DLLVM_ENABLE_BINDINGS=OFF"
+    "-DLLVM_ENABLE_OCAMLDOC=OFF"
+    "-DLLVM_BUILD_EXAMPLES=OFF"
+    "-DLLVM_OPTIMIZED_TABLEGEN=ON"
+    "-DLLVM_ENABLE_PROJECTS=mlir"
+    "-DLLVM_TARGETS_TO_BUILD="
+
+    # This option is needed to install llvm-config
+    "-DLLVM_INSTALL_UTILS=ON"
+  ];
+
+  outputs = [ "out" "lib" "dev" ];
+
+  postInstall = ''
+    # move llvm-config to $dev to resolve a circular dependency
+    moveToOutput "bin/llvm-config*" "$dev"
+
+    # move all lib files to $lib except lib/cmake
+    moveToOutput "lib" "$lib"
+    moveToOutput "lib/cmake" "$dev"
+
+    # patch configuration files so each path points to the new $lib or $dev paths
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
+    substituteInPlace \
+      "$dev/lib/cmake/llvm/LLVMExports-release.cmake" \
+      "$dev/lib/cmake/mlir/MLIRTargets-release.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "\''${_IMPORT_PREFIX}/lib/objects-Release" "$lib/lib/objects-Release" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" # patch path for llvm-config
+  '';
+
+  doCheck = true;
+  checkTarget = "check-mlir";
+
+  meta = llvm.meta // {
+    inherit (circt.meta) maintainers;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/circt/default.nix b/nixpkgs/pkgs/development/compilers/circt/default.nix
new file mode 100644
index 000000000000..bef2c568de13
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/circt/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, cmake
+, coreutils
+, python3
+, git
+, fetchFromGitHub
+, ninja
+, lit
+, gitUpdater
+, callPackage
+}:
+
+let
+  pythonEnv = python3.withPackages (ps: [ ps.psutil ]);
+  circt-llvm = callPackage ./circt-llvm.nix { };
+in
+stdenv.mkDerivation rec {
+  pname = "circt";
+  version = "1.65.0";
+  src = fetchFromGitHub {
+    owner = "llvm";
+    repo = "circt";
+    rev = "firtool-${version}";
+    sha256 = "sha256-RYQAnvU+yoHGrU9zVvrD1/O80ioHEq2Cvo/MIjI6uTo=";
+    fetchSubmodules = true;
+  };
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  nativeBuildInputs = [ cmake ninja git pythonEnv ];
+  buildInputs = [ circt-llvm ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DMLIR_DIR=${circt-llvm.dev}/lib/cmake/mlir"
+
+    # LLVM_EXTERNAL_LIT is executed by python3, the wrapped bash script will not work
+    "-DLLVM_EXTERNAL_LIT=${lit}/bin/.lit-wrapped"
+    "-DCIRCT_LLHD_SIM_ENABLED=OFF"
+  ];
+
+  # There are some tests depending on `clang-tools` to work. They are activated only when detected
+  # `clang-tidy` in PATH, However, we cannot simply put `clang-tools` in checkInputs to make these
+  # tests work. Because
+  #
+  # 1. The absolute paths of binaries used in tests are resolved in configure phase.
+  # 2. When stdenv = clangStdenv, the `clang-tidy` binary appears in PATH via `clang-unwrapped`,
+  #    which is always placed before `${clang-tools}/bin` in PATH. `clang-tidy` provided in
+  #    `clang-unwrapped` cause tests failing because it is not wrapped to resolve header search paths.
+  #    https://github.com/NixOS/nixpkgs/issues/214945 discusses this issue.
+  #
+  # As a temporary fix, we disabled these tests when using clang stdenv
+  # cannot use lib.optionalString as it creates an empty string, disabling all tests
+  LIT_FILTER_OUT = if stdenv.cc.isClang then "CIRCT :: Target/ExportSystemC/.*\.mlir" else null;
+
+  preConfigure = ''
+    find ./test -name '*.mlir' -exec sed -i 's|/usr/bin/env|${coreutils}/bin/env|g' {} \;
+    # circt uses git to check its version, but when cloned on nix it can't access git.
+    # So this hard codes the version.
+    substituteInPlace cmake/modules/GenVersionFile.cmake --replace "unknown git version" "${src.rev}"
+  '';
+
+  doCheck = true;
+  checkTarget = "check-circt check-circt-integration";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  postInstall = ''
+    moveToOutput lib "$lib"
+  '';
+
+  passthru = {
+    updateScript = gitUpdater {
+      rev-prefix = "firtool-";
+    };
+    llvm = circt-llvm;
+  };
+
+  meta = {
+    description = "Circuit IR compilers and tools";
+    homepage = "https://circt.org/";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ sharzy pineapplehunter ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/clasp/clasp-pin-repos-commits.patch b/nixpkgs/pkgs/development/compilers/clasp/clasp-pin-repos-commits.patch
new file mode 100644
index 000000000000..203ad5951411
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clasp/clasp-pin-repos-commits.patch
@@ -0,0 +1,90 @@
+diff --git a/repos.sexp b/repos.sexp
+index d31d4d62d..cd3238585 100644
+--- a/repos.sexp
++++ b/repos.sexp
+@@ -5,17 +5,17 @@
+ ;;;;   4. src/ - C/C++ dependencies for iclasp
+ ;;;;   5. extensions/ - extensions and their dependencies
+ ((:name :ansi-test
+-  :repository "https://gitlab.common-lisp.net/yitzchak/ansi-test"
++  :repository "https://github.com/clasp-developers/ansi-test.git"
+   :directory "dependencies/ansi-test/"
+-  :branch "add-expected-failures")
++  :commit "33ae7c1ddd3e814bbe6f55b9e7a6a92b39404664")
+  (:name :cl-bench
+-  :repository "https://gitlab.common-lisp.net/ansi-test/cl-bench.git"
++  :repository "https://github.com/clasp-developers/cl-bench.git"
+   :directory "dependencies/cl-bench/"
+-  :branch "master")
++  :commit "7d184b4ef2a6272f0e3de88f6c243edb20f7071a")
+  (:name :cl-who
+   :repository "https://github.com/edicl/cl-who.git"
+   :directory "dependencies/cl-who/"
+-  :branch "master")
++  :commit "07dafe9b351c32326ce20b5804e798f10d4f273d")
+  (:name :quicklisp-client
+   :repository "https://github.com/quicklisp/quicklisp-client.git"
+   :directory "dependencies/quicklisp-client/"
+@@ -23,21 +23,21 @@
+  (:name :shasht
+   :repository "https://github.com/yitzchak/shasht.git"
+   :directory "dependencies/shasht/"
+-  :branch "master")
++  :commit "f38e866990c6b5381a854d63f7ea0227c87c2f6d")
+  (:name :trivial-do
+   :repository "https://github.com/yitzchak/trivial-do.git"
+   :directory "dependencies/trivial-do/"
+-  :branch "master")
++  :commit "a19f93227cb80a6bec8846655ebcc7998020bd7e")
+  (:name :trivial-gray-streams
+   :repository "https://github.com/trivial-gray-streams/trivial-gray-streams.git"
+   :directory "dependencies/trivial-gray-streams/"
+-  :branch "master")
++  :commit "2b3823edbc78a450db4891fd2b566ca0316a7876")
+  (:name :acclimation
+   :repository "https://github.com/robert-strandh/Acclimation.git"
+   :directory "src/lisp/kernel/contrib/Acclimation/"
+   :commit "dd15c86b0866fc5d8b474be0da15c58a3c04c45c")
+  (:name :alexandria
+-  :repository "https://gitlab.common-lisp.net/alexandria/alexandria.git"
++  :repository "https://github.com/clasp-developers/alexandria.git"
+   :directory "src/lisp/kernel/contrib/alexandria/"
+   :commit "v1.4")
+  (:name :anaphora
+@@ -128,7 +128,7 @@
+  (:name :lparallel
+   :repository "https://github.com/yitzchak/lparallel.git"
+   :directory "src/lisp/kernel/contrib/lparallel/"
+-  :branch "fix-asdf-feature"
++  :commit "9c98bf629328b27a5a3fbb7a637afd1db439c00f"
+   :extension :cando)
+  (:name :parser.common-rules
+   :repository "https://github.com/scymtym/parser.common-rules.git"
+@@ -150,9 +150,9 @@
+   :commit "87a447a8eaef9cf4fd1c16d407a49f9adaf8adad"
+   :extension :cando)
+  (:name :trivial-features ; Needed both by the host and eclasp
+-  :repository "https://github.com/yitzchak/trivial-features.git"
++  :repository "https://github.com/trivial-features/trivial-features.git"
+   :directory "src/lisp/kernel/contrib/trivial-features/"
+-  :branch "asdf-feature")
++  :commit "d249a62aaf022902398a7141ae17217251fc61db")
+  (:name :trivial-garbage
+   :repository "https://github.com/trivial-garbage/trivial-garbage.git"
+   :directory "src/lisp/kernel/contrib/trivial-garbage/"
+@@ -176,7 +176,7 @@
+   :directory "src/lisp/kernel/contrib/usocket/"
+   :commit "7ad6582cc1ce9e7fa5931a10e73b7d2f2688fa81")
+  (:name :asdf
+-  :repository "https://gitlab.common-lisp.net/asdf/asdf.git"
++  :repository "https://github.com/clasp-developers/asdf.git"
+   :directory "src/lisp/modules/asdf/"
+   :commit "3.3.5")
+  (:name :mps
+@@ -205,4 +205,4 @@
+   :repository "https://github.com/seqan/seqan.git"
+   :directory "extensions/seqan-clasp/seqan/"
+   :commit "f5f658343c366c9c3d44ba358ffc9317e78a09ed"
+-  :extension :seqan-clasp))
+\ No newline at end of file
++  :extension :seqan-clasp))
diff --git a/nixpkgs/pkgs/development/compilers/clasp/default.nix b/nixpkgs/pkgs/development/compilers/clasp/default.nix
new file mode 100644
index 000000000000..64617d01f156
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clasp/default.nix
@@ -0,0 +1,90 @@
+{ lib
+, llvmPackages_15
+, fetchFromGitHub
+, sbcl
+, git
+, pkg-config
+, fmt_9
+, gmpxx
+, libelf
+, boost
+, libunwind
+, ninja
+, cacert
+}:
+
+let
+  inherit (llvmPackages_15) stdenv llvm libclang;
+
+  # Gathered from https://github.com/clasp-developers/clasp/raw/2.2.0/repos.sexp
+  dependencies = import ./dependencies.nix {
+    inherit fetchFromGitHub;
+  };
+
+  # Shortened version of `_defaultUnpack`
+  unpackDependency = elem: ''
+    mkdir -p "source/${elem.directory}"
+    cp -pr --reflink=auto -- ${elem.src}/* "source/${elem.directory}"
+    chmod -R u+w -- "source/${elem.directory}"
+  '';
+in
+
+stdenv.mkDerivation {
+  pname = "clasp";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "clasp-developers";
+    repo = "clasp";
+    rev = "2.2.0";
+    hash = "sha256-gvUqUb0dftW1miiBcAPJur0wOunox4y2SUYeeJpR9R4=";
+  };
+
+  patches = [
+    ./clasp-pin-repos-commits.patch
+    ./remove-unused-command-line-argument.patch
+  ];
+
+  nativeBuildInputs = [
+    sbcl
+    git
+    pkg-config
+    fmt_9
+    gmpxx
+    libelf
+    boost
+    libunwind
+    ninja
+    llvm
+    libclang
+  ];
+
+  ninjaFlags = [ "-C" "build" ];
+
+  postUnpack = lib.concatStringsSep "\n" (builtins.map unpackDependency dependencies);
+
+  configurePhase = ''
+    export SOURCE_DATE_EPOCH=1
+    export ASDF_OUTPUT_TRANSLATIONS=$(pwd):$(pwd)/__fasls
+    sbcl --script koga \
+      --skip-sync \
+      --cc=$NIX_CC/bin/cc \
+      --cxx=$NIX_CC/bin/c++ \
+      --reproducible-build \
+      --package-path=/ \
+      --bin-path=$out/bin \
+      --lib-path=$out/lib \
+      --share-path=$out/share
+  '';
+
+  meta = {
+    description = "A Common Lisp implementation based on LLVM with C++ integration";
+    license = lib.licenses.lgpl21Plus ;
+    maintainers = lib.teams.lisp.members;
+    platforms = ["x86_64-linux" "x86_64-darwin"];
+    # Upstream claims support, but breaks with:
+    # error: use of undeclared identifier 'aligned_alloc'
+    broken = stdenv.isDarwin;
+    homepage = "https://github.com/clasp-developers/clasp";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/clasp/dependencies.nix b/nixpkgs/pkgs/development/compilers/clasp/dependencies.nix
new file mode 100644
index 000000000000..abcd0f17747d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clasp/dependencies.nix
@@ -0,0 +1,457 @@
+# Gathered from https://github.com/clasp-developers/clasp/raw/2.2.0/repos.sexp
+# Generated using https://gist.github.com/philiptaron/8ea1394b049c2ca975e4b03965d9ac00
+# and then light editing using Vim
+
+{ fetchFromGitHub }:
+
+[
+  {
+    directory = "dependencies/ansi-test/";
+    src = fetchFromGitHub {
+      owner = "clasp-developers";
+      repo = "ansi-test";
+      rev = "33ae7c1ddd3e814bbe6f55b9e7a6a92b39404664";
+      hash = "sha256-dGF7CScvfPNMRxQXJM4v6Vfc/VjdUXNz0yCjUOsYM3I=";
+    };
+  }
+
+  {
+    directory = "dependencies/cl-bench/";
+    src = fetchFromGitHub {
+      owner = "clasp-developers";
+      repo = "cl-bench";
+      rev = "7d184b4ef2a6272f0e3de88f6c243edb20f7071a";
+      hash = "sha256-7ZEIWNEj7gzYFMTqW7nnZgjNE1zoTAMeJHj547gRtPs=";
+    };
+  }
+
+  {
+    directory = "dependencies/cl-who/";
+    src = fetchFromGitHub {
+      owner = "edicl";
+      repo = "cl-who";
+      rev = "07dafe9b351c32326ce20b5804e798f10d4f273d";
+      hash = "sha256-5T762W3qetAjXtHP77ko6YZR6w5bQ04XM6QZPELQu+U=";
+    };
+  }
+
+  {
+    directory = "dependencies/quicklisp-client/";
+    src = fetchFromGitHub {
+      owner = "quicklisp";
+      repo = "quicklisp-client";
+      rev = "8b63e00b3a2b3f96e24c113d7601dd03a128ce94";
+      hash = "sha256-1HLVPhl8aBaeG8dRLxBh0j0X/0wqFeNYK1CEfiELToA=";
+    };
+  }
+
+  {
+    directory = "dependencies/shasht/";
+    src = fetchFromGitHub {
+      owner = "yitzchak";
+      repo = "shasht";
+      rev = "f38e866990c6b5381a854d63f7ea0227c87c2f6d";
+      hash = "sha256-Ki5JNevMvVZoUz3tP6cv7qA4xDLzjd2MXmf4x9ew5bw=";
+    };
+  }
+
+  {
+    directory = "dependencies/trivial-do/";
+    src = fetchFromGitHub {
+      owner = "yitzchak";
+      repo = "trivial-do";
+      rev = "a19f93227cb80a6bec8846655ebcc7998020bd7e";
+      hash = "sha256-Tjd9VJan6pQpur292xtklvb28MDGGjq2+ub5T6o6FG8=";
+    };
+  }
+
+  {
+    directory = "dependencies/trivial-gray-streams/";
+    src = fetchFromGitHub {
+      owner = "trivial-gray-streams";
+      repo = "trivial-gray-streams";
+      rev = "2b3823edbc78a450db4891fd2b566ca0316a7876";
+      hash = "sha256-9vN74Gum7ihKSrCygC3hRLczNd15nNCWn5r60jjHN8I=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/Acclimation/";
+    src = fetchFromGitHub {
+      owner = "robert-strandh";
+      repo = "Acclimation";
+      rev = "dd15c86b0866fc5d8b474be0da15c58a3c04c45c";
+      hash = "sha256-AuoVdv/MU73A8X+GsxyG0K+xgzCKLQfbpu79oTERgmI=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/alexandria/";
+    src = fetchFromGitHub {
+      owner = "clasp-developers";
+      repo = "alexandria";
+      rev = "49e82add16cb9f1ffa72c77cd687271247181ff3";
+      hash = "sha256-1Hzxt65dZvgOFIljjjlSGgKYkj+YBLwJCACi5DZsKmQ=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/anaphora/";
+    src = fetchFromGitHub {
+      owner = "spwhitton";
+      repo = "anaphora";
+      rev = "bcf0f7485eec39415be1b2ec6ca31cf04a8ab5c5";
+      hash = "sha256-CzApbUmdDmD+BWPcFGJN0rdZu991354EdTDPn8FSRbc=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/architecture.builder-protocol/";
+    src = fetchFromGitHub {
+      owner = "scymtym";
+      repo = "architecture.builder-protocol";
+      rev = "0c1a9ebf9ab14e699c2b9c85fc20265b8c5364dd";
+      hash = "sha256-AdZeI4UCMnmuYpmSaWqIt+egdkNN3kzEn/zOqIBTnww=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/array-utils/";
+    src = fetchFromGitHub {
+      owner = "Shinmera";
+      repo = "array-utils";
+      rev = "5acd90fa3d9703cea33e3825334b256d7947632f";
+      hash = "sha256-Br3H39F+hqYnTgYtVezuRhwRQJwJlxohu+M033sYPOI=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/babel/";
+    src = fetchFromGitHub {
+      owner = "cl-babel";
+      repo = "babel";
+      rev = "f892d0587c7f3a1e6c0899425921b48008c29ee3";
+      hash = "sha256-U2E8u3ZWgH9eG4SV/t9CE1dUpcthuQMXgno/W1Ow2RE=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/bordeaux-threads/";
+    src = fetchFromGitHub {
+      owner = "sionescu";
+      repo = "bordeaux-threads";
+      rev = "3d25cd01176f7c9215ebc792c78313cb99ff02f9";
+      hash = "sha256-KoOaIKQZaZgEbtM6PGVwQn/xg+/slt+uloR4EaMlBeg=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/cffi/";
+    src = fetchFromGitHub {
+      owner = "cffi";
+      repo = "cffi";
+      rev = "9c912e7b89eb09dd347d3ebae16e4dc5f53e5717";
+      hash = "sha256-umt0HmX7M3SZM2VSrxqxUmNt9heTG/Ulwzphs2NRYTs=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/cl-markup/";
+    src = fetchFromGitHub {
+      owner = "arielnetworks";
+      repo = "cl-markup";
+      rev = "e0eb7debf4bdff98d1f49d0f811321a6a637b390";
+      hash = "sha256-50LZDaNfXhOZ6KoTmXClo5Bo2D9q1zbdCLSFkwqZhoI=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/cl-ppcre/";
+    src = fetchFromGitHub {
+      owner = "edicl";
+      repo = "cl-ppcre";
+      rev = "b4056c5aecd9304e80abced0ef9c89cd66ecfb5e";
+      hash = "sha256-6xeiSeYVwzAaisLQP/Bjqlc/Rhw8JMy0FT93hDQi5Y8=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/cl-svg/";
+    src = fetchFromGitHub {
+      owner = "wmannis";
+      repo = "cl-svg";
+      rev = "1e988ebd2d6e2ee7be4744208828ef1b59e5dcdc";
+      hash = "sha256-nwOvHGK0wIOZxAnZ68xyOhchAp8CBl/wsfRI42v8NYc=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/Cleavir/";
+    src = fetchFromGitHub {
+      owner = "s-expressionists";
+      repo = "Cleavir";
+      rev = "a73d313735447c63b4b11b6f8984f9b1e3e74ec9";
+      hash = "sha256-VQ8sB5W7JYnVsvfx2j7d2LQcECst79MCIW9QSuwm8GA=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/closer-mop/";
+    src = fetchFromGitHub {
+      owner = "pcostanza";
+      repo = "closer-mop";
+      rev = "d4d1c7aa6aba9b4ac8b7bb78ff4902a52126633f";
+      hash = "sha256-bHBYMBz45EOY727d4BWP75gRV4nzRAWxAlivPRzYrKo=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/Concrete-Syntax-Tree/";
+    src = fetchFromGitHub {
+      owner = "s-expressionists";
+      repo = "Concrete-Syntax-Tree";
+      rev = "4f01430c34f163356f3a2cfbf0a8a6963ff0e5ac";
+      hash = "sha256-0XfLkihztWUhqu7DrFiuwcEx/x+EILEivPfsHb5aMZk=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/documentation-utils/";
+    src = fetchFromGitHub {
+      owner = "Shinmera";
+      repo = "documentation-utils";
+      rev = "98630dd5f7e36ae057fa09da3523f42ccb5d1f55";
+      hash = "sha256-uMUyzymyS19ODiUjQbE/iJV7HFeVjB45gbnWqfGEGCU=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/Eclector/";
+    src = fetchFromGitHub {
+      owner = "s-expressionists";
+      repo = "Eclector";
+      rev = "dddb4d8af3eae78017baae7fb9b99e73d2a56e6b";
+      hash = "sha256-OrkWEI5HGlmejH9gg7OwJz2QXgAgE3kDHwen5yzhKgM=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/esrap/";
+    src = fetchFromGitHub {
+      owner = "scymtym";
+      repo = "esrap";
+      rev = "7588b430ad7c52f91a119b4b1c9a549d584b7064";
+      hash = "sha256-C0GiTyRna9BMIMy1/XdMZAkhjpLaoAEF1+ps97xQyMY=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/global-vars/";
+    src = fetchFromGitHub {
+      owner = "lmj";
+      repo = "global-vars";
+      rev = "c749f32c9b606a1457daa47d59630708ac0c266e";
+      hash = "sha256-bXxeNNnFsGbgP/any8rR3xBvHE9Rb4foVfrdQRHroxo=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/let-plus/";
+    src = fetchFromGitHub {
+      owner = "sharplispers";
+      repo = "let-plus";
+      rev = "455e657e077235829b197f7ccafd596fcda69e30";
+      hash = "sha256-SyZRx9cyuEN/h4t877TOWw35caQqMf2zSGZ9Qg22gAE=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/cl-netcdf/";
+    src = fetchFromGitHub {
+      owner = "clasp-developers";
+      repo = "cl-netcdf";
+      rev = "593c6c47b784ec02e67580aa12a7775ed6260200";
+      hash = "sha256-3VCTSsIbk0GovCM+rWPZj2QJdYq+UZksjfRd18UYY5s=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/lparallel/";
+    src = fetchFromGitHub {
+      owner = "yitzchak";
+      repo = "lparallel";
+      rev = "9c98bf629328b27a5a3fbb7a637afd1db439c00f";
+      hash = "sha256-sUM1WKXxZk7un64N66feXh21m7yzJsdcaWC3jIOd2W4=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/parser.common-rules/";
+    src = fetchFromGitHub {
+      owner = "scymtym";
+      repo = "parser.common-rules";
+      rev = "b7652db5e3f98440dce2226d67a50e8febdf7433";
+      hash = "sha256-ik+bteIjBN6MfMFiRBjn/nP7RBzv63QgoRKVi4F8Ho0=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/plump/";
+    src = fetchFromGitHub {
+      owner = "Shinmera";
+      repo = "plump";
+      rev = "d8ddda7514e12f35510a32399f18e2b26ec69ddc";
+      hash = "sha256-FjeZAWD81137lXWyN/RIr+L+anvwh/Glze497fcpHUY=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/split-sequence/";
+    src = fetchFromGitHub {
+      owner = "sharplispers";
+      repo = "split-sequence";
+      rev = "89a10b4d697f03eb32ade3c373c4fd69800a841a";
+      hash = "sha256-faF2EiQ+xXWHX9JlZ187xR2mWhdOYCpb4EZCPNoZ9uQ=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/static-vectors/";
+    src = fetchFromGitHub {
+      owner = "sionescu";
+      repo = "static-vectors";
+      rev = "87a447a8eaef9cf4fd1c16d407a49f9adaf8adad";
+      hash = "sha256-q4E+VPX/pOyuCdzJZ6CFEIiR58E6JIxJySROl/WcMyI=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/trivial-features/";
+    src = fetchFromGitHub {
+      owner = "trivial-features";
+      repo = "trivial-features";
+      rev = "d249a62aaf022902398a7141ae17217251fc61db";
+      hash = "sha256-g50OSfrMRH5hTRy077C1kCln2vz0Qeb1oq9qHh7zY2Q=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/trivial-garbage/";
+    src = fetchFromGitHub {
+      owner = "trivial-garbage";
+      repo = "trivial-garbage";
+      rev = "b3af9c0c25d4d4c271545f1420e5ea5d1c892427";
+      hash = "sha256-CCLZHHW3/0Id0uHxrbjf/WM3yC8netkcQ8p9Qtssvc4=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/trivial-http/";
+    src = fetchFromGitHub {
+      owner = "gwkkwg";
+      repo = "trivial-http";
+      rev = "ca45656587f36378305de1a4499c308acc7a03af";
+      hash = "sha256-0VKWHJYn1XcXVNHduxKiABe7xFUxj8M4/u92Usvq54o=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/trivial-indent/";
+    src = fetchFromGitHub {
+      owner = "Shinmera";
+      repo = "trivial-indent";
+      rev = "8d92e94756475d67fa1db2a9b5be77bc9c64d96c";
+      hash = "sha256-G+YCIB3bKN4RotJUjT/6bnivSBalseFRhIlwsEm5EUk=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/trivial-with-current-source-form/";
+    src = fetchFromGitHub {
+      owner = "scymtym";
+      repo = "trivial-with-current-source-form";
+      rev = "3898e09f8047ef89113df265574ae8de8afa31ac";
+      hash = "sha256-IKJOyJYqGBx0b6Oomddvb+2K6q4W508s3xnplleMJIQ=";
+    };
+  }
+
+  {
+    directory = "src/lisp/kernel/contrib/usocket/";
+    src = fetchFromGitHub {
+      owner = "usocket";
+      repo = "usocket";
+      rev = "7ad6582cc1ce9e7fa5931a10e73b7d2f2688fa81";
+      hash = "sha256-0HiItuc6fV70Rpk/5VevI1I0mGnY1JJvhnyPpx6r0uo=";
+    };
+  }
+
+  {
+    directory = "src/lisp/modules/asdf/";
+    src = fetchFromGitHub {
+      owner = "clasp-developers";
+      repo = "asdf";
+      rev = "97b279faf3cc11a5cfdd19b5325025cc8ec1e7bd";
+      hash = "sha256-4LhF+abor5NK4HgbGCYM5kSaH7TLISW5w5HXYOm4wqw=";
+    };
+  }
+
+  {
+    directory = "src/mps/";
+    src = fetchFromGitHub {
+      owner = "Ravenbrook";
+      repo = "mps";
+      rev = "b8a05a3846430bc36c8200f24d248c8293801503";
+      hash = "sha256-Zuc77cdap0xNYEqM8IkMQMUMY0f5QZ84uFmKgXjDXeA=";
+    };
+  }
+
+  {
+    directory = "src/bdwgc/";
+    src = fetchFromGitHub {
+      owner = "ivmai";
+      repo = "bdwgc";
+      rev = "036becee374b84fed5d56a6df3ae097b7cc0ff73";
+      hash = "sha256-WB1sFfVL6lWL+DEypg3chCJS/w0J4tPGi5tL1o3W73U=";
+    };
+  }
+
+  {
+    directory = "src/libatomic_ops/";
+    src = fetchFromGitHub {
+      owner = "ivmai";
+      repo = "libatomic_ops";
+      rev = "4b7d0b9036f9a645b03010dad1c7b7f86ea75772";
+      hash = "sha256-zThdbX2/l5/ZZVYobJf9KAd+IjIDIrk+08SUhTQs2gE=";
+    };
+  }
+
+  {
+    directory = "extensions/cando/";
+    src = fetchFromGitHub {
+      owner = "cando-developers";
+      repo = "cando";
+      rev = "a6934eddfce2ff1cb7131affce427ce652392f08";
+      hash = "sha256-AUmBLrk7lofJNagvI3KhPebvV8GkrDbBXrsAa3a1Bwo=";
+    };
+  }
+
+  {
+    directory = "extensions/seqan-clasp/";
+    src = fetchFromGitHub {
+      owner = "clasp-developers";
+      repo = "seqan-clasp";
+      rev = "5caa2e1e6028525276a6b6ba770fa6e334563d58";
+      hash = "sha256-xAvAd/kBr8n9SSw/trgWTqDWQLmpOp8+JX5L+JO2+Ls=";
+    };
+  }
+
+  {
+    directory = "extensions/seqan-clasp/seqan/";
+    src = fetchFromGitHub {
+      owner = "seqan";
+      repo = "seqan";
+      rev = "f5f658343c366c9c3d44ba358ffc9317e78a09ed";
+      hash = "sha256-AzZlONf7SNxCa9+SKQFC/rA6fx6rhWH96caZSmKnlsU=";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/development/compilers/clasp/remove-unused-command-line-argument.patch b/nixpkgs/pkgs/development/compilers/clasp/remove-unused-command-line-argument.patch
new file mode 100644
index 000000000000..b5c2d0bf39c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clasp/remove-unused-command-line-argument.patch
@@ -0,0 +1,13 @@
+diff --git a/src/koga/units.lisp b/src/koga/units.lisp
+index 808cebd17..2bbf965fd 100644
+--- a/src/koga/units.lisp
++++ b/src/koga/units.lisp
+@@ -197,7 +197,7 @@
+                                :type :cxxflags)
+   #+darwin (append-cflags configuration "-stdlib=libc++" :type :cxxflags)
+   #+darwin (append-cflags configuration "-I/usr/local/include")
+-  #+linux (append-cflags configuration "-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-stack-protector -stdlib=libstdc++"
++  #+linux (append-cflags configuration "-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-stack-protector"
+                                        :type :cxxflags)
+   #+linux (append-cflags configuration "-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-stack-protector"
+                                        :type :cflags)
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..e360bb05f40d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clean/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  pname = "clean";
+  version = "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 = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.erin ];
+    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..39dfa67d23e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/closure/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, jre, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "closure-compiler";
+  version = "20231112";
+
+  src = fetchurl {
+    url = "mirror://maven/com/google/javascript/closure-compiler/v${version}/closure-compiler-v${version}.jar";
+    sha256 = "sha256-oH1/QZX8cF9sZikP5XpNdfsMepJrgW+uX0OGHhJVbmw=";
+  };
+
+  dontUnpack = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ jre ];
+
+  installPhase = ''
+    mkdir -p $out/share/java $out/bin
+    cp ${src} $out/share/java/closure-compiler-v${version}.jar
+    makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
+      --add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
+  '';
+
+  meta = with lib; {
+    description = "A tool for making JavaScript download and run faster";
+    homepage = "https://developers.google.com/closure/compiler/";
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    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..817234f79991
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cmdstan/default.nix
@@ -0,0 +1,95 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, python3
+, stanc
+, buildPackages
+, runtimeShell
+, runCommandCC
+, cmdstan
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cmdstan";
+  version = "2.34.1";
+
+  src = fetchFromGitHub {
+    owner = "stan-dev";
+    repo = pname;
+    rev = "v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-gze8kd5zSs9nUlSY7AJwpx+jnc9Y21ahzDJmynlqm1Y=";
+  };
+
+  postPatch = ''
+    substituteInPlace stan/lib/stan_math/make/libraries \
+      --replace "/usr/bin/env bash" "bash"
+  '';
+
+  nativeBuildInputs = [
+    python3
+    stanc
+  ];
+
+  preConfigure = ''
+    patchShebangs test-all.sh runCmdStanTests.py stan/
+  ''
+  # Fix inclusion of hardcoded paths in PCH files, by building in the store.
+  + ''
+    mkdir -p $out/opt
+    cp -R . $out/opt/cmdstan
+    cd $out/opt/cmdstan
+    mkdir -p bin
+    ln -s ${buildPackages.stanc}/bin/stanc bin/stanc
+  '';
+
+  makeFlags = [
+    "build"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "arch=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  # Disable inclusion of timestamps in PCH files when using Clang.
+  env.CXXFLAGS = lib.optionalString stdenv.cc.isClang "-Xclang -fno-pch-timestamp";
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    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
+
+    runHook postInstall
+  '';
+
+  passthru.tests = {
+    test = runCommandCC "cmdstan-test" { } ''
+      cp -R ${cmdstan}/opt/cmdstan cmdstan
+      chmod -R +w cmdstan
+      cd cmdstan
+      ./runCmdStanTests.py -j$NIX_BUILD_CORES src/test/interface
+      touch $out
+    '';
+  };
+
+  meta = with lib; {
+    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 = licenses.bsd3;
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/cmucl/binary.nix b/nixpkgs/pkgs/development/compilers/cmucl/binary.nix
new file mode 100644
index 000000000000..7ad50a369c62
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cmucl/binary.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchurl
+, installShellFiles
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cmucl-binary";
+  version = "21d";
+
+  srcs = [
+    (fetchurl {
+      url = "http://common-lisp.net/project/cmucl/downloads/release/"
+            + finalAttrs.version + "/cmucl-${finalAttrs.version}-x86-linux.tar.bz2";
+      hash = "sha256-RdctcqPTtQh1Yb3BrpQ8jtRFQn85OcwOt1l90H6xDZs=";
+    })
+    (fetchurl {
+      url = "http://common-lisp.net/project/cmucl/downloads/release/"
+            + finalAttrs.version + "/cmucl-${finalAttrs.version}-x86-linux.extra.tar.bz2";
+      hash = "sha256-zEmiW3m5VPpFgPxV1WJNCqgYRlHMovtaMXcgXyNukls=";
+    })];
+
+  sourceRoot = ".";
+
+  outputs = [ "out" "doc" "man" ];
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -pv $out $doc/share $man
+    mv bin lib -t $out
+    mv -v doc -t $doc/share
+    installManPage man/man1/*
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      $out/bin/lisp
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.cons.org/cmucl/";
+    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 = licenses.publicDomain;
+    maintainers = lib.teams.lisp.members;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/codon/Add-a-hash-to-the-googletest-binary.patch b/nixpkgs/pkgs/development/compilers/codon/Add-a-hash-to-the-googletest-binary.patch
new file mode 100644
index 000000000000..5183723d3d49
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/codon/Add-a-hash-to-the-googletest-binary.patch
@@ -0,0 +1,23 @@
+From 5c158213fc3afe39ee96be84e255c12d5886ca18 Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloom@riseup.net>
+Date: Sat, 1 Apr 2023 17:38:37 +0300
+Subject: [PATCH] Add a hash to the `googletest` binary.
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0a06e6f..a614025 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -434,6 +434,7 @@ include(FetchContent)
+ FetchContent_Declare(
+   googletest
+   URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
++  URL_HASH SHA256=5cf189eb6847b4f8fc603a3ffff3b0771c08eec7dd4bd961bfd45477dd13eb73
+ )
+ # For Windows: Prevent overriding the parent project's compiler/linker settings
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+--
+2.39.2
diff --git a/nixpkgs/pkgs/development/compilers/codon/default.nix b/nixpkgs/pkgs/development/compilers/codon/default.nix
new file mode 100644
index 000000000000..e9393956e473
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/codon/default.nix
@@ -0,0 +1,141 @@
+{ cacert
+, cmake
+, fetchFromGitHub
+, git
+, lib
+, lld
+, ninja
+, nix-update-script
+, perl
+, python3
+, stdenv
+}:
+
+let
+  version = "0.16.1";
+
+  src = fetchFromGitHub {
+    owner = "exaloop";
+    repo = "codon";
+    rev = "v${version}";
+    hash = "sha256-s2GqiFcekXRts8BU5CSmTrkFZ9xLqq4A5MybhB1o1Gg=";
+  };
+
+  depsDir = "deps";
+
+  codon-llvm = stdenv.mkDerivation {
+    pname = "codon-llvm";
+    version = "unstable-2022-09-23";
+
+    src = fetchFromGitHub {
+      owner = "exaloop";
+      repo = "llvm-project";
+      rev = "55b0b8fa1c9f9082b535628fc9fa6313280c0b9a";
+      hash = "sha256-03SPQgNdrpR6/JZ5aR/ntoh/FnZvCjT/6bTAcZaFafw=";
+    };
+
+    nativeBuildInputs = [
+      cmake
+      git
+      lld
+      ninja
+      python3
+    ];
+
+    cmakeFlags = [
+      "-DLLVM_ENABLE_RTTI=ON"
+      "-DLLVM_ENABLE_TERMINFO=OFF"
+      "-DLLVM_ENABLE_ZLIB=OFF"
+      "-DLLVM_INCLUDE_TESTS=OFF"
+      "-DLLVM_TARGETS_TO_BUILD=all"
+      "-DLLVM_USE_LINKER=lld"
+      "-S ../llvm"
+    ];
+  };
+
+  codon-deps = stdenv.mkDerivation {
+    name = "codon-deps-${version}.tar.gz";
+
+    inherit src;
+
+    nativeBuildInputs = [
+      cacert
+      cmake
+      git
+      perl
+      python3
+    ];
+
+    dontBuild = true;
+
+    cmakeFlags = [
+      "-DCPM_DOWNLOAD_ALL=ON"
+      "-DCPM_SOURCE_CACHE=${depsDir}"
+      "-DLLVM_DIR=${codon-llvm}/lib/cmake/llvm"
+    ];
+
+    installPhase = ''
+      # Prune the `.git` directories
+      find ${depsDir} -name .git -type d -prune -exec rm -rf {} \;;
+      # Build a reproducible tar, per instructions at https://reproducible-builds.org/docs/archives/
+      tar --owner=0 --group=0 --numeric-owner --format=gnu \
+          --sort=name --mtime="@$SOURCE_DATE_EPOCH" \
+          -czf $out \
+            ${depsDir} \
+            cmake \
+            _deps/googletest-subbuild/googletest-populate-prefix/src/*.zip
+    '';
+
+    outputHash =
+      if stdenv.hostPlatform.isDarwin then
+        "sha256-KfemYV42xBAhsPbwTkzdc3GxCVHiWRbyUZORPWxx4vg="
+      else
+        "sha256-a1zGSpbMjfQBrcgW/aiIdKX8+uI3p/S9pgZjHe2HtWs=";
+
+    outputHashAlgo = "sha256";
+  };
+in
+stdenv.mkDerivation {
+  pname = "codon";
+
+  inherit src version;
+
+  patches = [
+    # Without the hash, CMake will try to replace the `.zip` file
+    ./Add-a-hash-to-the-googletest-binary.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    git
+    lld
+    ninja
+    perl
+    python3
+  ];
+
+  postUnpack = ''
+    mkdir -p $sourceRoot/build
+    tar -xf ${codon-deps} -C $sourceRoot/build
+  '';
+
+  cmakeFlags = [
+    "-DCPM_SOURCE_CACHE=${depsDir}"
+    "-DLLVM_DIR=${codon-llvm}/lib/cmake/llvm"
+    "-DLLVM_USE_LINKER=lld"
+  ];
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    ln -s $out/lib/codon/*.dylib $out/lib/
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
+    description = "A high-performance, zero-overhead, extensible Python compiler using LLVM";
+    homepage = "https://docs.exaloop.io/codon";
+    maintainers = [ ];
+    license = lib.licenses.bsl11;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/coffeescript/default.nix b/nixpkgs/pkgs/development/compilers/coffeescript/default.nix
new file mode 100644
index 000000000000..5245a25bba88
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/coffeescript/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+}:
+
+buildNpmPackage rec {
+  pname = "coffeescript";
+  version = "2.7.0";
+
+  src = fetchFromGitHub {
+    owner = "jashkenas";
+    repo = "coffeescript";
+    rev = version;
+    hash = "sha256-vr46LKICX61rFPCkZ3G+8gJykg+MO43YRJnZGM3RoY0=";
+  };
+
+  npmDepsHash = "sha256-mCm31OwI3wjq8taKRQuEj4+IWVZO9Z5KuIDBf39lYoQ=";
+
+  env = {
+    PUPPETEER_SKIP_DOWNLOAD = true;
+  };
+
+  dontNpmBuild = true;
+
+  meta = {
+    description = "A little language that compiles into JavaScript";
+    homepage = "https://github.com/jashkenas/coffeescript";
+    license = lib.licenses.mit;
+    mainProgram = "coffee";
+    maintainers = with lib.maintainers; [ cdmistman ];
+  };
+}
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..d7a0953a8035
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/colm/default.nix
@@ -0,0 +1,30 @@
+{ lib, 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 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/computecpp/default.nix b/nixpkgs/pkgs/development/compilers/computecpp/default.nix
new file mode 100644
index 000000000000..4e6e7ad43416
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/computecpp/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv
+, fetchzip
+, pkg-config
+, autoPatchelfHook
+, installShellFiles
+, ocl-icd
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "computecpp";
+  version = "2.11.0";
+
+  src = fetchzip {
+    url = "https://computecpp.codeplay.com/downloads/computecpp-ce/${version}/x86_64-linux-gnu.tar.gz";
+    hash = "sha256-xHOPuijx5TZeHzRHPXcll0WqoBzHBryIoe3BnOxBVVY=";
+    stripRoot = true;
+  };
+
+  dontStrip = true;
+
+  buildInputs = [ stdenv.cc.cc.lib 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;
+  };
+
+  meta = with 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/cone/default.nix b/nixpkgs/pkgs/development/compilers/cone/default.nix
new file mode 100644
index 000000000000..d94432be12d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cone/default.nix
@@ -0,0 +1,42 @@
+{ llvmPackages
+, lib
+, fetchFromGitHub
+, cmake
+}:
+
+llvmPackages.stdenv.mkDerivation rec {
+  pname = "cone";
+  version = "unstable-2022-12-12";
+
+  src = fetchFromGitHub {
+    owner = "jondgoodwin";
+    repo = pname;
+    rev = "698bd6afc75777eabbc8ef576d64d683c6a1c5ab";
+    sha256 = "0y2s9xgkci8n72v6gnc1i7shr2y3g2sa8fbr25gpxa9ipiq9khg7";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    llvmPackages.llvm
+  ];
+
+  # M68k is an experimental target, so not enabled by default
+  postPatch = ''
+    sed -i CMakeLists.txt \
+        -e '/M68k/d'
+  '';
+
+  installPhase = ''
+    install -Dm755 conec $out/bin/conec
+    install -Dm644 libconestd.a $out/lib/libconestd.a
+  '';
+
+  meta = with lib; {
+    description = "Cone Programming Language";
+    homepage = "https://cone.jondgoodwin.com";
+    license = licenses.mit;
+    maintainers = with maintainers; [ luc65r ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/copper/default.nix b/nixpkgs/pkgs/development/compilers/copper/default.nix
new file mode 100644
index 000000000000..f202932743f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/copper/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchurl
+, libffi
+}:
+stdenv.mkDerivation rec {
+  pname = "copper";
+  version = "4.6";
+  src = fetchurl {
+    url = "https://tibleiz.net/download/copper-${version}-src.tar.gz";
+    sha256 = "sha256-tyxAMJp4H50eBz8gjt2O3zj5fq6nOIXKX47wql8aUUg=";
+  };
+  buildInputs = [
+    libffi
+  ];
+  postPatch = ''
+    patchShebangs .
+  '';
+  buildPhase = ''
+    make BACKEND=elf64 boot-elf64
+    make BACKEND=elf64 COPPER=stage3/copper-elf64 copper-elf64
+  '';
+  installPhase = ''
+    make BACKEND=elf64 install prefix=$out
+  '';
+  meta = with lib; {
+    description = "Simple imperative language, statically typed with type inference and genericity";
+    homepage = "https://tibleiz.net/copper/";
+    license = licenses.bsd2;
+    platforms = platforms.x86_64;
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/corretto/11.nix b/nixpkgs/pkgs/development/compilers/corretto/11.nix
new file mode 100644
index 000000000000..9e61e133f4cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/corretto/11.nix
@@ -0,0 +1,37 @@
+{ corretto11
+, fetchFromGitHub
+, gradle_7
+, jdk11
+, lib
+, stdenv
+, rsync
+, runCommand
+, testers
+}:
+
+let
+  corretto = import ./mk-corretto.nix {
+    inherit lib stdenv rsync runCommand testers;
+    jdk = jdk11;
+    gradle = gradle_7;
+    version = "11.0.20.9.1";
+    src = fetchFromGitHub {
+      owner = "corretto";
+      repo = "corretto-11";
+      rev = "b880bdc8397ec3dd6b7cd4b837ce846c9e902783";
+      sha256 = "sha256-IomJHQn0ZgqsBZ5BrRqVrEOhTq7wjLiIKMQlz53JxsU=";
+    };
+  };
+in
+corretto.overrideAttrs (oldAttrs: {
+  # jdk11 is built with --disable-warnings-as-errors (see openjdk/11.nix)
+  # because of several compile errors. We need to include this parameter for
+  # Corretto, too. Since the build is invoked via `gradle` build.gradle has to
+  # be adapted.
+  postPatch = oldAttrs.postPatch + ''
+    for file in $(find installers -name "build.gradle"); do
+      substituteInPlace $file --replace "command += archSpecificFlags" "command += archSpecificFlags + ['--disable-warnings-as-errors']"
+    done
+  '';
+
+})
diff --git a/nixpkgs/pkgs/development/compilers/corretto/17.nix b/nixpkgs/pkgs/development/compilers/corretto/17.nix
new file mode 100644
index 000000000000..308750356c2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/corretto/17.nix
@@ -0,0 +1,26 @@
+{ corretto17
+, fetchFromGitHub
+, gradle_7
+, jdk17
+, lib
+, stdenv
+, rsync
+, runCommand
+, testers
+}:
+
+let
+  corretto = import ./mk-corretto.nix {
+    inherit lib stdenv rsync runCommand testers;
+    jdk = jdk17;
+    gradle = gradle_7;
+    version = "17.0.8.8.1";
+    src = fetchFromGitHub {
+      owner = "corretto";
+      repo = "corretto-17";
+      rev = "9a3cc984f76cb5f90598bdb43215bad20e0f7319";
+      sha256 = "sha256-/VuB3ocD5VvDqCU7BoTG+fQ0aKvK1TejegRYmswInqQ=";
+    };
+  };
+in
+corretto
diff --git a/nixpkgs/pkgs/development/compilers/corretto/19.nix b/nixpkgs/pkgs/development/compilers/corretto/19.nix
new file mode 100644
index 000000000000..ea1fcc1aee1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/corretto/19.nix
@@ -0,0 +1,26 @@
+{ corretto19
+, fetchFromGitHub
+, gradle_7
+, jdk19
+, lib
+, stdenv
+, rsync
+, runCommand
+, testers
+}:
+
+let
+  corretto = import ./mk-corretto.nix {
+    inherit lib stdenv rsync runCommand testers;
+    jdk = jdk19;
+    gradle = gradle_7;
+    version = "19.0.2.7.1";
+    src = fetchFromGitHub {
+      owner = "corretto";
+      repo = "corretto-19";
+      rev = "72f064a1d716272bd17d4e425d4a264b2c2c7d36";
+      sha256 = "sha256-mEj/MIbdXU0+fF5RhqjPuSeyclstesGaXB0e48YlKuw=";
+    };
+  };
+in
+corretto
diff --git a/nixpkgs/pkgs/development/compilers/corretto/mk-corretto.nix b/nixpkgs/pkgs/development/compilers/corretto/mk-corretto.nix
new file mode 100644
index 000000000000..adc6a86d98e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/corretto/mk-corretto.nix
@@ -0,0 +1,117 @@
+{ jdk
+, version
+, src
+, lib
+, stdenv
+, gradle
+, rsync
+, runCommand
+, testers
+}:
+
+# Each Corretto version is based on a corresponding OpenJDK version. So
+# building Corretto is more or less the same as building OpenJDK. Hence, the
+# Corretto derivation overrides the corresponding OpenJDK derivation in order
+# to have access to all the version-specific fixes for the various OpenJDK
+# builds. However, Corretto uses `gradle` as build tool (which in turn will
+# invoke `make`). The configure/build phases are adapted as needed.
+
+let
+  pname = "corretto";
+  # The version scheme is different between OpenJDK & Corretto.
+  # See https://github.com/corretto/corretto-17/blob/release-17.0.8.8.1/build.gradle#L40
+  # "major.minor.security.build.revision"
+in
+jdk.overrideAttrs (finalAttrs: oldAttrs: {
+  inherit pname version src;
+  name = "${pname}-${version}";
+
+  nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ jdk gradle rsync ];
+
+  dontConfigure = true;
+
+  postPatch = ''
+    # The rpm/deb task definitions require a Gradle plugin which we don't
+    # have and so the build fails. We'll simply remove them here because
+    # they are not needed anyways.
+    rm -rf installers/linux/universal/{rpm,deb}
+
+    # `/usr/bin/rsync` is invoked to copy the source tree. We don't have that.
+    for file in $(find installers -name "build.gradle"); do
+      substituteInPlace $file --replace "workingDir '/usr/bin'" "workingDir '.'"
+    done
+  '';
+
+
+  buildPhase =
+    let
+      # The Linux installer is placed at linux/universal/tar whereas the MacOS
+      # one is at mac/tar.
+      task =
+        if stdenv.isDarwin then
+          ":installers:mac:tar:packageBuildResults"
+        else ":installers:linux:universal:tar:packageBuildResults";
+    in
+    ''
+      runHook preBuild
+
+      # Corretto's actual built is triggered via `gradle`.
+      gradle --console=plain --no-daemon ${task}
+
+      # Prepare for the installPhase so that it looks like if a normal
+      # OpenJDK had been built.
+      dir=build/jdkImageName/images
+      mkdir -p $dir
+      file=$(find ./installers -name 'amazon-corretto-${version}*.tar.gz')
+      tar -xzf $file -C $dir
+      mv $dir/amazon-corretto-* $dir/jdk
+
+      runHook postBuild
+    '';
+
+  installPhase = oldAttrs.installPhase + ''
+    # The installPhase will place everything in $out/lib/openjdk and
+    # reference through symlinks. We don't rewrite the installPhase but at
+    # least move the folder to convey that this is not OpenJDK anymore.
+    mv $out/lib/openjdk $out/lib/corretto
+    ln -s $out/lib/corretto $out/lib/openjdk
+  '';
+
+  passthru =
+    let
+      pkg = finalAttrs.finalPackage;
+    in
+    oldAttrs.passthru // {
+      tests = {
+        version = testers.testVersion {
+          package = pkg;
+        };
+        vendor = runCommand "${pname}-vendor" { nativeBuildInputs = [ pkg ]; } ''
+          output=$(${pkg.meta.mainProgram} -XshowSettings:properties -version 2>&1 | grep vendor)
+          grep -Fq "java.vendor = Amazon.com Inc." - <<< "$output" && touch $out
+        '';
+        compiler = runCommand "${pname}-compiler" { nativeBuildInputs = [ pkg ]; } ''
+          cat << EOF  > Main.java
+          class Main {
+              public static void main(String[] args) {
+                  System.out.println("Hello, World!");
+              }
+          }
+          EOF
+          ${pkg}/bin/javac Main.java
+          ${pkg}/bin/java Main | grep -q "Hello, World!" && touch $out
+        '';
+      };
+    };
+
+
+  # Some of the OpenJDK derivation set their `pos` by hand. We need to
+  # overwrite this in order to point to Corretto, not OpenJDK.
+  pos = __curPos;
+  meta = with lib; oldAttrs.meta // {
+    homepage = "https://aws.amazon.com/corretto";
+    license = licenses.gpl2Only;
+    description = "Amazon's distribution of OpenJDK";
+    maintainers = with maintainers; [ rollf ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/critcl/default.nix b/nixpkgs/pkgs/development/compilers/critcl/default.nix
new file mode 100644
index 000000000000..5caf63d9dba6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/critcl/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, fetchFromGitHub
+, tcl
+, tcllib
+}:
+
+tcl.mkTclDerivation rec {
+  pname = "critcl";
+  version = "3.2";
+
+  src = fetchFromGitHub {
+    owner = "andreas-kupries";
+    repo = "critcl";
+    rev = version;
+    hash = "sha256-IxScn9ZTlqD9mG9VJLG+TtplLFhhahOiFhQCjxp22Uk=";
+  };
+
+  buildInputs = [
+    tcl
+    tcllib
+  ];
+
+  dontBuild = true;
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preInstall
+    HOME="$(mktemp -d)" tclsh ./build.tcl test
+    runHook postInstall
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    tclsh ./build.tcl install --prefix $out
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Easily embed C code in Tcl";
+    homepage = "https://andreas-kupries.github.io/critcl/";
+    license = licenses.tcltk;
+    mainProgram = "critcl";
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
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..e1ff7d08fb54
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/build-package.nix
@@ -0,0 +1,165 @@
+{ stdenv
+, lib
+, crystal
+, pcre2
+, shards
+, git
+, pkg-config
+, which
+, linkFarm
+, fetchgit
+, fetchFromGitHub
+, installShellFiles
+, removeReferencesTo
+}:
+
+{
+  # 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 = [ "--optionname" ]; }
+, crystalBinaries ? { }
+, enableParallelBuilding ? true
+, ...
+}@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 =
+        if (builtins.hasAttr "url" value)
+        then fetchgit value
+        else fetchFromGitHub value;
+    })
+    (import shardsFile));
+
+  # We no longer use --no-debug in accordance with upstream's recommendation
+  defaultOptions = [ "--release" "--progress" "--verbose" ];
+
+  buildDirectly = shardsFile == null || crystalBinaries != { };
+
+  mkCrystalBuildArgs = bin: attrs:
+    lib.concatStringsSep " " ([
+      "crystal"
+      "build"
+    ] ++ lib.optionals enableParallelBuilding [
+      "--threads"
+      "$NIX_BUILD_CORES"
+    ] ++ [
+      "-o"
+      bin
+      (attrs.src or (throw "No source file for crystal binary ${bin} provided"))
+      (lib.concatStringsSep " " (attrs.options or defaultOptions))
+    ]);
+
+in
+stdenv.mkDerivation (mkDerivationArgs // {
+
+  configurePhase = args.configurePhase or lib.concatStringsSep "\n"
+    (
+      [
+        "runHook preConfigure"
+      ]
+      ++ lib.optional (lockFile != null) "cp ${lockFile} ./shard.lock"
+      ++ lib.optionals (shardsFile != null) [
+        "test -e lib || mkdir lib"
+        "for d in ${crystalLib}/*; do ln -s $d lib/; done"
+        "cp shard.lock lib/.shards.info"
+      ]
+      ++ [ "runHook postConfigure" ]
+    );
+
+  CRFLAGS = lib.concatStringsSep " " defaultOptions;
+
+  PREFIX = placeholder "out";
+
+  inherit enableParallelBuilding;
+  strictDeps = true;
+  buildInputs = args.buildInputs or [ ] ++ [ crystal ]
+    ++ lib.optional (lib.versionAtLeast crystal.version "1.8") pcre2;
+
+  nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [
+    crystal
+    git
+    installShellFiles
+    removeReferencesTo
+    pkg-config
+    which
+  ] ++ lib.optional (format != "crystal") shards;
+
+  buildPhase = args.buildPhase or (lib.concatStringsSep "\n" ([
+    "runHook preBuild"
+  ] ++ lib.optional (format == "make")
+    "make \${buildTargets:-build} $makeFlags"
+  ++ lib.optionals (format == "crystal") (lib.mapAttrsToList mkCrystalBuildArgs crystalBinaries)
+  ++ lib.optional (format == "shards")
+    "shards build --local --production ${lib.concatStringsSep " " (args.options or 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
+  '') ++ [
+    "remove-references-to -t ${lib.getLib crystal} $out/bin/*"
+    "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
+      if [ $f == $out/bin/*.dwarf ]; then
+        continue
+      fi
+      $f --help > /dev/null
+    done
+  '';
+
+  meta = args.meta or { } // {
+    platforms = args.meta.platforms or crystal.meta.platforms;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/crystal/default.nix b/nixpkgs/pkgs/development/compilers/crystal/default.nix
new file mode 100644
index 000000000000..c9ffed829b2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/default.nix
@@ -0,0 +1,300 @@
+{ stdenv
+, callPackage
+, fetchFromGitHub
+, fetchurl
+, fetchpatch
+, lib
+, substituteAll
+  # Dependencies
+, boehmgc
+, coreutils
+, git
+, gmp
+, hostname
+, libatomic_ops
+, libevent
+, libiconv
+, libxml2
+, libyaml
+, libffi
+, llvmPackages_13
+, llvmPackages_15
+, makeWrapper
+, openssl
+, pcre2
+, pcre
+, pkg-config
+, readline
+, tzdata
+, which
+, zlib
+}:
+
+# 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-universal";
+    aarch64-darwin = "darwin-universal";
+    aarch64-linux = "linux-aarch64";
+  };
+
+  arch = archs.${stdenv.system} or (throw "system ${stdenv.system} not supported");
+
+  nativeCheckInputs = [ git gmp openssl readline libxml2 libyaml libffi ];
+
+  binaryUrl = version: rel:
+    if arch == archs.aarch64-linux then
+      "https://dev.alpinelinux.org/archive/crystal/crystal-${version}-aarch64-alpine-linux-musl.tar.gz"
+    else if arch == archs.x86_64-darwin && lib.versionOlder version "1.2.0" then
+      "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-darwin-x86_64.tar.gz"
+    else
+      "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-${arch}.tar.gz";
+
+  genericBinary = { version, sha256s, rel ? 1 }:
+  stdenv.mkDerivation rec {
+    pname = "crystal-binary";
+    inherit version;
+
+    src = fetchurl {
+      url = binaryUrl version rel;
+      sha256 = sha256s.${stdenv.system};
+    };
+
+    buildCommand = ''
+      mkdir -p $out
+      tar --strip-components=1 -C $out -xf ${src}
+      patchShebangs $out/bin/crystal
+    '';
+
+    meta.platforms = lib.attrNames sha256s;
+  };
+
+  generic =
+    { version
+    , sha256
+    , binary
+    , llvmPackages
+    , doCheck ? true
+    , extraBuildInputs ? [ ]
+    , buildFlags ? [ "all" "docs" "release=1"]
+    }:
+    stdenv.mkDerivation (finalAttrs: {
+      pname = "crystal";
+      inherit buildFlags doCheck version;
+
+      src = fetchFromGitHub {
+        owner = "crystal-lang";
+        repo = "crystal";
+        rev = version;
+        inherit sha256;
+      };
+
+      patches = [
+          (substituteAll {
+            src = ./tzdata.patch;
+            inherit tzdata;
+          })
+        ]
+        ++ lib.optionals (lib.versionOlder version "1.2.0") [
+        # add support for DWARF5 debuginfo, fixes builds on recent compilers
+        # the PR is 8 commits from 2019, so just fetch the whole thing
+        # and hope it doesn't change
+        (fetchpatch {
+          url = "https://github.com/crystal-lang/crystal/pull/11399.patch";
+          sha256 = "sha256-CjNpkQQ2UREADmlyLUt7zbhjXf0rTjFhNbFYLwJKkc8=";
+        })
+      ];
+
+      outputs = [ "out" "lib" "bin" ];
+
+      postPatch = ''
+        export TMP=$(mktemp -d)
+        export HOME=$TMP
+        export TMPDIR=$TMP
+        mkdir -p $HOME/test
+
+        # Add dependency of crystal to docs to avoid issue on flag changes between releases
+        # https://github.com/crystal-lang/crystal/pull/8792#issuecomment-614004782
+        substituteInPlace Makefile \
+          --replace 'docs: ## Generate standard library documentation' 'docs: crystal ## Generate standard library documentation'
+
+        mkdir -p $TMP/crystal
+
+        substituteInPlace spec/std/file_spec.cr \
+          --replace '/bin/ls' '${coreutils}/bin/ls' \
+          --replace '/usr/share' "$TMP/crystal" \
+          --replace '/usr' "$TMP" \
+          --replace '/tmp' "$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" \
+          --replace '/tmp' "$TMP"
+
+        substituteInPlace spec/std/system_spec.cr \
+          --replace '`hostname`' '`${hostname}/bin/hostname`'
+
+        # 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"'
+
+      '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.7.0") ''
+        # See https://github.com/NixOS/nixpkgs/pull/195606#issuecomment-1356491277
+        substituteInPlace spec/compiler/loader/unix_spec.cr \
+          --replace 'it "parses file paths"' 'pending "parses file paths"'
+      '' + lib.optionalString (stdenv.cc.isClang && (stdenv.cc.libcxx != null)) ''
+        # Darwin links against libc++ not libstdc++. Newer versions of clang (12+) require
+        # libc++abi to be linked explicitly (see https://github.com/NixOS/nixpkgs/issues/166205).
+        substituteInPlace src/llvm/lib_llvm.cr \
+          --replace '@[Link("stdc++")]' '@[Link("c++", "-l${stdenv.cc.libcxx.cxxabi.libName}")]'
+      '';
+
+      # Defaults are 4
+      preBuild = ''
+        export CRYSTAL_WORKERS=$NIX_BUILD_CORES
+        export threads=$NIX_BUILD_CORES
+        export CRYSTAL_CACHE_DIR=$TMP
+        export MACOSX_DEPLOYMENT_TARGET=10.11
+      '';
+
+
+      strictDeps = true;
+      nativeBuildInputs = [ binary makeWrapper which pkg-config llvmPackages.llvm ];
+      buildInputs = [
+        boehmgc
+        (if lib.versionAtLeast version "1.8" then pcre2 else pcre)
+        libevent
+        libyaml
+        zlib
+        libxml2
+        openssl
+      ] ++ extraBuildInputs
+      ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+      makeFlags = [
+        "CRYSTAL_CONFIG_VERSION=${version}"
+        "progress=1"
+      ];
+
+      LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config";
+
+      FLAGS = [
+        "--single-module" # needed for deterministic builds
+      ] ++ lib.optionals (lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.6.1") [
+        # ffi is only used by the interpreter and its spec are broken on < 1.6.1
+        "-Dwithout_ffi"
+      ];
+
+      # 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 [ pkg-config llvmPackages.clang which ]} \
+          --suffix CRYSTAL_PATH : lib:$lib/crystal \
+          --suffix PKG_CONFIG_PATH : ${
+            lib.makeSearchPathOutput "dev" "lib/pkgconfig" finalAttrs.buildInputs
+          } \
+          --suffix CRYSTAL_LIBRARY_PATH : ${
+            lib.makeLibraryPath finalAttrs.buildInputs
+          }
+        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 = "compiler_spec";
+
+      preCheck = ''
+        export LIBRARY_PATH=${lib.makeLibraryPath nativeCheckInputs}:$LIBRARY_PATH
+        export PATH=${lib.makeBinPath nativeCheckInputs}:$PATH
+      '';
+
+      passthru.buildBinary = binary;
+      passthru.buildCrystalPackage = callPackage ./build-package.nix {
+        crystal = finalAttrs.finalPackage;
+      };
+
+      meta = with lib; {
+        inherit (binary.meta) platforms;
+        description = "A compiled language with Ruby like syntax and type inference";
+        homepage = "https://crystal-lang.org/";
+        license = licenses.asl20;
+        maintainers = with maintainers; [ david50407 manveru peterhoeg donovanglover ];
+      };
+    });
+in
+rec {
+  binaryCrystal_1_2 = genericBinary {
+    version = "1.2.2";
+    sha256s = {
+      x86_64-linux = "sha256-sW5nhihW/6Dkq95i3vJNWs2D1CtQhujhxVbgQCAas6E=";
+      aarch64-darwin = "sha256-4VB4yYGl1/YeYSsHOZq7fdeQ8IQMfloAPhEU0iKrvxs=";
+      x86_64-darwin = "sha256-4VB4yYGl1/YeYSsHOZq7fdeQ8IQMfloAPhEU0iKrvxs=";
+      aarch64-linux = "sha256-QgPKUDFyodqY1+b85AybSpbbr0RmfISdNpB08Wf34jo=";
+    };
+  };
+
+  crystal_1_2 = generic {
+    version = "1.2.2";
+    sha256 = "sha256-nyOXhsutVBRdtJlJHe2dALl//BUXD1JeeQPgHU4SwiU=";
+    binary = binaryCrystal_1_2;
+    llvmPackages = llvmPackages_13;
+    extraBuildInputs = [ libatomic_ops ];
+  };
+
+  crystal_1_7 = generic {
+    version = "1.7.3";
+    sha256 = "sha256-ULhLGHRIZbsKhaMvNhc+W74BwNgfEjHcMnVNApWY+EE=";
+    binary = binaryCrystal_1_2;
+    llvmPackages = llvmPackages_13;
+  };
+
+  crystal_1_8 = generic {
+    version = "1.8.2";
+    sha256 = "sha256-YAORdipzpC9CrFgZUFlFfjzlJQ6ZeA2ekVu8IfPOxR8=";
+    binary = binaryCrystal_1_2;
+    llvmPackages = llvmPackages_15;
+  };
+
+  crystal_1_9 = generic {
+    version = "1.9.2";
+    sha256 = "sha256-M1oUFs7/8ljszga3StzLOLM1aA4fSfVPQlsbuDHGd84=";
+    binary = binaryCrystal_1_2;
+    llvmPackages = llvmPackages_15;
+  };
+
+  crystal = crystal_1_9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/crystal/tzdata.patch b/nixpkgs/pkgs/development/compilers/crystal/tzdata.patch
new file mode 100644
index 000000000000..b687336753ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/tzdata.patch
@@ -0,0 +1,12 @@
+diff --git a/src/crystal/system/unix/time.cr b/src/crystal/system/unix/time.cr
+index 333b66075..1c29a0e55 100644
+--- a/src/crystal/system/unix/time.cr
++++ b/src/crystal/system/unix/time.cr
+@@ -43,6 +43,7 @@ module Crystal::System::Time
+   # Many systems use /usr/share/zoneinfo, Solaris 2 has
+   # /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ.
+   ZONE_SOURCES = {
++    "@tzdata@/share/zoneinfo/",
+     "/usr/share/zoneinfo/",
+     "/usr/share/lib/zoneinfo/",
+     "/usr/lib/locale/TZ/",
diff --git a/nixpkgs/pkgs/development/compilers/crystal2nix/default.nix b/nixpkgs/pkgs/development/compilers/crystal2nix/default.nix
new file mode 100644
index 000000000000..3a53525b4771
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal2nix/default.nix
@@ -0,0 +1,35 @@
+{ lib, fetchFromGitHub, crystal, makeWrapper, nix-prefetch-git }:
+
+crystal.buildCrystalPackage rec {
+  pname = "crystal2nix";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "peterhoeg";
+    repo = "crystal2nix";
+    rev = "v${version}";
+    hash = "sha256-gb2vgKWVXwYWfUUcFvOLFF0qB4CTBekEllpyKduU1Mo=";
+  };
+
+  format = "shards";
+
+  shardsFile = ./shards.nix;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram $out/bin/crystal2nix \
+      --prefix PATH : ${lib.makeBinPath [ nix-prefetch-git ]}
+  '';
+
+  # temporarily off. We need the checks to execute the wrapped binary
+  doCheck = false;
+
+  doInstallCheck = true;
+
+  meta = with lib; {
+    description = "Utility to convert Crystal's shard.lock files to a Nix file";
+    license = licenses.mit;
+    maintainers = with maintainers; [ manveru peterhoeg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/crystal2nix/shards.nix b/nixpkgs/pkgs/development/compilers/crystal2nix/shards.nix
new file mode 100644
index 000000000000..728aefb80502
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal2nix/shards.nix
@@ -0,0 +1,12 @@
+{
+  spectator = {
+    url = "https://gitlab.com/arctic-fox/spectator.git";
+    rev = "v0.10.5";
+    sha256 = "1fgjz5vg59h4m25v4fjklimcdn62ngqbchm00kw1160ggjpgpzw2";
+  };
+  version_from_shard = {
+    url = "https://github.com/hugopl/version_from_shard.git";
+    rev = "v1.2.5";
+    sha256 = "0xizj0q4rd541rwjbx04cjifc2gfx4l5v6q2y7gmd0ndjmkgb8ik";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dale/default.nix b/nixpkgs/pkgs/development/compilers/dale/default.nix
new file mode 100644
index 000000000000..816e8e08f4a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dale/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libffi
+, llvm_13
+, perl
+}:
+
+stdenv.mkDerivation {
+  pname = "dale";
+  version = "20220411";
+
+  src = fetchFromGitHub {
+    owner = "tomhrr";
+    repo = "dale";
+    rev = "7386ef2d8912c60c6fb157a1e5cd772e15eaf658";
+    sha256 = "sha256-LNWqrFuEjtL7zuPTBfe4qQWr8IrT/ldQWSeDTK3Wqmo=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config llvm_13.dev ];
+  buildInputs = [ libffi llvm_13 ];
+
+  nativeCheckInputs = [ perl ];
+
+  checkTarget = "tests";
+
+  meta = with 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 = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
+    # failed on Darwin: linker couldn't find the FFI lib
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/default.nix b/nixpkgs/pkgs/development/compilers/dart/default.nix
new file mode 100644
index 000000000000..ee10acbdeb7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/default.nix
@@ -0,0 +1,70 @@
+{ stdenv
+, lib
+, fetchurl
+, unzip
+, runCommand
+, darwin
+, sources ? import ./sources.nix {inherit fetchurl;}
+, version ? sources.versionUsed
+}:
+
+assert sources != null && (builtins.isAttrs sources);
+stdenv.mkDerivation (finalAttrs: {
+  pname = "dart";
+  inherit version;
+
+  nativeBuildInputs = [ unzip ];
+
+  src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}");
+
+  installPhase = ''
+    mkdir -p $out
+    cp -R * $out/
+    echo $libPath
+  '' + lib.optionalString (stdenv.isLinux) ''
+    find $out/bin -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
+  '';
+
+  libPath = lib.makeLibraryPath [ stdenv.cc.cc ];
+  dontStrip = true;
+  passthru = {
+    updateScript = ./update.sh;
+    tests = {
+      testCreate = runCommand "dart-test-create" { nativeBuildInputs = [ finalAttrs.finalPackage ]; } ''
+        PROJECTNAME="dart_test_project"
+        dart create --no-pub $PROJECTNAME
+
+        [[ -d $PROJECTNAME ]]
+        [[ -f $PROJECTNAME/bin/$PROJECTNAME.dart ]]
+        touch $out
+      '';
+
+      testCompile = runCommand "dart-test-compile" {
+        nativeBuildInputs = [ finalAttrs.finalPackage ]
+          ++ lib.optionals stdenv.isDarwin [ darwin.cctools darwin.sigtool ];
+      } ''
+        HELLO_MESSAGE="Hello, world!"
+        echo "void main() => print('$HELLO_MESSAGE');" > hello.dart
+        dart compile exe hello.dart
+        PROGRAM_OUT=$(./hello.exe)
+
+        [[ "$PROGRAM_OUT" == "$HELLO_MESSAGE" ]]
+        touch $out
+      '';
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://dart.dev";
+    maintainers = with maintainers; [ grburst ];
+    description = "Scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps";
+    longDescription = ''
+      Dart is a class-based, single inheritance, object-oriented language
+      with C-style syntax. It offers compilation to JavaScript, interfaces,
+      mixins, abstract classes, reified generics, and optional typing.
+    '';
+    platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.bsd3;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/dart/package-source-builders/default.nix b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/default.nix
new file mode 100644
index 000000000000..e015d423a1ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/default.nix
@@ -0,0 +1,9 @@
+{ callPackage }:
+
+{
+  flutter_secure_storage_linux = callPackage ./flutter-secure-storage-linux { };
+  handy_window = callPackage ./handy-window { };
+  matrix = callPackage ./matrix { };
+  olm = callPackage ./olm { };
+  system_tray = callPackage ./system-tray { };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix
new file mode 100644
index 000000000000..c111a7364656
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix
@@ -0,0 +1,23 @@
+{ stdenv
+, libsecret
+, jsoncpp
+}:
+
+{ version, src, ... }:
+
+stdenv.mkDerivation {
+  pname = "flutter-secure-storage-linux";
+  inherit version src;
+  inherit (src) passthru;
+
+  propagatedBuildInputs = [ libsecret jsoncpp ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out"
+    ln -s '${src}'/* "$out"
+
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix
new file mode 100644
index 000000000000..bd43e0ed947f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, lib
+, writeScript
+, cairo
+, fribidi
+}:
+
+{ version, src, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "handy-window";
+  inherit version src;
+  inherit (src) passthru;
+
+  setupHook = writeScript "${pname}-setup-hook" ''
+    handyWindowConfigureHook() {
+      export CFLAGS="$CFLAGS -isystem ${lib.getDev fribidi}/include/fribidi -isystem ${lib.getDev cairo}/include"
+    }
+
+    postConfigureHooks+=(handyWindowConfigureHook)
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out"
+    ln -s '${src}'/* "$out"
+
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix
new file mode 100644
index 000000000000..1e2c3fea80e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix
@@ -0,0 +1,30 @@
+{ stdenv
+, lib
+, writeScript
+, openssl
+}:
+
+{ version, src, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "matrix";
+  inherit version src;
+  inherit (src) passthru;
+
+  setupHook = writeScript "${pname}-setup-hook" ''
+    matrixFixupHook() {
+      runtimeDependencies+=('${lib.getLib openssl}')
+    }
+
+    preFixupHooks+=(matrixFixupHook)
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out"
+    ln -s '${src}'/* "$out"
+
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/package-source-builders/olm/default.nix b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/olm/default.nix
new file mode 100644
index 000000000000..8d715ff190fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/olm/default.nix
@@ -0,0 +1,30 @@
+{ stdenv
+, lib
+, writeScript
+, olm
+}:
+
+{ version, src, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "olm";
+  inherit version src;
+  inherit (src) passthru;
+
+  setupHook = writeScript "${pname}-setup-hook" ''
+    olmFixupHook() {
+      runtimeDependencies+=('${lib.getLib olm}')
+    }
+
+    preFixupHooks+=(olmFixupHook)
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out"
+    ln -s '${src}'/* "$out"
+
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix
new file mode 100644
index 000000000000..81dc88ab2f52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix
@@ -0,0 +1,22 @@
+{ stdenv
+, libayatana-appindicator
+}:
+
+{ version, src, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "system-tray";
+  inherit version src;
+  inherit (src) passthru;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out"
+    cp -r '${src}'/* "$out"
+    substituteInPlace "$out/linux/tray.cc" \
+      --replace "libappindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
+
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/sources.nix b/nixpkgs/pkgs/development/compilers/dart/sources.nix
new file mode 100644
index 000000000000..865a75bbff5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/sources.nix
@@ -0,0 +1,24 @@
+let version = "3.2.6"; in
+{ fetchurl }: {
+  versionUsed = version;
+  "${version}-x86_64-darwin" = fetchurl {
+    url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-x64-release.zip";
+    sha256 = "05w5v6f302gwwpa3my8baz4spmdmqrimmc659wgki1h64ch1yrlp";
+  };
+  "${version}-aarch64-darwin" = fetchurl {
+    url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-macos-arm64-release.zip";
+    sha256 = "1dmd70jjpfi19rmlvj2hbggw92z03jm8irrwx6r0bk7r748cj11f";
+  };
+  "${version}-aarch64-linux" = fetchurl {
+    url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-arm64-release.zip";
+    sha256 = "1hs1mvk90qb0nijm8wcvv6xkd79z44i2bpcv2nh933lysdys664q";
+  };
+  "${version}-x86_64-linux" = fetchurl {
+    url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-x64-release.zip";
+    sha256 = "0j0xmyxdmzn4ii24j27yw6l3074ay4n2qjyzh967cpbg9yhr0cr5";
+  };
+  "${version}-i686-linux" = fetchurl {
+    url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${version}/sdk/dartsdk-linux-ia32-release.zip";
+    sha256 = "0ml9dvnd7f0rld3wfnnmv7arfs821zg8rqaq1c7zvqhkj3i0dwci";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dart/update.sh b/nixpkgs/pkgs/development/compilers/dart/update.sh
new file mode 100755
index 000000000000..87f430cd5d2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dart/update.sh
@@ -0,0 +1,77 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl jq
+
+set -euo pipefail
+
+# so if the script fails, debug logs are on stderr
+log() {
+  >&2 echo "DART_UPDATER: $@"
+}
+
+# fetch the latest version number from upstream
+NEW_VER_DETAILS=$(curl -sL https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION)
+NEW_VER=$(jq -r '.version' <<< "$NEW_VER_DETAILS")
+
+MY_PATH=$(dirname $(realpath "$0"))
+SRC_FILE=$(mktemp)
+
+log "file to write is $SRC_FILE"
+
+PRELUDE="let version = \"$NEW_VER\"; in
+{ fetchurl }: {
+  versionUsed = version;"
+echo "$PRELUDE" > "$SRC_FILE"
+log "wrote prelude"
+
+# Fetches the source, then  writes the fetcher and hash into the sources file.
+# Arguments:
+#   - $1: VARIABLE NAME of (table of nix platform -> dart platform mappings) ("DARWIN_PLATFORMS"|"LIN_PLATFORMS")
+#   - $2: Dart-OS ("macos"|"linux")
+write_for_platform() {
+  BASE_OF_ALL_URLS='https://storage.googleapis.com/dart-archive/channels/stable/release'
+  BASE_URL_WRITTEN="$BASE_OF_ALL_URLS/\${version}/sdk"
+  BASE_URL_FETCHED="$BASE_OF_ALL_URLS/$NEW_VER/sdk"
+
+  TABLE_NAME=$1
+  declare -n TABLE=$TABLE_NAME
+
+  for platform in "${!TABLE[@]}"; do
+    DART_PLATFORM="${TABLE[$platform]}"
+    log "trying for dartplatform $DART_PLATFORM (platform $platform) (OS $2)"
+
+    URL_POSTFIX="dartsdk-$2-$DART_PLATFORM-release.zip"
+    URL="$BASE_URL_FETCHED/$URL_POSTFIX"
+    log "URL for $DART_PLATFORM: $URL"
+
+    HASH=$(nix-prefetch-url "$URL" --type sha256)
+    log "hash for platform $platform: $HASH"
+
+    FETCHER="  \"\${version}-$platform\" = fetchurl {
+    url = \"$BASE_URL_WRITTEN/$URL_POSTFIX\";
+    sha256 = \"$HASH\";
+  };"
+
+    echo "$FETCHER" >> $SRC_FILE
+  done
+  log "finished for $1"
+
+}
+
+# Map nix platforms -> Dart platforms
+X8664="x64"
+AARCH64="arm64"
+I686="ia32"
+declare -A DARWIN_PLATFORMS=(["aarch64-darwin"]="$AARCH64"
+        ["x86_64-darwin"]="$X8664")
+
+declare -A LIN_PLATFORMS=( ["x86_64-linux"]="$X8664"
+        ["i686-linux"]="$I686"
+        ["aarch64-linux"]="$AARCH64")
+
+write_for_platform "DARWIN_PLATFORMS" "macos"
+write_for_platform "LIN_PLATFORMS" "linux"
+
+echo '}' >> $SRC_FILE
+
+log "moving tempfile to target directory"
+mv "$SRC_FILE" "$MY_PATH/sources.nix"
diff --git a/nixpkgs/pkgs/development/compilers/dasm/default.nix b/nixpkgs/pkgs/development/compilers/dasm/default.nix
new file mode 100644
index 000000000000..7f57f47f2ed6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dasm/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "dasm";
+  version = "2.20.14.1";
+
+  src = fetchFromGitHub {
+    owner = "dasm-assembler";
+    repo = "dasm";
+    rev = version;
+    sha256 = "1bna0bj503xyn5inwzzsrsgi9qg8p20by4dfk7azj91ynw56pl41";
+  };
+
+  configurePhase = false;
+  installPhase = ''
+    mkdir -p $out/bin
+    install bin/* $out/bin
+  '';
+
+  preCheck = ''
+    patchShebangs ./test/
+  '';
+
+  checkTarget = "test";
+  doCheck = true;
+
+  meta = with 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..c42c4ce88c15
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dev86/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "dev86";
+  version = "unstable-2022-07-19";
+
+  src = fetchFromGitHub {
+    owner = "jbruchon";
+    repo = "dev86";
+    rev = "f5cd3e5c17a0d3cd8298bac8e30bed6e59c4e57a";
+    hash = "sha256-CWeboFkJkpKHZ/wkuvMj5a+5qB2uzAtoYy8OdyYErMg=";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  # Parallel builds are not supported due to build process structure: tools are
+  # built sequentially in submakefiles and are reusing the same targets as
+  # dependencies. Building dependencies in parallel from different submakes is
+  # not synchronized and fails:
+  #     make[3]: Entering directory '/build/dev86-0.16.21/libc'
+  #     Unable to execute as86.
+  enableParallelBuilding = false;
+
+  meta = {
+    homepage = "https://github.com/jbruchon/dev86";
+    description =
+      "C compiler, assembler and linker environment for the production of 8086 executables";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch b/nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch
new file mode 100644
index 000000000000..8de4c9f57f6a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch
@@ -0,0 +1,46 @@
+From bb4767f8fc413ca4cb42879a9a226fd26f10e094 Mon Sep 17 00:00:00 2001
+From: Lucas Ransan <lucas@ransan.tk>
+Date: Tue, 3 Aug 2021 20:39:11 +0200
+Subject: [PATCH] force sqlite to be found
+
+---
+ src/CMakeLists.txt | 16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a0f3fee..58b4d0b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(INCLUDE_DIR include/)
+ list(FILTER sources EXCLUDE REGEX "(main|linenoise|utf8).c")
+ list(FILTER headers EXCLUDE REGEX "(linenoise|utf8).h")
+ 
+-find_library(SQLITE_LIB SQLite3)
++find_package(SQLite3 REQUIRED)
+ set(THREADS)
+ 
+ if(DISABLE_HTTP)
+@@ -20,16 +20,10 @@ else()
+     list(APPEND libraries curl)
+ endif()
+ 
+-if(NOT SQLITE_LIB)
+-    set(THREADS_PREFER_PTHREAD_FLAG ON)
+-    find_package(Threads REQUIRED)
+-    set(THREADS Threads::Threads)
+-else()
+-    list(FILTER sources EXCLUDE REGEX "sqlite3.c")
+-    list(FILTER headers EXCLUDE REGEX "sqlite3.h")
+-    list(APPEND libraries ${SQLITE_LIB})
+-    add_compile_definitions(INCLUDE_SQLITE_LIB)
+-endif()
++list(FILTER sources EXCLUDE REGEX "sqlite3.c")
++list(FILTER headers EXCLUDE REGEX "sqlite3.h")
++list(APPEND libraries ${SQLite3_LIBRARIES})
++add_compile_definitions(SQLite3_INCLUDE_DIR)
+ 
+ if(WIN32)
+     # ws2_32 is required for winsock2.h to work correctly
+-- 
+2.32.0
+
diff --git a/nixpkgs/pkgs/development/compilers/dictu/default.nix b/nixpkgs/pkgs/development/compilers/dictu/default.nix
new file mode 100644
index 000000000000..113f9291df2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dictu/default.nix
@@ -0,0 +1,85 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, sqlite
+, httpSupport ? true, curl
+, cliSupport ? true
+, linenoiseSupport ? cliSupport, linenoise
+, enableLTO ? stdenv.cc.isGNU
+}:
+
+assert enableLTO -> stdenv.cc.isGNU;
+
+stdenv.mkDerivation rec {
+  pname = "dictu";
+  version = "0.25.0";
+
+  src = fetchFromGitHub {
+    owner = "dictu-lang";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Tahi2K8Q/KPc9MN7yWhkqp/MzXfzJzrGSsvnTCyI03U=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    sqlite
+  ] ++ lib.optional httpSupport curl
+  ++ lib.optional linenoiseSupport linenoise;
+
+  patches = [
+    ./0001-force-sqlite-to-be-found.patch
+  ];
+
+  postPatch = lib.optionalString (!enableLTO) ''
+    sed -i src/CMakeLists.txt \
+        -e 's/-flto/${lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"}/'
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_CLI=${if cliSupport then "ON" else "OFF"}"
+    "-DDISABLE_HTTP=${if httpSupport then "OFF" else "ON"}"
+    "-DDISABLE_LINENOISE=${if linenoiseSupport then "OFF" else "ON"}"
+  ] ++ lib.optionals enableLTO [ # TODO: LTO with LLVM
+    "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
+    "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
+  ];
+
+  doCheck = cliSupport;
+
+  preCheck = ''
+    cd ..
+    sed -i tests/runTests.du \
+        -e '/http/d'
+    sed -i tests/path/realpath.du \
+        -e 's/usr/build/g'
+    sed -i tests/path/isDir.du \
+        -e 's,/usr/bin,/build/source,' \
+        -e '/home/d'
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+    ./dictu tests/runTests.du
+  '';
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r /build/source/src/include $out/include
+    mkdir -p $out/lib
+    cp /build/source/build/src/libdictu_api* $out/lib
+  '' + lib.optionalString cliSupport ''
+    install -Dm755 /build/source/dictu $out/bin/dictu
+  '';
+
+  meta = with lib; {
+    description = "High-level dynamically typed, multi-paradigm, interpreted programming language";
+    homepage = "https://dictu-lang.com";
+    license = licenses.mit;
+    maintainers = with maintainers; [ luc65r ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dictu.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/djgpp/default.nix b/nixpkgs/pkgs/development/compilers/djgpp/default.nix
new file mode 100644
index 000000000000..1dabc225d9a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/djgpp/default.nix
@@ -0,0 +1,101 @@
+{ bison
+, buildPackages
+, curl
+, fetchFromGitHub
+, fetchurl
+, file
+, flex
+, targetArchitecture ? "i586"
+, lib
+, makeWrapper
+, perl
+, stdenv
+, texinfo
+, unzip
+, which }:
+
+let
+  s = import ./sources.nix { inherit fetchurl fetchFromGitHub; };
+in
+assert lib.elem targetArchitecture [ "i586" "i686" ];
+stdenv.mkDerivation rec {
+  pname = "djgpp";
+  version = s.gccVersion;
+  src = s.src;
+
+  patchPhase = ''
+    runHook prePatch
+    for f in "build-djgpp.sh" "script/${version}" "setenv/copyfile.sh"; do
+      substituteInPlace "$f" --replace '/usr/bin/env' '${buildPackages.coreutils}/bin/env'
+    done
+  ''
+  # i686 patches from https://github.com/andrewwutw/build-djgpp/issues/45#issuecomment-1484010755
+  # The build script unpacks some files so we can't patch ahead of time, instead patch the script
+  # to patch after it extracts
+
+  + lib.optionalString (targetArchitecture == "i686") ''
+    sed -i 's/i586/i686/g' setenv/setenv script/${version}
+    sed -i '/Building DXE tools./a sed -i "s/i586/i686/g" src/makefile.def src/dxe/makefile.dxe' script/${version}
+  ''
+  + ''
+    runHook postPatch
+  '';
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  buildInputs = [
+    bison
+    curl
+    file
+    flex
+    perl
+    texinfo
+    unzip
+    which
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  # stripping breaks static libs, causing this when you attempt to compile a binary:
+  # error adding symbols: Archive has no index; run ranlib to add one
+  dontStrip = true;
+
+  buildPhase = ''
+    runHook preBuild
+    mkdir download; pushd download
+    ln -s "${s.autoconf}"   "${s.autoconf.name}"
+    ln -s "${s.automake}"   "${s.automake.name}"
+    ln -s "${s.binutils}"   "${s.binutils.name}"
+    ln -s "${s.djcrossgcc}" "${s.djcrossgcc.name}"
+    ln -s "${s.djcrx}"      "${s.djcrx.name}"
+    ln -s "${s.djdev}"      "${s.djdev.name}"
+    ln -s "${s.djlsr}"      "${s.djlsr.name}"
+    ln -s "${s.gcc}"        "${s.gcc.name}"
+    ln -s "${s.gmp}"        "${s.gmp.name}"
+    ln -s "${s.mpc}"        "${s.mpc.name}"
+    ln -s "${s.mpfr}"       "${s.mpfr.name}"
+    popd
+    DJGPP_PREFIX=$out ./build-djgpp.sh ${version}
+    runHook postBuild
+  '';
+
+  postInstall = ''
+    for f in dxegen dxe3gen dxe3res exe2coff stubify; do
+      cp -v "$out/${targetArchitecture}-pc-msdosdjgpp/bin/$f" "$out/bin"
+    done
+
+    for f in dxegen dxe3gen; do
+      wrapProgram $out/bin/$f --set DJDIR $out
+    done
+  '';
+
+  meta = {
+    description = "A complete 32-bit GNU-based development system for Intel x86 PCs running DOS";
+    homepage = "https://www.delorie.com/djgpp/";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ hughobrien ];
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/djgpp/sources.nix b/nixpkgs/pkgs/development/compilers/djgpp/sources.nix
new file mode 100644
index 000000000000..8ae440409b26
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/djgpp/sources.nix
@@ -0,0 +1,81 @@
+let
+  # adapted from https://github.com/andrewwutw/build-djgpp/blob/master/script/12.1.0
+  gccVersion = "12.2.0";
+  binutilsVersion = "230";
+  djcrxVersion = "205";
+  djlsrVersion = "205";
+  djdevVersion = "205";
+  gmpVersion = "6.2.1";
+  mpfrVersion = "4.1.0";
+  mpcVersion = "1.2.1";
+  autoconfVersion = "2.69";
+  automakeVersion = "1.15.1";
+  djgppFtpMirror = "https://www.mirrorservice.org/sites/ftp.delorie.com/pub";
+  gnuFtpMirror = "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu";
+in
+{ fetchFromGitHub, fetchurl }: {
+  inherit gccVersion;
+
+  src = fetchFromGitHub {
+    owner = "andrewwutw";
+    repo = "build-djgpp";
+    rev = "0dc28365825f853c3cc6ad0d8f10f8570bed5828";
+    hash = "sha256-L7ROTbnd/Ry/E9cP0N+l0y0cUzkkbC5B2aU9/r3rLQg=";
+  };
+
+  autoconf = fetchurl {
+    url = "${gnuFtpMirror}/autoconf/autoconf-${autoconfVersion}.tar.xz";
+    hash = "sha256-ZOvOyfisWySHElqGp3YNJZGsnh09vVlIljP53mKldoQ=";
+  };
+
+  automake = fetchurl {
+    url = "${gnuFtpMirror}/Automake/automake-${automakeVersion}.tar.xz";
+    hash = "sha256-r2ujkUIiBofFAPebSqLxgdmyTk+NjsSXzqS6JsZL7a8=";
+  };
+
+  binutils = fetchurl {
+    url = "${djgppFtpMirror}/djgpp/deleted/v2gnu/bnu${binutilsVersion}s.zip";
+    hash = "sha256-DSFQyFvswmP5/qYXbesFmUJ9tqEFJpILb0mGclfpXX0=";
+  };
+
+  djcrossgcc = fetchurl {
+    url = "${djgppFtpMirror}/djgpp/rpms/djcross-gcc-${gccVersion}/djcross-gcc-${gccVersion}.tar.bz2";
+    hash = "sha256-UL+wkeNv3LCQog0JigShIyBM7qJRqvN58Zitmti/BZM=";
+  };
+
+  djcrx = fetchurl {
+    url = "${djgppFtpMirror}/djgpp/current/v2/djcrx${djcrxVersion}.zip";
+    hash = "sha256-IidO2NXuV898zxYfXhaE/RwBkgaHJKfTThveFoBBymA=";
+  };
+
+  djdev = fetchurl {
+    url = "${djgppFtpMirror}/djgpp/current/v2/djdev${djdevVersion}.zip";
+    hash = "sha256-RVfftsFh0yZoCuX6cfAJisSUJaGxG5CgILgxYutwXdo=";
+  };
+
+  djlsr = fetchurl {
+    url = "${djgppFtpMirror}/djgpp/current/v2/djlsr${djlsrVersion}.zip";
+    hash = "sha256-gGkLbkT/i8bGCB/KH0+uuhWRxEkLdu8OyLNYR7ql3uo=";
+  };
+
+  gcc = fetchurl {
+    url = "${gnuFtpMirror}/gcc/gcc-${gccVersion}/gcc-${gccVersion}.tar.xz";
+    hash = "sha256-5UnPnPNZSgDie2WJ1DItcOByDN0hPzm+tBgeBpJiMP8=";
+  };
+
+  gmp = fetchurl {
+    url = "${gnuFtpMirror}/gmp/gmp-${gmpVersion}.tar.xz";
+    hash = "sha256-/UgpkSzd0S+EGBw0Ucx1K+IkZD6H+sSXtp7d2txJtPI=";
+  };
+
+  mpc = fetchurl {
+    url = "${gnuFtpMirror}/mpc/mpc-${mpcVersion}.tar.gz";
+    hash = "sha256-F1A9LDld/PEGtiLcFCaDwRmUMdCVNnxqrLpu7DA0BFk=";
+  };
+
+  mpfr = fetchurl {
+    url = "${gnuFtpMirror}/mpfr/mpfr-${mpfrVersion}.tar.xz";
+    hash = "sha256-DJij8XMv9spOppBVIHnanFl4ctMOluwoQU7iPJVVin8=";
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/dmd/binary.nix b/nixpkgs/pkgs/development/compilers/dmd/binary.nix
new file mode 100644
index 000000000000..3a5d6b76cec8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dmd/binary.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc
+, version, hashes }:
+
+let
+  inherit (stdenv) hostPlatform;
+  OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
+  MODEL = toString hostPlatform.parsed.cpu.bits;
+in
+
+# On linux pargets like `pkgsLLVM.dmd` `cc` does not expose `libgcc`
+# and can't build `dmd`.
+assert hostPlatform.isLinux -> (stdenv.cc.cc ? libgcc);
+stdenv.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 = lib.optionals hostPlatform.isLinux [
+    autoPatchelfHook
+  ] ++ lib.optionals hostPlatform.isDarwin [
+    fixDarwinDylibNames
+  ];
+  propagatedBuildInputs = [
+    curl
+    tzdata
+  ] ++ lib.optionals hostPlatform.isLinux [
+    glibc
+    stdenv.cc.cc.libgcc
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    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 "/../../" "/../"
+
+    runHook postInstall
+  '';
+
+  # Stripping on Darwin started to break libphobos2.a
+  # Undefined symbols for architecture x86_64:
+  #   "_rt_envvars_enabled", referenced from:
+  #       __D2rt6config16rt_envvarsOptionFNbNiAyaMDFNbNiQkZQnZQq in libphobos2.a(config_99a_6c3.o)
+  dontStrip = hostPlatform.isDarwin;
+
+  meta = with lib; {
+    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..16aa5ed4d404
--- /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 = "sha256-9HwGVO/8jfZ6aTiDIUi8w4C4Ukry0uUS8ACP3Ig8dmU=";
+    linux = "sha256-ByCrIA4Nt7i9YT0L19VXIL1IqIp+iObcZux407amZu4=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dmd/default.nix b/nixpkgs/pkgs/development/compilers/dmd/default.nix
new file mode 100644
index 000000000000..bdc9fafd4f06
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dmd/default.nix
@@ -0,0 +1,5 @@
+import ./generic.nix {
+  version = "2.106.1";
+  dmdSha256 = "sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8=";
+  phobosSha256 = "sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s=";
+}
diff --git a/nixpkgs/pkgs/development/compilers/dmd/generic.nix b/nixpkgs/pkgs/development/compilers/dmd/generic.nix
new file mode 100644
index 000000000000..5cf07454141b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dmd/generic.nix
@@ -0,0 +1,226 @@
+{ version
+, dmdSha256
+, phobosSha256
+}:
+
+{ stdenv
+, lib
+, fetchFromGitHub
+, removeReferencesTo
+, makeWrapper
+, which
+, writeTextFile
+, curl
+, tzdata
+, gdb
+, Foundation
+, callPackage
+, targetPackages
+, fetchpatch
+, bash
+, installShellFiles
+, git
+, unzip
+, dmdBootstrap ? callPackage ./bootstrap.nix { }
+, dmd_bin ? "${dmdBootstrap}/bin"
+}:
+
+let
+  dmdConfFile = writeTextFile {
+    name = "dmd.conf";
+    text = (lib.generators.toINI { } {
+      Environment = {
+        DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}'';
+      };
+    });
+  };
+
+  bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
+  osname =
+    if stdenv.isDarwin then
+      "osx"
+    else
+      stdenv.hostPlatform.parsed.kernel.name;
+
+  pathToDmd = "\${NIX_BUILD_TOP}/dmd/generated/${osname}/release/${bits}/dmd";
+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 = "phobos";
+      rev = "v${version}";
+      sha256 = phobosSha256;
+      name = "phobos";
+    })
+  ];
+
+  sourceRoot = ".";
+
+  # https://issues.dlang.org/show_bug.cgi?id=19553
+  hardeningDisable = [ "fortify" ];
+
+  patches = lib.optionals (lib.versionOlder version "2.088.0") [
+    # Migrates D1-style operator overloads in DMD source, to allow building with
+    # a newer DMD
+    (fetchpatch {
+      url = "https://github.com/dlang/dmd/commit/c4d33e5eb46c123761ac501e8c52f33850483a8a.patch";
+      stripLen = 1;
+      extraPrefix = "dmd/";
+      sha256 = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs dmd/compiler/test/{runnable,fail_compilation,compilable,tools}{,/extra-files}/*.sh
+
+    rm dmd/compiler/test/runnable/gdb1.d
+    rm dmd/compiler/test/runnable/gdb10311.d
+    rm dmd/compiler/test/runnable/gdb14225.d
+    rm dmd/compiler/test/runnable/gdb14276.d
+    rm dmd/compiler/test/runnable/gdb14313.d
+    rm dmd/compiler/test/runnable/gdb14330.d
+    rm dmd/compiler/test/runnable/gdb15729.sh
+    rm dmd/compiler/test/runnable/gdb4149.d
+    rm dmd/compiler/test/runnable/gdb4181.d
+    rm dmd/compiler/test/compilable/ddocYear.d
+
+    # Disable tests that rely on objdump whitespace until fixed upstream:
+    #   https://issues.dlang.org/show_bug.cgi?id=23317
+    rm dmd/compiler/test/runnable/cdvecfill.sh
+    rm dmd/compiler/test/compilable/cdcmp.d
+  ''
+
+  + lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
+    rm dmd/compiler/test/dshell/test6952.d
+  '' + lib.optionalString (lib.versionAtLeast version "2.092.2") ''
+    substituteInPlace dmd/compiler/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash"
+  ''
+
+  + lib.optionalString stdenv.isLinux ''
+    substituteInPlace phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
+  '';
+
+  nativeBuildInputs = [
+    makeWrapper
+    which
+    installShellFiles
+  ] ++ lib.optionals (lib.versionOlder version "2.088.0") [
+    git
+  ];
+
+  buildInputs = [
+    curl
+    tzdata
+  ] ++ lib.optionals stdenv.isDarwin [
+    Foundation
+  ];
+
+  nativeCheckInputs = [
+    gdb
+  ] ++ lib.optionals (lib.versionOlder version "2.089.0") [
+    unzip
+  ];
+
+  buildFlags = [
+    "BUILD=release"
+    "ENABLE_RELEASE=1"
+    "PIC=1"
+  ];
+
+  # Build and install are based on http://wiki.dlang.org/Building_DMD
+  buildPhase = ''
+    runHook preBuild
+
+    export buildJobs=$NIX_BUILD_CORES
+    if [ -z $enableParallelBuilding ]; then
+      buildJobs=1
+    fi
+
+    ${dmd_bin}/rdmd dmd/compiler/src/build.d -j$buildJobs HOST_DMD=${dmd_bin}/dmd $buildFlags
+    make -C dmd/druntime -f posix.mak DMD=${pathToDmd} $buildFlags -j$buildJobs
+    echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
+    echo ${lib.getLib curl}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > LibcurlPathFile
+    make -C phobos -f posix.mak $buildFlags -j$buildJobs DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
+
+    runHook postBuild
+  '';
+
+  doCheck = true;
+
+  checkFlags = buildFlags;
+
+  # many tests are disbled because they are failing
+
+  # NOTE: Purity check is disabled for checkPhase because it doesn't fare well
+  # with the DMD linker. See https://github.com/NixOS/nixpkgs/issues/97420
+  checkPhase = ''
+    runHook preCheck
+
+    export checkJobs=$NIX_BUILD_CORES
+    if [ -z $enableParallelChecking ]; then
+      checkJobs=1
+    fi
+
+    NIX_ENFORCE_PURITY= \
+      make -C dmd/compiler/test $checkFlags CC=$CXX SHELL=$SHELL -j$checkJobs N=$checkJobs
+
+    NIX_ENFORCE_PURITY= \
+      make -C phobos -f posix.mak unittest $checkFlags -j$checkJobs DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
+
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 ${pathToDmd} $out/bin/dmd
+
+    installManPage dmd/docs/man/man*/*
+
+    mkdir -p $out/include/dmd
+    cp -r {dmd/druntime/import/*,phobos/{std,etc}} $out/include/dmd/
+
+    mkdir $out/lib
+    cp phobos/generated/${osname}/release/${bits}/libphobos2.* $out/lib/
+
+    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
+
+    runHook postInstall
+  '';
+
+  preFixup = ''
+    find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${dmd_bin}/dmd '{}' +
+  '';
+
+  disallowedReferences = [ dmdBootstrap ];
+
+  meta = with lib; {
+    description = "Official reference compiler for the D language";
+    homepage = "https://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 dukc jtbx ];
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix
new file mode 100644
index 000000000000..bcdb16c63350
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix
@@ -0,0 +1,169 @@
+{ type
+, version
+, srcs
+, packages ? null
+}:
+
+assert builtins.elem type [ "aspnetcore" "runtime" "sdk" ];
+assert if type == "sdk" then packages != null else true;
+
+{ lib
+, stdenv
+, fetchurl
+, writeText
+, autoPatchelfHook
+, makeWrapper
+, libunwind
+, icu
+, libuuid
+, zlib
+, libkrb5
+, curl
+, lttng-ust_2_12
+, testers
+, runCommand
+, writeShellScript
+, mkNugetDeps
+}:
+
+let
+  pname =
+    if type == "aspnetcore" then
+      "aspnetcore-runtime"
+    else if type == "runtime" then
+      "dotnet-runtime"
+    else
+      "dotnet-sdk";
+
+  descriptions = {
+    aspnetcore = "ASP.NET Core Runtime ${version}";
+    runtime = ".NET Runtime ${version}";
+    sdk = ".NET SDK ${version}";
+  };
+
+  packageDeps = if type == "sdk" then mkNugetDeps {
+    name = "${pname}-${version}-deps";
+    nugetDeps = packages;
+  } else null;
+
+in
+stdenv.mkDerivation (finalAttrs: rec {
+  inherit pname version;
+
+  # Some of these dependencies are `dlopen()`ed.
+  nativeBuildInputs = [
+    makeWrapper
+  ] ++ lib.optional stdenv.isLinux autoPatchelfHook;
+
+  buildInputs = [
+    stdenv.cc.cc
+    zlib
+    icu
+    libkrb5
+    curl
+  ] ++ lib.optional stdenv.isLinux lttng-ust_2_12;
+
+  src = fetchurl (
+    srcs."${stdenv.hostPlatform.system}" or (throw
+      "Missing source (url and hash) for host system: ${stdenv.hostPlatform.system}")
+  );
+
+  sourceRoot = ".";
+
+  dontPatchELF = true;
+  noDumpEnvVars = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp -r ./ $out
+
+    mkdir -p $out/share/doc/$pname/$version
+    mv $out/LICENSE.txt $out/share/doc/$pname/$version/
+    mv $out/ThirdPartyNotices.txt $out/share/doc/$pname/$version/
+
+    ln -s $out/dotnet $out/bin/dotnet
+
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/dotnet --info
+  '';
+
+  # Tell autoPatchelf about runtime dependencies.
+  # (postFixup phase is run before autoPatchelfHook.)
+  postFixup = lib.optionalString stdenv.isLinux ''
+    patchelf \
+      --add-needed libicui18n.so \
+      --add-needed libicuuc.so \
+      $out/shared/Microsoft.NETCore.App/*/libcoreclr.so \
+      $out/shared/Microsoft.NETCore.App/*/*System.Globalization.Native.so \
+      $out/packs/Microsoft.NETCore.App.Host.linux-x64/*/runtimes/linux-x64/native/singlefilehost
+    patchelf \
+      --add-needed libgssapi_krb5.so \
+      $out/shared/Microsoft.NETCore.App/*/*System.Net.Security.Native.so \
+      $out/packs/Microsoft.NETCore.App.Host.linux-x64/*/runtimes/linux-x64/native/singlefilehost
+    patchelf \
+      --add-needed libssl.so \
+      $out/shared/Microsoft.NETCore.App/*/*System.Security.Cryptography.Native.OpenSsl.so \
+      $out/packs/Microsoft.NETCore.App.Host.linux-x64/*/runtimes/linux-x64/native/singlefilehost
+  '';
+
+  setupHook = writeText "dotnet-setup-hook" ''
+    if [ ! -w "$HOME" ]; then
+      export HOME=$(mktemp -d) # Dotnet expects a writable home directory for its configuration files
+    fi
+
+    export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 # Dont try to expand NuGetFallbackFolder to disk
+    export DOTNET_NOLOGO=1 # Disables the welcome message
+    export DOTNET_CLI_TELEMETRY_OPTOUT=1
+    export DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK=1 # Skip integrity check on first run, which fails due to read-only directory
+  '';
+
+  passthru = {
+    inherit icu;
+    packages = packageDeps;
+
+    updateScript =
+      if type == "sdk" then
+      let
+        majorVersion =
+          with lib;
+          concatStringsSep "." (take 2 (splitVersion version));
+      in
+      writeShellScript "update-dotnet-${majorVersion}" ''
+        pushd pkgs/development/compilers/dotnet
+        exec ${./update.sh} "${majorVersion}"
+      '' else null;
+
+    tests = {
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+      };
+
+      smoke-test = runCommand "dotnet-sdk-smoke-test" {
+        nativeBuildInputs = [ finalAttrs.finalPackage ];
+      } ''
+        HOME=$(pwd)/fake-home
+        dotnet new console --no-restore
+        dotnet restore --source "$(mktemp -d)"
+        dotnet build --no-restore
+        output="$(dotnet run --no-build)"
+        # yes, older SDKs omit the comma
+        [[ "$output" =~ Hello,?\ World! ]] && touch "$out"
+      '';
+    };
+  };
+
+  meta = with lib; {
+    description = builtins.getAttr type descriptions;
+    homepage = "https://dotnet.github.io/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ kuznero mdarocha ];
+    mainProgram = "dotnet";
+    platforms = attrNames srcs;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix b/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix
new file mode 100644
index 000000000000..eaae0db2fc02
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix
@@ -0,0 +1,34 @@
+dotnetPackages:
+{ buildEnv, makeWrapper, lib }:
+# TODO: Rethink how we determine and/or get the CLI.
+#       Possible options raised in #187118:
+#         1. A separate argument for the CLI (as suggested by IvarWithoutBones
+#         2. Use the highest version SDK for the CLI (as suggested by GGG)
+#         3. Something else?
+let cli = builtins.head dotnetPackages;
+in
+assert lib.assertMsg ((builtins.length dotnetPackages) > 0)
+    ''You must include at least one package, e.g
+      `with dotnetCorePackages; combinePackages [
+          sdk_6_0 aspnetcore_7_0
+       ];`'' ;
+  buildEnv {
+    name = "dotnet-core-combined";
+    paths = dotnetPackages;
+    pathsToLink = [ "/host" "/packs" "/sdk" "/sdk-manifests" "/shared" "/templates" ];
+    ignoreCollisions = true;
+    postBuild = ''
+      cp -R ${cli}/{dotnet,share,nix-support} $out/
+
+      mkdir $out/bin
+      ln -s $out/dotnet $out/bin/dotnet
+    '';
+    passthru = {
+      inherit (cli) icu;
+
+      versions = lib.catAttrs "version" dotnetPackages;
+      packages = lib.remove null (lib.catAttrs "packages" dotnetPackages);
+    };
+
+    inherit (cli) meta;
+  }
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/default.nix b/nixpkgs/pkgs/development/compilers/dotnet/default.nix
new file mode 100644
index 000000000000..814560e49bee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/default.nix
@@ -0,0 +1,45 @@
+/*
+How to combine packages for use in development:
+dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ];
+
+Hashes and urls are retrieved from:
+https://dotnet.microsoft.com/download/dotnet
+*/
+{ lib, config, callPackage }:
+let
+  buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {};
+  buildAttrs = {
+    buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
+    buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; });
+    buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
+  };
+
+  ## Files in versions/ are generated automatically by update.sh ##
+  dotnet_6_0 = import ./versions/6.0.nix buildAttrs;
+  dotnet_7_0 = import ./versions/7.0.nix buildAttrs;
+  dotnet_8_0 = import ./versions/8.0.nix buildAttrs;
+
+  runtimeIdentifierMap = {
+    "x86_64-linux" = "linux-x64";
+    "aarch64-linux" = "linux-arm64";
+    "x86_64-darwin" = "osx-x64";
+    "aarch64-darwin" = "osx-arm64";
+    "x86_64-windows" = "win-x64";
+    "i686-windows" = "win-x86";
+  };
+
+  # Convert a "stdenv.hostPlatform.system" to a dotnet RID
+  systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
+in
+{
+  inherit systemToDotnetRid;
+
+  combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {};
+} // lib.optionalAttrs config.allowAliases {
+  # EOL
+  sdk_2_1 = throw "Dotnet SDK 2.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
+  sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
+  sdk_3_0 = throw "Dotnet SDK 3.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
+  sdk_3_1 = throw "Dotnet SDK 3.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
+  sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
+} // dotnet_6_0 // dotnet_7_0 // dotnet_8_0
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/update.sh b/nixpkgs/pkgs/development/compilers/dotnet/update.sh
new file mode 100755
index 000000000000..cdbbe482d4e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/update.sh
@@ -0,0 +1,379 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -I nixpkgs=../../../../. -i bash -p curl jq nix gnused
+# shellcheck shell=bash
+
+set -Eeuo pipefail
+
+release () {
+  local content="$1"
+  local version="$2"
+
+  jq -r '.releases[] | select(."release-version" == "'"$version"'")' <<< "$content"
+}
+
+release_files () {
+  local release="$1"
+  local type="$2"
+
+  jq -r '[."'"$type"'".files[] | select(.name | test("^.*.tar.gz$"))]' <<< "$release"
+}
+
+release_platform_attr () {
+  local release_files="$1"
+  local platform="$2"
+  local attr="$3"
+
+  jq -r '.[] | select((.rid == "'"$platform"'") and (.name | contains("composite") | not)) | ."'"$attr"'"' <<< "$release_files"
+}
+
+platform_sources () {
+  local release_files="$1"
+  local platforms=( \
+    "x86_64-linux   linux-x64" \
+    "aarch64-linux  linux-arm64" \
+    "x86_64-darwin  osx-x64" \
+    "aarch64-darwin osx-arm64" \
+  )
+
+  echo "srcs = {"
+  for kv in "${platforms[@]}"; do
+    local nix_platform=${kv%% *}
+    local ms_platform=${kv##* }
+
+    local url=$(release_platform_attr "$release_files" "$ms_platform" url)
+    local hash=$(release_platform_attr "$release_files" "$ms_platform" hash)
+
+    [[ -z "$url" || -z "$hash" ]] && continue
+    echo "      $nix_platform = {
+        url     = \"$url\";
+        sha512  = \"$hash\";
+      };"
+    done
+    echo "    };"
+}
+
+generate_package_list() {
+    local version pkgs nuget_url
+    version="$1"
+    shift
+    pkgs=( "$@" )
+
+    nuget_url="$(curl -f "https://api.nuget.org/v3/index.json" | jq --raw-output '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"')"
+
+    for pkg in "${pkgs[@]}"; do
+        local url hash
+        url="${nuget_url}${pkg,,}/${version,,}/${pkg,,}.${version,,}.nupkg"
+        hash="$(nix-prefetch-url "$url")"
+        if [[ -z "$hash" ]]; then
+            echo "Failed to fetch hash for $url" >&2
+            exit 1
+        fi
+
+        echo "      (fetchNuGet { pname = \"${pkg}\"; version = \"${version}\"; sha256 = \"${hash}\"; })"
+    done
+}
+
+version_older () {
+    cur_version=$1
+    max_version=$2
+    result=$(nix-instantiate -I ../../../../. \
+        --eval -E "(import <nixpkgs> {}).lib.versionOlder \"$cur_version\" \"$max_version\"")
+    if [[ "$result" == "true" ]]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+aspnetcore_packages () {
+    local version=$1
+    # These packages are implicitly references by the build process,
+    # based on the specific project configurations (RIDs, used features, etc.)
+    # They are always referenced with the same version as the SDK used for building.
+    # Since we lock nuget dependencies, when these packages are included in the generated
+    # lock files (deps.nix), every update of SDK required those lock files to be
+    # updated to reflect the new versions of these packages - otherwise, the build
+    # would fail due to missing dependencies.
+    #
+    # Moving them to a separate list stored alongside the SDK package definitions,
+    # and implicitly including them along in buildDotnetModule allows us
+    # to make updating .NET SDK packages a lot easier - we now just update
+    # the versions of these packages in one place, and all packages that
+    # use buildDotnetModule continue building with the new .NET version without changes.
+    #
+    # Keep in mind that there is no canonical list of these implicitly
+    # referenced packages - this list was created based on looking into
+    # the deps.nix files of existing packages, and which dependencies required
+    # updating after a SDK version bump.
+    #
+    # Due to this, make sure to check if new SDK versions introduce any new packages.
+    # This should not happend in minor or bugfix updates, but probably happens
+    # with every new major .NET release.
+    local pkgs=( \
+      "Microsoft.AspNetCore.App.Runtime.linux-arm" \
+      "Microsoft.AspNetCore.App.Runtime.linux-arm64" \
+      "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64" \
+      "Microsoft.AspNetCore.App.Runtime.linux-musl-x64" \
+      "Microsoft.AspNetCore.App.Runtime.linux-x64" \
+      "Microsoft.AspNetCore.App.Runtime.osx-x64" \
+      "Microsoft.AspNetCore.App.Runtime.win-arm64" \
+      "Microsoft.AspNetCore.App.Runtime.win-x64" \
+      "Microsoft.AspNetCore.App.Runtime.win-x86" \
+    )
+
+    # These packages are currently broken on .NET 8
+    if version_older "$version" "8"; then
+        pkgs+=( \
+            "Microsoft.AspNetCore.App.Runtime.win-arm" \
+        )
+    fi
+
+    # Packages that only apply to .NET 6 and up
+    if ! version_older "$version" "6"; then
+        pkgs+=( \
+          "Microsoft.AspNetCore.App.Ref" \
+          "Microsoft.AspNetCore.App.Runtime.linux-musl-arm" \
+          "Microsoft.AspNetCore.App.Runtime.osx-arm64" \
+        )
+    fi
+
+
+    generate_package_list "$version" "${pkgs[@]}"
+}
+
+sdk_packages () {
+    local version=$1
+    # These packages are implicitly references by the build process,
+    # based on the specific project configurations (RIDs, used features, etc.)
+    # They are always referenced with the same version as the SDK used for building.
+    # Since we lock nuget dependencies, when these packages are included in the generated
+    # lock files (deps.nix), every update of SDK required those lock files to be
+    # updated to reflect the new versions of these packages - otherwise, the build
+    # would fail due to missing dependencies.
+    #
+    # Moving them to a separate list stored alongside the SDK package definitions,
+    # and implicitly including them along in buildDotnetModule allows us
+    # to make updating .NET SDK packages a lot easier - we now just update
+    # the versions of these packages in one place, and all packages that
+    # use buildDotnetModule continue building with the new .NET version without changes.
+    #
+    # Keep in mind that there is no canonical list of these implicitly
+    # referenced packages - this list was created based on looking into
+    # the deps.nix files of existing packages, and which dependencies required
+    # updating after a SDK version bump.
+    #
+    # Due to this, make sure to check if new SDK versions introduce any new packages.
+    # This should not happend in minor or bugfix updates, but probably happens
+    # with every new major .NET release.
+    local pkgs=( \
+      "Microsoft.NETCore.App.Host.linux-arm" \
+      "Microsoft.NETCore.App.Host.linux-arm64" \
+      "Microsoft.NETCore.App.Host.linux-musl-arm64" \
+      "Microsoft.NETCore.App.Host.linux-musl-x64" \
+      "Microsoft.NETCore.App.Host.linux-x64" \
+      "Microsoft.NETCore.App.Host.osx-x64" \
+      "Microsoft.NETCore.App.Host.win-arm64" \
+      "Microsoft.NETCore.App.Host.win-x64" \
+      "Microsoft.NETCore.App.Host.win-x86" \
+      "Microsoft.NETCore.App.Runtime.linux-arm" \
+      "Microsoft.NETCore.App.Runtime.linux-arm64" \
+      "Microsoft.NETCore.App.Runtime.linux-musl-arm64" \
+      "Microsoft.NETCore.App.Runtime.linux-musl-x64" \
+      "Microsoft.NETCore.App.Runtime.linux-x64" \
+      "Microsoft.NETCore.App.Runtime.osx-x64" \
+      "Microsoft.NETCore.App.Runtime.win-arm64" \
+      "Microsoft.NETCore.App.Runtime.win-x64" \
+      "Microsoft.NETCore.App.Runtime.win-x86" \
+      "Microsoft.NETCore.DotNetAppHost" \
+      "Microsoft.NETCore.DotNetHost" \
+      "Microsoft.NETCore.DotNetHostPolicy" \
+      "Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.linux-arm64.Microsoft.NETCore.DotNetHost" \
+      "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.linux-arm.Microsoft.NETCore.DotNetHost" \
+      "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost" \
+      "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost" \
+      "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.linux-x64.Microsoft.NETCore.DotNetHost" \
+      "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.osx-x64.Microsoft.NETCore.DotNetHost" \
+      "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.win-arm64.Microsoft.NETCore.DotNetHost" \
+      "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.win-x64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.win-x64.Microsoft.NETCore.DotNetHost" \
+      "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.win-x86.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.win-x86.Microsoft.NETCore.DotNetHost" \
+      "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver" \
+      "Microsoft.NETCore.App.Host.linux-musl-arm" \
+      "Microsoft.NETCore.App.Host.osx-arm64" \
+      "Microsoft.NETCore.App.Runtime.linux-musl-arm" \
+      "Microsoft.NETCore.App.Runtime.osx-arm64" \
+      "Microsoft.NETCore.App.Ref" \
+      "Microsoft.NETCore.App.Runtime.Mono.linux-arm" \
+      "Microsoft.NETCore.App.Runtime.Mono.linux-arm64" \
+      "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64" \
+      "Microsoft.NETCore.App.Runtime.Mono.linux-x64" \
+      "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" \
+      "Microsoft.NETCore.App.Runtime.Mono.osx-x64" \
+      "Microsoft.NETCore.App.Runtime.Mono.win-x64" \
+      "Microsoft.NETCore.App.Runtime.Mono.win-x86" \
+      "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost" \
+      "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver" \
+      "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost" \
+      "runtime.osx-arm64.Microsoft.NETCore.DotNetHost" \
+      "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy" \
+      "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver" \
+      "Microsoft.NETCore.App.Crossgen2.linux-musl-arm" \
+      "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64" \
+      "Microsoft.NETCore.App.Crossgen2.linux-musl-x64" \
+      "Microsoft.NETCore.App.Crossgen2.linux-arm" \
+      "Microsoft.NETCore.App.Crossgen2.linux-arm64" \
+      "Microsoft.NETCore.App.Crossgen2.linux-x64" \
+      "Microsoft.NETCore.App.Crossgen2.osx-x64" \
+      "Microsoft.NETCore.App.Crossgen2.osx-arm64"
+    )
+
+    # These packages were removed on .NET 8
+    if version_older "$version" "8"; then
+        pkgs+=( \
+            "Microsoft.NETCore.App.Host.win-arm" \
+            "Microsoft.NETCore.App.Runtime.win-arm" \
+            "runtime.win-arm.Microsoft.NETCore.DotNetAppHost" \
+            "runtime.win-arm.Microsoft.NETCore.DotNetHost" \
+            "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy" \
+            "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver" \
+            "Microsoft.NETCore.App.Composite" \
+        )
+    fi
+
+    # Packages that only apply to .NET 7 and up
+    if ! version_older "$version" "7"; then
+        pkgs+=( \
+          "runtime.linux-arm64.Microsoft.DotNet.ILCompiler" \
+          "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler" \
+          "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler" \
+          "runtime.linux-x64.Microsoft.DotNet.ILCompiler" \
+          "runtime.osx-x64.Microsoft.DotNet.ILCompiler" \
+          "runtime.win-arm64.Microsoft.DotNet.ILCompiler" \
+          "runtime.win-x64.Microsoft.DotNet.ILCompiler" \
+        )
+    fi
+
+    generate_package_list "$version" "${pkgs[@]}"
+}
+
+main () {
+  pname=$(basename "$0")
+  if [[ ! "$*" =~ ^.*[0-9]{1,}\.[0-9]{1,}.*$ ]]; then
+    echo "Usage: $pname [sem-versions]
+Get updated dotnet src (platform - url & sha512) expressions for specified versions
+
+Examples:
+  $pname 6.0.14 7.0.201    - specific x.y.z versions
+  $pname 6.0 7.0           - latest x.y versions
+" >&2
+    exit 1
+  fi
+
+  for sem_version in "$@"; do
+    echo "Generating ./versions/${sem_version}.nix"
+    patch_specified=false
+    # Check if a patch was specified as an argument.
+    # If so, generate file for the specific version.
+    # If only x.y version was provided, get the latest patch
+    # version of the given x.y version.
+    if [[ "$sem_version" =~ ^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$ ]]; then
+        patch_specified=true
+    elif [[ ! "$sem_version" =~ ^[0-9]{1,}\.[0-9]{1,}$ ]]; then
+        continue
+    fi
+
+    # Make sure the x.y version is properly passed to .NET release metadata url.
+    # Then get the json file and parse it to find the latest patch release.
+    major_minor=$(sed 's/^\([0-9]*\.[0-9]*\).*$/\1/' <<< "$sem_version")
+    content=$(curl -sL https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/"$major_minor"/releases.json)
+    major_minor_patch=$([ "$patch_specified" == true ] && echo "$sem_version" || jq -r '."latest-release"' <<< "$content")
+    major_minor_underscore=${major_minor/./_}
+
+    release_content=$(release "$content" "$major_minor_patch")
+    aspnetcore_version=$(jq -r '."aspnetcore-runtime".version' <<< "$release_content")
+    runtime_version=$(jq -r '.runtime.version' <<< "$release_content")
+    sdk_version=$(jq -r '.sdk.version' <<< "$release_content")
+
+    # If patch was not specified, check if the package is already the latest version
+    # If it is, exit early
+    if [ "$patch_specified" == false ] && [ -f "./versions/${sem_version}.nix" ]; then
+        current_version=$(nix-instantiate --eval -E "(import ./versions/${sem_version}.nix { \
+            buildAspNetCore = { ... }: {}; \
+            buildNetRuntime = { ... }: {}; \
+            buildNetSdk = { version, ... }: version; \
+            }).sdk_${major_minor_underscore}" | jq -r)
+
+        if [[ "$current_version" == "$sdk_version" ]]; then
+            echo "Nothing to update."
+            exit
+        fi
+    fi
+
+    aspnetcore_files="$(release_files "$release_content" "aspnetcore-runtime")"
+    runtime_files="$(release_files "$release_content" "runtime")"
+    sdk_files="$(release_files "$release_content" "sdk")"
+
+    channel_version=$(jq -r '."channel-version"' <<< "$content")
+    support_phase=$(jq -r '."support-phase"' <<< "$content")
+
+    result=$(mktemp)
+    trap "rm -f $result" TERM INT EXIT
+
+    echo "{ buildAspNetCore, buildNetRuntime, buildNetSdk }:
+
+# v$channel_version ($support_phase)
+{
+  aspnetcore_$major_minor_underscore = buildAspNetCore {
+    version = \"${aspnetcore_version}\";
+    $(platform_sources "$aspnetcore_files")
+  };
+
+  runtime_$major_minor_underscore = buildNetRuntime {
+    version = \"${runtime_version}\";
+    $(platform_sources "$runtime_files")
+  };
+
+  sdk_$major_minor_underscore = buildNetSdk {
+    version = \"${sdk_version}\";
+    $(platform_sources "$sdk_files")
+    packages = { fetchNuGet }: [
+$(aspnetcore_packages "${aspnetcore_version}")
+$(sdk_packages "${runtime_version}")
+    ];
+  };
+}" > "${result}"
+
+    cp "${result}" "./versions/${sem_version}.nix"
+    echo "Generated ./versions/${sem_version}.nix"
+  done
+}
+
+main "$@"
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix b/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix
new file mode 100644
index 000000000000..91340bbf0d18
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix
@@ -0,0 +1,179 @@
+{ buildAspNetCore, buildNetRuntime, buildNetSdk }:
+
+# v6.0 (active)
+{
+  aspnetcore_6_0 = buildAspNetCore {
+    version = "6.0.26";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/b63daa46-51f4-480e-ad03-ef2c5a6a2885/ae059763456991305109bf98b3a67640/aspnetcore-runtime-6.0.26-linux-x64.tar.gz";
+        sha512  = "51a0091ffa5abb2a6f2f968f76848e475310fbb33126238bc1358ee86e24bfd3f046d32af2f39dc7a30b14becdd637d1314ca4f4b771fe5fa0954474a605e4fd";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/cfc40e77-a6de-481f-812d-6867289e2d8b/eeedeebccc412fd01110d8b59050754d/aspnetcore-runtime-6.0.26-linux-arm64.tar.gz";
+        sha512  = "48330ea4d98fc565c9553ea119f56e3e485ca30a0986f43e78335e263d9cc82d17b7ced8115480d1adb33298cbc5cb2b0759bc89d516659c4c59eab9520a2254";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/19e27b0b-cd99-4b84-bc7a-05eda52bd77f/a85cbbb13b629b75b2026bb8c6238e6e/aspnetcore-runtime-6.0.26-osx-x64.tar.gz";
+        sha512  = "9ffb209f2f07392935b9627e22b44260803cc5e21ab8d09152d5499ebae51d6f488992664bc44a23334332a1183c444b47cada319cf4d461dd95a6b78f1cd825";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/e5181497-c33a-4341-a5a6-57eb21f39d33/85b574ef2b884f084b604d1869d72c02/aspnetcore-runtime-6.0.26-osx-arm64.tar.gz";
+        sha512  = "641cb5542c5d4b0103a2ac0154e2a99d755a4987fcdad854cda1fc75bdde08432eab73db69c444628e7d68496ed6e36fa52eda5033e118ed4b5140b8d5c47d96";
+      };
+    };
+  };
+
+  runtime_6_0 = buildNetRuntime {
+    version = "6.0.26";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/1873e7f3-aa12-4189-8d6d-db0fb859211e/b36e8f8a6ceb63bc3cfac875c7bb63d0/dotnet-runtime-6.0.26-linux-x64.tar.gz";
+        sha512  = "7336f71f7f99ffc3a44c7d730c6a1e08c5c0b6e05d2076a1963776f174f8588d31c9b783d1c4f645f7e7cc6a54077b798c6bde35ed4a812ffd9b2427d29b0b34";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/226d8ab0-8daf-47b1-80cb-a9b68badb28b/a4425bebee91775ce41a50aca80e09c1/dotnet-runtime-6.0.26-linux-arm64.tar.gz";
+        sha512  = "775d96bb3dfa6f5e7f81829e7eedf0744aeb75d5e1a613622debd1f285f9eda694ae79effe531558dd8367dc4fad5d682039aa24fb2bbb39fb561c67aeeb4a18";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/51703c07-2cf0-415f-abbd-5d4bf2ffd56a/fc952db2ecb119fa2d58828d1046f974/dotnet-runtime-6.0.26-osx-x64.tar.gz";
+        sha512  = "e2d51f955c841299fe6dabe1abce15ab2ffb2b9c624f5c2ad12685a14451fa62ed9452ae7d7d579f1beca784e4d4e3b532cf686e58490d44bbd0e022ddabd667";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/d76c6416-5a6d-42c0-99b0-a4bb0021426b/84ef0457a893dbf0d565a532fa9dd805/dotnet-runtime-6.0.26-osx-arm64.tar.gz";
+        sha512  = "fba964511efd71b87aad92ac8a31d7a86cde605fc0eb9d57ea270067b22cd540a67451d8ff3a079fcec8fffcdcfcbd74cfcc89123c2b11096dca78cbfc891be3";
+      };
+    };
+  };
+
+  sdk_6_0 = buildNetSdk {
+    version = "6.0.418";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/01292c7c-a1ec-4957-90fc-3f6a2a1e5edc/025e84c4d9bd4aeb003d4f07b42e9159/dotnet-sdk-6.0.418-linux-x64.tar.gz";
+        sha512  = "24d705157ae51ed5ec5ff267c76474d2ff71b0e56693f700de456321f15212a7791291b95770522a976434f5220e5c03b042f41755a0b6e9854abf73cd51e299";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/487a62cc-de86-4648-bcf4-18a02b0f4ccc/669d92e679215646badef80782d32bff/dotnet-sdk-6.0.418-linux-arm64.tar.gz";
+        sha512  = "2848db109c65dc284320f680c13b498789f944f3474788548c0bf15d333020cf9b8286348bacda9af56e1dea6b56590ff24669de7ed5eaa31906f4710cabc6e1";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/0cce8cdf-fcdf-453e-9346-96abbe76ba6e/79047571e41085ddbef25c25540b40a8/dotnet-sdk-6.0.418-osx-x64.tar.gz";
+        sha512  = "62eb6c792e90750510395a4e5796bd72b0b6806633b220ead6f54505edbabcc9216c52a4346247b20fe2c6b5b31de23432afd2687a0a6aa38727c4cad2c96e93";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/20977215-ff63-458a-ba19-43e93456b76e/bd58619144624cc66ac451d9c3bd5f5a/dotnet-sdk-6.0.418-osx-arm64.tar.gz";
+        sha512  = "4328aa334e5ddc2dc53c2602e5cd7718e7bc7750a3a44993ee1e6b052251d570882592f24a89821bd261c42d235e3f0213f060d36c7365bd6d2d5eca60231524";
+      };
+    };
+    packages = { fetchNuGet }: [
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "6.0.26"; sha256 = "1dghq8zl0ad9wspixf6pg1ryqx5g5b2d6vavz00arkr29hbb6pr1"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "6.0.26"; sha256 = "1za8lc52m4z54d68wd64c2nhzy05g3gx171k5cdlx73fbymiys9z"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "6.0.26"; sha256 = "0yni79dvg87lx4ysy9l61hz120w43g8g2bl0l5d3l3c835vk4fsk"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "6.0.26"; sha256 = "1sb4jy90xwjpysham5a09960zll1p9q696dajcz3hayfd3d72nc6"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.26"; sha256 = "1zpbmz6z8758gwywzg0bac8kx9x39sxxc9j4a4r2jl74l9ssw4vm"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.26"; sha256 = "02src68hd3213sd1a2ms1my7i92knfmdxclvv90il9cky2zsq8kw"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "6.0.26"; sha256 = "1b2p4a0vngdq77kqdv3fprqg0r9nzsn1idnxkqclvpbkal8ackhc"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "6.0.26"; sha256 = "1gxlmfdkfzmhw9pac5jiv674nn6i1zymcp2hj81irjwhhjk01mf5"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "6.0.26"; sha256 = "1kmx5kmsb0xqhjpig9zmwp1zcyxlx7q42npcywfjvj8rhn3k8f6z"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm"; version = "6.0.26"; sha256 = "0amqvl3jimfr3hpsm43pc30rfijsi5j08q07whyv136s3wj2fp9m"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "6.0.26"; sha256 = "1d8nkz24vsm0iy2xm8y5ak2q1w1p99dxyz0y26acs6sfk2na0vm6"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "6.0.26"; sha256 = "0gb5b57pq3kfgk5kzwzf6124l0rfa197945ynpr3h8jcamab2bc9"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "6.0.26"; sha256 = "1i8ydlwjzk7j0mzvn0rpljxfp1h50zwaqalnyvfxai1fwgigzgw5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "6.0.26"; sha256 = "00zknjp1bscjfprzjipjmwvq4i0i95mxvd5r61c077pfwkr2rrap"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "6.0.26"; sha256 = "19y6c6v20bgf7x7rrh4rx9y7s5fy8vp5m4j9b6gi1wp4rpb5mza4"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "6.0.26"; sha256 = "0jlxi1y51rpsppz02gybqcsja746ns7mjfrg7f6y8x5xqvp4p84i"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "6.0.26"; sha256 = "0sgcg406w9a9s0ipvp1csrb80ddmakifzy8ngsqkxl2phvkxrak3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.26"; sha256 = "0p7hhidaa3mnyiwnsijwy8578v843x8hh99255s69qwwyld6falv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.26"; sha256 = "1chac9b4424ihrrnlzvc7qz6j4ymfjyv4kzyazzzw19yhymdkh2s"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "6.0.26"; sha256 = "1k78541brbw29n6nblls4msj604jznj4s74973c899svv2qw5ayf"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.26"; sha256 = "0i7g9fsqjnbh9rc6807m57r2idg5pkcw6xjfwhnxkcpgqm96258v"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "6.0.26"; sha256 = "0p7ar2xl9p8qzxvkrx59vry09dyjgy6hky1a8x8alvi5aay725r7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "6.0.26"; sha256 = "0w797ab42nncr17f5imgwi47bw8im851v4l52jlkpfcr7sak6f7q"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "6.0.26"; sha256 = "164hfrwqz5dxcbb441lridk4mzcqmarb0b7ckgvqhsvpawyjw88v"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "6.0.26"; sha256 = "02nymbmv9wvbx1jsxp1iz3009finzabg9p3ibrsqmrg9cxfs1y5c"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "6.0.26"; sha256 = "0l30qp4gwcazh8rmw4i4j0k996jnlpkr5nzf0r14zm4j0h1zq6i3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.26"; sha256 = "0islayddpnflviqpbq4djc4f3v9nhsa2y76k5x6il3csq5vdw2hq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.26"; sha256 = "00f9l9dkdz0zv5csaw8fkm6s8ckrj5n9k3ygz12daa22l3bcn6ii"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "6.0.26"; sha256 = "0cls6ac8795iwmiqnbwfsg28gw9ac1smdp2fnvqfcjng7fnpq3ny"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.26"; sha256 = "0i2p356phfc5y6qnr3vyrzjfi1mrbwfb6g85k4q37bbyxjfp7zl9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "6.0.26"; sha256 = "0qqlnm9p060ff0fs3gl9lkx908zmpbsdnj2inf7h3gxxncf8d7ba"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "19dlfl7z5lxh9kdi6h9a00npmhcbn6j8hpf7lmmx8lqzxx43v92n"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "1nzdrswailhr8q2lqcnx5x73fnlacrh91q2zhwsiwkzhnj2g10ad"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "1x9sizw7m2ibff4x0iwwfhwacqmm07h7calp65xyzjbsbd3pvwwl"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1inp20x12nmxydrklcflm2gjq9hhg4w2ak37ssdqs4lp0ljrclyl"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "07w9n5wxj3rb2i50dlq4wx5fpkchlg1zm3mwkq49aw1xspplhmb3"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "0bp1951qsb67a9qkfl144ijbpf7wrayj2zfnsyrlnacyfjr15nh0"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "0pcn8gsw9cyhbry1wlxqh6khmkvji7w01z8mv9m6pxl1f58nnk5g"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "17znyv8ql0iigk3ipnf79jzqfhjb1gr7zmci7plr5gdsm4xwqvhj"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "1mbabip288dypj2vqifs3gc5pxn77m58dsawmhaf1rp046fv66zw"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "1x93q16gfl7j4445vyjp9md4ypfrp1q2562kcxfga7zgfw8jrig2"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "1j2a8svxyphsfry7dj9w2a0dnbpxsm8jp4h0752zs8vwr7566dbd"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1ia3aysigp73c5iyrk901wygaw5ivlca6pgpq8cv8haf5a0hb8p4"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "0akginmvpjm6pd3854j9p5hcb7iq1qgsmy02w7ih3fsrpc6k1xvj"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "1r7zwd9livxs9gf1a3xnx2rjf0azgp8xxha46axigfip62zqib8z"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "093rjmlk3q74q5bzzxrs5587ymfhikzhfhymii7b86nvnbzm62fp"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1wjkz1icqlv0f2nkr9mpdiqp8aiqbbgbpb4j1zdms0rqwf3y3ngd"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "0ay8i7vbf0dbfwh3riggm8y0dwn1wxkw98c6isdk2yp30pc6y1gf"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "049gk7f50n1mni8a31dmrih6pxn0dl9iyfb7malhj4x2va54676m"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "0q0xzszp5jxqcdr5n8p0glq79zrlcqkj05zmd31admqxl9hlv4qd"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "0qkivqmgli8id2c6da9nckggs4dl0sg3rafhmgs7g9s1izlwjkgz"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "1ladvxwyh7yp32k27lzw2zyl0wsn74lylpxb0bvcq8fspsq8kqbp"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "0yb06wsqjljnrni0y0dfrfxk8r80w9zzicdj18dx5l85n0apk2zp"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "18l9bpiv03xsawkvy0kzwcmqrfil0m42n5zb2c4na3hdalw6k230"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "17nr1hpb5lkv8f72y0jljn9sb6zgi80z63s0r6pci77dknbqw0m7"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "1vak4v0q9p99yrm24ld3jw3hpy2myk1sr7fm47cb84q4hh6ppdad"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "1693h15h9na4n2bgmrcrcr0rsqfc8dr7s4wwirnn2fki1gk33vxj"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "0s2694rz7ykzg1x1yn8y3vdj6nipmh1h136p8584m4hqyyszg7h5"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "06i6pavanzbl9maclzsvkq482knjsz2s0sk5b36a8wr08lvy83ih"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "0qm079rbljawwj8lm83kd8dfn3rhasn981gyfkrapk92y2ndjjj5"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "1a886rw2xb053cybh9vfjwyg4a0w9d3141dsd08jxqrmbbsirb1d"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "0i9k3fcl54rnqk3gxi6dm17cmxwygclgjhjvqrjc6cshwsxm8g6c"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "06kdqs9x2mwsiv74n5dpilmvy00qzjaxljcsvqdlgmdi2z1jpshl"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "10543k5zyg60icanbn1y7dnxlpf4mcg1nlfx78lf9i9x61q542cw"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "0cfn3r2781rjmmjmk8xxrd8jn88941lkmb8j2g52jp1425w0q0qg"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "0yilpqh378zpy3likp9nkp84jrcnxnhg8gygr8qs3c6xfapy9c65"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1vxvlf6dwjjfcjahljcv7yfyxlcj1vnf66wbzp7k6bk27lndwc4j"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "1d9q0xcbj50fpbls0hvkk6n7aabg42a3kwszwnknfdabwzgmiyqh"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "077lvw62nbs1xhn4xysml1vyzbqpq3h5x3x28cppjamcnaf00k56"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "1fsz9x2qjavmvl3g7phxqj5cxm0z212dw5cz82f9njyi9m4q5bh9"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1bxs8cnqny1rdh3q0glr1f2a669697rlr2zmcimhy84y1y46x3s3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "6.0.26"; sha256 = "02mdbziad0k3b6za8bp2n7qcqjigyawxkxzphlbqag5gcn7qacsz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "6.0.26"; sha256 = "1mq11xsv9g1vsasp6k80y7xlvwi9hrpk5dgm773fvy8538s01gfv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "6.0.26"; sha256 = "1731r332y4jxm7f64i1qg4dwb8fbq4q6p85azrrbvbrh08551rgq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "6.0.26"; sha256 = "1acn5zw1pxzmcg3c0pbf9hal36fbdh9mvbsiwra7simrk7hzqpdc"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "6.0.26"; sha256 = "12gb52dhg5h9hgnyqh1zgj2w46paxv2pfh33pphl9ajhrdr7hlsb"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "6.0.26"; sha256 = "1fj70xx2hp4nly340pcvnxxaari7mixqwmwqrp3fkjnzv0s523f7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "6.0.26"; sha256 = "05hzps86qkx0jl8zn89732vw9a2wdxsszhzp6ld665hsjfs7xwr7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "6.0.26"; sha256 = "0s9b3ca10wapa0xhqk6yk2hh1rqi38l766fk62yp4d4rvj2sa0qq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "6.0.26"; sha256 = "1f8axm5dz0bgm6hsdv2li2iw4y70ki9ac0xvk7q3cqmvrq0100c6"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "6.0.26"; sha256 = "04iivbqh899d0ddnnicxzckiiv12iy8cfavmkv9w9zh8bw01isy1"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "6.0.26"; sha256 = "1sxj6sv0p3cbn030j9ivgww5pk4ffrh4wg3n1g50rxd3dvfml87v"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "6.0.26"; sha256 = "09iynj920zr5c4jlrpim9qajyabxapmkzllvhhx47d88bngqqddx"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "6.0.26"; sha256 = "1nnbr5v0asl7lrz484572wzhsrzdd0lq31dnxx05c3c1lplxzpgh"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "1vqx13dbw932jx24h7qh49bmh755f28xlwiz6lpzvgz06fr1qb5x"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "0qmbs7509p83l3gfdnckw5hpxkr50awvh3112r469f3zmn2s0wvb"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "0yyxmbdqdzxw3fd36ngpy9j2c7qlmzjxrhqi4lyfz3icnzzb9cpi"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1p3xq75bhv8nsrym88yij3wlwawvxca4lcfi8hn72qf1gqrsrfby"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "1aznr59g2npja74qa7argkqlyca2sgzn55hy41pd5l5fv275bac3"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "0xbkd0g7qd9jssbnknwqpmvbp4mnkj85bhh0pf489j5nr3cmbhjc"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "1riw5l45wm4f51rfsxhs4r7k06q487zvxssfwc5xg8z0wzhf82gv"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "0207y7jgizr16hq7ml04s2xl8rrp5q87631wcj6sg53bm47nzls3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "6.0.26"; sha256 = "1cs3hij0lidd6wszbwp2kx46mqx5zyvin97sqy8dr1ywl1fb0zw4"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "6.0.26"; sha256 = "1brvsvbi55ph9gbx6i4vf2bpvaqk820vjik5x2zvz5kjc5wy9nxj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "6.0.26"; sha256 = "12m6619yqjs81xna3mw7xxwnddxxhffcihxqa5dhz04dca9grmvi"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "6.0.26"; sha256 = "0hv0zv2qw78z285bzckcznr2kqmfpl7ghxv1cb1d90lvhfyhhpz0"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "6.0.26"; sha256 = "0prdggyp2cqdkxkm4rrk3rgvrj73s89rgkfznqsbd79j9sms5zmr"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "6.0.26"; sha256 = "1vwji98xhrmxcqr43f1ijq8bd94dq9cfp3h7g09rc5h327n92i6z"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "6.0.26"; sha256 = "0g81sv3jnmwmggsfqniv89fvwk4592bmy09m9fqggv88rfzfcl36"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "6.0.26"; sha256 = "05lhb550f385lprzxdnsama7rac7bfml5p40r7rx3mqg3bs8waxv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm"; version = "6.0.26"; sha256 = "19s0q3j5w31dnd9j4vnlxyak8cr8bgpwqy0i393ixa9148nfmk23"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm"; version = "6.0.26"; sha256 = "12whmsh15mb6ny0vazymsxpdp9aa6rjja4nifamm2ss8gzvcbqik"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.26"; sha256 = "0jw2zm5a590mai2wggbhz2h62596076c6p4ndb8z84mkjrm9aal2"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.26"; sha256 = "0wwwp4bsqdkkikwzfchb3d61i9dlpi80y7nlm8l6lyfxpjirszsp"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.26"; sha256 = "1cgmlkg5fnxf5al68m3218zdj5i186ijfly0w2c81fq2yyci6fb7"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.26"; sha256 = "1sqqf6i98y1i7k0dfw51glvin8apf4nknqcjhq3sf1pxsa6c77m5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Composite"; version = "6.0.26"; sha256 = "0qzca5yxxzjgzkvvp8ysvgbwmda5mw085zrk1ikm2094mswz4mvl"; })
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix b/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix
new file mode 100644
index 000000000000..0f64389b261e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix
@@ -0,0 +1,186 @@
+{ buildAspNetCore, buildNetRuntime, buildNetSdk }:
+
+# v7.0 (maintenance)
+{
+  aspnetcore_7_0 = buildAspNetCore {
+    version = "7.0.15";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/30cb8b2d-ee36-421b-90d0-6650bf5180ad/9e2dff64d0134c46b74eafcad1bb658d/aspnetcore-runtime-7.0.15-linux-x64.tar.gz";
+        sha512  = "8aae979c0e9c90e781b8747aba5d7e09c9a81845b936c9185dc16d519db3a4ad9e219da4bffe13476baa81c7ff3e1637e8ef031be1f9f305f7d1681568ae3aed";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/fed5ac78-3c8f-4eb9-bc13-2df4e97d01e1/3125fd43ab4eaf0e3304839295bf4bfd/aspnetcore-runtime-7.0.15-linux-arm64.tar.gz";
+        sha512  = "4139d28b0c67497854794d34ec3eb3d7f4a49f34be4ed43cb634be88e7315af81090dd851fe2cdd429bf0050345f14000d2f939c020aeb809a1696483afdebe6";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/1d44c976-5d7e-441c-aaf2-1b43b95131cc/b9f0c5a91fceb7fd47c76a7097c75c78/aspnetcore-runtime-7.0.15-osx-x64.tar.gz";
+        sha512  = "75d01e3e123abbb5851c709a13d186a11db425bf18c82f615b445c2ff6629264a4d41e8011d43a225816ac807c7c8793cb35bbaf506455a3169a741d637230d0";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/478d989b-d381-448d-be80-f81c5ec93014/9a7b49e5a2c0720e290d19a9447984cc/aspnetcore-runtime-7.0.15-osx-arm64.tar.gz";
+        sha512  = "7d090dfbc862d6329fefcb93ec74c5b82100fa1949ec92602b69871b48f467654fa6c18ec0553d1edd8908a87cc3682e809270c5fcfb3c93111be8adae86dd6a";
+      };
+    };
+  };
+
+  runtime_7_0 = buildNetRuntime {
+    version = "7.0.15";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/921a24a1-0a7c-4100-b72e-f948ff3b4614/1cf0fe858e6d42bf1ef88d775fd8d865/dotnet-runtime-7.0.15-linux-x64.tar.gz";
+        sha512  = "3cec6eabe448ccf5105c2203928a6fe00e343f1f0d97c79614d41c198548a20659113b9507da95b63dedbd3caa6a66bf5f3750f4443744186e35e47de5c30555";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/854685e1-521f-4784-8a6a-b49307a3a4a7/6079b3613f0a297df59ab563e31074bc/dotnet-runtime-7.0.15-linux-arm64.tar.gz";
+        sha512  = "e5b71578142f81809dd3e2bd5a9d673459c3f311ee095429b8e59929bd3ea17169c880113b7c86b8940c2db4bb1138f4770883456102da6b4b42ab7f0da8f8ed";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/f10c8029-961d-4c91-922e-d81eceda9434/004a62489c01ae2a41ac7ec1aba2eec7/dotnet-runtime-7.0.15-osx-x64.tar.gz";
+        sha512  = "bab7013467ae933e18f0c963319f19a54816fb3b2bda35316d45affb683c4e74cc1f6f7cd289c3ca475a2a0eebbd2809831f5ef908039c200407341f2bebb5eb";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/44fec9e2-bcd6-460f-b1a9-0e8dfddc98fa/06bcccde9a49279d460d2862f54af404/dotnet-runtime-7.0.15-osx-arm64.tar.gz";
+        sha512  = "0910ae01475c5df70b846aa80b30fb85cd91349b43c682e25692d470cadd877d7965b7ecf06ce93a71f92a4a32c534a876e6733dbf45684628476a1c6bb6d112";
+      };
+    };
+  };
+
+  sdk_7_0 = buildNetSdk {
+    version = "7.0.405";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/5202b091-2406-445c-b40a-68a5b97c882b/b509f2a7a0eb61aea145b990b40b6d5b/dotnet-sdk-7.0.405-linux-x64.tar.gz";
+        sha512  = "6cdf82af56f920c87315209f5b5166126e97b13b6d715b6507ddbc9a2eb618f812e43686b79de810ae6a21e0fb5a8e04d68a004f00a07533c8b664f9c889b5b0";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/bdfe4e91-3a24-421f-881a-47b6d91404cb/cfe786933a6a7fd358b799af23542827/dotnet-sdk-7.0.405-linux-arm64.tar.gz";
+        sha512  = "35c3b0036324f0d5a1711859f318863a2f24dd43d61518b38acffe9e278ee203007bf620d783ac706a615175b9c15d348cb9386c800aac219fb23537c03b919b";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/77e1c2df-aaa1-44aa-abc5-ffca44b1dfc9/1fea5228f09398a885ca956d1b537f02/dotnet-sdk-7.0.405-osx-x64.tar.gz";
+        sha512  = "8525c009fad7fd0873ad72654a88f90d86b13ac58b17846fcf3d7cb696bc0d3c2c45bfb8d85e17a99f42421c5d6081aa4973d81211e42265efdc58443d075f5c";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/5bb0e0e4-2a8d-4aba-88ad-232e1f65c281/ee6d35f762d81965b4cf336edde1b318/dotnet-sdk-7.0.405-osx-arm64.tar.gz";
+        sha512  = "0ad6700475827ffc8f3dd16609f64368b736dc8b6dc07213738480c237a0d8896323959e05acb7f9510d1027746cfecaf4458f620faa757ee4f0779ecca24201";
+      };
+    };
+    packages = { fetchNuGet }: [
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "7.0.15"; sha256 = "092zx30wi1gsqqxdz9sxw901vzr4vr912qgfy27v2h9c66xwkawc"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "7.0.15"; sha256 = "1mzzijri3ysscnpdpf130i3if4c524hxkqbrgspk2xjnb4qgzgl9"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "7.0.15"; sha256 = "1qjsnv6cj1i55dj67nii4wsnw2yf2vk89r9nrfh385dd5azfr7cn"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "7.0.15"; sha256 = "17jww47v2yzj828wcvwwizbizfn5ygygfab8nzckr6cmfy24wqrh"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "7.0.15"; sha256 = "04qcxbqsabk89q4rk2wcrsry41ykhw0nm27garfhc67j1fy4xz6g"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "7.0.15"; sha256 = "04fa3r282nlxfhfgvkml9f1pmls94kcaxqq1kb7qjp1hliss9ld1"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "7.0.15"; sha256 = "10qm75z6ril2rhzyysb24bniw9hzb3m8ipxq7pyw0pw80ppknx17"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "7.0.15"; sha256 = "0j6g9bal618di3arb9sjci2pnx1g33jxv73c3k6pggs6p46kkbfx"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "7.0.15"; sha256 = "19hjclrwwsv7810qhz6p3sac5535qz80y3rknx4r079082zyqmnp"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm"; version = "7.0.15"; sha256 = "0mfipgk0szhc4p3pysya5gf02vlccz1s2k49swywj4qkarkxc4h3"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "7.0.15"; sha256 = "1wxp1w2wyx81glnngpzyhl6x3px9mg5glljnvxpd0rj7f2a2jv2r"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "7.0.15"; sha256 = "148fxdy6j0iq65g102dhq3wcplpldlflnfzb485qb557pyfs174k"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "7.0.15"; sha256 = "0jklf1dlbvymh18ijq20wnd6v2k3mjafr5k9yya84xl1srad22ww"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "7.0.15"; sha256 = "0mlvc3c0sb0qx33fxamnp1a00y28zz2g519mrhsr9qv6na4hihh7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "7.0.15"; sha256 = "1mys96zqvf2i8nv1j36797p3ha0z2c9xh7zjd5ixd614kgwix0ns"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "7.0.15"; sha256 = "08hvr3dwz0b78v3n7zn7q6qfa1yhy43m6z5rcbs4fd80gzkj45cq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "7.0.15"; sha256 = "0nwl2jivi0dfbkqkmfi5y4zzmvqc2z9sa7bl8mwxx4n3vyyias46"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "7.0.15"; sha256 = "1rrijrvaan4q9qkj0lfd0x9kqana49aiflkn2p2z8w1c0z781g5r"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "7.0.15"; sha256 = "1nfah8by8mlzkwpglnf3x9r84gg3dskhhh502z01i60r1khrqli9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "7.0.15"; sha256 = "1gnzl52h65dczh6722w6hkwx8kp32zkqmhnvyd1xksspfi8ldzyh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "7.0.15"; sha256 = "1zn9w3avcl5ssj502dby07f37y0gdcird02v7qqnsxmsd426m8ha"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "7.0.15"; sha256 = "0lxzl2cjcz7kbbcy7m2gwyxisl2v4nw8z84pdlccklx3g7mdjr4n"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "7.0.15"; sha256 = "0jf860xprgw4ly4iqs6mf4593h0gjwd7z1cvqgmljdviw1zaxpcy"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "7.0.15"; sha256 = "16yak4qmv50yny9amanwsyi29v1c8331w3svz1fhvj02qxh7022z"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "7.0.15"; sha256 = "0glwfimi5pzsz9j8ss39xmwwzd42bnagysxdmbwlk6cj8fdxkr46"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "7.0.15"; sha256 = "09c4ax99m8zibpv30id2jd90j6ixi2dam3c527p4047klnwgpjzh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "7.0.15"; sha256 = "0s7idg74b5qbrp6nr1v36s0rfrnz1rbqxikdvbf6whlvfqzjwy8d"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "7.0.15"; sha256 = "0r86ab0iihb2qwh6n6ffmmzwsrgva0v2nvvv5gh9vyq00xfjw0wh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "7.0.15"; sha256 = "0vamqkhjamhfgd2a0rlfjjxlj3jfwqxw937599jr4bkx033galn8"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "7.0.15"; sha256 = "1vmhysinify9yn3ad8894203y3p279471z2pna52fhdiay89si8r"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "7.0.15"; sha256 = "1ir30gp1kv1arhhs435cjkl88yjz1az4wq5ylidrc4r5ny7p91yd"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "12hyxbzpn28a54x2370zvdd7kd14g06dzk6hlj7rwshla35m47a3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "1hqbnvi10lyr5id92cf7q4k83rvk7qx2hprhanrdf5psvyqjqkk7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1dy7khybv18q8a7aarlnwps16j32frf0hhvzszx4vx4gpm2y10i0"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "1pd0429sm69jj6kd3a8cs0r6v6n6w849y8y3zlpdf8gzsrkdwbw0"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "1aiizg0za2bahs1myl3fqjy7zpb4knnninylvcdcw71hl4lwnisi"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0ij656h7nxk2wlr2g05nxiridjncx6mm3limahhjy6pp89v1853v"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1djd5dj07bwr4rm95vpabaf6piqsdsz30bjimalyz9cams01air4"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "05hqnh1ix7bixldcsp7a5j5fvyc19lfmfqyhvzwz507xl784704i"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "1729n6l2yv6zxp71z8gakxnwcn0p6gfw29djpppkhyby0a5bqnfd"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "027kppzv27ja2fvlxcx22s1vg8kk94rn0lm3b6hji9vhld05170z"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "0dvh2shaw4dkq4ly2xgdw1agjzkzlifnal7s0fbhcsn2da59dqpg"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "1zs1in0v5l0g59rjkhs3iikr9i0zdsnikf7dqr127dy181i558rj"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "0dxh835m4v8hsv3jdw5j7rxk5ap5p8jsqbl86slc72x2jhfm93g9"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "1h15sx8afa17c5jswmdr73kmw0anvvsgi48hzcc20hwn5fyj5cai"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "0b6xrsdfvadnf0a6dgnwy80yggik4a8fvg41ladxfzdl3dzbam1y"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "0xm0yd20p2f9crnj927ikh350n30y3qi0zlwqniv4q53jcs2nlgh"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "12yq0ldk4snn6av6qk19vpsga20r6c71i2k7lhjq2v1cz29q92in"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0lwi12sy2ygbzj33r50myfjgpz06rccxpzhaa1mdv6qxr7c1izhs"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1454qcs72846p1hlvmhcvbdgacykr94bgcghimpj97xsgm2h743f"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "0p0a1hgcrbasi58x43zi68q71fd200zvr1g5h4gr1ank0czgqb50"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "03hxh8vc97h5ci8yzapamncgs4pw991w4a58vyd9a657ira8949m"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "07klrbvw87q0fpx965r17d17wa7irw394nnnn8bcypwdibc0ib21"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1qz2gqjxi9h31lvvx9flzwrc9aikw1mrkd50rrc0i66hl0bv9wrz"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "13bysjg14n6gykcd3a316ik73f7nfb2h0bbxil78dfcsfabzkk9k"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "0icj4qwmhdpp09qypbccpyw64dcjg3ykb76iaz8a1lwys2gqq9cc"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0xzbl5939ap2s2jzncp8wchvwj5c56fbg67fr6422bbgh0i85fiq"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "07kyjc3957zg8lg73xaxhvx25i1a3mb7zwvvp2icl93fl47pybam"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "1adm4skcxhw3agpxgrg8wldzbzm77kn0nl3n1l1flq0ysf4j7x22"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "03cdg58mhsqvm85jdsks29jv8v5bx8mym9ly9pn6i65v6q211brg"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "1gb0d9dylq250ayydbcraa25fjyzlgx9ich4yh81cf6dw7zxk3cg"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "14vbbqwixyz95skqg5lw9z634d5lw4660zzba036mlg8csq3m9b1"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "16g06phagwnnry3fwh6b3c3iwhxmhw5ppnqynj4gcl2ir7bsdrb8"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "178j0p4c5mxkaza5p2r3fxy613mzhs93a1jvkm8v9rq5qv8pwld3"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0l37908yz40pmqa2k8ssmj3ypgfa0cqmg9sg6c5b7liczdjnqyyr"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "053ymy8khfq07p0r1kk35z1aykq68inck40j9l2lc4rixk2k9jhg"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "10cnsrxk97f3wxhjax8plbaj2vhcznz9mdybpj2az45rb2abh5vf"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "1nm7n49jkkvp8j0qfq1dvn48vq9d872chaaly14awql6ypfym5pb"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "1509qr4cb469hb4dgnmsgm21dyxzwhhyq2iag2z1cxbk44mjz2ma"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1738bri3bs89hig3149kb9m6ia8dc1vp5ivkiz265qkw6gvhncb9"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "0gq17d6jczj52lgc5c8i5k5gj9g37zp5gcsnvqdc5vaidq1g2ggr"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "7.0.15"; sha256 = "099yrwc5f9lx0bczfq8dhq8v0l3hg0pspv3wr6yl2pqz2ziyk9ap"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "7.0.15"; sha256 = "1lljcbkzs1l25ndwzcyhwdh4q4rildwz7vza921r0kcg8zdb7izz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "7.0.15"; sha256 = "0hi97qsr1w0r660rv3h1rqy7cn84pnkgx49l4ckll88klwyvpq9p"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "7.0.15"; sha256 = "1wjfm26b0dq2lsa1zrc16xjxnpi1z3n2myd7myjvmlklbzl59x9c"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "7.0.15"; sha256 = "0zg8lyik3sdg24vy6w8974iiccy8mzln8gw8rs356wswk7irrpk2"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "7.0.15"; sha256 = "03wsv6msyfg6fnbfy2hzkc67sxlhskcr6h3lndl5pyb5fvpqhj4h"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "7.0.15"; sha256 = "02w4gk7zvdmpf774d2i2zqkz7nb98gbrp0rkv3klr53dklayqwhn"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "7.0.15"; sha256 = "1bwam1av4rkx0pmf9x79lrgsnsimficm33jgm608f3csp8d69a9l"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "7.0.15"; sha256 = "08g46m9ksvi1bjbxfjd59npycwmmbdgkdw0162g97wbzz5bi2gdx"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "7.0.15"; sha256 = "0dcpi92xgrqqqmg5ka7wjbibzkvfcfgzis5jpkkfxmw6m3srswxp"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "7.0.15"; sha256 = "1hw0djf8svihjl6mwwyj3zcx0rczf159v95w660rzh30xn737ykl"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "7.0.15"; sha256 = "05pmq79i085r6g7l2gj96vxr0qr2m1775v2381ng6flmylyyjidq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "7.0.15"; sha256 = "1z2hj01n9r5s9x5vrvlhk7gbk8qp6381cmkksj45yqgn9ghkcid7"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "00pbi47dnqns2xbkl72abfidssphi46vqa4qf8rwij7dvz46ddn2"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0if8hwxz2ibfmdzkpd8n6ga3zkvnrnd10vwxmj1wbld1c7ngfc0a"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1pka9lqwb9kg9k72i83p53f87md7mgb8qrcwwcjalk8g36dqygwc"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "084pybg40sp61wirjgw7abrnj5xs7519pd9rjmz5y79gnwmspcas"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "1kwsxqcdyc0ijhzsq1j79qqzb8p9irdjdjvrbghmf5mnfnnxhglr"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0d529y2ih0jjbw89wpyr32ljmdbpvx5v2cwpv8hxqqwwfm133fxx"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "10sxjj9qfr3m0wjdms1h2bx5hxk9dkdy3fgv1fbp5b21gsk9vh2r"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "19l103ajspna7fdkqnwpprm1q3vdgy0j1v2vqz0kxa3sd1vjs5ag"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "7.0.15"; sha256 = "0ndpv3xw74azx9kk9nk0fah97ysn7y006223mczk40cq32vwga3c"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "7.0.15"; sha256 = "00ji50aazc4wzwdbvm9yhxw681xpar5nk7f7lbbipxv3mip9lhwc"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "7.0.15"; sha256 = "15wgv5x0z2kc1pnkwkflvmj7y6iwds5hb2pjz5gq9z24a5v68310"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "7.0.15"; sha256 = "0g3djzyhlnx2qmwlyjvc2raq5r2ysqim0wlkdsxw87gi7lxy5xdi"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "7.0.15"; sha256 = "0acrs1msmxdwq9nrmw22660yj39vi4ywlfjdki8i5s3h2h3ah9dz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "7.0.15"; sha256 = "047ydlw1348y36xz16sxvbvpc8ifypg9vbak43krshdxqkxdkbba"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "7.0.15"; sha256 = "1g5pmhknp9a3xai0p40idb2jds2s1kdpcfimcw0n8rc7w55vanqy"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "7.0.15"; sha256 = "0dg2z3qph6ldapz6kz94pv9rrfkiqz0ydyy9rzcj93534iv72i4r"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm"; version = "7.0.15"; sha256 = "1zqqcmhbxyxi683l1qm3caj9d41agz564gsqg5ckb8zkpkwipilb"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm"; version = "7.0.15"; sha256 = "14ibzk7snns5d38ky1g5mwbxmf84x4kapyxfmnrz05y7584qxxai"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.15"; sha256 = "0cyw8m44i1yp85k651hwaqnfsc1hxla9wiin8159kjildzf618rg"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.15"; sha256 = "0xbbwrgzs8az1nkzipv50rr3iffs8pcnjcvxwmlmz1nrk3a3jhxi"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.15"; sha256 = "1r5vwnvkqv0xr2l8ypapps4b9qjgb1cw2fy66wrys62affhm06kg"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.15"; sha256 = "1ayhr32dym33dqxs8lcg2v2vgx2ka8gc3h734wxzj3rrf4ngjswv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Composite"; version = "7.0.15"; sha256 = "0jjjnva0qb81x8nldq6v2d1166xm5yhvjs19gbvww36y6zlmm5bc"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "0wjlxvpp0pdmfzpn1c7izadwfjqh60s4cdg4fvbdjq70cgxwf83j"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "0mfwfr6fwp5hg33vmrdy0vk80a7xwg65zsqisgw9b8z07wsyj5k5"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "0a56nn3d0vx4vanw0020sifayqrd3jqiyk7s3qdppkf7gxvd1wnm"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "027hn6c8qzr9jxz3q61fqcnhwj7k2mbcr3s20igmawhmjfrfcxvl"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "1swkh2ra7jqkghx5ka43s1s2nli21saypcnzjk9qfwh71np44ayc"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "12skw2zb5v6wfs9za0s1hhcgdfm490zmm032l9wsrwj3flfx50ak"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.15"; sha256 = "04dq9pljyqnd312y071z0bi3gspzrymyiq9paqvaa3xyprzdyxld"; })
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix b/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix
new file mode 100644
index 000000000000..478a596e0be5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix
@@ -0,0 +1,178 @@
+{ buildAspNetCore, buildNetRuntime, buildNetSdk }:
+
+# v8.0 (active)
+{
+  aspnetcore_8_0 = buildAspNetCore {
+    version = "8.0.1";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/8e19b03a-93be-43ae-8cd6-95b89a849572/facbb896d726a2496dd23bcecb28c9e9/aspnetcore-runtime-8.0.1-linux-x64.tar.gz";
+        sha512  = "64eecc0fc50f8c68205123355c43eae5ee29b7f6061a260315818960153fdf25f2bb25a51dd3f051e2362e228c032f2d0b9e7b6b476ac52141c17cfd8de0bfd2";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/0688a08e-fdaf-489b-90e4-033cc19cfffc/c9a9c648862b0b18c9aca77d3be0ef9f/aspnetcore-runtime-8.0.1-linux-arm64.tar.gz";
+        sha512  = "7d34b6986363e54dca53828ca7a4d658aae1b24f8f33c6a82f811e12ce6d56698462db746d9f19e4ad245cc8d130a19930be28e0a0c2da2c96fd74b1cb2d8192";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/6032140f-ed94-431d-94b3-afa360230225/eabd66a040f8a926694f78bf0f4a417e/aspnetcore-runtime-8.0.1-osx-x64.tar.gz";
+        sha512  = "1a573a57d7eae9162976f915b065fcba8f4069e42f8aff4bb93b131fff16d9f54ce17d7a9392aeea27fd693c5d5932a94db8a8220ca34f481429824639a4819f";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/73548990-4198-4c80-ac97-29ff5064cb11/da52a05fbc9a0cc6b997c14284753589/aspnetcore-runtime-8.0.1-osx-arm64.tar.gz";
+        sha512  = "ac12b846bd8c65035087b9a77cc44edbbbdcc5f8b8b1b9cf47bc282b3505d3f8670188e1dbffebdc26233f7a5c35ae6b2c1dc61b26d7ffc3233117436399e46d";
+      };
+    };
+  };
+
+  runtime_8_0 = buildNetRuntime {
+    version = "8.0.1";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/4d5166de-c1ac-45c5-bb8a-d47f8ee93ad9/ffab59440a3eb74359dd3009e4da5a81/dotnet-runtime-8.0.1-linux-x64.tar.gz";
+        sha512  = "cbd03325280ff93cd0edab71c5564a50bb2423980f63d04602914db917c9c811a0068d848cab07d82e3260bff6684ad7cffacc2f449c06fc0b0aa8f845c399b6";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/39e79317-94d1-4e57-bb90-d5e004f4f3d4/cdcf3c0d8dc2560dcfcb160acb193785/dotnet-runtime-8.0.1-linux-arm64.tar.gz";
+        sha512  = "29707882d4fce61eb4b20763473d548570f89f9d028bafb76b646911a5e7bf793dc75e33a6903622d7ba46e9eea0eac000d931cd2f45da118ef05fede6d4079b";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/220d43f7-eb7f-470d-a80b-b30210adbbf2/dbfa691328557ee9888a1f38a29f72bd/dotnet-runtime-8.0.1-osx-x64.tar.gz";
+        sha512  = "8c88db692cd889d8f4d6a1f0a82a3eb0b3f49a4771318127c294822f20ee83a87668c6a54012ad87242936d4412b3f8adc0448b8d5ff623f0a6faa3cfc544309";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/43ed6ef8-5265-462e-bbc4-2055a0f473e8/28d78788aeca160f615dcbd63c79b621/dotnet-runtime-8.0.1-osx-arm64.tar.gz";
+        sha512  = "9d716e324c041ecd210ae65bcdd9bbf8c884d8fb92cda72d5bd13429581d47d7837d51f63c2994dfe17c5cda77de1c727308b590367d3181c91fa1f173c66b04";
+      };
+    };
+  };
+
+  sdk_8_0 = buildNetSdk {
+    version = "8.0.101";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/9454f7dc-b98e-4a64-a96d-4eb08c7b6e66/da76f9c6bc4276332b587b771243ae34/dotnet-sdk-8.0.101-linux-x64.tar.gz";
+        sha512  = "26df0151a3a59c4403b52ba0f0df61eaa904110d897be604f19dcaa27d50860c82296733329cb4a3cf20a2c2e518e8f5d5f36dfb7931bf714a45e46b11487c9a";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/092bec24-9cad-421d-9b43-458b3a7549aa/84280dbd1eef750f9ed1625339235c22/dotnet-sdk-8.0.101-linux-arm64.tar.gz";
+        sha512  = "56beedb8181b63efd319b028190a8a98842efd96da27c5e48e18c4d15ba1a5805610e8838f1904a19263abd51ff68df369973ed59dab879edc52f6e7f93517c6";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/c7f806d2-1483-4a52-893a-4de1054b0bff/a6f52ed50876c45f859192b6576a14d5/dotnet-sdk-8.0.101-osx-x64.tar.gz";
+        sha512  = "5c18dd1c0bb8199660dea5793eb2a568c63adbde492ca5080a8130e723a6260c6b9c6a055c299a3b8ba2497d6875959f86da8b9c9bf85e093bca2e08724d46a1";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/ef083c06-7aee-4a4f-b18b-50c9a8990753/e206864e7910e81bbd9cb7e674ff1b4c/dotnet-sdk-8.0.101-osx-arm64.tar.gz";
+        sha512  = "a6048ca248aef3c430c8bdb65b534d5f58463a9d3c314fd70f5c7c4a9ac7eaabfba7786c40c76c73e5abc1a95ba957a682e73fb228e15bc9808adb47b4a1b291";
+      };
+    };
+    packages = { fetchNuGet }: [
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "8.0.1"; sha256 = "1pqjaj3faxmyhiikrb7gh8zcp9ybqacb91qzz0xxc0snc9k1gc42"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "8.0.1"; sha256 = "0dsdgqg7566qximmjfza4x9if3icy4kskq698ddj5apdia88h2mw"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "8.0.1"; sha256 = "0cx4gz9qjsaxd41aasrk0bq68pwdmy8bjh4wxwgbnlwjr34h29rv"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "8.0.1"; sha256 = "124vppxwj56bs0j7bgl3baj91wi6c8h5cgxz40d1sih9gz5bm9qd"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "8.0.1"; sha256 = "1gjz379y61ag9whi78qxx09bwkwcznkx2mzypgycibxk61g11da1"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "8.0.1"; sha256 = "0a9aljr4fy4haq6ndz2y723liv5hbfpss1rn45s88nmgcp27m15m"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "8.0.1"; sha256 = "0xy4pb3imq5ij7k22i3dbbvgchiqbnyblfz988zq6pg140hr84jp"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "8.0.1"; sha256 = "01kzndyqmsvcq49i2jrv7ymfp0l71yxfylv1cy3nhkdbprqz8ipx"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "8.0.1"; sha256 = "1cvf0fdsfv4di3wp83gm5nw1a1qnfn6mdvg49a3afi83lpbjxix4"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "8.0.1"; sha256 = "0yaaiqq7mi6sclyrb1v0fyncanbx0ifmnnhv9whynqj8439jsdwh"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "8.0.1"; sha256 = "1j8cdmxv8k1y9vxmdnka0lxk2ykwr1xb2qz8l5s1vca8fns1l7fs"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "8.0.1"; sha256 = "0w3mrs4zdl9mfanl1j81759xwwrzmicsjxn6yfxv5yrxbxzq695n"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "8.0.1"; sha256 = "1lai8b9pmvid4sfzgl4br6x426cp9v7m5bhif3ll5ndai46xg8im"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "8.0.1"; sha256 = "0dhpdlcdz7adcfh9w01fc867051m35fqaxnvj3fqvqhgcm2n3143"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "8.0.1"; sha256 = "13psnlgpq89ifn7w56wpvzabxy432wkqqs0g01kpy8y1ni2vb9l8"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "8.0.1"; sha256 = "1lhbr8dxwrn4d1ijhdbx1xfhmkjz09phac5130n7cm86ix0vk48w"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "8.0.1"; sha256 = "1aw6mc7zcmzs1grxz2wa9cw9kfj8pz7zpj417xnp1a9n4ix1bxgr"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "8.0.1"; sha256 = "010f8wn15s2kv7yyzgys3pv9i1mxw20hpv1ig2zhybjxs8lpj8jj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "8.0.1"; sha256 = "1sw3vfg9wc5zwml63h179z385cakj09s217j3nxzf7klhl3fbhm5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "8.0.1"; sha256 = "1ssj1cyam3nfidm8q82kvh4i3fzm2lzb3bxw6ck09hwhvwh909z4"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "8.0.1"; sha256 = "0gdv64dzjd656843714kr99rbips9l7q0divc3rfrmdflc7bxji0"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "8.0.1"; sha256 = "0krzds3jxxy8kcm0zpi7q9jvm3ryjcl0ldr4pcbi9g4nfr8z6n7f"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "8.0.1"; sha256 = "0353whnjgz3sqhzsfrviad3a3db4pk7hl7m4wwppv5mqdg9i9ri5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "8.0.1"; sha256 = "15bix3grr9mjczgc55jk1zb6fpcy3gdp1mafscsdy7zai6yy73lv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "8.0.1"; sha256 = "08qz9ii78rm8plvx3j93v3yckly58hc6s8mjn7sjf7lk0dfvls7j"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "8.0.1"; sha256 = "1g5b30f4l8a1zjjr3b8pk9mcqxkxqwa86362f84646xaj4iw3a4d"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "8.0.1"; sha256 = "1fk1flqp6ji0l4c2gvh83ykndpx7a2nkkgrgkgql3c75j1k2v1s9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "8.0.1"; sha256 = "1nv24b7zm1j5kkn02nk308jbkciybvxw8mjj6qsqgmmlg6dyxlv8"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "8.0.1"; sha256 = "198576cdkl72xs29zznff9ls763p8pfr0zji7b74dqxd5ga0s3bd"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "8.0.1"; sha256 = "1g7l5da8v1s8xhyij2y0mr2q8xkw80cr0bmqzkmkk0425ikbkc8s"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "1rg8b8437sys3pdxzg5m3vi6nn53k5hkg901lwzbp41bch6pjl1b"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "1iagkshd7cy6ni2fb6750a0hvbsqms91lb39jd1dx8mlnspzxyld"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "1n3b044h3c9qbyj41r2rwrld4smfg165fvwqgi56xg16agwz4d2h"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "05jadsr25g30fxqg48sdf1k3fjgs0bipxcwy2rdxf9v5r3g6sqn5"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "085k52x87d2bfw2mwri6s3i6aqn1yfnhb1mp57scck8jb53wnmcm"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "04cdb8ya03419r9v3kbdlawb2bgvxsa284rbfcdbbyhwa49589ja"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "0biyilsm78mlg51f20zkdxcby2qr0vas324jaicpvw9212b99x9j"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "15v9wyj9fagxpr62r3i3wvzmqjb0padrk9249ndrm7xbcghfzkl6"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "1zg5grsl3i368hpqqdhprb46pz5ymfjbyyv07r99jg881i95pp49"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "106gjs082kixijjijs6pmph60zlgmiz26jrzc0c87b22daqc6nc8"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "0s14f344f9xmxhzb8zv0rg6kc361pyrd46bwzd01qxcwa2g1yh95"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "1crszc67z13qwrhin06a6i9m60qlsk730h381jy9s5wbn80cgxgv"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "0girwd7dail3zlvsvj1ypmrw24vbc6jly1fj41j4w87l0v893ccd"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "0mf905knky5k69nyx82jvijsi71fwl1001dj0zsx5rwa6i8g4kpx"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "08z5bxzyhvrx3k7i89n0dpnncjxfyr0ikva7jq25qmqp2xj55wwh"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "0gif52wgg1h7zvd85yl44wfn2gxskwxb679p26xrfdn5npv1vzs7"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "0cmgln0aqrrm57q0zm3sl600j1hjhf46rimc2hvfqk6vv6gmql82"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "1m05vz3y2h028wr785833bfpw18vq1j6b12bpm7fsfib28isgy8a"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "1d7yyc07siamz3h7qilpdkq41j22hm43ds58vrxnpgcn4alr17a4"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "02r7gxrch89viid1zyqa50ag5zbmdjyysx9p54xcxrq2fz874b04"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "1q8z929yf31yhcr0yga2sycgxjkdamddrh0kxfvzpsxa9iq92n41"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "1g7i2mj777avqpnzl8sf4npcwiry712jfarvnk5k39l339xs7qxy"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "0i64v0wf5fcm8fcvj32k0s2h8cmn64zipnm0v54nx010143fsjzm"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "0g7xzzpgcl0zfm4zpyy6r3xh99m5994bkcc7mkhwl2iqyxm121fh"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "0dy2z56ypbkyaif1sqm88np0zd1h7rzsvcwphhw4fghm6z7v31f9"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "06vrwf8n12n8y59x38fdjfm737r9r0ginw3bq1wi8sdsarfxyqpm"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "1fwk41k82q6zbnvd95wn6cibplmmfp281sfj03nmfhcfdqdsfq60"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "1zm5k3xan886sl90ypm90qp02wv9b7wi42am7mk6x016rq4l40cm"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "12ziik1aclv3jyqqpw4bhhvwwzxxllghn5ci9rmfhcanhv2krxbp"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "1isn4n8m9bh0fwd7rqx7z1msrxhn24fwk23kngkwnvl5q17k89if"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "09b2swf93ia4g8yb7j0hzd3jjg41blvx10qz83xsqsvkhci3z1v0"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "07ppksnq35rvqj6zh6b7cr8jda3crlbmy5yq2cz267123x272dm2"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "0fkdc2apgbhhxjnxyplfc3rcvqfmpqx8h7q3lr1bpnhhyvmx5jf1"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "0vq6br7qnwbh62amqfnyc5x9aldgd0sjqwywyh9swfdk30lyp9b3"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "1asyqkk2ilgf7qh4s6cj95hsxsgzqc44wvbsl3z9jm4dh4jrmm7n"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "0lhxhbi9g8dh5si6a63n377p3jwiz1j7khgv15gpqdpz3amsf0r0"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "06zs2wrgx7sw4rizwphpppgw32i822kjg2qgg7ki7pc0kj7dz6w2"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "0kwb138r4i3ci7hzkai00wmj3hq7r3838fdsxx8lhavhk3hyzqmk"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "0qg2z4ljj66wg2mfq3pljgzhhs16b42xh51xbhirq3fxrpm0g936"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "0jfqj1cjq05qr04mywy5fz40g8w2ss5f5dzxjy3pk23rg5cg436l"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "8.0.1"; sha256 = "02q9kzn4pmsvccm3rl58mx1yaddaca5yks7bsd04z2s7zv70bwz8"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "8.0.1"; sha256 = "1dzg3prng9zfdzz7gcgywjdbwzhwm85j89z0jahynxx4q2dra4b9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "8.0.1"; sha256 = "18cj1nganlqfpxq7f3f4mg0pmh76azfgyclny5mcyjyshyznxxnj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "8.0.1"; sha256 = "0cdrpdaq5sl3602anfx1p0z0ncx2sjjvl6mgsd6y38g47n7f95jc"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "8.0.1"; sha256 = "02r4jg4ha0qksix9v6s3cpmvavmz54gkawkxy9bvknw5ynxhhl1l"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "8.0.1"; sha256 = "139f7rh3lkkwidz8klxrpd47lr5d1bkc7aqsgy5sbsqf6f8nn5qb"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "8.0.1"; sha256 = "1h3yxvmaiv2cj5v9a84v1kmp81raas273v8m5wd20s8y51q7fkl3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "8.0.1"; sha256 = "09xavj7hhnw1lmh95v1py9ng3rgp5cksg1lz031qv3vqsxs59lnn"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "8.0.1"; sha256 = "02670yxz97b0f2l4jh59xyh4yyg9ijw1c6h5yv78g8zkdd29zdd1"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "8.0.1"; sha256 = "1pji3rkhna967ibs58xix0ymgbzpwp7yd8vmjbx6gchxgib5g64q"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "8.0.1"; sha256 = "1zvdw094kh02ivzjwzq1izvvhkgkd920y2w2ag73zmfwivaqpya2"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "8.0.1"; sha256 = "0g7kv0dy20lcl82yz71w39l9i8j05w57jx8g4smkx3hmk17qxrlz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "8.0.1"; sha256 = "04fjp83zl4fydrp4qmcjapcz8yijag1r3jmb4jn5x9s77w95i6p6"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "1ax8k7zk8p55id1jzsp2xz3cxgyrh0l3za1qpyqgkp9yp8x43qc9"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "0bzrxy28gbl1zmn84b698rf4xic0faywy8dibachh7mh0pxh1bxv"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "01yjcdyj6w9x9f2nvnj46qgcd8z7g3k2n5l0rcvxnwzflyf16c9p"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "058xj78mlq44svhgb4z19npsivw7q9rqjz5x4859gz9fgm4bkajq"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.1"; sha256 = "16x1ivz7ycz04wf4w1a2q9ifqb2knc1ngvpm5m39djh2dwphn4ny"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.1"; sha256 = "0zi02kl8dwc75iwgkpznd6jkd2jmd62m6vix7s55a95jqqgc1lpx"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.1"; sha256 = "0llmj8pj98mgfcazazz1arrq5ccpy35ycp955bl4f1di5422rkyv"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.1"; sha256 = "1xnwgdn8vxxq73krbzd495i2cznyg01jss1495l39z0s79f78ybl"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "8.0.1"; sha256 = "1g55w5xa1z8x4cqgn5dvxm3c40lczdsp4xnlwm6czx7iyy7i81mn"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "8.0.1"; sha256 = "04rbyl6qxidw2nc3bfmzny7988f2x9ngsxprn7vsi7xlsf8wkqc5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "8.0.1"; sha256 = "1w0w9da4q14icj815c7divmwrslbh7hxmksvyfjck4hyy4q4c6d0"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "8.0.1"; sha256 = "0f2zndr6rdb3v443hd5i9dgn0r6668595gvpff6lm1pnyhsv41rg"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "8.0.1"; sha256 = "0j4grr62s5gm98rxw77qxkjiy7281sfixw4n8f0r43152ml57qab"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "8.0.1"; sha256 = "0zpsfwygc8azdm1qyh6ry9rfwxlzgd0s2g31zi28xfwzkliwyykv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "8.0.1"; sha256 = "0swxakdpwc4d5fjlxpl0awlkjijldcyvp9hwx0a8kvvjrbydm357"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "8.0.1"; sha256 = "0jd2ndgci5i745n0h70l6kyh5ayd4kvmankmxqxshcfyfqijh8yd"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "05n7p13vc49v4gvrgfkswi7ycnfvcwaww4y28xz9dnd9qj2y2b50"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "1nl4bpr1ba2iqf2y1w3da2cynrwxdb1yghwgm8ix3sd72vmpwfxr"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "08n4pnasxsd2qgq5izib8simzspcwsldcsbjgxjb9291ipzwsd3z"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "0mky32k6kv2iy14c89xbznyrr33ni616s85z40ny43j5w9scxh04"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "08x0vcpnhakaqifhg556dslr3s33mgplnxphhnm90dnfvyb6mqjq"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "1qf7ws0a5ny805pxmpzrp751p5p18h46r6lfi4p7h2rlw9p32ys0"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.1"; sha256 = "01h77hc9b5q8dhr19r3dxs1m76zhk9x4wz0wzkqz4j98p1g5bffa"; })
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dtc/default.nix b/nixpkgs/pkgs/development/compilers/dtc/default.nix
new file mode 100644
index 000000000000..adc3ed7aaac8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dtc/default.nix
@@ -0,0 +1,105 @@
+{ stdenv
+, lib
+, fetchzip
+, fetchpatch
+, meson
+, ninja
+, flex
+, bison
+, pkg-config
+, which
+, pythonSupport ? false
+, python ? null
+, swig
+, libyaml
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "dtc";
+  version = "1.7.0";
+
+  src = fetchzip {
+    url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/dtc-v${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-FMh3VvlY3fUK8fbd0M+aCmlUrmG9YegiOOQ7MOByffc=";
+  };
+
+  patches = [
+    # meson: Fix cell overflow tests when running from meson
+    (fetchpatch {
+      url = "https://github.com/dgibson/dtc/commit/32174a66efa4ad19fc6a2a6422e4af2ae4f055cb.patch";
+      sha256 = "sha256-C7OzwY0zq+2CV3SB5unI7Ill2M3deF7FXeQE3B/Kx2s=";
+    })
+
+    # Use #ifdef NO_VALGRIND
+    (fetchpatch {
+      url = "https://github.com/dgibson/dtc/commit/41821821101ad8a9f83746b96b163e5bcbdbe804.patch";
+      sha256 = "sha256-7QEFDtap2DWbUGqtyT/RgJZJFldKB8oSubKiCtLZ0w4=";
+    })
+
+    # dtc: Fix linker options so it also works in Darwin
+    (fetchpatch {
+      url = "https://github.com/dgibson/dtc/commit/3acde70714df3623e112cf3ec99fc9b5524220b8.patch";
+      sha256 = "sha256-uLXL0Sjcn+bnMuF+A6PjUW1Rq6uNg1dQl58zbeYpP/U=";
+    })
+
+    # meson: allow disabling tests
+    (fetchpatch {
+      url = "https://github.com/dgibson/dtc/commit/35f26d2921b68d97fefbd5a2b6e821a2f02ff65d.patch";
+      sha256 = "sha256-cO4f/jJX/pQL7kk4jpKUhsCVESW2ZuWaTr7z3BuvVkw=";
+    })
+  ];
+
+  env.SETUPTOOLS_SCM_PRETEND_VERSION = finalAttrs.version;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    flex
+    bison
+    pkg-config
+    which
+  ] ++ lib.optionals pythonSupport [
+    python
+    python.pkgs.setuptools-scm
+    swig
+  ];
+
+  buildInputs = [ libyaml ];
+
+  postPatch = ''
+    patchShebangs setup.py
+
+    # meson.build: bump version to 1.7.0
+    substituteInPlace libfdt/meson.build \
+      --replace "version: '1.6.0'," "version: '${finalAttrs.version}',"
+    substituteInPlace meson.build \
+      --replace "version: '1.6.0'," "version: '${finalAttrs.version}',"
+  '';
+
+  # Required for installation of Python library and is innocuous otherwise.
+  env.DESTDIR = "/";
+
+  mesonAutoFeatures = "auto";
+  mesonFlags = [
+    (lib.mesonBool "static-build" stdenv.hostPlatform.isStatic)
+    (lib.mesonBool "tests" finalAttrs.finalPackage.doCheck)
+  ];
+
+  doCheck =
+    # Checks are broken on aarch64 darwin
+    # https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436
+    !stdenv.isDarwin &&
+
+    # we must explicitly disable this here so that mesonFlags receives
+    # `-Dtests=disabled`; without it meson will attempt to run
+    # hostPlatform binaries during the configurePhase.
+    (with stdenv; buildPlatform.canExecute hostPlatform);
+
+  meta = with lib; {
+    description = "Device Tree Compiler";
+    homepage = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git";
+    license = licenses.gpl2Plus; # 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..75055130ada2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix
@@ -0,0 +1,99 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, libtool
+, autoconf
+, automake
+, gmp
+, mpfr
+, libffi
+, makeWrapper
+, noUnicode ? false
+, gcc
+, threadSupport ? false
+, useBoehmgc ? true
+, boehmgc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ecl";
+  version = "16.1.2";
+
+  src = fetchurl {
+    url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
+    sha256 = "sha256-LUgrGgpPvV2IFDRRcDInnYCMtkBeIt2R721zNTRGS5k=";
+  };
+
+  nativeBuildInputs = [ autoconf automake makeWrapper libtool ];
+  propagatedBuildInputs = [
+    libffi
+    gmp
+    mpfr
+    gcc
+  ] ++ lib.optionals useBoehmgc [
+    # replaces ecl's own gc which other packages can depend on, thus propagated
+    boehmgc
+  ];
+
+  configureFlags = [
+    (if threadSupport then "--enable-threads" else "--disable-threads")
+    "--with-gmp-incdir=${lib.getDev gmp}/include"
+    "--with-gmp-libdir=${lib.getLib gmp}/lib"
+    # -incdir, -libdir doesn't seem to be supported for libffi
+    "--with-libffi-prefix=${lib.getDev libffi}"
+  ] ++ 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://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/ecl/patches/16.1.2-getcwd.patch";
+      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 ':' "${
+        lib.makeBinPath [
+          gcc                   # for the C compiler
+          gcc.bintools.bintools # for ar
+        ]
+      }" \
+  ''
+  # ecl 16.1.2 is too old to have -libdir for libffi and boehmgc, so we need to
+  # use NIX_LDFLAGS_BEFORE to make gcc find these particular libraries.
+  # Since it is missing even the prefix flag for boehmgc we also need to inject
+  # the correct -I flag via NIX_CFLAGS_COMPILE. Since we have access to it, we
+  # create the variables with suffixSalt (which seems to be necessary for
+  # NIX_CFLAGS_COMPILE even).
+  + lib.optionalString useBoehmgc ''
+    --prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \
+    --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \
+  '' + ''
+    --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib"
+  '';
+
+  meta = with lib; {
+    description = "Lisp implementation aiming to be small, fast and easy to embed";
+    license = licenses.mit;
+    maintainers = lib.teams.lisp.members;
+    platforms = platforms.unix;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ecl/default.nix b/nixpkgs/pkgs/development/compilers/ecl/default.nix
new file mode 100644
index 000000000000..a9a7471275e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/default.nix
@@ -0,0 +1,86 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, libtool
+, autoconf
+, automake
+, texinfo
+, gmp
+, mpfr
+, libffi
+, makeWrapper
+, noUnicode ? false
+, gcc
+, threadSupport ? true
+, useBoehmgc ? false
+, boehmgc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ecl";
+  version = "23.9.9";
+
+  src = fetchurl {
+    url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
+    sha256 = "107q6gmxlsya4yv38r1x1axrgyyfgdrfkkz97zfp64bcrasdl6y5";
+  };
+
+  nativeBuildInputs = [
+    libtool
+    autoconf
+    automake
+    texinfo
+    makeWrapper
+  ];
+  propagatedBuildInputs = [
+    libffi
+    gmp
+    mpfr
+    gcc
+    # replaces ecl's own gc which other packages can depend on, thus propagated
+  ] ++ lib.optionals useBoehmgc [
+    # replaces ecl's own gc which other packages can depend on, thus propagated
+    boehmgc
+  ];
+
+  patches = [
+    # https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ecl/patches/write_error.patch";
+      sha256 = "0hfxacpgn4919hg0mn4wf4m8r7y592r4gw7aqfnva7sckxi6w089";
+    })
+  ];
+
+  configureFlags = [
+    (if threadSupport then "--enable-threads" else "--disable-threads")
+    "--with-gmp-incdir=${lib.getDev gmp}/include"
+    "--with-gmp-libdir=${lib.getLib gmp}/lib"
+    "--with-libffi-incdir=${lib.getDev libffi}/include"
+    "--with-libffi-libdir=${lib.getLib libffi}/lib"
+  ] ++ lib.optionals useBoehmgc [
+    "--with-libgc-incdir=${lib.getDev boehmgc}/include"
+    "--with-libgc-libdir=${lib.getLib boehmgc}/lib"
+  ] ++ 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 ':' "${
+      lib.makeBinPath [
+        gcc                   # for the C compiler
+        gcc.bintools.bintools # for ar
+      ]
+    }"
+  '';
+
+  meta = with lib; {
+    description = "Lisp implementation aiming to be small, fast and easy to embed";
+    homepage = "https://common-lisp.net/project/ecl/";
+    license = licenses.mit;
+    maintainers = lib.teams.lisp.members;
+    platforms = platforms.unix;
+    changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${version}/CHANGELOG";
+  };
+}
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/edk2/default.nix b/nixpkgs/pkgs/development/compilers/edk2/default.nix
new file mode 100644
index 000000000000..4cfe823e59d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/edk2/default.nix
@@ -0,0 +1,148 @@
+{ stdenv
+, clangStdenv
+, fetchFromGitHub
+, fetchpatch
+, runCommand
+, libuuid
+, python3
+, bc
+, lib
+, buildPackages
+}:
+
+let
+  pythonEnv = buildPackages.python3.withPackages (ps: [ps.tkinter]);
+
+targetArch = if stdenv.isi686 then
+  "IA32"
+else if stdenv.isx86_64 then
+  "X64"
+else if stdenv.isAarch32 then
+  "ARM"
+else if stdenv.isAarch64 then
+  "AARCH64"
+else if stdenv.hostPlatform.isRiscV64 then
+  "RISCV64"
+else
+  throw "Unsupported architecture";
+
+buildType = if stdenv.isDarwin then
+    "CLANGPDB"
+  else
+    "GCC5";
+
+edk2 = stdenv.mkDerivation rec {
+  pname = "edk2";
+  version = "202311";
+
+  patches = [
+    # pass targetPrefix as an env var
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/edk2/raw/08f2354cd280b4ce5a7888aa85cf520e042955c3/f/0021-Tweak-the-tools_def-to-support-cross-compiling.patch";
+      hash = "sha256-E1/fiFNVx0aB1kOej2DJ2DlBIs9tAAcxoedym2Zhjxw=";
+    })
+  ];
+
+  srcWithVendoring = fetchFromGitHub {
+    owner = "tianocore";
+    repo = "edk2";
+    rev = "edk2-stable${edk2.version}";
+    fetchSubmodules = true;
+    hash = "sha256-gC/If8U9qo70rGvNl3ld/mmZszwY0w/5Ge/K21mhzYw=";
+  };
+
+  # We don't want EDK2 to keep track of OpenSSL,
+  # they're frankly bad at it.
+  src = runCommand "edk2-unvendored-src" { } ''
+    cp --no-preserve=mode -r ${srcWithVendoring} $out
+    rm -rf $out/CryptoPkg/Library/OpensslLib/openssl
+    mkdir -p $out/CryptoPkg/Library/OpensslLib/openssl
+    tar --strip-components=1 -xf ${buildPackages.openssl.src} -C $out/CryptoPkg/Library/OpensslLib/openssl
+    chmod -R +w $out/
+
+    # Fix missing INT64_MAX include that edk2 explicitly does not provide
+    # via it's own <stdint.h>. Let's pull in openssl's definition instead:
+    sed -i $out/CryptoPkg/Library/OpensslLib/openssl/crypto/property/property_parse.c \
+        -e '1i #include "internal/numbers.h"'
+  '';
+
+  nativeBuildInputs = [ pythonEnv ];
+  depsBuildBuild = [ buildPackages.stdenv.cc buildPackages.bash ];
+  depsHostHost = [ libuuid ];
+  strictDeps = true;
+
+  # trick taken from https://src.fedoraproject.org/rpms/edk2/blob/08f2354cd280b4ce5a7888aa85cf520e042955c3/f/edk2.spec#_319
+  ${"GCC5_${targetArch}_PREFIX"} = stdenv.cc.targetPrefix;
+
+  makeFlags = [ "-C BaseTools" ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-return-type"
+    + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation"
+    + lib.optionalString (stdenv.isDarwin) " -Wno-error=macro-redefined";
+
+  hardeningDisable = [ "format" "fortify" ];
+
+  installPhase = ''
+    mkdir -vp $out
+    mv -v BaseTools $out
+    mv -v edksetup.sh $out
+    # patchShebangs fails to see these when cross compiling
+    for i in $out/BaseTools/BinWrappers/PosixLike/*; do
+      substituteInPlace $i --replace '/usr/bin/env bash' ${buildPackages.bash}/bin/bash
+      chmod +x "$i"
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Intel EFI development kit";
+    homepage = "https://github.com/tianocore/tianocore.github.io/wiki/EDK-II/";
+    license = licenses.bsd2;
+    platforms = with platforms; aarch64 ++ arm ++ i686 ++ x86_64 ++ riscv64;
+  };
+
+  passthru = {
+    mkDerivation = projectDscPath: attrsOrFun: stdenv.mkDerivation (finalAttrs:
+    let
+      attrs = lib.toFunction attrsOrFun finalAttrs;
+    in
+    {
+      inherit (edk2) src;
+
+      depsBuildBuild = [ buildPackages.stdenv.cc ] ++ attrs.depsBuildBuild or [];
+      nativeBuildInputs = [ bc pythonEnv ] ++ attrs.nativeBuildInputs or [];
+      strictDeps = true;
+
+      ${"GCC5_${targetArch}_PREFIX"}=stdenv.cc.targetPrefix;
+
+      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 ${attrs.buildConfig or "RELEASE"} -t ${buildType} -p ${projectDscPath} -n $NIX_BUILD_CORES $buildFlags
+        runHook postBuild
+      '';
+
+      installPhase = ''
+        runHook preInstall
+        mv -v Build/*/* $out
+        runHook postInstall
+      '';
+    } // removeAttrs attrs [ "nativeBuildInputs" "depsBuildBuild" ]);
+  };
+};
+
+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..7cd9413991fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/eli/default.nix
@@ -0,0 +1,94 @@
+{ lib, 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" ];
+
+  # Workaround build failure on -fno-common toolchains:
+  #   ld: cexp.o:(.bss+0x40): multiple definition of `obstck'; cccp.o:(.bss+0x0): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  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 = "https://eli-project.sourceforge.net/";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ timokau ];
+    platforms = 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..9ae361ddf442
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/default.nix
@@ -0,0 +1,307 @@
+{ pkgs
+, lib
+, makeWrapper
+, nodejs ? pkgs.nodejs_18
+}:
+
+let
+  fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { };
+
+  # Haskell packages that require ghc 9.6
+  hs96Pkgs = self: pkgs.haskell.packages.ghc96.override {
+    overrides = self: super: with pkgs.haskell.lib.compose; with lib;
+    let elmPkgs = rec {
+      elm = overrideCabal (drv: {
+        # sadly with parallelism most of the time breaks compilation
+        enableParallelBuilding = false;
+        preConfigure = fetchElmDeps {
+          elmPackages = (import ./packages/elm-srcs.nix);
+          elmVersion = drv.version;
+          registryDat = ./registry.dat;
+        };
+        buildTools = drv.buildTools or [] ++ [ makeWrapper ];
+        postInstall = ''
+          wrapProgram $out/bin/elm \
+            --prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
+        '';
+
+        description = "A delightful language for reliable webapps";
+        homepage = "https://elm-lang.org/";
+        license = licenses.bsd3;
+        maintainers = with maintainers; [ domenkozar turbomack ];
+      }) (self.callPackage ./packages/elm.nix { });
+
+      inherit fetchElmDeps;
+      elmVersion = elmPkgs.elm.version;
+    };
+    in elmPkgs // {
+      inherit elmPkgs;
+    };
+  };
+
+  # Haskell packages that require ghc 8.10
+  hs810Pkgs = self: pkgs.haskell.packages.ghc810.override {
+    overrides = self: super: with pkgs.haskell.lib.compose; with lib;
+    let elmPkgs = rec {
+      elmi-to-json = justStaticExecutables (overrideCabal (drv: {
+        prePatch = ''
+          substituteInPlace package.yaml --replace "- -Werror" ""
+          hpack
+        '';
+        jailbreak = true;
+
+        description = "Tool that reads .elmi files (Elm interface file) generated by the elm compiler";
+        homepage = "https://github.com/stoeffel/elmi-to-json";
+        license = licenses.bsd3;
+        maintainers = [ maintainers.turbomack ];
+      }) (self.callPackage ./packages/elmi-to-json.nix {}));
+
+      elm-instrument = justStaticExecutables (overrideCabal (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;
+
+        description = "Instrument Elm code as a preprocessing step for elm-coverage";
+        homepage = "https://github.com/zwilias/elm-instrument";
+        license = licenses.bsd3;
+        maintainers = [ maintainers.turbomack ];
+      }) (self.callPackage ./packages/elm-instrument.nix {}));
+    };
+    in elmPkgs // {
+      inherit elmPkgs;
+
+      # We need attoparsec < 0.14 to build elm for now
+      attoparsec = self.attoparsec_0_13_2_5;
+
+      # aeson 2.0.3.0 does not build with attoparsec_0_13_2_5
+      aeson = doJailbreak self.aeson_1_5_6_0;
+
+      # elm-instrument needs this
+      indents = self.callPackage ./packages/indents.nix {};
+
+      # elm-instrument's tests depend on an old version of elm-format, but we set doCheck to false for other reasons above
+      elm-format = null;
+    };
+  };
+
+  # Haskell packages that require ghc 9.2
+  hs92Pkgs = self: pkgs.haskell.packages.ghc92.override {
+    overrides = self: super: with pkgs.haskell.lib.compose; with lib;
+    let elmPkgs = rec {
+      /*
+      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 (drv: {
+        jailbreak = true;
+
+        description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide";
+        homepage = "https://github.com/avh4/elm-format";
+        license = licenses.bsd3;
+        maintainers = with maintainers; [ avh4 turbomack ];
+      }) (self.callPackage ./packages/elm-format.nix {}));
+    };
+    in elmPkgs // {
+      inherit elmPkgs;
+
+      # Needed for elm-format
+      avh4-lib = doJailbreak (self.callPackage ./packages/avh4-lib.nix {});
+      elm-format-lib = doJailbreak (self.callPackage ./packages/elm-format-lib.nix {});
+      elm-format-test-lib = self.callPackage ./packages/elm-format-test-lib.nix {};
+      elm-format-markdown = self.callPackage ./packages/elm-format-markdown.nix {};
+
+      # elm-format requires text >= 2.0
+      text = self.text_2_0_2;
+      # unorderd-container's tests indirectly depend on text < 2.0
+      unordered-containers = overrideCabal (drv: { doCheck = false; }) super.unordered-containers;
+      # relude-1.1.0.0's tests depend on hedgehog < 1.2, which indirectly depends on text < 2.0
+      relude = overrideCabal (drv: { doCheck = false; }) super.relude;
+    };
+  };
+
+  nodePkgs = pkgs.callPackage ./packages/node-composition.nix {
+    inherit pkgs nodejs;
+    inherit (pkgs.stdenv.hostPlatform) system;
+  };
+
+in lib.makeScope pkgs.newScope (self: with self; {
+  inherit fetchElmDeps nodejs;
+
+  /* Node/NPM based dependencies 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/lib.nix`.
+
+      * Packages which depend on npm installation of elm can be patched using
+        `patchNpmElm` function also defined in `packages/lib.nix`.
+  */
+  elmLib = let
+    hsElmPkgs = (hs810Pkgs self) // (hs96Pkgs self);
+  in import ./packages/lib.nix {
+    inherit lib;
+    inherit (pkgs) writeScriptBin stdenv;
+    inherit (hsElmPkgs.elmPkgs) elm;
+  };
+
+  elm-json = callPackage ./packages/elm-json.nix { };
+
+  elm-test-rs = callPackage ./packages/elm-test-rs.nix { };
+
+  elm-test = callPackage ./packages/elm-test.nix { };
+} // (hs96Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (hs810Pkgs self).elmPkgs // (with elmLib; with (hs96Pkgs self).elmPkgs; {
+  elm-verify-examples = let
+    patched = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // {
+    meta = with lib; nodePkgs.elm-verify-examples.meta // {
+      description = "Verify examples in your docs";
+      homepage = "https://github.com/stoeffel/elm-verify-examples";
+      license = licenses.bsd3;
+      maintainers = [ maintainers.turbomack ];
+    };
+  };
+  in patched.override (old: {
+    preRebuild = (old.preRebuild or "") + ''
+      # 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
+      # TODO: investigate, same as for elm-coverage below
+      sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
+    '';
+  });
+
+  elm-coverage = let
+      patched = patchNpmElm (patchBinwrap [elmi-to-json] nodePkgs.elm-coverage);
+    in patched.override (old: {
+      # Symlink Elm instrument binary
+      preRebuild = (old.preRebuild or "") + ''
+        # Noop custom installation script
+        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
+        # TODO: investigate
+        sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
+      '';
+      postInstall = (old.postInstall or "") + ''
+        mkdir -p unpacked_bin
+        ln -sf ${elm-instrument}/bin/elm-instrument unpacked_bin/elm-instrument
+      '';
+      meta = with lib; nodePkgs.elm-coverage.meta // {
+        description = "Work in progress - Code coverage tooling for Elm";
+        homepage = "https://github.com/zwilias/elm-coverage";
+        license = licenses.bsd3;
+        maintainers = [ maintainers.turbomack ];
+      };
+    });
+
+    create-elm-app = patchNpmElm
+    nodePkgs.create-elm-app // {
+      meta = with lib; nodePkgs.create-elm-app.meta // {
+        description = "Create Elm apps with no build configuration";
+        homepage = "https://github.com/halfzebra/create-elm-app";
+        license = licenses.mit;
+        maintainers = [ maintainers.turbomack ];
+      };
+    };
+
+    elm-graphql =
+      nodePkgs."@dillonkearns/elm-graphql" // {
+        meta = with lib; nodePkgs."@dillonkearns/elm-graphql".meta // {
+          description = " Autogenerate type-safe GraphQL queries in Elm.";
+          license = licenses.bsd3;
+          maintainers = [ maintainers.pedrohlc ];
+        };
+      };
+
+    elm-review =
+      nodePkgs.elm-review // {
+        meta = with lib; nodePkgs.elm-review.meta // {
+          description = "Analyzes Elm projects, to help find mistakes before your users find them";
+          homepage = "https://package.elm-lang.org/packages/jfmengels/elm-review/${nodePkgs.elm-review.version}";
+          license = licenses.bsd3;
+          maintainers = [ maintainers.turbomack ];
+        };
+      };
+
+      elm-language-server = nodePkgs."@elm-tooling/elm-language-server" // {
+        meta = with lib; nodePkgs."@elm-tooling/elm-language-server".meta // {
+          description = "Language server implementation for Elm";
+          homepage = "https://github.com/elm-tooling/elm-language-server";
+          license = licenses.mit;
+          maintainers = [ maintainers.turbomack ];
+        };
+      };
+
+      elm-spa = nodePkgs."elm-spa".overrideAttrs  (
+        old: {
+          nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ makeWrapper old.nodejs.pkgs.node-gyp-build ];
+
+          meta = with lib; nodePkgs."elm-spa".meta // {
+            description = "A tool for building single page apps in Elm";
+            homepage = "https://www.elm-spa.dev/";
+            license = licenses.bsd3;
+            maintainers = [ maintainers.ilyakooo0 ];
+          };
+        }
+      );
+
+      elm-optimize-level-2 = nodePkgs."elm-optimize-level-2" // {
+        meta = with lib; nodePkgs."elm-optimize-level-2".meta // {
+          description = "A second level of optimization for the Javascript that the Elm Compiler produces";
+          homepage = "https://github.com/mdgriffith/elm-optimize-level-2";
+          license = licenses.bsd3;
+          maintainers = [ maintainers.turbomack ];
+        };
+      };
+
+      elm-pages = nodePkgs."elm-pages".overrideAttrs (
+        old: {
+          nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ makeWrapper old.nodejs.pkgs.node-gyp-build ];
+
+          # can't use `patches = [ <patch_file> ]` with a nodePkgs derivation;
+          # need to patch in one of the build phases instead.
+          # see upstream issue https://github.com/dillonkearns/elm-pages/issues/305 for dealing with the read-only problem
+          preFixup = ''
+            patch $out/lib/node_modules/elm-pages/generator/src/codegen.js ${./packages/elm-pages-fix-read-only.patch}
+            patch $out/lib/node_modules/elm-pages/generator/src/init.js ${./packages/elm-pages-fix-init-read-only.patch}
+          '';
+
+          postFixup = ''
+            wrapProgram $out/bin/elm-pages --prefix PATH : ${
+              with pkgs.elmPackages; lib.makeBinPath [ elm elm-review elm-optimize-level-2 ]
+            }
+          '';
+
+          meta = with lib; nodePkgs."elm-pages".meta // {
+            description = "A statically typed site generator for Elm.";
+            homepage = "https://github.com/dillonkearns/elm-pages";
+            license = licenses.bsd3;
+            maintainers = [ maintainers.turbomack maintainers.jali-clarke ];
+          };
+        }
+      );
+
+      elm-land =
+        let
+          patched = patchNpmElm nodePkgs.elm-land;
+        in
+        patched.override (old: {
+          meta = with lib; nodePkgs."elm-land".meta // {
+            description = "A production-ready framework for building Elm applications.";
+            homepage = "https://elm.land/";
+            license = licenses.bsd3;
+            maintainers = [ maintainers.zupo ];
+          };
+        }
+      );
+
+      lamdera = callPackage ./packages/lamdera.nix {};
+
+      elm-doc-preview = nodePkgs."elm-doc-preview".overrideAttrs (old: {
+        nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ old.nodejs.pkgs.node-gyp-build ];
+      });
+
+      inherit (nodePkgs) elm-live elm-upgrade elm-xref elm-analyse elm-git-install;
+    })
+  )
diff --git a/nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix b/nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix
new file mode 100644
index 000000000000..9715bfbe037d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix
@@ -0,0 +1,10 @@
+{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..43252747c3a3
--- /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.replaceStrings ["/"] ["-"] 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/avh4-lib.nix b/nixpkgs/pkgs/development/compilers/elm/packages/avh4-lib.nix
new file mode 100644
index 000000000000..f7f9381703c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/avh4-lib.nix
@@ -0,0 +1,28 @@
+{ mkDerivation, array, base, bytestring, directory, fetchgit
+, filepath, lib, mtl, pooled-io, process, relude, tasty
+, tasty-discover, tasty-hspec, tasty-hunit, text
+}:
+mkDerivation {
+  pname = "avh4-lib";
+  version = "0.0.0.1";
+  src = fetchgit {
+    url = "https://github.com/avh4/elm-format";
+    sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
+    rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
+    fetchSubmodules = true;
+  };
+  postUnpack = "sourceRoot+=/avh4-lib; echo source root reset to $sourceRoot";
+  configureFlags = [ "--ghc-option=-Wno-error=unused-packages" ];
+  libraryHaskellDepends = [
+    array base bytestring directory filepath mtl pooled-io process
+    relude text
+  ];
+  testHaskellDepends = [
+    array base bytestring directory filepath mtl pooled-io process
+    relude tasty tasty-hspec tasty-hunit text
+  ];
+  testToolDepends = [ tasty-discover ];
+  doHaddock = false;
+  description = "Common code for haskell projects";
+  license = lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/bimap.nix b/nixpkgs/pkgs/development/compilers/elm/packages/bimap.nix
new file mode 100644
index 000000000000..41412d1639c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/bimap.nix
@@ -0,0 +1,15 @@
+{ mkDerivation, base, containers, exceptions, lib, QuickCheck
+, template-haskell
+}:
+mkDerivation {
+  pname = "bimap";
+  version = "0.3.3";
+  sha256 = "73829355c7bcbd3eedba22a382a04a3ab641702b00828790ec082ec2db3a8ad1";
+  libraryHaskellDepends = [ base containers exceptions ];
+  testHaskellDepends = [
+    base containers exceptions QuickCheck template-haskell
+  ];
+  homepage = "https://github.com/joelwilliamson/bimap";
+  description = "Bidirectional mapping between two key types";
+  license = lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-lib.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-lib.nix
new file mode 100644
index 000000000000..a6b70414143f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-lib.nix
@@ -0,0 +1,30 @@
+{ mkDerivation, aeson, avh4-lib, base, bimap, binary, bytestring
+, containers, elm-format-markdown, elm-format-test-lib, fetchgit
+, hspec, lib, mtl, optparse-applicative, relude, split, tasty
+, tasty-discover, tasty-hspec, tasty-hunit, text
+}:
+mkDerivation {
+  pname = "elm-format-lib";
+  version = "0.0.0.1";
+  src = fetchgit {
+    url = "https://github.com/avh4/elm-format";
+    sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
+    rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
+    fetchSubmodules = true;
+  };
+  postUnpack = "sourceRoot+=/elm-format-lib; echo source root reset to $sourceRoot";
+  libraryHaskellDepends = [
+    aeson avh4-lib base bimap binary bytestring containers
+    elm-format-markdown mtl optparse-applicative relude text
+  ];
+  testHaskellDepends = [
+    aeson avh4-lib base bimap binary bytestring containers
+    elm-format-markdown elm-format-test-lib hspec mtl
+    optparse-applicative relude split tasty tasty-hspec tasty-hunit
+    text
+  ];
+  testToolDepends = [ tasty-discover ];
+  doHaddock = false;
+  description = "Common code used by elm-format and elm-refactor";
+  license = lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-markdown.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-markdown.nix
new file mode 100644
index 000000000000..fdeb2e88d384
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-markdown.nix
@@ -0,0 +1,16 @@
+{ mkDerivation, base, containers, fetchgit, lib, mtl, text }:
+mkDerivation {
+  pname = "elm-format-markdown";
+  version = "0.0.0.1";
+  src = fetchgit {
+    url = "https://github.com/avh4/elm-format";
+    sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
+    rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
+    fetchSubmodules = true;
+  };
+  postUnpack = "sourceRoot+=/elm-format-markdown; echo source root reset to $sourceRoot";
+  libraryHaskellDepends = [ base containers mtl text ];
+  doHaddock = false;
+  description = "Markdown parsing for Elm documentation comments";
+  license = lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix
new file mode 100644
index 000000000000..ccd6264d6c16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix
@@ -0,0 +1,27 @@
+{ mkDerivation, avh4-lib, base, containers, fetchgit, filepath
+, hspec, hspec-core, hspec-golden, lib, mtl, split, tasty
+, tasty-discover, tasty-hspec, tasty-hunit, text
+}:
+mkDerivation {
+  pname = "elm-format-test-lib";
+  version = "0.0.0.1";
+  src = fetchgit {
+    url = "https://github.com/avh4/elm-format";
+    sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
+    rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
+    fetchSubmodules = true;
+  };
+  postUnpack = "sourceRoot+=/elm-format-test-lib; echo source root reset to $sourceRoot";
+  libraryHaskellDepends = [
+    avh4-lib base containers filepath hspec hspec-core hspec-golden mtl
+    split tasty-hunit text
+  ];
+  testHaskellDepends = [
+    avh4-lib base containers filepath hspec hspec-core hspec-golden mtl
+    split tasty tasty-hspec tasty-hunit text
+  ];
+  testToolDepends = [ tasty-discover ];
+  doHaddock = false;
+  description = "Test helpers used by elm-format-tests and elm-refactor-tests";
+  license = lib.licenses.bsd3;
+}
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..c4448f246425
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix
@@ -0,0 +1,41 @@
+{ mkDerivation, aeson, ansi-wl-pprint, avh4-lib, base, bytestring
+, elm-format-lib, elm-format-test-lib, fetchgit, hspec, lib
+, optparse-applicative, QuickCheck, quickcheck-io, relude, tasty
+, tasty-hspec, tasty-hunit, tasty-quickcheck, text
+}:
+mkDerivation rec {
+  pname = "elm-format";
+  version = "0.8.7";
+  src = fetchgit {
+    url = "https://github.com/avh4/elm-format";
+    sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
+    rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
+    fetchSubmodules = true;
+  };
+  isLibrary = false;
+  isExecutable = true;
+  executableHaskellDepends = [
+    aeson ansi-wl-pprint avh4-lib base bytestring elm-format-lib
+    optparse-applicative relude text
+  ];
+  testHaskellDepends = [
+    aeson ansi-wl-pprint avh4-lib base bytestring elm-format-lib
+    elm-format-test-lib hspec optparse-applicative QuickCheck
+    quickcheck-io relude tasty tasty-hspec tasty-hunit tasty-quickcheck
+    text
+  ];
+  doHaddock = false;
+  homepage = "https://elm-lang.org";
+  description = "A source code formatter for Elm";
+  license = lib.licenses.bsd3;
+  mainProgram = "elm-format";
+  postPatch = ''
+    mkdir -p ./generated
+    cat <<EOHS > ./generated/Build_elm_format.hs
+    module Build_elm_format where
+
+    gitDescribe :: String
+    gitDescribe = "${version}"
+    EOHS
+  '';
+}
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..18f4d3aff196
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-instrument.nix
@@ -0,0 +1,43 @@
+{ mkDerivation, fetchpatch, 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, lib, 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;
+  };
+  patches = [
+    # Update code after breaking change in optparse-applicative
+    # https://github.com/zwilias/elm-instrument/pull/5
+    (fetchpatch {
+      name = "update-optparse-applicative.patch";
+      url = "https://github.com/mdevlamynck/elm-instrument/commit/c548709d4818aeef315528e842eaf4c5b34b59b4.patch";
+      sha256 = "0ln7ik09n3r3hk7jmwwm46kz660mvxfa71120rkbbaib2falfhsc";
+    })
+  ];
+  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 = lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-json.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-json.nix
new file mode 100644
index 000000000000..6eb5d10cd471
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-json.nix
@@ -0,0 +1,39 @@
+{ lib
+, curl
+, rustPlatform
+, fetchurl
+, openssl
+, stdenv
+, pkg-config
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "elm-json";
+  version = "0.2.12";
+
+  src = fetchurl {
+    url = "https://github.com/zwilias/elm-json/archive/v${version}.tar.gz";
+    sha256 = "sha256:nlpxlPzWk3wwDgczuMI9T6DFY1YtQpQ1R4BhdPbzZBs=";
+  };
+
+  cargoPatches = [ ./elm-json.patch ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    curl openssl
+  ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
+
+  cargoSha256 = "sha256:8SOpL8nfhYen9vza0LYpB/5fgVmBwG7vGMmFOaJskIc=";
+
+  # Tests perform networking and therefore can't work in sandbox
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Install, upgrade and uninstall Elm dependencies";
+    homepage = "https://github.com/zwilias/elm-json";
+    license = licenses.mit;
+    maintainers = [ maintainers.turbomack ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-json.patch b/nixpkgs/pkgs/development/compilers/elm/packages/elm-json.patch
new file mode 100644
index 000000000000..54df03019231
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-json.patch
@@ -0,0 +1,43 @@
+diff --git a/Cargo.lock b/Cargo.lock
+index b9bf434..58cfe81 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -685,15 +685,6 @@ version = "0.1.4"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
+ 
+-[[package]]
+-name = "openssl-src"
+-version = "111.17.0+1.1.1m"
+-source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "05d6a336abd10814198f66e2a91ccd7336611f30334119ca8ce300536666fcf4"
+-dependencies = [
+- "cc",
+-]
+-
+ [[package]]
+ name = "openssl-sys"
+ version = "0.9.72"
+@@ -703,7 +694,6 @@ dependencies = [
+  "autocfg",
+  "cc",
+  "libc",
+- "openssl-src",
+  "pkg-config",
+  "vcpkg",
+ ]
+diff --git a/Cargo.toml b/Cargo.toml
+index bc97f20..54d3b14 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -17,8 +17,8 @@ colored = "2.0"
+ dialoguer = "0.6"
+ dirs = "3.0"
+ fs2 = "0.4"
+-isahc = { version = "1.6.0", default-features = false, features = ["static-ssl", "static-curl"] }
+-curl = {version = "0.4.42", default-features = false, features = ["ssl", "static-curl", "static-ssl", "force-system-lib-on-osx"]}
++isahc = { version = "1.6.0", default-features = false }
++curl = {version = "0.4.42", default-features = false, features = ["ssl", "force-system-lib-on-osx"]}
+ ctrlc = "3.1"
+ console = "0.12"
+ anyhow = "1.0"
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-init-read-only.patch b/nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-init-read-only.patch
new file mode 100644
index 000000000000..9704ef9f7c08
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-init-read-only.patch
@@ -0,0 +1,39 @@
+diff --git a/generator/src/init.js b/generator/src/init.js
+index 06386ff..7127dae 100644
+--- a/generator/src/init.js
++++ b/generator/src/init.js
+@@ -6,6 +6,20 @@ import { fileURLToPath } from "url";
+ const __filename = fileURLToPath(import.meta.url);
+ const __dirname = path.dirname(__filename);
+ 
++let walknDo = function(somePath, doStuff) {
++  doStuff(somePath, true);
++  const dir = fs.readdirSync(somePath)
++  dir.forEach((i) => {
++    let p = path.join(somePath, i);
++    const s = fs.statSync(p)
++    if (s.isDirectory()) {
++      walknDo(p, doStuff)
++    } else {
++      doStuff(p);
++    }
++  });
++}
++
+ /**
+  * @param {string} name
+  */
+@@ -18,6 +32,13 @@ export async function run(name) {
+   if (!fs.existsSync(name)) {
+     try {
+       await fsExtra.copy(template, appRoot);
++      walknDo(appRoot, (file, isDir) => {
++        if (isDir) {
++          fs.chmodSync(file, 0o755);
++        } else {
++          fs.chmodSync(file, 0o644);
++        }
++      });
+       fs.renameSync(
+         path.resolve(appRoot, "gitignore"),
+         path.resolve(appRoot, ".gitignore")
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-read-only.patch b/nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-read-only.patch
new file mode 100644
index 000000000000..547f89f86f69
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-pages-fix-read-only.patch
@@ -0,0 +1,39 @@
+diff --git a/generator/src/codegen.js b/generator/src/codegen.js
+index baf5368..e5edf4d 100644
+--- a/generator/src/codegen.js
++++ b/generator/src/codegen.js
+@@ -37,9 +37,9 @@ export async function generate(basePath) {
+     copyToBoth("SiteConfig.elm"),
+ 
+     fs.promises.writeFile("./.elm-pages/Pages.elm", uiFileContent),
+-    fs.promises.copyFile(
+-      path.join(__dirname, `./elm-application.json`),
+-      `./elm-stuff/elm-pages/elm-application.json`
++    fs.promises.writeFile(
++      `./elm-stuff/elm-pages/elm-application.json`,
++      fs.readFileSync(path.join(__dirname, `./elm-application.json`))
+     ),
+     // write `Pages.elm` with cli interface
+     fs.promises.writeFile(
+@@ -82,9 +82,9 @@ function writeFetcherModules(basePath, fetcherData) {
+ }
+ 
+ async function newCopyBoth(modulePath) {
+-  await fs.promises.copyFile(
+-    path.join(__dirname, modulePath),
+-    path.join(`./elm-stuff/elm-pages/client/.elm-pages/`, modulePath)
++  await fs.promises.writeFile(
++    path.join(`./elm-stuff/elm-pages/client/.elm-pages/`, modulePath),
++    fs.readFileSync(path.join(__dirname, modulePath))
+   );
+ }
+ 
+@@ -197,7 +197,7 @@ async function copyFileEnsureDir(from, to) {
+   await fs.promises.mkdir(path.dirname(to), {
+     recursive: true,
+   });
+-  await fs.promises.copyFile(from, to);
++  await fs.promises.writeFile(to, fs.readFileSync(from));
+ }
+ 
+ /**
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..708d81455d69
--- /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/browser" = {
+        sha256 = "1zlmx672glg7fdgkvh5jm47y85pv7pdfr5mkhg6x7ar6k000vyka";
+        version = "1.0.1";
+      };
+
+      "elm/core" = {
+        sha256 = "1l0qdbczw91kzz8sx5d5zwz9x662bspy7p21dsr3f2rigxiix2as";
+        version = "1.0.2";
+      };
+
+      "elm/html" = {
+        sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
+        version = "1.0.0";
+      };
+
+      "elm/http" = {
+        sha256 = "008bs76mnp48b4dw8qwjj4fyvzbxvlrl4xpa2qh1gg2kfwyw56v1";
+        version = "2.0.0";
+      };
+
+      "elm/json" = {
+        sha256 = "1a107nmm905dih4w4mjjkkpdcjbgaf5qjvr7fl30kkpkckfjjnrw";
+        version = "1.1.2";
+      };
+
+      "elm/project-metadata-utils" = {
+        sha256 = "1d4rd4grrnbdvj9gf00h7dr6hbkjzawgkzpizfrkp1z1pyr3mvq9";
+        version = "1.0.0";
+      };
+
+      "elm/svg" = {
+        sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k";
+        version = "1.0.1";
+      };
+
+      "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/time" = {
+        sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
+        version = "1.0.0";
+      };
+
+      "elm/url" = {
+        sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
+        version = "1.0.0";
+      };
+
+      "elm/virtual-dom" = {
+        sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
+        version = "1.0.2";
+      };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-test-rs.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-test-rs.nix
new file mode 100644
index 000000000000..5e2a5502b211
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-test-rs.nix
@@ -0,0 +1,30 @@
+{ lib, rustPlatform, fetchurl, openssl, stdenv, darwin }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "elm-test-rs";
+  version = "2.0";
+
+  src = fetchurl {
+    url = "https://github.com/mpizenberg/elm-test-rs/archive/v${version}.tar.gz";
+    sha256 = "sha256:1manr42w613r9vyji7pxx5gb08jcgkdxv29qqylrqlwxa8d5dcid";
+  };
+
+  buildInputs = lib.optionals (!stdenv.isDarwin) [
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    Security
+    CoreServices
+  ]);
+
+  cargoSha256 = "sha256:1dpdlzv96kpc25yf5jgsz9qldghyw35x382qpxhkadkn5dryzjvd";
+
+  # Tests perform networking and therefore can't work in sandbox
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Fast and portable executable to run your Elm tests";
+    homepage = "https://github.com/mpizenberg/elm-test-rs";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.jpagex ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-test.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-test.nix
new file mode 100644
index 000000000000..fc943a80a3fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-test.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+}:
+
+buildNpmPackage rec {
+  pname = "elm-test";
+  version = "0.19.1-revision12";
+
+  src = fetchFromGitHub {
+    owner = "rtfeldman";
+    repo = "node-test-runner";
+    rev = version;
+    hash = "sha256-cnxAOFcPTJjtHi4VYCO9oltb5iOeDnLvRgnuJnNzjsY=";
+  };
+
+  npmDepsHash = "sha256-QljHVrmF6uBem9sW67CYduCro3BqF34EPGn1BtKqom0=";
+
+  postPatch = ''
+    sed -i '/elm-tooling install/d' package.json
+  '';
+
+  dontNpmBuild = true;
+
+  meta = {
+    changelog = "https://github.com/rtfeldman/node-test-runner/blob/${src.rev}/CHANGELOG.md";
+    description = "Runs elm-test suites from Node.js";
+    homepage = "https://github.com/rtfeldman/node-test-runner";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ turbomack ];
+  };
+}
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..1071d50a84c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm.nix
@@ -0,0 +1,32 @@
+{ 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, lib, mtl
+, network, parsec, process, raw-strings-qq, scientific, SHA
+, snap-core, snap-server, 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 = "1h9jhwlv1pqqna5s09vd72arwhhjn0dlhv0w9xx5771x0xryxxg8";
+    rev = "2f6dd29258e880dbb7effd57a829a0470d8da48b";
+    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 = lib.licenses.bsd3;
+  mainProgram = "elm";
+}
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..f82f3e5179ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elmi-to-json.nix
@@ -0,0 +1,26 @@
+{ mkDerivation, aeson, base, binary, bytestring, containers
+, directory, fetchgit, filepath, ghc-prim, hpack
+, optparse-applicative, lib, text, unliftio
+, unordered-containers
+}:
+mkDerivation {
+  pname = "elmi-to-json";
+  version = "1.3.0";
+  src = fetchgit {
+    url = "https://github.com/stoeffel/elmi-to-json";
+    rev = "bd18efb59d247439b362272b480e67a16a4e424e";
+    sha256 = "sha256-9fScXRSyTkqzeXwh/Jjza6mnENCThlU6KI366CLFcgY=";
+  };
+  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 = 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..49e697e43e88
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/generate-node-packages.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../../..)"
+
+set -eu -o pipefail
+
+$(nix-build $ROOT -A nodePackages.node2nix --no-out-link)/bin/node2nix \
+    -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..85e765db3e50
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/indents.nix
@@ -0,0 +1,11 @@
+{ mkDerivation, base, concatenative, lib, mtl, parsec }:
+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 = lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/lamdera.nix b/nixpkgs/pkgs/development/compilers/elm/packages/lamdera.nix
new file mode 100644
index 000000000000..e3dda4c31a52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/lamdera.nix
@@ -0,0 +1,39 @@
+{ stdenv, lib
+, fetchurl
+}:
+
+let
+  os = if stdenv.isDarwin then "macos" else "linux";
+  arch = if stdenv.isAarch64 then "arm64" else "x86_64";
+  hashes =
+    {
+      "x86_64-linux" = "a51d5b9a011c54b0001ff3273cee027774686e233adadb20b1978d2cabfe32a6";
+      "aarch64-linux" = "8904ce928f60e06df1f06b3af5ee5eb320c388922aa38b698d823df1d73e8e49";
+      "x86_64-darwin" = "b4d1bb5ddc3503862750e5b241f74c22dc013792bc4f410dd914a5216e20ed2f";
+      "aarch64-darwin" = "6d20e384dae90bb994c3f1e866c964124c7e8a51e9e08bad0e90a2b560bb5a18";
+    };
+in
+
+stdenv.mkDerivation rec {
+  pname = "lamdera";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "https://static.lamdera.com/bin/lamdera-${version}-${os}-${arch}";
+    sha256 = hashes.${stdenv.system};
+  };
+
+  dontUnpack = true;
+
+  installPhase = ''
+    install -m755 -D $src $out/bin/lamdera
+  '';
+
+  meta = with lib; {
+    homepage = "https://lamdera.com";
+    license = licenses.unfree;
+    description = "A delightful platform for full-stack web apps";
+    platforms = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
+    maintainers = with maintainers; [ Zimmi48 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/lib.nix b/nixpkgs/pkgs/development/compilers/elm/packages/lib.nix
new file mode 100644
index 000000000000..12e0600dc231
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/lib.nix
@@ -0,0 +1,43 @@
+{ writeScriptBin, stdenv, lib, elm }:
+let
+  patchBinwrap =
+    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 (old: {
+        nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ binwrap binwrap-install ];
+
+        # Manually install targets
+        # by symlinking binaries into `node_modules`
+        postInstall = let
+          binFile = module: lib.strings.removeSuffix ("-" + module.version) module.name;
+        in (old.postInstall or "") + ''
+          ${lib.concatStrings (map (module: ''
+              echo "linking ${binFile module}"
+              ln -sf ${module}/bin/${binFile module} \
+                  node_modules/${binFile module}/bin/${binFile module}
+          '') targets)}
+        '';
+      });
+
+  patchNpmElm = pkg:
+    pkg.override (old: {
+      preRebuild = (old.preRebuild or "") + ''
+        rm node_modules/elm/install.js
+        echo "console.log('Nixpkgs\' version of Elm will be used');" > node_modules/elm/install.js
+      '';
+      postInstall = (old.postInstall or "") + ''
+        ln -sf ${elm}/bin/elm node_modules/elm/bin/elm
+      '';
+    });
+in
+{ inherit patchBinwrap patchNpmElm; }
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..c825c6c66349
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/node-composition.nix
@@ -0,0 +1,17 @@
+# This file has been generated by node2nix 1.11.1. Do not edit!
+
+{pkgs ? import <nixpkgs> {
+    inherit system;
+  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_18"}:
+
+let
+  nodeEnv = import ../../../node-packages/node-env.nix {
+    inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
+    inherit pkgs nodejs;
+    libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
+  };
+in
+import ./node-packages.nix {
+  inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
+  inherit nodeEnv;
+}
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..8112b01bc9e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.json
@@ -0,0 +1,19 @@
+[
+  "elm-analyse",
+  "elm-coverage",
+  "elm-doc-preview",
+  "@elm-tooling/elm-language-server",
+  "elm-land",
+  "elm-live",
+  "elm-spa",
+  "elm-test",
+  "elm-upgrade",
+  "elm-verify-examples",
+  "elm-xref",
+  "create-elm-app",
+  "elm-optimize-level-2",
+  "elm-pages",
+  "elm-review",
+  "elm-git-install",
+  "@dillonkearns/elm-graphql"
+]
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..0efccbb5ff90
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.nix
@@ -0,0 +1,19059 @@
+# This file has been generated by node2nix 1.11.1. Do not edit!
+
+{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:
+
+let
+  sources = {
+    "@adobe/css-tools-4.3.2" = {
+      name = "_at_adobe_slash_css-tools";
+      packageName = "@adobe/css-tools";
+      version = "4.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz";
+        sha512 = "DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==";
+      };
+    };
+    "@babel/cli-7.12.10" = {
+      name = "_at_babel_slash_cli";
+      packageName = "@babel/cli";
+      version = "7.12.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/cli/-/cli-7.12.10.tgz";
+        sha512 = "+y4ZnePpvWs1fc/LhZRTHkTesbXkyBYuOB+5CyodZqrEuETXi3zOVfpAQIdgC3lXbHLTDG9dQosxR9BhvLKDLQ==";
+      };
+    };
+    "@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 = "OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==";
+      };
+    };
+    "@babel/code-frame-7.23.5" = {
+      name = "_at_babel_slash_code-frame";
+      packageName = "@babel/code-frame";
+      version = "7.23.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz";
+        sha512 = "CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==";
+      };
+    };
+    "@babel/compat-data-7.23.5" = {
+      name = "_at_babel_slash_compat-data";
+      packageName = "@babel/compat-data";
+      version = "7.23.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz";
+        sha512 = "uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==";
+      };
+    };
+    "@babel/core-7.12.10" = {
+      name = "_at_babel_slash_core";
+      packageName = "@babel/core";
+      version = "7.12.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz";
+        sha512 = "eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==";
+      };
+    };
+    "@babel/generator-7.23.6" = {
+      name = "_at_babel_slash_generator";
+      packageName = "@babel/generator";
+      version = "7.23.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz";
+        sha512 = "qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==";
+      };
+    };
+    "@babel/helper-annotate-as-pure-7.22.5" = {
+      name = "_at_babel_slash_helper-annotate-as-pure";
+      packageName = "@babel/helper-annotate-as-pure";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz";
+        sha512 = "LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==";
+      };
+    };
+    "@babel/helper-builder-binary-assignment-operator-visitor-7.22.15" = {
+      name = "_at_babel_slash_helper-builder-binary-assignment-operator-visitor";
+      packageName = "@babel/helper-builder-binary-assignment-operator-visitor";
+      version = "7.22.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz";
+        sha512 = "QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==";
+      };
+    };
+    "@babel/helper-compilation-targets-7.23.6" = {
+      name = "_at_babel_slash_helper-compilation-targets";
+      packageName = "@babel/helper-compilation-targets";
+      version = "7.23.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz";
+        sha512 = "9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==";
+      };
+    };
+    "@babel/helper-create-class-features-plugin-7.23.7" = {
+      name = "_at_babel_slash_helper-create-class-features-plugin";
+      packageName = "@babel/helper-create-class-features-plugin";
+      version = "7.23.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz";
+        sha512 = "xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==";
+      };
+    };
+    "@babel/helper-create-regexp-features-plugin-7.22.15" = {
+      name = "_at_babel_slash_helper-create-regexp-features-plugin";
+      packageName = "@babel/helper-create-regexp-features-plugin";
+      version = "7.22.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz";
+        sha512 = "29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==";
+      };
+    };
+    "@babel/helper-environment-visitor-7.22.20" = {
+      name = "_at_babel_slash_helper-environment-visitor";
+      packageName = "@babel/helper-environment-visitor";
+      version = "7.22.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz";
+        sha512 = "zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==";
+      };
+    };
+    "@babel/helper-function-name-7.23.0" = {
+      name = "_at_babel_slash_helper-function-name";
+      packageName = "@babel/helper-function-name";
+      version = "7.23.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz";
+        sha512 = "OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==";
+      };
+    };
+    "@babel/helper-hoist-variables-7.22.5" = {
+      name = "_at_babel_slash_helper-hoist-variables";
+      packageName = "@babel/helper-hoist-variables";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz";
+        sha512 = "wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==";
+      };
+    };
+    "@babel/helper-member-expression-to-functions-7.23.0" = {
+      name = "_at_babel_slash_helper-member-expression-to-functions";
+      packageName = "@babel/helper-member-expression-to-functions";
+      version = "7.23.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz";
+        sha512 = "6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==";
+      };
+    };
+    "@babel/helper-module-imports-7.22.15" = {
+      name = "_at_babel_slash_helper-module-imports";
+      packageName = "@babel/helper-module-imports";
+      version = "7.22.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz";
+        sha512 = "0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==";
+      };
+    };
+    "@babel/helper-module-transforms-7.23.3" = {
+      name = "_at_babel_slash_helper-module-transforms";
+      packageName = "@babel/helper-module-transforms";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz";
+        sha512 = "7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==";
+      };
+    };
+    "@babel/helper-optimise-call-expression-7.22.5" = {
+      name = "_at_babel_slash_helper-optimise-call-expression";
+      packageName = "@babel/helper-optimise-call-expression";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz";
+        sha512 = "HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==";
+      };
+    };
+    "@babel/helper-plugin-utils-7.22.5" = {
+      name = "_at_babel_slash_helper-plugin-utils";
+      packageName = "@babel/helper-plugin-utils";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz";
+        sha512 = "uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==";
+      };
+    };
+    "@babel/helper-remap-async-to-generator-7.22.20" = {
+      name = "_at_babel_slash_helper-remap-async-to-generator";
+      packageName = "@babel/helper-remap-async-to-generator";
+      version = "7.22.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz";
+        sha512 = "pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==";
+      };
+    };
+    "@babel/helper-replace-supers-7.22.20" = {
+      name = "_at_babel_slash_helper-replace-supers";
+      packageName = "@babel/helper-replace-supers";
+      version = "7.22.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz";
+        sha512 = "qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==";
+      };
+    };
+    "@babel/helper-simple-access-7.22.5" = {
+      name = "_at_babel_slash_helper-simple-access";
+      packageName = "@babel/helper-simple-access";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz";
+        sha512 = "n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==";
+      };
+    };
+    "@babel/helper-skip-transparent-expression-wrappers-7.22.5" = {
+      name = "_at_babel_slash_helper-skip-transparent-expression-wrappers";
+      packageName = "@babel/helper-skip-transparent-expression-wrappers";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz";
+        sha512 = "tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==";
+      };
+    };
+    "@babel/helper-split-export-declaration-7.22.6" = {
+      name = "_at_babel_slash_helper-split-export-declaration";
+      packageName = "@babel/helper-split-export-declaration";
+      version = "7.22.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz";
+        sha512 = "AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==";
+      };
+    };
+    "@babel/helper-string-parser-7.23.4" = {
+      name = "_at_babel_slash_helper-string-parser";
+      packageName = "@babel/helper-string-parser";
+      version = "7.23.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz";
+        sha512 = "803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==";
+      };
+    };
+    "@babel/helper-validator-identifier-7.22.20" = {
+      name = "_at_babel_slash_helper-validator-identifier";
+      packageName = "@babel/helper-validator-identifier";
+      version = "7.22.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz";
+        sha512 = "Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==";
+      };
+    };
+    "@babel/helper-validator-option-7.23.5" = {
+      name = "_at_babel_slash_helper-validator-option";
+      packageName = "@babel/helper-validator-option";
+      version = "7.23.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz";
+        sha512 = "85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==";
+      };
+    };
+    "@babel/helper-wrap-function-7.22.20" = {
+      name = "_at_babel_slash_helper-wrap-function";
+      packageName = "@babel/helper-wrap-function";
+      version = "7.22.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz";
+        sha512 = "pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==";
+      };
+    };
+    "@babel/helpers-7.23.7" = {
+      name = "_at_babel_slash_helpers";
+      packageName = "@babel/helpers";
+      version = "7.23.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz";
+        sha512 = "6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==";
+      };
+    };
+    "@babel/highlight-7.23.4" = {
+      name = "_at_babel_slash_highlight";
+      packageName = "@babel/highlight";
+      version = "7.23.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz";
+        sha512 = "acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==";
+      };
+    };
+    "@babel/parser-7.23.6" = {
+      name = "_at_babel_slash_parser";
+      packageName = "@babel/parser";
+      version = "7.23.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz";
+        sha512 = "Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==";
+      };
+    };
+    "@babel/plugin-proposal-async-generator-functions-7.20.7" = {
+      name = "_at_babel_slash_plugin-proposal-async-generator-functions";
+      packageName = "@babel/plugin-proposal-async-generator-functions";
+      version = "7.20.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz";
+        sha512 = "xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==";
+      };
+    };
+    "@babel/plugin-proposal-class-properties-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-class-properties";
+      packageName = "@babel/plugin-proposal-class-properties";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz";
+        sha512 = "cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==";
+      };
+    };
+    "@babel/plugin-proposal-dynamic-import-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-dynamic-import";
+      packageName = "@babel/plugin-proposal-dynamic-import";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz";
+        sha512 = "1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==";
+      };
+    };
+    "@babel/plugin-proposal-export-namespace-from-7.18.9" = {
+      name = "_at_babel_slash_plugin-proposal-export-namespace-from";
+      packageName = "@babel/plugin-proposal-export-namespace-from";
+      version = "7.18.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz";
+        sha512 = "k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==";
+      };
+    };
+    "@babel/plugin-proposal-json-strings-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-json-strings";
+      packageName = "@babel/plugin-proposal-json-strings";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz";
+        sha512 = "lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==";
+      };
+    };
+    "@babel/plugin-proposal-logical-assignment-operators-7.20.7" = {
+      name = "_at_babel_slash_plugin-proposal-logical-assignment-operators";
+      packageName = "@babel/plugin-proposal-logical-assignment-operators";
+      version = "7.20.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz";
+        sha512 = "y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==";
+      };
+    };
+    "@babel/plugin-proposal-nullish-coalescing-operator-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-nullish-coalescing-operator";
+      packageName = "@babel/plugin-proposal-nullish-coalescing-operator";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz";
+        sha512 = "wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==";
+      };
+    };
+    "@babel/plugin-proposal-numeric-separator-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-numeric-separator";
+      packageName = "@babel/plugin-proposal-numeric-separator";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz";
+        sha512 = "ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==";
+      };
+    };
+    "@babel/plugin-proposal-object-rest-spread-7.20.7" = {
+      name = "_at_babel_slash_plugin-proposal-object-rest-spread";
+      packageName = "@babel/plugin-proposal-object-rest-spread";
+      version = "7.20.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz";
+        sha512 = "d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==";
+      };
+    };
+    "@babel/plugin-proposal-optional-catch-binding-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-optional-catch-binding";
+      packageName = "@babel/plugin-proposal-optional-catch-binding";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz";
+        sha512 = "Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==";
+      };
+    };
+    "@babel/plugin-proposal-optional-chaining-7.21.0" = {
+      name = "_at_babel_slash_plugin-proposal-optional-chaining";
+      packageName = "@babel/plugin-proposal-optional-chaining";
+      version = "7.21.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz";
+        sha512 = "p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==";
+      };
+    };
+    "@babel/plugin-proposal-private-methods-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-private-methods";
+      packageName = "@babel/plugin-proposal-private-methods";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz";
+        sha512 = "nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==";
+      };
+    };
+    "@babel/plugin-proposal-unicode-property-regex-7.18.6" = {
+      name = "_at_babel_slash_plugin-proposal-unicode-property-regex";
+      packageName = "@babel/plugin-proposal-unicode-property-regex";
+      version = "7.18.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz";
+        sha512 = "2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==";
+      };
+    };
+    "@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 = "tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==";
+      };
+    };
+    "@babel/plugin-syntax-class-properties-7.12.13" = {
+      name = "_at_babel_slash_plugin-syntax-class-properties";
+      packageName = "@babel/plugin-syntax-class-properties";
+      version = "7.12.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz";
+        sha512 = "fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==";
+      };
+    };
+    "@babel/plugin-syntax-dynamic-import-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-dynamic-import";
+      packageName = "@babel/plugin-syntax-dynamic-import";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz";
+        sha512 = "5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==";
+      };
+    };
+    "@babel/plugin-syntax-export-namespace-from-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-export-namespace-from";
+      packageName = "@babel/plugin-syntax-export-namespace-from";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz";
+        sha512 = "MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==";
+      };
+    };
+    "@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 = "lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==";
+      };
+    };
+    "@babel/plugin-syntax-logical-assignment-operators-7.10.4" = {
+      name = "_at_babel_slash_plugin-syntax-logical-assignment-operators";
+      packageName = "@babel/plugin-syntax-logical-assignment-operators";
+      version = "7.10.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz";
+        sha512 = "d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==";
+      };
+    };
+    "@babel/plugin-syntax-nullish-coalescing-operator-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-nullish-coalescing-operator";
+      packageName = "@babel/plugin-syntax-nullish-coalescing-operator";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz";
+        sha512 = "aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==";
+      };
+    };
+    "@babel/plugin-syntax-numeric-separator-7.10.4" = {
+      name = "_at_babel_slash_plugin-syntax-numeric-separator";
+      packageName = "@babel/plugin-syntax-numeric-separator";
+      version = "7.10.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz";
+        sha512 = "9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==";
+      };
+    };
+    "@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 = "XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==";
+      };
+    };
+    "@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 = "6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==";
+      };
+    };
+    "@babel/plugin-syntax-optional-chaining-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-optional-chaining";
+      packageName = "@babel/plugin-syntax-optional-chaining";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz";
+        sha512 = "KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==";
+      };
+    };
+    "@babel/plugin-syntax-top-level-await-7.14.5" = {
+      name = "_at_babel_slash_plugin-syntax-top-level-await";
+      packageName = "@babel/plugin-syntax-top-level-await";
+      version = "7.14.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz";
+        sha512 = "hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==";
+      };
+    };
+    "@babel/plugin-transform-arrow-functions-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-arrow-functions";
+      packageName = "@babel/plugin-transform-arrow-functions";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz";
+        sha512 = "NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==";
+      };
+    };
+    "@babel/plugin-transform-async-to-generator-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-async-to-generator";
+      packageName = "@babel/plugin-transform-async-to-generator";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz";
+        sha512 = "A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==";
+      };
+    };
+    "@babel/plugin-transform-block-scoped-functions-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-block-scoped-functions";
+      packageName = "@babel/plugin-transform-block-scoped-functions";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz";
+        sha512 = "vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==";
+      };
+    };
+    "@babel/plugin-transform-block-scoping-7.23.4" = {
+      name = "_at_babel_slash_plugin-transform-block-scoping";
+      packageName = "@babel/plugin-transform-block-scoping";
+      version = "7.23.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz";
+        sha512 = "0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==";
+      };
+    };
+    "@babel/plugin-transform-classes-7.23.5" = {
+      name = "_at_babel_slash_plugin-transform-classes";
+      packageName = "@babel/plugin-transform-classes";
+      version = "7.23.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz";
+        sha512 = "jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg==";
+      };
+    };
+    "@babel/plugin-transform-computed-properties-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-computed-properties";
+      packageName = "@babel/plugin-transform-computed-properties";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz";
+        sha512 = "dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==";
+      };
+    };
+    "@babel/plugin-transform-destructuring-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-destructuring";
+      packageName = "@babel/plugin-transform-destructuring";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz";
+        sha512 = "n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==";
+      };
+    };
+    "@babel/plugin-transform-dotall-regex-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-dotall-regex";
+      packageName = "@babel/plugin-transform-dotall-regex";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz";
+        sha512 = "vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==";
+      };
+    };
+    "@babel/plugin-transform-duplicate-keys-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-duplicate-keys";
+      packageName = "@babel/plugin-transform-duplicate-keys";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz";
+        sha512 = "RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==";
+      };
+    };
+    "@babel/plugin-transform-exponentiation-operator-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-exponentiation-operator";
+      packageName = "@babel/plugin-transform-exponentiation-operator";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz";
+        sha512 = "5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==";
+      };
+    };
+    "@babel/plugin-transform-for-of-7.23.6" = {
+      name = "_at_babel_slash_plugin-transform-for-of";
+      packageName = "@babel/plugin-transform-for-of";
+      version = "7.23.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz";
+        sha512 = "aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==";
+      };
+    };
+    "@babel/plugin-transform-function-name-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-function-name";
+      packageName = "@babel/plugin-transform-function-name";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz";
+        sha512 = "I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==";
+      };
+    };
+    "@babel/plugin-transform-literals-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-literals";
+      packageName = "@babel/plugin-transform-literals";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz";
+        sha512 = "wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==";
+      };
+    };
+    "@babel/plugin-transform-member-expression-literals-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-member-expression-literals";
+      packageName = "@babel/plugin-transform-member-expression-literals";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz";
+        sha512 = "sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==";
+      };
+    };
+    "@babel/plugin-transform-modules-amd-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-modules-amd";
+      packageName = "@babel/plugin-transform-modules-amd";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz";
+        sha512 = "vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==";
+      };
+    };
+    "@babel/plugin-transform-modules-commonjs-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-modules-commonjs";
+      packageName = "@babel/plugin-transform-modules-commonjs";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz";
+        sha512 = "aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==";
+      };
+    };
+    "@babel/plugin-transform-modules-systemjs-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-modules-systemjs";
+      packageName = "@babel/plugin-transform-modules-systemjs";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz";
+        sha512 = "ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==";
+      };
+    };
+    "@babel/plugin-transform-modules-umd-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-modules-umd";
+      packageName = "@babel/plugin-transform-modules-umd";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz";
+        sha512 = "zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==";
+      };
+    };
+    "@babel/plugin-transform-named-capturing-groups-regex-7.22.5" = {
+      name = "_at_babel_slash_plugin-transform-named-capturing-groups-regex";
+      packageName = "@babel/plugin-transform-named-capturing-groups-regex";
+      version = "7.22.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz";
+        sha512 = "YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==";
+      };
+    };
+    "@babel/plugin-transform-new-target-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-new-target";
+      packageName = "@babel/plugin-transform-new-target";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz";
+        sha512 = "YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==";
+      };
+    };
+    "@babel/plugin-transform-object-super-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-object-super";
+      packageName = "@babel/plugin-transform-object-super";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz";
+        sha512 = "BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==";
+      };
+    };
+    "@babel/plugin-transform-parameters-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-parameters";
+      packageName = "@babel/plugin-transform-parameters";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz";
+        sha512 = "09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==";
+      };
+    };
+    "@babel/plugin-transform-property-literals-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-property-literals";
+      packageName = "@babel/plugin-transform-property-literals";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz";
+        sha512 = "jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==";
+      };
+    };
+    "@babel/plugin-transform-regenerator-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-regenerator";
+      packageName = "@babel/plugin-transform-regenerator";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz";
+        sha512 = "KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==";
+      };
+    };
+    "@babel/plugin-transform-reserved-words-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-reserved-words";
+      packageName = "@babel/plugin-transform-reserved-words";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz";
+        sha512 = "QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==";
+      };
+    };
+    "@babel/plugin-transform-runtime-7.12.10" = {
+      name = "_at_babel_slash_plugin-transform-runtime";
+      packageName = "@babel/plugin-transform-runtime";
+      version = "7.12.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz";
+        sha512 = "xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA==";
+      };
+    };
+    "@babel/plugin-transform-shorthand-properties-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-shorthand-properties";
+      packageName = "@babel/plugin-transform-shorthand-properties";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz";
+        sha512 = "ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==";
+      };
+    };
+    "@babel/plugin-transform-spread-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-spread";
+      packageName = "@babel/plugin-transform-spread";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz";
+        sha512 = "VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==";
+      };
+    };
+    "@babel/plugin-transform-sticky-regex-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-sticky-regex";
+      packageName = "@babel/plugin-transform-sticky-regex";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz";
+        sha512 = "HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==";
+      };
+    };
+    "@babel/plugin-transform-template-literals-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-template-literals";
+      packageName = "@babel/plugin-transform-template-literals";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz";
+        sha512 = "Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==";
+      };
+    };
+    "@babel/plugin-transform-typeof-symbol-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-typeof-symbol";
+      packageName = "@babel/plugin-transform-typeof-symbol";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz";
+        sha512 = "4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==";
+      };
+    };
+    "@babel/plugin-transform-unicode-escapes-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-unicode-escapes";
+      packageName = "@babel/plugin-transform-unicode-escapes";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz";
+        sha512 = "OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==";
+      };
+    };
+    "@babel/plugin-transform-unicode-regex-7.23.3" = {
+      name = "_at_babel_slash_plugin-transform-unicode-regex";
+      packageName = "@babel/plugin-transform-unicode-regex";
+      version = "7.23.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz";
+        sha512 = "wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==";
+      };
+    };
+    "@babel/preset-env-7.12.10" = {
+      name = "_at_babel_slash_preset-env";
+      packageName = "@babel/preset-env";
+      version = "7.12.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.10.tgz";
+        sha512 = "Gz9hnBT/tGeTE2DBNDkD7BiWRELZt+8lSysHuDwmYXUIvtwZl0zI+D6mZgXZX0u8YBlLS4tmai9ONNY9tjRgRA==";
+      };
+    };
+    "@babel/preset-modules-0.1.6" = {
+      name = "_at_babel_slash_preset-modules";
+      packageName = "@babel/preset-modules";
+      version = "0.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6.tgz";
+        sha512 = "ID2yj6K/4lKfhuU3+EX4UvNbIt7eACFbHmNUjzA+ep+B5971CknnA/9DEWKbRokfbbtblxxxXFJJrH47UEAMVg==";
+      };
+    };
+    "@babel/regjsgen-0.8.0" = {
+      name = "_at_babel_slash_regjsgen";
+      packageName = "@babel/regjsgen";
+      version = "0.8.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz";
+        sha512 = "x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==";
+      };
+    };
+    "@babel/runtime-7.12.5" = {
+      name = "_at_babel_slash_runtime";
+      packageName = "@babel/runtime";
+      version = "7.12.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz";
+        sha512 = "plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==";
+      };
+    };
+    "@babel/template-7.22.15" = {
+      name = "_at_babel_slash_template";
+      packageName = "@babel/template";
+      version = "7.22.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz";
+        sha512 = "QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==";
+      };
+    };
+    "@babel/traverse-7.23.7" = {
+      name = "_at_babel_slash_traverse";
+      packageName = "@babel/traverse";
+      version = "7.23.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz";
+        sha512 = "tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==";
+      };
+    };
+    "@babel/types-7.23.6" = {
+      name = "_at_babel_slash_types";
+      packageName = "@babel/types";
+      version = "7.23.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz";
+        sha512 = "+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==";
+      };
+    };
+    "@esbuild/android-arm-0.17.19" = {
+      name = "_at_esbuild_slash_android-arm";
+      packageName = "@esbuild/android-arm";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz";
+        sha512 = "rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==";
+      };
+    };
+    "@esbuild/android-arm-0.18.20" = {
+      name = "_at_esbuild_slash_android-arm";
+      packageName = "@esbuild/android-arm";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz";
+        sha512 = "fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==";
+      };
+    };
+    "@esbuild/android-arm64-0.17.19" = {
+      name = "_at_esbuild_slash_android-arm64";
+      packageName = "@esbuild/android-arm64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz";
+        sha512 = "KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==";
+      };
+    };
+    "@esbuild/android-arm64-0.18.20" = {
+      name = "_at_esbuild_slash_android-arm64";
+      packageName = "@esbuild/android-arm64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz";
+        sha512 = "Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==";
+      };
+    };
+    "@esbuild/android-x64-0.17.19" = {
+      name = "_at_esbuild_slash_android-x64";
+      packageName = "@esbuild/android-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz";
+        sha512 = "uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==";
+      };
+    };
+    "@esbuild/android-x64-0.18.20" = {
+      name = "_at_esbuild_slash_android-x64";
+      packageName = "@esbuild/android-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz";
+        sha512 = "8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==";
+      };
+    };
+    "@esbuild/darwin-arm64-0.17.19" = {
+      name = "_at_esbuild_slash_darwin-arm64";
+      packageName = "@esbuild/darwin-arm64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz";
+        sha512 = "80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==";
+      };
+    };
+    "@esbuild/darwin-arm64-0.18.20" = {
+      name = "_at_esbuild_slash_darwin-arm64";
+      packageName = "@esbuild/darwin-arm64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz";
+        sha512 = "bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==";
+      };
+    };
+    "@esbuild/darwin-x64-0.17.19" = {
+      name = "_at_esbuild_slash_darwin-x64";
+      packageName = "@esbuild/darwin-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz";
+        sha512 = "IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==";
+      };
+    };
+    "@esbuild/darwin-x64-0.18.20" = {
+      name = "_at_esbuild_slash_darwin-x64";
+      packageName = "@esbuild/darwin-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz";
+        sha512 = "pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==";
+      };
+    };
+    "@esbuild/freebsd-arm64-0.17.19" = {
+      name = "_at_esbuild_slash_freebsd-arm64";
+      packageName = "@esbuild/freebsd-arm64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz";
+        sha512 = "pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==";
+      };
+    };
+    "@esbuild/freebsd-arm64-0.18.20" = {
+      name = "_at_esbuild_slash_freebsd-arm64";
+      packageName = "@esbuild/freebsd-arm64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz";
+        sha512 = "yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==";
+      };
+    };
+    "@esbuild/freebsd-x64-0.17.19" = {
+      name = "_at_esbuild_slash_freebsd-x64";
+      packageName = "@esbuild/freebsd-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz";
+        sha512 = "4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==";
+      };
+    };
+    "@esbuild/freebsd-x64-0.18.20" = {
+      name = "_at_esbuild_slash_freebsd-x64";
+      packageName = "@esbuild/freebsd-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz";
+        sha512 = "tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==";
+      };
+    };
+    "@esbuild/linux-arm-0.17.19" = {
+      name = "_at_esbuild_slash_linux-arm";
+      packageName = "@esbuild/linux-arm";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz";
+        sha512 = "cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==";
+      };
+    };
+    "@esbuild/linux-arm-0.18.20" = {
+      name = "_at_esbuild_slash_linux-arm";
+      packageName = "@esbuild/linux-arm";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz";
+        sha512 = "/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==";
+      };
+    };
+    "@esbuild/linux-arm64-0.17.19" = {
+      name = "_at_esbuild_slash_linux-arm64";
+      packageName = "@esbuild/linux-arm64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz";
+        sha512 = "ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==";
+      };
+    };
+    "@esbuild/linux-arm64-0.18.20" = {
+      name = "_at_esbuild_slash_linux-arm64";
+      packageName = "@esbuild/linux-arm64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz";
+        sha512 = "2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==";
+      };
+    };
+    "@esbuild/linux-ia32-0.17.19" = {
+      name = "_at_esbuild_slash_linux-ia32";
+      packageName = "@esbuild/linux-ia32";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz";
+        sha512 = "w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==";
+      };
+    };
+    "@esbuild/linux-ia32-0.18.20" = {
+      name = "_at_esbuild_slash_linux-ia32";
+      packageName = "@esbuild/linux-ia32";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz";
+        sha512 = "P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==";
+      };
+    };
+    "@esbuild/linux-loong64-0.17.19" = {
+      name = "_at_esbuild_slash_linux-loong64";
+      packageName = "@esbuild/linux-loong64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz";
+        sha512 = "2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==";
+      };
+    };
+    "@esbuild/linux-loong64-0.18.20" = {
+      name = "_at_esbuild_slash_linux-loong64";
+      packageName = "@esbuild/linux-loong64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz";
+        sha512 = "nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==";
+      };
+    };
+    "@esbuild/linux-mips64el-0.17.19" = {
+      name = "_at_esbuild_slash_linux-mips64el";
+      packageName = "@esbuild/linux-mips64el";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz";
+        sha512 = "LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==";
+      };
+    };
+    "@esbuild/linux-mips64el-0.18.20" = {
+      name = "_at_esbuild_slash_linux-mips64el";
+      packageName = "@esbuild/linux-mips64el";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz";
+        sha512 = "d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==";
+      };
+    };
+    "@esbuild/linux-ppc64-0.17.19" = {
+      name = "_at_esbuild_slash_linux-ppc64";
+      packageName = "@esbuild/linux-ppc64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz";
+        sha512 = "/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==";
+      };
+    };
+    "@esbuild/linux-ppc64-0.18.20" = {
+      name = "_at_esbuild_slash_linux-ppc64";
+      packageName = "@esbuild/linux-ppc64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz";
+        sha512 = "WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==";
+      };
+    };
+    "@esbuild/linux-riscv64-0.17.19" = {
+      name = "_at_esbuild_slash_linux-riscv64";
+      packageName = "@esbuild/linux-riscv64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz";
+        sha512 = "FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==";
+      };
+    };
+    "@esbuild/linux-riscv64-0.18.20" = {
+      name = "_at_esbuild_slash_linux-riscv64";
+      packageName = "@esbuild/linux-riscv64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz";
+        sha512 = "WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==";
+      };
+    };
+    "@esbuild/linux-s390x-0.17.19" = {
+      name = "_at_esbuild_slash_linux-s390x";
+      packageName = "@esbuild/linux-s390x";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz";
+        sha512 = "IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==";
+      };
+    };
+    "@esbuild/linux-s390x-0.18.20" = {
+      name = "_at_esbuild_slash_linux-s390x";
+      packageName = "@esbuild/linux-s390x";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz";
+        sha512 = "+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==";
+      };
+    };
+    "@esbuild/linux-x64-0.17.19" = {
+      name = "_at_esbuild_slash_linux-x64";
+      packageName = "@esbuild/linux-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz";
+        sha512 = "68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==";
+      };
+    };
+    "@esbuild/linux-x64-0.18.20" = {
+      name = "_at_esbuild_slash_linux-x64";
+      packageName = "@esbuild/linux-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz";
+        sha512 = "UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==";
+      };
+    };
+    "@esbuild/netbsd-x64-0.17.19" = {
+      name = "_at_esbuild_slash_netbsd-x64";
+      packageName = "@esbuild/netbsd-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz";
+        sha512 = "CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==";
+      };
+    };
+    "@esbuild/netbsd-x64-0.18.20" = {
+      name = "_at_esbuild_slash_netbsd-x64";
+      packageName = "@esbuild/netbsd-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz";
+        sha512 = "iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==";
+      };
+    };
+    "@esbuild/openbsd-x64-0.17.19" = {
+      name = "_at_esbuild_slash_openbsd-x64";
+      packageName = "@esbuild/openbsd-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz";
+        sha512 = "cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==";
+      };
+    };
+    "@esbuild/openbsd-x64-0.18.20" = {
+      name = "_at_esbuild_slash_openbsd-x64";
+      packageName = "@esbuild/openbsd-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz";
+        sha512 = "e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==";
+      };
+    };
+    "@esbuild/sunos-x64-0.17.19" = {
+      name = "_at_esbuild_slash_sunos-x64";
+      packageName = "@esbuild/sunos-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz";
+        sha512 = "vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==";
+      };
+    };
+    "@esbuild/sunos-x64-0.18.20" = {
+      name = "_at_esbuild_slash_sunos-x64";
+      packageName = "@esbuild/sunos-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz";
+        sha512 = "kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==";
+      };
+    };
+    "@esbuild/win32-arm64-0.17.19" = {
+      name = "_at_esbuild_slash_win32-arm64";
+      packageName = "@esbuild/win32-arm64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz";
+        sha512 = "yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==";
+      };
+    };
+    "@esbuild/win32-arm64-0.18.20" = {
+      name = "_at_esbuild_slash_win32-arm64";
+      packageName = "@esbuild/win32-arm64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz";
+        sha512 = "ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==";
+      };
+    };
+    "@esbuild/win32-ia32-0.17.19" = {
+      name = "_at_esbuild_slash_win32-ia32";
+      packageName = "@esbuild/win32-ia32";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz";
+        sha512 = "eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==";
+      };
+    };
+    "@esbuild/win32-ia32-0.18.20" = {
+      name = "_at_esbuild_slash_win32-ia32";
+      packageName = "@esbuild/win32-ia32";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz";
+        sha512 = "Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==";
+      };
+    };
+    "@esbuild/win32-x64-0.17.19" = {
+      name = "_at_esbuild_slash_win32-x64";
+      packageName = "@esbuild/win32-x64";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz";
+        sha512 = "lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==";
+      };
+    };
+    "@esbuild/win32-x64-0.18.20" = {
+      name = "_at_esbuild_slash_win32-x64";
+      packageName = "@esbuild/win32-x64";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz";
+        sha512 = "kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==";
+      };
+    };
+    "@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 = "QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==";
+      };
+    };
+    "@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 = "1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==";
+      };
+    };
+    "@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 = "yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==";
+      };
+    };
+    "@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 = "entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==";
+      };
+    };
+    "@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 = "tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==";
+      };
+    };
+    "@isaacs/cliui-8.0.2" = {
+      name = "_at_isaacs_slash_cliui";
+      packageName = "@isaacs/cliui";
+      version = "8.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz";
+        sha512 = "O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==";
+      };
+    };
+    "@jridgewell/gen-mapping-0.3.3" = {
+      name = "_at_jridgewell_slash_gen-mapping";
+      packageName = "@jridgewell/gen-mapping";
+      version = "0.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz";
+        sha512 = "HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==";
+      };
+    };
+    "@jridgewell/resolve-uri-3.1.1" = {
+      name = "_at_jridgewell_slash_resolve-uri";
+      packageName = "@jridgewell/resolve-uri";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz";
+        sha512 = "dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==";
+      };
+    };
+    "@jridgewell/set-array-1.1.2" = {
+      name = "_at_jridgewell_slash_set-array";
+      packageName = "@jridgewell/set-array";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz";
+        sha512 = "xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==";
+      };
+    };
+    "@jridgewell/source-map-0.3.5" = {
+      name = "_at_jridgewell_slash_source-map";
+      packageName = "@jridgewell/source-map";
+      version = "0.3.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz";
+        sha512 = "UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==";
+      };
+    };
+    "@jridgewell/sourcemap-codec-1.4.15" = {
+      name = "_at_jridgewell_slash_sourcemap-codec";
+      packageName = "@jridgewell/sourcemap-codec";
+      version = "1.4.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz";
+        sha512 = "eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==";
+      };
+    };
+    "@jridgewell/trace-mapping-0.3.20" = {
+      name = "_at_jridgewell_slash_trace-mapping";
+      packageName = "@jridgewell/trace-mapping";
+      version = "0.3.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz";
+        sha512 = "R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==";
+      };
+    };
+    "@kwsites/file-exists-1.1.1" = {
+      name = "_at_kwsites_slash_file-exists";
+      packageName = "@kwsites/file-exists";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz";
+        sha512 = "m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==";
+      };
+    };
+    "@kwsites/promise-deferred-1.1.1" = {
+      name = "_at_kwsites_slash_promise-deferred";
+      packageName = "@kwsites/promise-deferred";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz";
+        sha512 = "GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==";
+      };
+    };
+    "@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 = "bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==";
+      };
+    };
+    "@nodelib/fs.scandir-2.1.5" = {
+      name = "_at_nodelib_slash_fs.scandir";
+      packageName = "@nodelib/fs.scandir";
+      version = "2.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz";
+        sha512 = "vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==";
+      };
+    };
+    "@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 = "shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==";
+      };
+    };
+    "@nodelib/fs.stat-2.0.5" = {
+      name = "_at_nodelib_slash_fs.stat";
+      packageName = "@nodelib/fs.stat";
+      version = "2.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz";
+        sha512 = "RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==";
+      };
+    };
+    "@nodelib/fs.walk-1.2.8" = {
+      name = "_at_nodelib_slash_fs.walk";
+      packageName = "@nodelib/fs.walk";
+      version = "1.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz";
+        sha512 = "oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==";
+      };
+    };
+    "@npmcli/fs-3.1.0" = {
+      name = "_at_npmcli_slash_fs";
+      packageName = "@npmcli/fs";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz";
+        sha512 = "7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==";
+      };
+    };
+    "@sindresorhus/is-0.14.0" = {
+      name = "_at_sindresorhus_slash_is";
+      packageName = "@sindresorhus/is";
+      version = "0.14.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz";
+        sha512 = "9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==";
+      };
+    };
+    "@sindresorhus/is-2.1.1" = {
+      name = "_at_sindresorhus_slash_is";
+      packageName = "@sindresorhus/is";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz";
+        sha512 = "/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg==";
+      };
+    };
+    "@sindresorhus/is-4.6.0" = {
+      name = "_at_sindresorhus_slash_is";
+      packageName = "@sindresorhus/is";
+      version = "4.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz";
+        sha512 = "t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==";
+      };
+    };
+    "@szmarczak/http-timer-1.1.2" = {
+      name = "_at_szmarczak_slash_http-timer";
+      packageName = "@szmarczak/http-timer";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz";
+        sha512 = "XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==";
+      };
+    };
+    "@szmarczak/http-timer-4.0.6" = {
+      name = "_at_szmarczak_slash_http-timer";
+      packageName = "@szmarczak/http-timer";
+      version = "4.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz";
+        sha512 = "4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==";
+      };
+    };
+    "@tootallnate/once-2.0.0" = {
+      name = "_at_tootallnate_slash_once";
+      packageName = "@tootallnate/once";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz";
+        sha512 = "XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==";
+      };
+    };
+    "@types/cacheable-request-6.0.3" = {
+      name = "_at_types_slash_cacheable-request";
+      packageName = "@types/cacheable-request";
+      version = "6.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz";
+        sha512 = "IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==";
+      };
+    };
+    "@types/configstore-2.1.1" = {
+      name = "_at_types_slash_configstore";
+      packageName = "@types/configstore";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/configstore/-/configstore-2.1.1.tgz";
+        sha512 = "YY+hm3afkDHeSM2rsFXxeZtu0garnusBWNG1+7MknmDWQHqcH2w21/xOU9arJUi8ch4qyFklidANLCu3ihhVwQ==";
+      };
+    };
+    "@types/debug-0.0.30" = {
+      name = "_at_types_slash_debug";
+      packageName = "@types/debug";
+      version = "0.0.30";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/debug/-/debug-0.0.30.tgz";
+        sha512 = "orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==";
+      };
+    };
+    "@types/get-port-3.2.0" = {
+      name = "_at_types_slash_get-port";
+      packageName = "@types/get-port";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/get-port/-/get-port-3.2.0.tgz";
+        sha512 = "TiNg8R1kjDde5Pub9F9vCwZA/BNW9HeXP5b9j7Qucqncy/McfPZ6xze/EyBdXS5FhMIGN6Fx3vg75l5KHy3V1Q==";
+      };
+    };
+    "@types/glob-5.0.38" = {
+      name = "_at_types_slash_glob";
+      packageName = "@types/glob";
+      version = "5.0.38";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/glob/-/glob-5.0.38.tgz";
+        sha512 = "rTtf75rwyP9G2qO5yRpYtdJ6aU1QqEhWbtW55qEgquEDa6bXW0s2TWZfDm02GuppjEozOWG/F2UnPq5hAQb+gw==";
+      };
+    };
+    "@types/glob-7.2.0" = {
+      name = "_at_types_slash_glob";
+      packageName = "@types/glob";
+      version = "7.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz";
+        sha512 = "ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==";
+      };
+    };
+    "@types/html-minifier-terser-5.1.2" = {
+      name = "_at_types_slash_html-minifier-terser";
+      packageName = "@types/html-minifier-terser";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz";
+        sha512 = "h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w==";
+      };
+    };
+    "@types/http-cache-semantics-4.0.4" = {
+      name = "_at_types_slash_http-cache-semantics";
+      packageName = "@types/http-cache-semantics";
+      version = "4.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz";
+        sha512 = "1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==";
+      };
+    };
+    "@types/http-proxy-1.17.14" = {
+      name = "_at_types_slash_http-proxy";
+      packageName = "@types/http-proxy";
+      version = "1.17.14";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz";
+        sha512 = "SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==";
+      };
+    };
+    "@types/jest-27.5.2" = {
+      name = "_at_types_slash_jest";
+      packageName = "@types/jest";
+      version = "27.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz";
+        sha512 = "mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==";
+      };
+    };
+    "@types/json-schema-7.0.15" = {
+      name = "_at_types_slash_json-schema";
+      packageName = "@types/json-schema";
+      version = "7.0.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz";
+        sha512 = "5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==";
+      };
+    };
+    "@types/keyv-3.1.4" = {
+      name = "_at_types_slash_keyv";
+      packageName = "@types/keyv";
+      version = "3.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz";
+        sha512 = "BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==";
+      };
+    };
+    "@types/lodash-4.14.202" = {
+      name = "_at_types_slash_lodash";
+      packageName = "@types/lodash";
+      version = "4.14.202";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz";
+        sha512 = "OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==";
+      };
+    };
+    "@types/minimatch-5.1.2" = {
+      name = "_at_types_slash_minimatch";
+      packageName = "@types/minimatch";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz";
+        sha512 = "K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==";
+      };
+    };
+    "@types/mkdirp-0.5.2" = {
+      name = "_at_types_slash_mkdirp";
+      packageName = "@types/mkdirp";
+      version = "0.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.2.tgz";
+        sha512 = "U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==";
+      };
+    };
+    "@types/node-20.10.6" = {
+      name = "_at_types_slash_node";
+      packageName = "@types/node";
+      version = "20.10.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz";
+        sha512 = "Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==";
+      };
+    };
+    "@types/node-8.10.66" = {
+      name = "_at_types_slash_node";
+      packageName = "@types/node";
+      version = "8.10.66";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz";
+        sha512 = "tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==";
+      };
+    };
+    "@types/parse-json-4.0.2" = {
+      name = "_at_types_slash_parse-json";
+      packageName = "@types/parse-json";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz";
+        sha512 = "dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==";
+      };
+    };
+    "@types/q-1.5.8" = {
+      name = "_at_types_slash_q";
+      packageName = "@types/q";
+      version = "1.5.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/q/-/q-1.5.8.tgz";
+        sha512 = "hroOstUScF6zhIi+5+x0dzqrHA1EJi+Irri6b1fxolMTqqHIV/Cg77EtnQcZqZCu8hR3mX2BzIxN4/GzI68Kfw==";
+      };
+    };
+    "@types/responselike-1.0.3" = {
+      name = "_at_types_slash_responselike";
+      packageName = "@types/responselike";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz";
+        sha512 = "H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==";
+      };
+    };
+    "@types/rimraf-2.0.5" = {
+      name = "_at_types_slash_rimraf";
+      packageName = "@types/rimraf";
+      version = "2.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.5.tgz";
+        sha512 = "YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==";
+      };
+    };
+    "@types/source-list-map-0.1.6" = {
+      name = "_at_types_slash_source-list-map";
+      packageName = "@types/source-list-map";
+      version = "0.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.6.tgz";
+        sha512 = "5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g==";
+      };
+    };
+    "@types/tapable-1.0.12" = {
+      name = "_at_types_slash_tapable";
+      packageName = "@types/tapable";
+      version = "1.0.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.12.tgz";
+        sha512 = "bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q==";
+      };
+    };
+    "@types/tmp-0.0.33" = {
+      name = "_at_types_slash_tmp";
+      packageName = "@types/tmp";
+      version = "0.0.33";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/tmp/-/tmp-0.0.33.tgz";
+        sha512 = "gVC1InwyVrO326wbBZw+AO3u2vRXz/iRWq9jYhpG4W8LXyIgDv3ZmcLQ5Q4Gs+gFMyqx+viFoFT+l3p61QFCmQ==";
+      };
+    };
+    "@types/uglify-js-3.17.4" = {
+      name = "_at_types_slash_uglify-js";
+      packageName = "@types/uglify-js";
+      version = "3.17.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.4.tgz";
+        sha512 = "Hm/T0kV3ywpJyMGNbsItdivRhYNCQQf1IIsYsXnoVPES4t+FMLyDe0/K+Ea7ahWtMtSNb22ZdY7MIyoD9rqARg==";
+      };
+    };
+    "@types/webpack-4.41.38" = {
+      name = "_at_types_slash_webpack";
+      packageName = "@types/webpack";
+      version = "4.41.38";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.38.tgz";
+        sha512 = "oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw==";
+      };
+    };
+    "@types/webpack-sources-3.2.3" = {
+      name = "_at_types_slash_webpack-sources";
+      packageName = "@types/webpack-sources";
+      version = "3.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-3.2.3.tgz";
+        sha512 = "4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw==";
+      };
+    };
+    "@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 = "C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==";
+      };
+    };
+    "@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 = "TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==";
+      };
+    };
+    "@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 = "NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==";
+      };
+    };
+    "@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 = "qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==";
+      };
+    };
+    "@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 = "ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==";
+      };
+    };
+    "@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 = "OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==";
+      };
+    };
+    "@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 = "MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==";
+      };
+    };
+    "@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 = "R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==";
+      };
+    };
+    "@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 = "XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==";
+      };
+    };
+    "@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 = "dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==";
+      };
+    };
+    "@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 = "ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==";
+      };
+    };
+    "@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 = "GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==";
+      };
+    };
+    "@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 = "FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==";
+      };
+    };
+    "@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 = "cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==";
+      };
+    };
+    "@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 = "Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==";
+      };
+    };
+    "@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 = "9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==";
+      };
+    };
+    "@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 = "qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==";
+      };
+    };
+    "@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 = "2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==";
+      };
+    };
+    "@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 = "DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==";
+      };
+    };
+    "@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 = "NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==";
+      };
+    };
+    "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 = "nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==";
+      };
+    };
+    "accepts-1.3.8" = {
+      name = "accepts";
+      packageName = "accepts";
+      version = "1.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz";
+        sha512 = "PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==";
+      };
+    };
+    "acorn-6.4.2" = {
+      name = "acorn";
+      packageName = "acorn";
+      version = "6.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz";
+        sha512 = "XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==";
+      };
+    };
+    "acorn-8.11.3" = {
+      name = "acorn";
+      packageName = "acorn";
+      version = "8.11.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz";
+        sha512 = "Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==";
+      };
+    };
+    "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 = "z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg==";
+      };
+    };
+    "agent-base-6.0.2" = {
+      name = "agent-base";
+      packageName = "agent-base";
+      version = "6.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz";
+        sha512 = "RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==";
+      };
+    };
+    "agentkeepalive-4.5.0" = {
+      name = "agentkeepalive";
+      packageName = "agentkeepalive";
+      version = "4.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz";
+        sha512 = "5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==";
+      };
+    };
+    "aggregate-error-3.1.0" = {
+      name = "aggregate-error";
+      packageName = "aggregate-error";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz";
+        sha512 = "4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==";
+      };
+    };
+    "ajv-6.12.6" = {
+      name = "ajv";
+      packageName = "ajv";
+      version = "6.12.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz";
+        sha512 = "j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==";
+      };
+    };
+    "ajv-8.12.0" = {
+      name = "ajv";
+      packageName = "ajv";
+      version = "8.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz";
+        sha512 = "sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==";
+      };
+    };
+    "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 = "DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==";
+      };
+    };
+    "ajv-keywords-3.5.2" = {
+      name = "ajv-keywords";
+      packageName = "ajv-keywords";
+      version = "3.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz";
+        sha512 = "5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==";
+      };
+    };
+    "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";
+        sha512 = "0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ==";
+      };
+    };
+    "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 = "hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==";
+      };
+    };
+    "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 = "cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==";
+      };
+    };
+    "ansi-escapes-4.3.2" = {
+      name = "ansi-escapes";
+      packageName = "ansi-escapes";
+      version = "4.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz";
+        sha512 = "gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==";
+      };
+    };
+    "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";
+        sha512 = "JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==";
+      };
+    };
+    "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";
+        sha512 = "TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==";
+      };
+    };
+    "ansi-regex-3.0.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz";
+        sha512 = "+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==";
+      };
+    };
+    "ansi-regex-4.1.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz";
+        sha512 = "ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==";
+      };
+    };
+    "ansi-regex-5.0.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz";
+        sha512 = "quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==";
+      };
+    };
+    "ansi-regex-6.0.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz";
+        sha512 = "n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==";
+      };
+    };
+    "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";
+        sha512 = "kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==";
+      };
+    };
+    "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 = "VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==";
+      };
+    };
+    "ansi-styles-4.3.0" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz";
+        sha512 = "zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==";
+      };
+    };
+    "ansi-styles-5.2.0" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "5.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz";
+        sha512 = "Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==";
+      };
+    };
+    "ansi-styles-6.2.1" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "6.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz";
+        sha512 = "bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==";
+      };
+    };
+    "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 = "5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==";
+      };
+    };
+    "anymatch-3.1.3" = {
+      name = "anymatch";
+      packageName = "anymatch";
+      version = "3.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz";
+        sha512 = "KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==";
+      };
+    };
+    "application-config-path-0.1.1" = {
+      name = "application-config-path";
+      packageName = "application-config-path";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/application-config-path/-/application-config-path-0.1.1.tgz";
+        sha512 = "zy9cHePtMP0YhwG+CfHm0bgwdnga2X3gZexpdCwEj//dpb+TKajtiC8REEUJUSq6Ab4f9cgNy2l8ObXzCXFkEw==";
+      };
+    };
+    "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 = "Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==";
+      };
+    };
+    "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 = "o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==";
+      };
+    };
+    "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";
+        sha512 = "YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==";
+      };
+    };
+    "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 = "L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==";
+      };
+    };
+    "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";
+        sha512 = "sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==";
+      };
+    };
+    "array-buffer-byte-length-1.0.0" = {
+      name = "array-buffer-byte-length";
+      packageName = "array-buffer-byte-length";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz";
+        sha512 = "LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==";
+      };
+    };
+    "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";
+        sha512 = "VW0FpCIhjZdarWjIz8Vpva7U95fl2Jn+b+mmFFMLn8PIVscOQcAgEznwUzTEuUHuqZqIxwzRlcaN/urTFFQoiw==";
+      };
+    };
+    "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";
+        sha512 = "PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==";
+      };
+    };
+    "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 = "hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==";
+      };
+    };
+    "array-map-0.0.1" = {
+      name = "array-map";
+      packageName = "array-map";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-map/-/array-map-0.0.1.tgz";
+        sha512 = "sxHIeJTGEsRC8/hYkZzdJNNPZ41EXHVys7pqMw1iwE/Kx8/hto0UbDuGQsSJ0ujPovj9qUZl6EOY/EiZ2g3d9Q==";
+      };
+    };
+    "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";
+        sha512 = "8jR+StqaC636u7h3ye1co3lQRefgVVUQUhuAmRbDqIMeR2yuXzRvkCNQiQ5J/wbREmoBLNtp13dhaaVpZQDRUw==";
+      };
+    };
+    "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";
+        sha512 = "Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==";
+      };
+    };
+    "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 = "HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==";
+      };
+    };
+    "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";
+        sha512 = "MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==";
+      };
+    };
+    "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";
+        sha512 = "SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==";
+      };
+    };
+    "array.prototype.reduce-1.0.6" = {
+      name = "array.prototype.reduce";
+      packageName = "array.prototype.reduce";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.6.tgz";
+        sha512 = "UW+Mz8LG/sPSU8jRDCjVr6J/ZKAGpHfwrZ6kWTG5qCxIEiXdVshqGnu5vEZA8S1y6X4aCSbQZ0/EEsfvEvBiSg==";
+      };
+    };
+    "arraybuffer.prototype.slice-1.0.2" = {
+      name = "arraybuffer.prototype.slice";
+      packageName = "arraybuffer.prototype.slice";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz";
+        sha512 = "yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==";
+      };
+    };
+    "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";
+        sha512 = "BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==";
+      };
+    };
+    "asn1-0.2.6" = {
+      name = "asn1";
+      packageName = "asn1";
+      version = "0.2.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz";
+        sha512 = "ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==";
+      };
+    };
+    "asn1.js-5.4.1" = {
+      name = "asn1.js";
+      packageName = "asn1.js";
+      version = "5.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz";
+        sha512 = "+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==";
+      };
+    };
+    "assert-1.5.1" = {
+      name = "assert";
+      packageName = "assert";
+      version = "1.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/assert/-/assert-1.5.1.tgz";
+        sha512 = "zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A==";
+      };
+    };
+    "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";
+        sha512 = "NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==";
+      };
+    };
+    "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 = "iqXT/CtP013CO+IZJG7f4/KmUnde+nn6FSksAhrGRbT1GODsFU3xocP6A5NkTFoey3XOI9n1ZY0QmX/mY74gNA==";
+      };
+    };
+    "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";
+        sha512 = "Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==";
+      };
+    };
+    "astral-regex-2.0.0" = {
+      name = "astral-regex";
+      packageName = "astral-regex";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz";
+        sha512 = "Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==";
+      };
+    };
+    "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";
+        sha512 = "l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==";
+      };
+    };
+    "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";
+        sha512 = "5mO7DX4CbJzp9zjaFXusQQ4tzKJARjNB1Ih1pVBi8wkbmXy/xzIDgEMXxWePLzt2OdFwaxfneIlT1nCiXubrPQ==";
+      };
+    };
+    "async-2.6.4" = {
+      name = "async";
+      packageName = "async";
+      version = "2.6.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async/-/async-2.6.4.tgz";
+        sha512 = "mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==";
+      };
+    };
+    "async-each-1.0.6" = {
+      name = "async-each";
+      packageName = "async-each";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz";
+        sha512 = "c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==";
+      };
+    };
+    "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 = "csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==";
+      };
+    };
+    "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";
+        sha512 = "Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==";
+      };
+    };
+    "at-least-node-1.0.0" = {
+      name = "at-least-node";
+      packageName = "at-least-node";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz";
+        sha512 = "+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==";
+      };
+    };
+    "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 = "Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==";
+      };
+    };
+    "autoprefixer-10.1.0" = {
+      name = "autoprefixer";
+      packageName = "autoprefixer";
+      version = "10.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.1.0.tgz";
+        sha512 = "0/lBNwN+ZUnb5su18NZo5MBIjDaq6boQKZcxwy86Gip/CmXA2zZqUoFQLCNAGI5P25ZWSP2RWdhDJ8osfKEjoQ==";
+      };
+    };
+    "available-typed-arrays-1.0.5" = {
+      name = "available-typed-arrays";
+      packageName = "available-typed-arrays";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz";
+        sha512 = "DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==";
+      };
+    };
+    "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";
+        sha512 = "08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==";
+      };
+    };
+    "aws4-1.12.0" = {
+      name = "aws4";
+      packageName = "aws4";
+      version = "1.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz";
+        sha512 = "NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==";
+      };
+    };
+    "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 = "qWWzi4TlddohA91bFwgt6zO/J0X+io7Qp184Fw0m2JYRSTZnJbFR8+07KmzudHCZgOiKRCrjhylwv9Xd8gfhVQ==";
+      };
+    };
+    "babel-loader-8.2.2" = {
+      name = "babel-loader";
+      packageName = "babel-loader";
+      version = "8.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz";
+        sha512 = "JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==";
+      };
+    };
+    "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";
+        sha512 = "C4Aq+GaAj83pRQ0EFgTvw5YO6T3Qz2KGrNRwIj9mSoNHVvdZY4KO2uA6HNtNXCw993iSZnckY1aLW8nOi8i4+w==";
+      };
+    };
+    "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";
+        sha512 = "ocgA9VJvyxwt+qJB0ncxV8kb/CjfTcECUY4tQ5VT7nP6Aohzobm8CDFaQ5FHdvZQzLmf0sgDxB8iRXZXxwZcyA==";
+      };
+    };
+    "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";
+        sha512 = "v7NCdzdD8DkDNmZfX4ZhOD9C573rbGnYtuxR1hKPPMf9eYNiopXXr9DnZ2KkiX5SO+mHAX2w815Piphb9UidZQ==";
+      };
+    };
+    "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";
+        sha512 = "ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==";
+      };
+    };
+    "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 = "q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==";
+      };
+    };
+    "balanced-match-1.0.2" = {
+      name = "balanced-match";
+      packageName = "balanced-match";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz";
+        sha512 = "3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==";
+      };
+    };
+    "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 = "5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==";
+      };
+    };
+    "base64-js-1.5.1" = {
+      name = "base64-js";
+      packageName = "base64-js";
+      version = "1.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz";
+        sha512 = "AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==";
+      };
+    };
+    "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";
+        sha512 = "x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==";
+      };
+    };
+    "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";
+        sha512 = "qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==";
+      };
+    };
+    "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 = "+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==";
+      };
+    };
+    "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 = "vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==";
+      };
+    };
+    "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";
+        sha512 = "D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==";
+      };
+    };
+    "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 = "Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==";
+      };
+    };
+    "binary-extensions-2.2.0" = {
+      name = "binary-extensions";
+      packageName = "binary-extensions";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz";
+        sha512 = "jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==";
+      };
+    };
+    "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 = "p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==";
+      };
+    };
+    "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 = "Y+Wvypk3JhH5GPZAvlwJAWOVH/OsOhQMSj37vySuWHwQivoALplPxfBA8b973rFJI7OS+O+1YmmYXIiEXVMAcw==";
+      };
+    };
+    "binwrap-0.2.3" = {
+      name = "binwrap";
+      packageName = "binwrap";
+      version = "0.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/binwrap/-/binwrap-0.2.3.tgz";
+        sha512 = "N4Pm7iyDEv0BrAMs+dny8WQa+e0nNTdzn2ODkf/MM6XBtKSCxCSUA1ZOQGoc1n7mUqdgOS5pwjsW91rmXVxy2Q==";
+      };
+    };
+    "bl-4.1.0" = {
+      name = "bl";
+      packageName = "bl";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz";
+        sha512 = "1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==";
+      };
+    };
+    "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 = "XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==";
+      };
+    };
+    "bn.js-4.12.0" = {
+      name = "bn.js";
+      packageName = "bn.js";
+      version = "4.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz";
+        sha512 = "c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==";
+      };
+    };
+    "bn.js-5.2.1" = {
+      name = "bn.js";
+      packageName = "bn.js";
+      version = "5.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz";
+        sha512 = "eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==";
+      };
+    };
+    "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";
+        sha512 = "XIXhPptoLGNcvFyyOzjNXCjDYIbYj4iuXO0VU9lM0f3kYdG0ar5yg7C+pIc3OyoTlZXDu5ObpLTmS2Cgp89oDg==";
+      };
+    };
+    "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 = "dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==";
+      };
+    };
+    "body-parser-1.20.1" = {
+      name = "body-parser";
+      packageName = "body-parser";
+      version = "1.20.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz";
+        sha512 = "jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==";
+      };
+    };
+    "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";
+        sha512 = "RaVTblr+OnEli0r/ud8InrU7D+G0y6aJhlxaLa6Pwty4+xoxboF1BsUI45tujvRpbj9dQVoglChqonGAsjEBYg==";
+      };
+    };
+    "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";
+        sha512 = "JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==";
+      };
+    };
+    "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 = "iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==";
+      };
+    };
+    "brace-expansion-2.0.1" = {
+      name = "brace-expansion";
+      packageName = "brace-expansion";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz";
+        sha512 = "XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==";
+      };
+    };
+    "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 = "aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==";
+      };
+    };
+    "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 = "b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==";
+      };
+    };
+    "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";
+        sha512 = "cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==";
+      };
+    };
+    "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 = "+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==";
+      };
+    };
+    "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 = "sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==";
+      };
+    };
+    "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 = "BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==";
+      };
+    };
+    "browserify-rsa-4.1.0" = {
+      name = "browserify-rsa";
+      packageName = "browserify-rsa";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz";
+        sha512 = "AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==";
+      };
+    };
+    "browserify-sign-4.2.2" = {
+      name = "browserify-sign";
+      packageName = "browserify-sign";
+      version = "4.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz";
+        sha512 = "1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==";
+      };
+    };
+    "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 = "Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==";
+      };
+    };
+    "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 = "VBorw+tgpOtZ1BYhrVSVTzTt/3+vSE3eFUh0N2GCFK1HffceOaf32YS/bs6WiFhjDAblAFrx85jMy3BG9fBK2Q==";
+      };
+    };
+    "browserslist-4.22.2" = {
+      name = "browserslist";
+      packageName = "browserslist";
+      version = "4.22.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz";
+        sha512 = "0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==";
+      };
+    };
+    "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 = "xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==";
+      };
+    };
+    "buffer-5.7.1" = {
+      name = "buffer";
+      packageName = "buffer";
+      version = "5.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz";
+        sha512 = "EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==";
+      };
+    };
+    "buffer-from-1.1.2" = {
+      name = "buffer-from";
+      packageName = "buffer-from";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz";
+        sha512 = "E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==";
+      };
+    };
+    "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 = "4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==";
+      };
+    };
+    "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";
+        sha512 = "571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==";
+      };
+    };
+    "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";
+        sha512 = "9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==";
+      };
+    };
+    "bufferutil-4.0.8" = {
+      name = "bufferutil";
+      packageName = "bufferutil";
+      version = "4.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz";
+        sha512 = "4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==";
+      };
+    };
+    "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";
+        sha512 = "HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==";
+      };
+    };
+    "busboy-1.6.0" = {
+      name = "busboy";
+      packageName = "busboy";
+      version = "1.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz";
+        sha512 = "8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==";
+      };
+    };
+    "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";
+        sha512 = "pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==";
+      };
+    };
+    "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 = "zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==";
+      };
+    };
+    "bytes-3.1.2" = {
+      name = "bytes";
+      packageName = "bytes";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz";
+        sha512 = "/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==";
+      };
+    };
+    "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 = "Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==";
+      };
+    };
+    "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 = "a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==";
+      };
+    };
+    "cacache-17.1.4" = {
+      name = "cacache";
+      packageName = "cacache";
+      version = "17.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz";
+        sha512 = "/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==";
+      };
+    };
+    "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 = "AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==";
+      };
+    };
+    "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 = "EMMbsiOTcdngM/K6gV/OxF2x0t07+vMOWxZNSCRQMjO2MY2nhZQ6OYhOOpyQrbhqsgtvKGI7hcq6xjnA92USjg==";
+      };
+    };
+    "cacheable-lookup-5.0.4" = {
+      name = "cacheable-lookup";
+      packageName = "cacheable-lookup";
+      version = "5.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz";
+        sha512 = "2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==";
+      };
+    };
+    "cacheable-request-6.1.0" = {
+      name = "cacheable-request";
+      packageName = "cacheable-request";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz";
+        sha512 = "Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==";
+      };
+    };
+    "cacheable-request-7.0.4" = {
+      name = "cacheable-request";
+      packageName = "cacheable-request";
+      version = "7.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz";
+        sha512 = "v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==";
+      };
+    };
+    "call-bind-1.0.5" = {
+      name = "call-bind";
+      packageName = "call-bind";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz";
+        sha512 = "C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==";
+      };
+    };
+    "call-me-maybe-1.0.2" = {
+      name = "call-me-maybe";
+      packageName = "call-me-maybe";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz";
+        sha512 = "HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==";
+      };
+    };
+    "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";
+        sha512 = "JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==";
+      };
+    };
+    "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";
+        sha512 = "MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==";
+      };
+    };
+    "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";
+        sha512 = "ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==";
+      };
+    };
+    "callsites-3.1.0" = {
+      name = "callsites";
+      packageName = "callsites";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz";
+        sha512 = "P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==";
+      };
+    };
+    "camel-case-4.1.2" = {
+      name = "camel-case";
+      packageName = "camel-case";
+      version = "4.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz";
+        sha512 = "gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==";
+      };
+    };
+    "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";
+        sha512 = "4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==";
+      };
+    };
+    "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 = "L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==";
+      };
+    };
+    "camelcase-6.3.0" = {
+      name = "camelcase";
+      packageName = "camelcase";
+      version = "6.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz";
+        sha512 = "Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==";
+      };
+    };
+    "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 = "bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==";
+      };
+    };
+    "caniuse-lite-1.0.30001574" = {
+      name = "caniuse-lite";
+      packageName = "caniuse-lite";
+      version = "1.0.30001574";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz";
+        sha512 = "BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==";
+      };
+    };
+    "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 = "/4YgnZS8y1UXXmC02xD5rRrBEu6T5ub+mQHLNRj0fzTRbgdBYhsNo2V5EqwgqrExjxsjtF/OpAKAMkKsxbD5XQ==";
+      };
+    };
+    "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";
+        sha512 = "4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==";
+      };
+    };
+    "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 = "Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==";
+      };
+    };
+    "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";
+        sha512 = "75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==";
+      };
+    };
+    "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";
+        sha512 = "U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==";
+      };
+    };
+    "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 = "ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==";
+      };
+    };
+    "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 = "Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==";
+      };
+    };
+    "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 = "4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==";
+      };
+    };
+    "chalk-4.1.2" = {
+      name = "chalk";
+      packageName = "chalk";
+      version = "4.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz";
+        sha512 = "oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==";
+      };
+    };
+    "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 = "mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==";
+      };
+    };
+    "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";
+        sha512 = "yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==";
+      };
+    };
+    "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 = "ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==";
+      };
+    };
+    "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 = "c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA==";
+      };
+    };
+    "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 = "/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w==";
+      };
+    };
+    "chokidar-3.4.2" = {
+      name = "chokidar";
+      packageName = "chokidar";
+      version = "3.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz";
+        sha512 = "IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==";
+      };
+    };
+    "chokidar-3.5.3" = {
+      name = "chokidar";
+      packageName = "chokidar";
+      version = "3.5.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz";
+        sha512 = "Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==";
+      };
+    };
+    "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 = "jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==";
+      };
+    };
+    "chownr-2.0.0" = {
+      name = "chownr";
+      packageName = "chownr";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz";
+        sha512 = "bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==";
+      };
+    };
+    "chrome-trace-event-1.0.3" = {
+      name = "chrome-trace-event";
+      packageName = "chrome-trace-event";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz";
+        sha512 = "p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==";
+      };
+    };
+    "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 = "Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==";
+      };
+    };
+    "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 = "qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==";
+      };
+    };
+    "clean-css-4.2.4" = {
+      name = "clean-css";
+      packageName = "clean-css";
+      version = "4.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz";
+        sha512 = "EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==";
+      };
+    };
+    "clean-stack-2.2.0" = {
+      name = "clean-stack";
+      packageName = "clean-stack";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz";
+        sha512 = "4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==";
+      };
+    };
+    "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";
+        sha512 = "8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==";
+      };
+    };
+    "cli-cursor-3.1.0" = {
+      name = "cli-cursor";
+      packageName = "cli-cursor";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz";
+        sha512 = "I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==";
+      };
+    };
+    "cli-spinners-2.9.2" = {
+      name = "cli-spinners";
+      packageName = "cli-spinners";
+      version = "2.9.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz";
+        sha512 = "ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==";
+      };
+    };
+    "cli-table-0.3.4" = {
+      name = "cli-table";
+      packageName = "cli-table";
+      version = "0.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-table/-/cli-table-0.3.4.tgz";
+        sha512 = "1vinpnX/ZERcmE443i3SZTmU5DF0rPO9DrL4I2iVAllhxzCM9SzPlHnz19fsZB78htkKZvYBvj6SZ6vXnaxmTA==";
+      };
+    };
+    "cli-width-2.2.1" = {
+      name = "cli-width";
+      packageName = "cli-width";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz";
+        sha512 = "GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==";
+      };
+    };
+    "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";
+        sha512 = "0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==";
+      };
+    };
+    "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 = "PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==";
+      };
+    };
+    "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 = "t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==";
+      };
+    };
+    "cliui-8.0.1" = {
+      name = "cliui";
+      packageName = "cliui";
+      version = "8.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz";
+        sha512 = "BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==";
+      };
+    };
+    "clone-1.0.4" = {
+      name = "clone";
+      packageName = "clone";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz";
+        sha512 = "JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==";
+      };
+    };
+    "clone-response-1.0.3" = {
+      name = "clone-response";
+      packageName = "clone-response";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz";
+        sha512 = "ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==";
+      };
+    };
+    "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 = "q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==";
+      };
+    };
+    "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";
+        sha512 = "RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==";
+      };
+    };
+    "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";
+        sha512 = "lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==";
+      };
+    };
+    "color-3.2.1" = {
+      name = "color";
+      packageName = "color";
+      version = "3.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color/-/color-3.2.1.tgz";
+        sha512 = "aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==";
+      };
+    };
+    "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 = "QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==";
+      };
+    };
+    "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 = "RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==";
+      };
+    };
+    "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";
+        sha512 = "72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==";
+      };
+    };
+    "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 = "dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==";
+      };
+    };
+    "color-string-1.9.1" = {
+      name = "color-string";
+      packageName = "color-string";
+      version = "1.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz";
+        sha512 = "shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==";
+      };
+    };
+    "colorette-1.4.0" = {
+      name = "colorette";
+      packageName = "colorette";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz";
+        sha512 = "Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==";
+      };
+    };
+    "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";
+        sha512 = "pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==";
+      };
+    };
+    "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 = "a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==";
+      };
+    };
+    "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 = "FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==";
+      };
+    };
+    "command-exists-1.2.9" = {
+      name = "command-exists";
+      packageName = "command-exists";
+      version = "1.2.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz";
+        sha512 = "LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==";
+      };
+    };
+    "commander-10.0.1" = {
+      name = "commander";
+      packageName = "commander";
+      version = "10.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz";
+        sha512 = "y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==";
+      };
+    };
+    "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 = "+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==";
+      };
+    };
+    "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 = "wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==";
+      };
+    };
+    "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 = "GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==";
+      };
+    };
+    "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 = "NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==";
+      };
+    };
+    "commander-5.1.0" = {
+      name = "commander";
+      packageName = "commander";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz";
+        sha512 = "P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==";
+      };
+    };
+    "commander-6.2.1" = {
+      name = "commander";
+      packageName = "commander";
+      version = "6.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz";
+        sha512 = "U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==";
+      };
+    };
+    "commander-9.5.0" = {
+      name = "commander";
+      packageName = "commander";
+      version = "9.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz";
+        sha512 = "KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==";
+      };
+    };
+    "common-tags-1.8.2" = {
+      name = "common-tags";
+      packageName = "common-tags";
+      version = "1.8.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz";
+        sha512 = "gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==";
+      };
+    };
+    "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";
+        sha512 = "W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==";
+      };
+    };
+    "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 = "W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==";
+      };
+    };
+    "component-emitter-1.3.1" = {
+      name = "component-emitter";
+      packageName = "component-emitter";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz";
+        sha512 = "T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==";
+      };
+    };
+    "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 = "AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==";
+      };
+    };
+    "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 = "jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==";
+      };
+    };
+    "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";
+        sha512 = "/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==";
+      };
+    };
+    "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";
+        sha512 = "H6xsIBfQ94aESBG8jGHXQ7i5AEpy5ZeVaLDOisDICiTCKpqEfr34/KmTrspKQNoLKNu9gTkovlpQcUi630AKiQ==";
+      };
+    };
+    "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 = "27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==";
+      };
+    };
+    "config-chain-1.1.13" = {
+      name = "config-chain";
+      packageName = "config-chain";
+      version = "1.1.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz";
+        sha512 = "qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==";
+      };
+    };
+    "connect-3.7.0" = {
+      name = "connect";
+      packageName = "connect";
+      version = "3.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz";
+        sha512 = "ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==";
+      };
+    };
+    "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 = "e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==";
+      };
+    };
+    "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 = "ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==";
+      };
+    };
+    "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";
+        sha512 = "xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==";
+      };
+    };
+    "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";
+        sha512 = "kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==";
+      };
+    };
+    "content-disposition-0.5.4" = {
+      name = "content-disposition";
+      packageName = "content-disposition";
+      version = "0.5.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz";
+        sha512 = "FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==";
+      };
+    };
+    "content-type-1.0.5" = {
+      name = "content-type";
+      packageName = "content-type";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz";
+        sha512 = "nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==";
+      };
+    };
+    "convert-source-map-1.9.0" = {
+      name = "convert-source-map";
+      packageName = "convert-source-map";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz";
+        sha512 = "ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==";
+      };
+    };
+    "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";
+        sha512 = "+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==";
+      };
+    };
+    "cookie-0.5.0" = {
+      name = "cookie";
+      packageName = "cookie";
+      version = "0.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz";
+        sha512 = "YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==";
+      };
+    };
+    "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";
+        sha512 = "QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==";
+      };
+    };
+    "cookie-signature-1.2.1" = {
+      name = "cookie-signature";
+      packageName = "cookie-signature";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.1.tgz";
+        sha512 = "78KWk9T26NhzXtuL26cIJ8/qNHANyJ/ZYrmEXFzUmhZdjpBv+DlWlOANRTGBt48YcyslsLrj0bMLFTmXvLRCOw==";
+      };
+    };
+    "copy-anything-2.0.6" = {
+      name = "copy-anything";
+      packageName = "copy-anything";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz";
+        sha512 = "1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==";
+      };
+    };
+    "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 = "f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==";
+      };
+    };
+    "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";
+        sha512 = "XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==";
+      };
+    };
+    "copy-webpack-plugin-5.1.2" = {
+      name = "copy-webpack-plugin";
+      packageName = "copy-webpack-plugin";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz";
+        sha512 = "Uh7crJAco3AjBvgAy9Z75CjK8IG+gxaErro71THQ+vv/bl4HaQcpkexAY8KVW/T6D2W2IRr+couF/knIRkZMIQ==";
+      };
+    };
+    "core-js-2.6.12" = {
+      name = "core-js";
+      packageName = "core-js";
+      version = "2.6.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz";
+        sha512 = "Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==";
+      };
+    };
+    "core-js-compat-3.35.0" = {
+      name = "core-js-compat";
+      packageName = "core-js-compat";
+      version = "3.35.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz";
+        sha512 = "5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==";
+      };
+    };
+    "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";
+        sha512 = "3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==";
+      };
+    };
+    "core-util-is-1.0.3" = {
+      name = "core-util-is";
+      packageName = "core-util-is";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz";
+        sha512 = "ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==";
+      };
+    };
+    "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 = "H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==";
+      };
+    };
+    "cosmiconfig-7.1.0" = {
+      name = "cosmiconfig";
+      packageName = "cosmiconfig";
+      version = "7.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz";
+        sha512 = "AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==";
+      };
+    };
+    "create-ecdh-4.0.4" = {
+      name = "create-ecdh";
+      packageName = "create-ecdh";
+      version = "4.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz";
+        sha512 = "mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==";
+      };
+    };
+    "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 = "z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==";
+      };
+    };
+    "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 = "MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==";
+      };
+    };
+    "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 = "2qCRJwBmPlRQXzd50k9gt9PaItultOP8lj/cKSH2Eai9aeBuNqAnDuyolAm9TGn6Pw/4BgbxtPJLU1S+tQ4WMQ==";
+      };
+    };
+    "cross-fetch-3.1.8" = {
+      name = "cross-fetch";
+      packageName = "cross-fetch";
+      version = "3.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz";
+        sha512 = "cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==";
+      };
+    };
+    "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";
+        sha512 = "77q+/Kkp43OBZUppmezGBqwB1qdjGk8y1Kb6zdPaYVz8qKFRdGpL6TRLqJhlhG5RhtGkNnKaeEYCt7b/vtYteg==";
+      };
+    };
+    "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";
+        sha512 = "pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==";
+      };
+    };
+    "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 = "eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==";
+      };
+    };
+    "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 = "6U/8SMK2FBNnB21oQ4+6Nsodxanw1gTkntYA2zBdkFYFu3ZDx65P2ONEXGSvob/QS6REjVHQ9zxzdOafwFdstw==";
+      };
+    };
+    "cross-spawn-7.0.3" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "7.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz";
+        sha512 = "iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==";
+      };
+    };
+    "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";
+        sha512 = "mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==";
+      };
+    };
+    "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 = "fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==";
+      };
+    };
+    "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";
+        sha512 = "zj5D7X1U2h2zsXOAM8EyUREBnnts6H+Jm+d1M2DbiQQcUtnqgQsMrdo8JW9R80YFUmIdBZeMu5wvYM7hcgWP/Q==";
+      };
+    };
+    "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 = "BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==";
+      };
+    };
+    "css-loader-4.3.0" = {
+      name = "css-loader";
+      packageName = "css-loader";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-loader/-/css-loader-4.3.0.tgz";
+        sha512 = "rdezjCjScIrsL8BSYszgT4s476IcNKt6yX69t0pHjJVnPUTDpn4WfIpDQTN3wCJvUvfsz/mFjuGOekf3PY3NUg==";
+      };
+    };
+    "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 = "Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==";
+      };
+    };
+    "css-select-4.3.0" = {
+      name = "css-select";
+      packageName = "css-select";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz";
+        sha512 = "wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==";
+      };
+    };
+    "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 = "jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==";
+      };
+    };
+    "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 = "DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==";
+      };
+    };
+    "css-tree-1.1.3" = {
+      name = "css-tree";
+      packageName = "css-tree";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz";
+        sha512 = "tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==";
+      };
+    };
+    "css-what-3.4.2" = {
+      name = "css-what";
+      packageName = "css-what";
+      version = "3.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz";
+        sha512 = "ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==";
+      };
+    };
+    "css-what-6.1.0" = {
+      name = "css-what";
+      packageName = "css-what";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz";
+        sha512 = "HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==";
+      };
+    };
+    "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 = "/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==";
+      };
+    };
+    "cssnano-4.1.11" = {
+      name = "cssnano";
+      packageName = "cssnano";
+      version = "4.1.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz";
+        sha512 = "6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==";
+      };
+    };
+    "cssnano-preset-default-4.0.8" = {
+      name = "cssnano-preset-default";
+      packageName = "cssnano-preset-default";
+      version = "4.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz";
+        sha512 = "LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==";
+      };
+    };
+    "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";
+        sha512 = "6RIcwmV3/cBMG8Aj5gucQRsJb4vv4I4rn6YjPbVWd5+Pn/fuG+YseGvXGk00XLkoZkaj31QOD7vMUpNPC4FIuw==";
+      };
+    };
+    "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";
+        sha512 = "JPMZ1TSMRUPVIqEalIBNoBtAYbi8okvcFns4O0YIhcdGebeYZK7dMyHJiQ6GqNBA9kE0Hym4Aqym5rPdsV/4Cw==";
+      };
+    };
+    "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 = "qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==";
+      };
+    };
+    "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 = "WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==";
+      };
+    };
+    "csso-4.2.0" = {
+      name = "csso";
+      packageName = "csso";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz";
+        sha512 = "wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==";
+      };
+    };
+    "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";
+        sha512 = "TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA==";
+      };
+    };
+    "cyclist-1.0.2" = {
+      name = "cyclist";
+      packageName = "cyclist";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cyclist/-/cyclist-1.0.2.tgz";
+        sha512 = "0sVXIohTfLqVIW3kb/0n6IiWF3Ifj5nm2XaSrLq2DI6fKIGa2fYAZdk917rUneaeLVpYfFcyXE2ft0fe3remsA==";
+      };
+    };
+    "d-1.0.1" = {
+      name = "d";
+      packageName = "d";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/d/-/d-1.0.1.tgz";
+        sha512 = "m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==";
+      };
+    };
+    "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";
+        sha512 = "jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==";
+      };
+    };
+    "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 = "bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==";
+      };
+    };
+    "debug-3.2.7" = {
+      name = "debug";
+      packageName = "debug";
+      version = "3.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz";
+        sha512 = "CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==";
+      };
+    };
+    "debug-4.3.4" = {
+      name = "debug";
+      packageName = "debug";
+      version = "4.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz";
+        sha512 = "PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==";
+      };
+    };
+    "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";
+        sha512 = "z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==";
+      };
+    };
+    "decode-uri-component-0.2.2" = {
+      name = "decode-uri-component";
+      packageName = "decode-uri-component";
+      version = "0.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz";
+        sha512 = "FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==";
+      };
+    };
+    "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";
+        sha512 = "BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==";
+      };
+    };
+    "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 = "TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw==";
+      };
+    };
+    "decompress-response-6.0.0" = {
+      name = "decompress-response";
+      packageName = "decompress-response";
+      version = "6.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz";
+        sha512 = "aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==";
+      };
+    };
+    "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";
+        sha512 = "FXgye2Jr6oEk01S7gmSrHrPEQ1ontR7wwl+nYiZ8h4SXlHVm0DYda74BIPcHz2s2qPz4+375IcAz1vsWLwddgQ==";
+      };
+    };
+    "deep-equal-1.1.2" = {
+      name = "deep-equal";
+      packageName = "deep-equal";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz";
+        sha512 = "5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==";
+      };
+    };
+    "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 = "LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==";
+      };
+    };
+    "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 = "h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==";
+      };
+    };
+    "defaults-1.0.4" = {
+      name = "defaults";
+      packageName = "defaults";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz";
+        sha512 = "eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==";
+      };
+    };
+    "defer-to-connect-1.1.3" = {
+      name = "defer-to-connect";
+      packageName = "defer-to-connect";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz";
+        sha512 = "0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==";
+      };
+    };
+    "defer-to-connect-2.0.1" = {
+      name = "defer-to-connect";
+      packageName = "defer-to-connect";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz";
+        sha512 = "4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==";
+      };
+    };
+    "define-data-property-1.1.1" = {
+      name = "define-data-property";
+      packageName = "define-data-property";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz";
+        sha512 = "E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==";
+      };
+    };
+    "define-properties-1.2.1" = {
+      name = "define-properties";
+      packageName = "define-properties";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz";
+        sha512 = "8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==";
+      };
+    };
+    "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";
+        sha512 = "Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==";
+      };
+    };
+    "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";
+        sha512 = "cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==";
+      };
+    };
+    "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 = "jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==";
+      };
+    };
+    "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 = "QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==";
+      };
+    };
+    "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";
+        sha512 = "ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==";
+      };
+    };
+    "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";
+        sha512 = "Jlk9xvkTDGXwZiIDyoM7+3AsuvJVoyOpRupvEVy9nX3YO3/ieZxhlgh8GpLNZ8AY7HjO6y2YwpMSh1ejhu3uIw==";
+      };
+    };
+    "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";
+        sha512 = "7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==";
+      };
+    };
+    "depd-2.0.0" = {
+      name = "depd";
+      packageName = "depd";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz";
+        sha512 = "g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==";
+      };
+    };
+    "des.js-1.1.0" = {
+      name = "des.js";
+      packageName = "des.js";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz";
+        sha512 = "r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==";
+      };
+    };
+    "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";
+        sha512 = "3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==";
+      };
+    };
+    "destroy-1.2.0" = {
+      name = "destroy";
+      packageName = "destroy";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz";
+        sha512 = "2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==";
+      };
+    };
+    "detect-libc-1.0.3" = {
+      name = "detect-libc";
+      packageName = "detect-libc";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz";
+        sha512 = "pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==";
+      };
+    };
+    "detect-node-2.1.0" = {
+      name = "detect-node";
+      packageName = "detect-node";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz";
+        sha512 = "T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==";
+      };
+    };
+    "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 = "5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==";
+      };
+    };
+    "devcert-1.2.2" = {
+      name = "devcert";
+      packageName = "devcert";
+      version = "1.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/devcert/-/devcert-1.2.2.tgz";
+        sha512 = "UsLqvtJGPiGwsIZnJINUnFYaWgK7CroreGRndWHZkRD58tPFr3pVbbSyHR8lbh41+azR4jKvuNZ+eCoBZGA5kA==";
+      };
+    };
+    "diff-sequences-27.5.1" = {
+      name = "diff-sequences";
+      packageName = "diff-sequences";
+      version = "27.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz";
+        sha512 = "k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==";
+      };
+    };
+    "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 = "kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==";
+      };
+    };
+    "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 = "f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==";
+      };
+    };
+    "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 = "WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==";
+      };
+    };
+    "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";
+        sha512 = "z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==";
+      };
+    };
+    "dns-packet-1.3.4" = {
+      name = "dns-packet";
+      packageName = "dns-packet";
+      version = "1.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz";
+        sha512 = "BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==";
+      };
+    };
+    "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";
+        sha512 = "Ix5PrWjphuSoUXV/Zv5gaFHjnaJtb02F2+Si3Ht9dyJ87+Z/lMmy+dpNHtTGraNK958ndXq2i+GLkWsWHcKaBQ==";
+      };
+    };
+    "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 = "gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==";
+      };
+    };
+    "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 = "2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==";
+      };
+    };
+    "dom-serializer-1.4.1" = {
+      name = "dom-serializer";
+      packageName = "dom-serializer";
+      version = "1.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz";
+        sha512 = "VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==";
+      };
+    };
+    "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 = "jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==";
+      };
+    };
+    "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 = "BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==";
+      };
+    };
+    "domelementtype-2.3.0" = {
+      name = "domelementtype";
+      packageName = "domelementtype";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz";
+        sha512 = "OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==";
+      };
+    };
+    "domhandler-4.3.1" = {
+      name = "domhandler";
+      packageName = "domhandler";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz";
+        sha512 = "GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==";
+      };
+    };
+    "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 = "Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==";
+      };
+    };
+    "domutils-2.8.0" = {
+      name = "domutils";
+      packageName = "domutils";
+      version = "2.8.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz";
+        sha512 = "w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==";
+      };
+    };
+    "dot-case-3.0.4" = {
+      name = "dot-case";
+      packageName = "dot-case";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz";
+        sha512 = "Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==";
+      };
+    };
+    "dot-prop-5.3.0" = {
+      name = "dot-prop";
+      packageName = "dot-prop";
+      version = "5.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz";
+        sha512 = "QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==";
+      };
+    };
+    "dotenv-8.2.0" = {
+      name = "dotenv";
+      packageName = "dotenv";
+      version = "8.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz";
+        sha512 = "8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==";
+      };
+    };
+    "duplexer-0.1.2" = {
+      name = "duplexer";
+      packageName = "duplexer";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz";
+        sha512 = "jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==";
+      };
+    };
+    "duplexer3-0.1.5" = {
+      name = "duplexer3";
+      packageName = "duplexer3";
+      version = "0.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz";
+        sha512 = "1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==";
+      };
+    };
+    "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 = "07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==";
+      };
+    };
+    "eastasianwidth-0.2.0" = {
+      name = "eastasianwidth";
+      packageName = "eastasianwidth";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz";
+        sha512 = "I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==";
+      };
+    };
+    "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";
+        sha512 = "eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==";
+      };
+    };
+    "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";
+        sha512 = "WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==";
+      };
+    };
+    "electron-to-chromium-1.4.622" = {
+      name = "electron-to-chromium";
+      packageName = "electron-to-chromium";
+      version = "1.4.622";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.622.tgz";
+        sha512 = "GZ47DEy0Gm2Z8RVG092CkFvX7SdotG57c4YZOe8W8qD4rOmk3plgeNmiLVRHP/Liqj1wRiY3uUUod9vb9hnxZA==";
+      };
+    };
+    "elliptic-6.5.4" = {
+      name = "elliptic";
+      packageName = "elliptic";
+      version = "6.5.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz";
+        sha512 = "iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==";
+      };
+    };
+    "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 = "rehOtJKZvoYDddlrd7AX5NAf0H+LUllnBg3AHaeaIOKWzw4W316d7Bkhlbo7aSG+hVUVWP2ihKwyYkDi589TfA==";
+      };
+    };
+    "elm-0.19.1-5" = {
+      name = "elm";
+      packageName = "elm";
+      version = "0.19.1-5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm/-/elm-0.19.1-5.tgz";
+        sha512 = "dyBoPvFiNLvxOStQJdyq28gZEjS/enZXdZ5yyCtNtDEMbFJJVQq4pYNRKvhrKKdlxNot6d96iQe1uczoqO5yvA==";
+      };
+    };
+    "elm-0.19.1-6" = {
+      name = "elm";
+      packageName = "elm";
+      version = "0.19.1-6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm/-/elm-0.19.1-6.tgz";
+        sha512 = "mKYyierHICPdMx/vhiIacdPmTPnh889gjHOZ75ZAoCxo3lZmSWbGP8HMw78wyctJH0HwvTmeKhlYSWboQNYPeQ==";
+      };
+    };
+    "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 = "jrXYtxk13LXtbxCiT23+RuNhUgbJgGBRW2sCqkMGojTZTFKttL1E8mSUvsIuomUiKLJOSXUZb3HjvwXNkJjTNA==";
+      };
+    };
+    "elm-doc-preview-5.0.5" = {
+      name = "elm-doc-preview";
+      packageName = "elm-doc-preview";
+      version = "5.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-doc-preview/-/elm-doc-preview-5.0.5.tgz";
+        sha512 = "GlWnbw2Bl+pA7QzRlqSYNGEQ3r3oNxMr2Nu0uiCM6AWzQ6Sk3BwtqSiUZvXLLlzWBV9pAQnY9U8xpDpPuh5rOQ==";
+      };
+    };
+    "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 = "qPDP/o/Fkifriaxaf3E7hHFB5L6Ijihyg8is4A6xna6/h/zebUiNssbQrxywI2oxNUkr6W/leEu/WlIC1tmVnw==";
+      };
+    };
+    "elm-hot-1.1.6" = {
+      name = "elm-hot";
+      packageName = "elm-hot";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-hot/-/elm-hot-1.1.6.tgz";
+        sha512 = "zYZJlfs7Gt4BdjA+D+857K+XAWzwwySJmXCgFpHW1dIEfaHSZCIPYPf7/jinZBLfKRkOAlKzI32AA84DY50g7Q==";
+      };
+    };
+    "elm-hot-webpack-loader-1.1.7" = {
+      name = "elm-hot-webpack-loader";
+      packageName = "elm-hot-webpack-loader";
+      version = "1.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-hot-webpack-loader/-/elm-hot-webpack-loader-1.1.7.tgz";
+        sha512 = "FcRN8UlTl52EigvGjTaG9rnfdUJYh88eWRrruUmZLNVb/71maM92l3HNDAcyztOj4pEYGhoo9DEHEquZm6B08A==";
+      };
+    };
+    "elm-solve-deps-wasm-1.0.2" = {
+      name = "elm-solve-deps-wasm";
+      packageName = "elm-solve-deps-wasm";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-solve-deps-wasm/-/elm-solve-deps-wasm-1.0.2.tgz";
+        sha512 = "qnwo7RO9IO7jd9SLHvIy0rSOEIlc/tNMTE9Cras0kl+b161PVidW4FvXo0MtXU8GAKi/2s/HYvhcnpR/NNQ1zw==";
+      };
+    };
+    "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 = "SyZgZ/hxq62budS3k0M1Qj1E8fIRvldSxFSm4XfzE6qRRuHAT2a82fxprZRZl1yG2GwnImGmhuKH5hSyjPpzjA==";
+      };
+    };
+    "elm-test-0.19.1-revision12" = {
+      name = "elm-test";
+      packageName = "elm-test";
+      version = "0.19.1-revision12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-test/-/elm-test-0.19.1-revision12.tgz";
+        sha512 = "5GV3WkJ8R/faOP1hwElQdNuCt8tKx2+1lsMrdeIYWSFz01Kp9gJl/R6zGtp4QUyrUtO8KnHsxjHrQNUf2CHkrg==";
+      };
+    };
+    "elm-tooling-1.15.0" = {
+      name = "elm-tooling";
+      packageName = "elm-tooling";
+      version = "1.15.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-tooling/-/elm-tooling-1.15.0.tgz";
+        sha512 = "quRE5LGJyrkPBoJ3MvFQ5RGgf80J0L0d3NkduStvXh4TmZuMXNC3Z/l2ZRoq2UTUaNWeYfO1Zx5wns1AvsTrnw==";
+      };
+    };
+    "elm-webpack-loader-6.0.1" = {
+      name = "elm-webpack-loader";
+      packageName = "elm-webpack-loader";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-webpack-loader/-/elm-webpack-loader-6.0.1.tgz";
+        sha512 = "SkltiDAbegaiPxsQq7sxqTyRUXzD4n6UaT9JTZXIYoAjAEi/ogaIbYLQD6Ne5ZaSW3JOo6S/vb+VO5v0qDdirw==";
+      };
+    };
+    "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 = "zNinzt6/YMr11HgeBlC9Z0UM3qHkYrGsWJTjrCmgBkKnaOLUzTP5K9N3z1RltyunItXtHAxb8DFPvMxlYRPv/Q==";
+      };
+    };
+    "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 = "CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==";
+      };
+    };
+    "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 = "MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==";
+      };
+    };
+    "emoji-regex-9.2.2" = {
+      name = "emoji-regex";
+      packageName = "emoji-regex";
+      version = "9.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz";
+        sha512 = "L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==";
+      };
+    };
+    "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";
+        sha512 = "knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==";
+      };
+    };
+    "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 = "/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==";
+      };
+    };
+    "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";
+        sha512 = "TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==";
+      };
+    };
+    "encoding-0.1.13" = {
+      name = "encoding";
+      packageName = "encoding";
+      version = "0.1.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz";
+        sha512 = "ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==";
+      };
+    };
+    "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 = "+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==";
+      };
+    };
+    "enhanced-resolve-4.5.0" = {
+      name = "enhanced-resolve";
+      packageName = "enhanced-resolve";
+      version = "4.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz";
+        sha512 = "Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==";
+      };
+    };
+    "entities-2.2.0" = {
+      name = "entities";
+      packageName = "entities";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz";
+        sha512 = "p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==";
+      };
+    };
+    "eol-0.9.1" = {
+      name = "eol";
+      packageName = "eol";
+      version = "0.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eol/-/eol-0.9.1.tgz";
+        sha512 = "Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==";
+      };
+    };
+    "err-code-2.0.3" = {
+      name = "err-code";
+      packageName = "err-code";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz";
+        sha512 = "2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==";
+      };
+    };
+    "errno-0.1.8" = {
+      name = "errno";
+      packageName = "errno";
+      version = "0.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz";
+        sha512 = "dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==";
+      };
+    };
+    "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 = "7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==";
+      };
+    };
+    "es-abstract-1.22.3" = {
+      name = "es-abstract";
+      packageName = "es-abstract";
+      version = "1.22.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz";
+        sha512 = "eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==";
+      };
+    };
+    "es-array-method-boxes-properly-1.0.0" = {
+      name = "es-array-method-boxes-properly";
+      packageName = "es-array-method-boxes-properly";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz";
+        sha512 = "wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==";
+      };
+    };
+    "es-set-tostringtag-2.0.2" = {
+      name = "es-set-tostringtag";
+      packageName = "es-set-tostringtag";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz";
+        sha512 = "BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==";
+      };
+    };
+    "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 = "QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==";
+      };
+    };
+    "es5-ext-0.10.62" = {
+      name = "es5-ext";
+      packageName = "es5-ext";
+      version = "0.10.62";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz";
+        sha512 = "BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==";
+      };
+    };
+    "es6-iterator-2.0.3" = {
+      name = "es6-iterator";
+      packageName = "es6-iterator";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz";
+        sha512 = "zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==";
+      };
+    };
+    "es6-promisify-6.1.1" = {
+      name = "es6-promisify";
+      packageName = "es6-promisify";
+      version = "6.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es6-promisify/-/es6-promisify-6.1.1.tgz";
+        sha512 = "HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==";
+      };
+    };
+    "es6-symbol-3.1.3" = {
+      name = "es6-symbol";
+      packageName = "es6-symbol";
+      version = "3.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz";
+        sha512 = "NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==";
+      };
+    };
+    "esbuild-0.17.19" = {
+      name = "esbuild";
+      packageName = "esbuild";
+      version = "0.17.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz";
+        sha512 = "XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==";
+      };
+    };
+    "esbuild-0.18.20" = {
+      name = "esbuild";
+      packageName = "esbuild";
+      version = "0.18.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz";
+        sha512 = "ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==";
+      };
+    };
+    "escalade-3.1.1" = {
+      name = "escalade";
+      packageName = "escalade";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz";
+        sha512 = "k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==";
+      };
+    };
+    "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";
+        sha512 = "NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==";
+      };
+    };
+    "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";
+        sha512 = "vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==";
+      };
+    };
+    "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 = "UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==";
+      };
+    };
+    "escape-string-regexp-4.0.0" = {
+      name = "escape-string-regexp";
+      packageName = "escape-string-regexp";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz";
+        sha512 = "TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==";
+      };
+    };
+    "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 = "p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==";
+      };
+    };
+    "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 = "eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==";
+      };
+    };
+    "esrecurse-4.3.0" = {
+      name = "esrecurse";
+      packageName = "esrecurse";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz";
+        sha512 = "KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==";
+      };
+    };
+    "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 = "39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==";
+      };
+    };
+    "estraverse-5.3.0" = {
+      name = "estraverse";
+      packageName = "estraverse";
+      version = "5.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz";
+        sha512 = "MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==";
+      };
+    };
+    "esutils-2.0.3" = {
+      name = "esutils";
+      packageName = "esutils";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz";
+        sha512 = "kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==";
+      };
+    };
+    "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";
+        sha512 = "aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==";
+      };
+    };
+    "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 = "tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==";
+      };
+    };
+    "eventemitter3-4.0.7" = {
+      name = "eventemitter3";
+      packageName = "eventemitter3";
+      version = "4.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz";
+        sha512 = "8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==";
+      };
+    };
+    "events-3.3.0" = {
+      name = "events";
+      packageName = "events";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/events/-/events-3.3.0.tgz";
+        sha512 = "mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==";
+      };
+    };
+    "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";
+        sha512 = "bbB5tEuvC+SuRUG64X8ghvjgiRniuA4WlehWbFnoN4z6TxDXpyX+BMHF7rMgZAqoe+EbyNRUbHN0uuP9phy5jQ==";
+      };
+    };
+    "eventsource-1.1.2" = {
+      name = "eventsource";
+      packageName = "eventsource";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eventsource/-/eventsource-1.1.2.tgz";
+        sha512 = "xAH3zWhgO2/3KIniEKYPr8plNSzlGINOUqYj0m0u7AB81iRw8b/3E73W6AuU+6klLbaSFmZnaETQ2lXPfAydrA==";
+      };
+    };
+    "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 = "/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==";
+      };
+    };
+    "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 = "adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==";
+      };
+    };
+    "execa-5.1.1" = {
+      name = "execa";
+      packageName = "execa";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz";
+        sha512 = "8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==";
+      };
+    };
+    "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";
+        sha512 = "w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==";
+      };
+    };
+    "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";
+        sha512 = "A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==";
+      };
+    };
+    "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";
+        sha512 = "CDaOBMB9knI6vx9SpIxEMOJ6VBbC2U/tYNILs0qv1YOZc15K9U2EcF06v10F0JX6IYcWnKYZJwIDJspEHLvUaQ==";
+      };
+    };
+    "express-4.18.2" = {
+      name = "express";
+      packageName = "express";
+      version = "4.18.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/express/-/express-4.18.2.tgz";
+        sha512 = "5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==";
+      };
+    };
+    "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";
+        sha512 = "Voh/dZzLoNVxd+foiLS24ch2ZBKEuSJyXjHIjE2mq5bKtII8JKUVRqhr5onD7nVXU8SCxJtn4LYKnHlypRYGOA==";
+      };
+    };
+    "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 = "KEyUw8AwRET2iFjFsI1EJQrJ/fHeGiJtgpYgEWG3yDv4l/To/m3a2GaYfeGyB3lsWdvbesjF5XCMx+SVBgAAYw==";
+      };
+    };
+    "ext-1.7.0" = {
+      name = "ext";
+      packageName = "ext";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz";
+        sha512 = "6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==";
+      };
+    };
+    "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 = "fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==";
+      };
+    };
+    "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";
+        sha512 = "zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==";
+      };
+    };
+    "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";
+        sha512 = "BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==";
+      };
+    };
+    "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 = "hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==";
+      };
+    };
+    "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 = "Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==";
+      };
+    };
+    "extract-files-9.0.0" = {
+      name = "extract-files";
+      packageName = "extract-files";
+      version = "9.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz";
+        sha512 = "CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==";
+      };
+    };
+    "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";
+        sha512 = "11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==";
+      };
+    };
+    "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";
+        sha512 = "GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==";
+      };
+    };
+    "fast-deep-equal-3.1.3" = {
+      name = "fast-deep-equal";
+      packageName = "fast-deep-equal";
+      version = "3.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz";
+        sha512 = "f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==";
+      };
+    };
+    "fast-diff-1.3.0" = {
+      name = "fast-diff";
+      packageName = "fast-diff";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz";
+        sha512 = "VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==";
+      };
+    };
+    "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 = "g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==";
+      };
+    };
+    "fast-glob-3.3.2" = {
+      name = "fast-glob";
+      packageName = "fast-glob";
+      version = "3.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz";
+        sha512 = "oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==";
+      };
+    };
+    "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 = "lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==";
+      };
+    };
+    "fastest-levenshtein-1.0.16" = {
+      name = "fastest-levenshtein";
+      packageName = "fastest-levenshtein";
+      version = "1.0.16";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz";
+        sha512 = "eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==";
+      };
+    };
+    "fastq-1.16.0" = {
+      name = "fastq";
+      packageName = "fastq";
+      version = "1.16.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz";
+        sha512 = "ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==";
+      };
+    };
+    "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";
+        sha512 = "Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ==";
+      };
+    };
+    "faye-websocket-0.11.4" = {
+      name = "faye-websocket";
+      packageName = "faye-websocket";
+      version = "0.11.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz";
+        sha512 = "CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==";
+      };
+    };
+    "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 = "0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==";
+      };
+    };
+    "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";
+        sha512 = "Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==";
+      };
+    };
+    "file-loader-6.2.0" = {
+      name = "file-loader";
+      packageName = "file-loader";
+      version = "6.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz";
+        sha512 = "qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==";
+      };
+    };
+    "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 = "0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==";
+      };
+    };
+    "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 = "7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==";
+      };
+    };
+    "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";
+        sha512 = "VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==";
+      };
+    };
+    "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 = "qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==";
+      };
+    };
+    "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 = "Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==";
+      };
+    };
+    "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 = "aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==";
+      };
+    };
+    "finalhandler-1.2.0" = {
+      name = "finalhandler";
+      packageName = "finalhandler";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz";
+        sha512 = "5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==";
+      };
+    };
+    "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";
+        sha512 = "+QhLzsS+vyYsZqojEIGDwzp5KxkhHs1BJUt2CtI93bL27SKj7H6FnAjwVIvjQiEXKV2qmgCj9ikqegVUIrw7ZA==";
+      };
+    };
+    "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";
+        sha512 = "7a4/LCiInB9xYMnAUEjLilL9FKclwbwK7VlXw+h5jMvT2TDFeYFCHM24O1XdnC/on/hx8mxVO3FTQkyHZnOghQ==";
+      };
+    };
+    "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";
+        sha512 = "46TFiBOzX7xq/PcSWfFwkyjpemdRnMe31UQF+os0y+1W3k95f6R4SEt02Hj4p3X0Mir9gfrkmOtshFidS0VPUg==";
+      };
+    };
+    "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 = "Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==";
+      };
+    };
+    "find-cache-dir-3.3.2" = {
+      name = "find-cache-dir";
+      packageName = "find-cache-dir";
+      version = "3.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz";
+        sha512 = "wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==";
+      };
+    };
+    "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 = "nM5UCbccD1G8CGK2GsM7ykG3ksOAl9E+34jiDfl07CAl2OPnLpBVWY2hlxEmIkSBfdJjSopEowWHrO0cI8RhxQ==";
+      };
+    };
+    "find-elm-dependencies-2.0.4" = {
+      name = "find-elm-dependencies";
+      packageName = "find-elm-dependencies";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-elm-dependencies/-/find-elm-dependencies-2.0.4.tgz";
+        sha512 = "x/4w4fVmlD2X4PD9oQ+yh9EyaQef6OtEULdMGBTuWx0Nkppvo2Z/bAiQioW2n+GdRYKypME2b9OmYTw5tw5qDg==";
+      };
+    };
+    "find-parent-dir-0.3.1" = {
+      name = "find-parent-dir";
+      packageName = "find-parent-dir";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.1.tgz";
+        sha512 = "o4UcykWV/XN9wm+jMEtWLPlV8RXCZnMhQI6F6OdHeSez7iiJWePw8ijOlskJZMsaQoGR/b7dH6lO02HhaTN7+A==";
+      };
+    };
+    "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";
+        sha512 = "jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==";
+      };
+    };
+    "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";
+        sha512 = "NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==";
+      };
+    };
+    "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 = "1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==";
+      };
+    };
+    "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 = "PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==";
+      };
+    };
+    "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";
+        sha512 = "JBzSqQYZvZaD3aHRG1okOog1aZXuXCWHcf9BzkpHYIN9s9zQQCjFajawWxGzDco50p9wtg93A5qC90gnnfngKg==";
+      };
+    };
+    "firstline-1.3.1" = {
+      name = "firstline";
+      packageName = "firstline";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/firstline/-/firstline-1.3.1.tgz";
+        sha512 = "ycwgqtoxujz1dm0kjkBFOPQMESxB9uKc/PlD951dQDIG+tBXRpYZC2UmJb0gDxopQ1ZX6oyRQN3goRczYu7Deg==";
+      };
+    };
+    "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 = "8KcmfI0jgSECnzdhucm0i7vrwef3BWwgjimW2YkRC5eSFwjb5DibVoA0YvgkYwwxuJi9c+7M7X3b3lX8o9B6wg==";
+      };
+    };
+    "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 = "3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==";
+      };
+    };
+    "folder-hash-3.3.3" = {
+      name = "folder-hash";
+      packageName = "folder-hash";
+      version = "3.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/folder-hash/-/folder-hash-3.3.3.tgz";
+        sha512 = "SDgHBgV+RCjrYs8aUwCb9rTgbTVuSdzvFmLaChsLre1yf+D64khCW++VYciaByZ8Rm0uKF8R/XEpXuTRSGUM1A==";
+      };
+    };
+    "follow-redirects-1.15.4" = {
+      name = "follow-redirects";
+      packageName = "follow-redirects";
+      version = "1.15.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz";
+        sha512 = "Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==";
+      };
+    };
+    "for-each-0.3.3" = {
+      name = "for-each";
+      packageName = "for-each";
+      version = "0.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz";
+        sha512 = "jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==";
+      };
+    };
+    "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";
+        sha512 = "7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==";
+      };
+    };
+    "foreground-child-3.1.1" = {
+      name = "foreground-child";
+      packageName = "foreground-child";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz";
+        sha512 = "TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==";
+      };
+    };
+    "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";
+        sha512 = "j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==";
+      };
+    };
+    "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 = "1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==";
+      };
+    };
+    "form-data-3.0.1" = {
+      name = "form-data";
+      packageName = "form-data";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz";
+        sha512 = "RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==";
+      };
+    };
+    "forwarded-0.2.0" = {
+      name = "forwarded";
+      packageName = "forwarded";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz";
+        sha512 = "buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==";
+      };
+    };
+    "fraction.js-4.3.7" = {
+      name = "fraction.js";
+      packageName = "fraction.js";
+      version = "4.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz";
+        sha512 = "ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==";
+      };
+    };
+    "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";
+        sha512 = "GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==";
+      };
+    };
+    "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";
+        sha512 = "zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==";
+      };
+    };
+    "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";
+        sha512 = "OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==";
+      };
+    };
+    "fs-extra-11.2.0" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "11.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz";
+        sha512 = "PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==";
+      };
+    };
+    "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";
+        sha512 = "DERmRq6uGnu7I4uFJiWQBe5pYy67v2oKowEi8jYA/52u/ZO9xXBP2HAGacD9Nus0UT/WhJFZTq8cWbxZqOHVUg==";
+      };
+    };
+    "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 = "q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==";
+      };
+    };
+    "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 = "GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==";
+      };
+    };
+    "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 = "YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==";
+      };
+    };
+    "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 = "yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==";
+      };
+    };
+    "fs-extra-9.1.0" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "9.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz";
+        sha512 = "hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==";
+      };
+    };
+    "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 = "GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==";
+      };
+    };
+    "fs-minipass-2.1.0" = {
+      name = "fs-minipass";
+      packageName = "fs-minipass";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz";
+        sha512 = "V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==";
+      };
+    };
+    "fs-minipass-3.0.3" = {
+      name = "fs-minipass";
+      packageName = "fs-minipass";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz";
+        sha512 = "XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==";
+      };
+    };
+    "fs-monkey-1.0.5" = {
+      name = "fs-monkey";
+      packageName = "fs-monkey";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz";
+        sha512 = "8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==";
+      };
+    };
+    "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 = "GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==";
+      };
+    };
+    "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";
+        sha512 = "gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==";
+      };
+    };
+    "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";
+        sha512 = "OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==";
+      };
+    };
+    "fsevents-1.2.13" = {
+      name = "fsevents";
+      packageName = "fsevents";
+      version = "1.2.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz";
+        sha512 = "oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==";
+      };
+    };
+    "fsevents-2.1.3" = {
+      name = "fsevents";
+      packageName = "fsevents";
+      version = "2.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz";
+        sha512 = "Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==";
+      };
+    };
+    "fsevents-2.3.3" = {
+      name = "fsevents";
+      packageName = "fsevents";
+      version = "2.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz";
+        sha512 = "5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==";
+      };
+    };
+    "function-bind-1.1.2" = {
+      name = "function-bind";
+      packageName = "function-bind";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz";
+        sha512 = "7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==";
+      };
+    };
+    "function.prototype.name-1.1.6" = {
+      name = "function.prototype.name";
+      packageName = "function.prototype.name";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz";
+        sha512 = "Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==";
+      };
+    };
+    "functions-have-names-1.2.3" = {
+      name = "functions-have-names";
+      packageName = "functions-have-names";
+      version = "1.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz";
+        sha512 = "xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==";
+      };
+    };
+    "gensync-1.0.0-beta.2" = {
+      name = "gensync";
+      packageName = "gensync";
+      version = "1.0.0-beta.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz";
+        sha512 = "3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==";
+      };
+    };
+    "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 = "3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==";
+      };
+    };
+    "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 = "DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==";
+      };
+    };
+    "get-intrinsic-1.2.2" = {
+      name = "get-intrinsic";
+      packageName = "get-intrinsic";
+      version = "1.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz";
+        sha512 = "0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==";
+      };
+    };
+    "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 = "I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==";
+      };
+    };
+    "get-port-3.2.0" = {
+      name = "get-port";
+      packageName = "get-port";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz";
+        sha512 = "x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==";
+      };
+    };
+    "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 = "zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==";
+      };
+    };
+    "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 = "GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==";
+      };
+    };
+    "get-stream-5.2.0" = {
+      name = "get-stream";
+      packageName = "get-stream";
+      version = "5.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz";
+        sha512 = "nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==";
+      };
+    };
+    "get-stream-6.0.1" = {
+      name = "get-stream";
+      packageName = "get-stream";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz";
+        sha512 = "ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==";
+      };
+    };
+    "get-symbol-description-1.0.0" = {
+      name = "get-symbol-description";
+      packageName = "get-symbol-description";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz";
+        sha512 = "2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==";
+      };
+    };
+    "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";
+        sha512 = "Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==";
+      };
+    };
+    "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";
+        sha512 = "0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==";
+      };
+    };
+    "git-clone-able-0.1.2" = {
+      name = "git-clone-able";
+      packageName = "git-clone-able";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/git-clone-able/-/git-clone-able-0.1.2.tgz";
+        sha512 = "0pcXixfRCfLXdkwC/FJxiYEg5sYnbqYqtMmtXRzlKrStI9tLev7G/PDuFH2GmySJQ3ix5YUPRN/OJEuFD827EA==";
+      };
+    };
+    "glob-10.3.10" = {
+      name = "glob";
+      packageName = "glob";
+      version = "10.3.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz";
+        sha512 = "fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==";
+      };
+    };
+    "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 = "hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==";
+      };
+    };
+    "glob-7.2.3" = {
+      name = "glob";
+      packageName = "glob";
+      version = "7.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz";
+        sha512 = "nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==";
+      };
+    };
+    "glob-8.1.0" = {
+      name = "glob";
+      packageName = "glob";
+      version = "8.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz";
+        sha512 = "r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==";
+      };
+    };
+    "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";
+        sha512 = "E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==";
+      };
+    };
+    "glob-parent-5.1.2" = {
+      name = "glob-parent";
+      packageName = "glob-parent";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz";
+        sha512 = "AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==";
+      };
+    };
+    "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";
+        sha512 = "Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig==";
+      };
+    };
+    "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 = "sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==";
+      };
+    };
+    "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";
+        sha512 = "5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==";
+      };
+    };
+    "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 = "WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==";
+      };
+    };
+    "globalthis-1.0.3" = {
+      name = "globalthis";
+      packageName = "globalthis";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz";
+        sha512 = "sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==";
+      };
+    };
+    "globby-11.1.0" = {
+      name = "globby";
+      packageName = "globby";
+      version = "11.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz";
+        sha512 = "jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==";
+      };
+    };
+    "globby-13.1.4" = {
+      name = "globby";
+      packageName = "globby";
+      version = "13.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz";
+        sha512 = "iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==";
+      };
+    };
+    "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";
+        sha512 = "KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==";
+      };
+    };
+    "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";
+        sha512 = "yANWAN2DUcBtuus5Cpd+SKROzXHs2iVXFZt/Ykrfz6SAXqacLX25NZpltE+39ceMexYF4TtEadjuSTw8+3wX4g==";
+      };
+    };
+    "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 = "oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==";
+      };
+    };
+    "gopd-1.0.1" = {
+      name = "gopd";
+      packageName = "gopd";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz";
+        sha512 = "d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==";
+      };
+    };
+    "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 = "aWTDeNw9g+XqEZNcTjMMZSy7B7yE9toWOFYip7ofFTLleJhvZwUxxTxkTpKvF+p1SAA4VHmuEy7PiHTHyq8tJg==";
+      };
+    };
+    "got-11.8.6" = {
+      name = "got";
+      packageName = "got";
+      version = "11.8.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/got/-/got-11.8.6.tgz";
+        sha512 = "6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==";
+      };
+    };
+    "got-9.6.0" = {
+      name = "got";
+      packageName = "got";
+      version = "9.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/got/-/got-9.6.0.tgz";
+        sha512 = "R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==";
+      };
+    };
+    "graceful-fs-4.2.11" = {
+      name = "graceful-fs";
+      packageName = "graceful-fs";
+      version = "4.2.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz";
+        sha512 = "RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==";
+      };
+    };
+    "graphql-16.8.1" = {
+      name = "graphql";
+      packageName = "graphql";
+      version = "16.8.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz";
+        sha512 = "59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==";
+      };
+    };
+    "graphql-request-3.7.0" = {
+      name = "graphql-request";
+      packageName = "graphql-request";
+      version = "3.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/graphql-request/-/graphql-request-3.7.0.tgz";
+        sha512 = "dw5PxHCgBneN2DDNqpWu8QkbbJ07oOziy8z+bK/TAXufsOLaETuVO4GkXrbs0WjhdKhBMN3BkpN/RIvUHkmNUQ==";
+      };
+    };
+    "gray-matter-4.0.3" = {
+      name = "gray-matter";
+      packageName = "gray-matter";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz";
+        sha512 = "5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==";
+      };
+    };
+    "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 = "5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==";
+      };
+    };
+    "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 = "9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==";
+      };
+    };
+    "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";
+        sha512 = "Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==";
+      };
+    };
+    "har-validator-5.1.5" = {
+      name = "har-validator";
+      packageName = "har-validator";
+      version = "5.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz";
+        sha512 = "nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==";
+      };
+    };
+    "has-1.0.4" = {
+      name = "has";
+      packageName = "has";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has/-/has-1.0.4.tgz";
+        sha512 = "qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==";
+      };
+    };
+    "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";
+        sha512 = "C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==";
+      };
+    };
+    "has-bigints-1.0.2" = {
+      name = "has-bigints";
+      packageName = "has-bigints";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz";
+        sha512 = "tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==";
+      };
+    };
+    "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";
+        sha512 = "sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==";
+      };
+    };
+    "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 = "EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==";
+      };
+    };
+    "has-property-descriptors-1.0.1" = {
+      name = "has-property-descriptors";
+      packageName = "has-property-descriptors";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz";
+        sha512 = "VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==";
+      };
+    };
+    "has-proto-1.0.1" = {
+      name = "has-proto";
+      packageName = "has-proto";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz";
+        sha512 = "7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==";
+      };
+    };
+    "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 = "3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==";
+      };
+    };
+    "has-symbols-1.0.3" = {
+      name = "has-symbols";
+      packageName = "has-symbols";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz";
+        sha512 = "l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==";
+      };
+    };
+    "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 = "vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==";
+      };
+    };
+    "has-tostringtag-1.0.0" = {
+      name = "has-tostringtag";
+      packageName = "has-tostringtag";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz";
+        sha512 = "kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==";
+      };
+    };
+    "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";
+        sha512 = "gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==";
+      };
+    };
+    "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";
+        sha512 = "IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==";
+      };
+    };
+    "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";
+        sha512 = "J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==";
+      };
+    };
+    "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";
+        sha512 = "ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==";
+      };
+    };
+    "hash-base-3.1.0" = {
+      name = "hash-base";
+      packageName = "hash-base";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz";
+        sha512 = "1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==";
+      };
+    };
+    "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 = "taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==";
+      };
+    };
+    "hasown-2.0.0" = {
+      name = "hasown";
+      packageName = "hasown";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz";
+        sha512 = "vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==";
+      };
+    };
+    "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 = "F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==";
+      };
+    };
+    "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 = "l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==";
+      };
+    };
+    "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";
+        sha512 = "Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==";
+      };
+    };
+    "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 = "eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==";
+      };
+    };
+    "hosted-git-info-2.8.9" = {
+      name = "hosted-git-info";
+      packageName = "hosted-git-info";
+      version = "2.8.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz";
+        sha512 = "mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==";
+      };
+    };
+    "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";
+        sha512 = "zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==";
+      };
+    };
+    "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";
+        sha512 = "M5ezZw4LzXbBKMruP+BNANf0k+19hDQMgpzBIYnya//Al+fjNct9Wf3b1WedLqdEs2hKBvxq/jh+DsHJLj0F9A==";
+      };
+    };
+    "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";
+        sha512 = "7Wn5GMLuHBjZCb2bTmnDOycho0p/7UVaAeqXZGbHrBCl6Yd/xDhQJAXe6Ga9AXJH2I5zY1dEdYw2u1UptnSBJA==";
+      };
+    };
+    "html-entities-1.4.0" = {
+      name = "html-entities";
+      packageName = "html-entities";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz";
+        sha512 = "8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==";
+      };
+    };
+    "html-minifier-terser-5.1.1" = {
+      name = "html-minifier-terser";
+      packageName = "html-minifier-terser";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz";
+        sha512 = "ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==";
+      };
+    };
+    "html-webpack-plugin-4.5.0" = {
+      name = "html-webpack-plugin";
+      packageName = "html-webpack-plugin";
+      version = "4.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.0.tgz";
+        sha512 = "MouoXEYSjTzCrjIxWwg8gxL5fE2X2WZJLmBYXlaJhQUH5K/b5OrqmV7T4dB7iu0xkmJ6JlUuV6fFVtnqbPopZw==";
+      };
+    };
+    "htmlparser2-6.1.0" = {
+      name = "htmlparser2";
+      packageName = "htmlparser2";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz";
+        sha512 = "gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==";
+      };
+    };
+    "http-cache-semantics-4.1.1" = {
+      name = "http-cache-semantics";
+      packageName = "http-cache-semantics";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz";
+        sha512 = "er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==";
+      };
+    };
+    "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";
+        sha512 = "LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==";
+      };
+    };
+    "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";
+        sha512 = "STnYGcKMXL9CGdtpeTFnLmgMSHTTNQJSHxiC4DETHKf934Q160Ht5pljrNeH24S0O9xUN+9vsDJZdZtk5js6Ww==";
+      };
+    };
+    "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";
+        sha512 = "lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==";
+      };
+    };
+    "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 = "uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==";
+      };
+    };
+    "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 = "ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==";
+      };
+    };
+    "http-errors-2.0.0" = {
+      name = "http-errors";
+      packageName = "http-errors";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz";
+        sha512 = "FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==";
+      };
+    };
+    "http-parser-js-0.5.8" = {
+      name = "http-parser-js";
+      packageName = "http-parser-js";
+      version = "0.5.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz";
+        sha512 = "SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==";
+      };
+    };
+    "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 = "Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==";
+      };
+    };
+    "http-proxy-1.18.1" = {
+      name = "http-proxy";
+      packageName = "http-proxy";
+      version = "1.18.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz";
+        sha512 = "7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==";
+      };
+    };
+    "http-proxy-agent-5.0.0" = {
+      name = "http-proxy-agent";
+      packageName = "http-proxy-agent";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz";
+        sha512 = "n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==";
+      };
+    };
+    "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 = "yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==";
+      };
+    };
+    "http-proxy-middleware-0.21.0" = {
+      name = "http-proxy-middleware";
+      packageName = "http-proxy-middleware";
+      version = "0.21.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.21.0.tgz";
+        sha512 = "4Arcl5QQ6pRMRJmtM1WVHKHkFAQn5uvw83XuNeqnMTOikDiCoTxv5/vdudhKQsF+1mtaAawrK2SEB1v2tYecdQ==";
+      };
+    };
+    "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";
+        sha512 = "CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==";
+      };
+    };
+    "http2-wrapper-1.0.3" = {
+      name = "http2-wrapper";
+      packageName = "http2-wrapper";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz";
+        sha512 = "V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==";
+      };
+    };
+    "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";
+        sha512 = "J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==";
+      };
+    };
+    "https-proxy-agent-5.0.1" = {
+      name = "https-proxy-agent";
+      packageName = "https-proxy-agent";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz";
+        sha512 = "dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==";
+      };
+    };
+    "human-signals-2.1.0" = {
+      name = "human-signals";
+      packageName = "human-signals";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz";
+        sha512 = "B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==";
+      };
+    };
+    "humanize-ms-1.2.1" = {
+      name = "humanize-ms";
+      packageName = "humanize-ms";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz";
+        sha512 = "Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==";
+      };
+    };
+    "i-0.3.7" = {
+      name = "i";
+      packageName = "i";
+      version = "0.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/i/-/i-0.3.7.tgz";
+        sha512 = "FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==";
+      };
+    };
+    "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 = "oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==";
+      };
+    };
+    "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 = "v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==";
+      };
+    };
+    "iconv-lite-0.6.3" = {
+      name = "iconv-lite";
+      packageName = "iconv-lite";
+      version = "0.6.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz";
+        sha512 = "4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==";
+      };
+    };
+    "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 = "4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==";
+      };
+    };
+    "ieee754-1.2.1" = {
+      name = "ieee754";
+      packageName = "ieee754";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz";
+        sha512 = "dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==";
+      };
+    };
+    "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";
+        sha512 = "DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==";
+      };
+    };
+    "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 = "Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==";
+      };
+    };
+    "ignore-5.3.0" = {
+      name = "ignore";
+      packageName = "ignore";
+      version = "5.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz";
+        sha512 = "g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==";
+      };
+    };
+    "image-size-0.5.5" = {
+      name = "image-size";
+      packageName = "image-size";
+      version = "0.5.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz";
+        sha512 = "6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==";
+      };
+    };
+    "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 = "4Urocwu9+XLDJw4Tc6ZCg7APVjjLInCFvO4TwGsAYV5zT6YYSor14dsZR0+0tHlDIN92cFUOq+i7fC00G5vTxA==";
+      };
+    };
+    "immutable-4.3.4" = {
+      name = "immutable";
+      packageName = "immutable";
+      version = "4.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz";
+        sha512 = "fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==";
+      };
+    };
+    "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";
+        sha512 = "eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==";
+      };
+    };
+    "import-fresh-3.3.0" = {
+      name = "import-fresh";
+      packageName = "import-fresh";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz";
+        sha512 = "veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==";
+      };
+    };
+    "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 = "b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==";
+      };
+    };
+    "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";
+        sha512 = "JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==";
+      };
+    };
+    "indent-string-4.0.0" = {
+      name = "indent-string";
+      packageName = "indent-string";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz";
+        sha512 = "EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==";
+      };
+    };
+    "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";
+        sha512 = "bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==";
+      };
+    };
+    "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 = "IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==";
+      };
+    };
+    "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";
+        sha512 = "k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==";
+      };
+    };
+    "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";
+        sha512 = "x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==";
+      };
+    };
+    "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 = "k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==";
+      };
+    };
+    "ini-1.3.8" = {
+      name = "ini";
+      packageName = "ini";
+      version = "1.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz";
+        sha512 = "JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==";
+      };
+    };
+    "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 = "QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==";
+      };
+    };
+    "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 = "S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==";
+      };
+    };
+    "internal-slot-1.0.6" = {
+      name = "internal-slot";
+      packageName = "internal-slot";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz";
+        sha512 = "Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==";
+      };
+    };
+    "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";
+        sha512 = "xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==";
+      };
+    };
+    "ip-1.1.8" = {
+      name = "ip";
+      packageName = "ip";
+      version = "1.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz";
+        sha512 = "PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==";
+      };
+    };
+    "ip-2.0.0" = {
+      name = "ip";
+      packageName = "ip";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz";
+        sha512 = "WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==";
+      };
+    };
+    "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";
+        sha512 = "58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==";
+      };
+    };
+    "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 = "0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==";
+      };
+    };
+    "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";
+        sha512 = "vOx7VprsKyllwjSkLV79NIhpyLfr3jAp7VaTCMXOJHu4m0Ew1CZ2fcjASwmV1jI3BWuWHB013M48eyeldk9gYg==";
+      };
+    };
+    "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 = "opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==";
+      };
+    };
+    "is-accessor-descriptor-1.0.1" = {
+      name = "is-accessor-descriptor";
+      packageName = "is-accessor-descriptor";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz";
+        sha512 = "YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==";
+      };
+    };
+    "is-arguments-1.1.1" = {
+      name = "is-arguments";
+      packageName = "is-arguments";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz";
+        sha512 = "8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==";
+      };
+    };
+    "is-array-buffer-3.0.2" = {
+      name = "is-array-buffer";
+      packageName = "is-array-buffer";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz";
+        sha512 = "y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==";
+      };
+    };
+    "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";
+        sha512 = "zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==";
+      };
+    };
+    "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 = "eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==";
+      };
+    };
+    "is-bigint-1.0.4" = {
+      name = "is-bigint";
+      packageName = "is-bigint";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz";
+        sha512 = "zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==";
+      };
+    };
+    "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";
+        sha512 = "9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==";
+      };
+    };
+    "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 = "ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==";
+      };
+    };
+    "is-boolean-object-1.1.2" = {
+      name = "is-boolean-object";
+      packageName = "is-boolean-object";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz";
+        sha512 = "gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==";
+      };
+    };
+    "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 = "NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==";
+      };
+    };
+    "is-callable-1.2.7" = {
+      name = "is-callable";
+      packageName = "is-callable";
+      version = "1.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz";
+        sha512 = "1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==";
+      };
+    };
+    "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";
+        sha512 = "H1U8Vz0cfXNujrJzEcvvwMDW9Ra+biSYA3ThdQvAnMLJkEHQXn6bWzLkxHtVYJ+Sdbx0b6finn3jZiaVe7MAHA==";
+      };
+    };
+    "is-core-module-2.13.1" = {
+      name = "is-core-module";
+      packageName = "is-core-module";
+      version = "2.13.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz";
+        sha512 = "hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==";
+      };
+    };
+    "is-data-descriptor-1.0.1" = {
+      name = "is-data-descriptor";
+      packageName = "is-data-descriptor";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz";
+        sha512 = "bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==";
+      };
+    };
+    "is-date-object-1.0.5" = {
+      name = "is-date-object";
+      packageName = "is-date-object";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz";
+        sha512 = "9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==";
+      };
+    };
+    "is-descriptor-0.1.7" = {
+      name = "is-descriptor";
+      packageName = "is-descriptor";
+      version = "0.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz";
+        sha512 = "C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==";
+      };
+    };
+    "is-descriptor-1.0.3" = {
+      name = "is-descriptor";
+      packageName = "is-descriptor";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz";
+        sha512 = "JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==";
+      };
+    };
+    "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";
+        sha512 = "yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==";
+      };
+    };
+    "is-docker-2.2.1" = {
+      name = "is-docker";
+      packageName = "is-docker";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz";
+        sha512 = "F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==";
+      };
+    };
+    "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";
+        sha512 = "5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==";
+      };
+    };
+    "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 = "arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==";
+      };
+    };
+    "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";
+        sha512 = "SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==";
+      };
+    };
+    "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";
+        sha512 = "1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==";
+      };
+    };
+    "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";
+        sha512 = "VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==";
+      };
+    };
+    "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 = "zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==";
+      };
+    };
+    "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";
+        sha512 = "UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==";
+      };
+    };
+    "is-glob-4.0.3" = {
+      name = "is-glob";
+      packageName = "is-glob";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz";
+        sha512 = "xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==";
+      };
+    };
+    "is-interactive-1.0.0" = {
+      name = "is-interactive";
+      packageName = "is-interactive";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz";
+        sha512 = "2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==";
+      };
+    };
+    "is-lambda-1.0.1" = {
+      name = "is-lambda";
+      packageName = "is-lambda";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz";
+        sha512 = "z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==";
+      };
+    };
+    "is-negative-zero-2.0.2" = {
+      name = "is-negative-zero";
+      packageName = "is-negative-zero";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz";
+        sha512 = "dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==";
+      };
+    };
+    "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";
+        sha512 = "4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==";
+      };
+    };
+    "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 = "41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==";
+      };
+    };
+    "is-number-object-1.0.7" = {
+      name = "is-number-object";
+      packageName = "is-number-object";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz";
+        sha512 = "k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==";
+      };
+    };
+    "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";
+        sha512 = "l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==";
+      };
+    };
+    "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 = "drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==";
+      };
+    };
+    "is-object-1.0.2" = {
+      name = "is-object";
+      packageName = "is-object";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz";
+        sha512 = "2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==";
+      };
+    };
+    "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 = "w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==";
+      };
+    };
+    "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 = "rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==";
+      };
+    };
+    "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 = "wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==";
+      };
+    };
+    "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";
+        sha512 = "yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==";
+      };
+    };
+    "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 = "h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==";
+      };
+    };
+    "is-regex-1.1.4" = {
+      name = "is-regex";
+      packageName = "is-regex";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz";
+        sha512 = "kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==";
+      };
+    };
+    "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";
+        sha512 = "7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==";
+      };
+    };
+    "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 = "qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==";
+      };
+    };
+    "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 = "F/pJIk8QD6OX5DNhRB7hWamLsUilmkDGho48KbgZ6xg/lmAZXHxzXQ91jzB3yRSw5kdQGGGc4yz8HYhTYIMWPg==";
+      };
+    };
+    "is-shared-array-buffer-1.0.2" = {
+      name = "is-shared-array-buffer";
+      packageName = "is-shared-array-buffer";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz";
+        sha512 = "sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==";
+      };
+    };
+    "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";
+        sha512 = "uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==";
+      };
+    };
+    "is-stream-2.0.1" = {
+      name = "is-stream";
+      packageName = "is-stream";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz";
+        sha512 = "hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==";
+      };
+    };
+    "is-string-1.0.7" = {
+      name = "is-string";
+      packageName = "is-string";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz";
+        sha512 = "tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==";
+      };
+    };
+    "is-symbol-1.0.4" = {
+      name = "is-symbol";
+      packageName = "is-symbol";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz";
+        sha512 = "C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==";
+      };
+    };
+    "is-typed-array-1.1.12" = {
+      name = "is-typed-array";
+      packageName = "is-typed-array";
+      version = "1.1.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz";
+        sha512 = "Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==";
+      };
+    };
+    "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";
+        sha512 = "cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==";
+      };
+    };
+    "is-unicode-supported-0.1.0" = {
+      name = "is-unicode-supported";
+      packageName = "is-unicode-supported";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz";
+        sha512 = "knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==";
+      };
+    };
+    "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";
+        sha512 = "rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==";
+      };
+    };
+    "is-valid-domain-0.1.6" = {
+      name = "is-valid-domain";
+      packageName = "is-valid-domain";
+      version = "0.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-valid-domain/-/is-valid-domain-0.1.6.tgz";
+        sha512 = "ZKtq737eFkZr71At8NxOFcP9O1K89gW3DkdrGMpp1upr/ueWjj+Weh4l9AI4rN0Gt8W2M1w7jrG2b/Yv83Ljpg==";
+      };
+    };
+    "is-weakref-1.0.2" = {
+      name = "is-weakref";
+      packageName = "is-weakref";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz";
+        sha512 = "qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==";
+      };
+    };
+    "is-what-3.14.1" = {
+      name = "is-what";
+      packageName = "is-what";
+      version = "3.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz";
+        sha512 = "sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==";
+      };
+    };
+    "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 = "eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==";
+      };
+    };
+    "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";
+        sha512 = "gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==";
+      };
+    };
+    "is-wsl-2.2.0" = {
+      name = "is-wsl";
+      packageName = "is-wsl";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz";
+        sha512 = "fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==";
+      };
+    };
+    "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";
+        sha512 = "VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==";
+      };
+    };
+    "isarray-2.0.5" = {
+      name = "isarray";
+      packageName = "isarray";
+      version = "2.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz";
+        sha512 = "xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==";
+      };
+    };
+    "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";
+        sha512 = "RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==";
+      };
+    };
+    "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";
+        sha512 = "+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==";
+      };
+    };
+    "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";
+        sha512 = "WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==";
+      };
+    };
+    "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";
+        sha512 = "Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==";
+      };
+    };
+    "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 = "1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==";
+      };
+    };
+    "jackspeak-2.3.6" = {
+      name = "jackspeak";
+      packageName = "jackspeak";
+      version = "2.3.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz";
+        sha512 = "N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==";
+      };
+    };
+    "jest-diff-27.5.1" = {
+      name = "jest-diff";
+      packageName = "jest-diff";
+      version = "27.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz";
+        sha512 = "m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==";
+      };
+    };
+    "jest-get-type-27.5.1" = {
+      name = "jest-get-type";
+      packageName = "jest-get-type";
+      version = "27.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz";
+        sha512 = "2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==";
+      };
+    };
+    "jest-matcher-utils-27.5.1" = {
+      name = "jest-matcher-utils";
+      packageName = "jest-matcher-utils";
+      version = "27.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz";
+        sha512 = "z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==";
+      };
+    };
+    "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 = "RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==";
+      };
+    };
+    "js-yaml-3.14.1" = {
+      name = "js-yaml";
+      packageName = "js-yaml";
+      version = "3.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz";
+        sha512 = "okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==";
+      };
+    };
+    "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";
+        sha512 = "UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==";
+      };
+    };
+    "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";
+        sha512 = "uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==";
+      };
+    };
+    "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 = "OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==";
+      };
+    };
+    "jsesc-3.0.2" = {
+      name = "jsesc";
+      packageName = "jsesc";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz";
+        sha512 = "xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==";
+      };
+    };
+    "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";
+        sha512 = "CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==";
+      };
+    };
+    "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 = "4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==";
+      };
+    };
+    "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 = "mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==";
+      };
+    };
+    "json-parse-even-better-errors-2.3.1" = {
+      name = "json-parse-even-better-errors";
+      packageName = "json-parse-even-better-errors";
+      version = "2.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz";
+        sha512 = "xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==";
+      };
+    };
+    "json-schema-0.4.0" = {
+      name = "json-schema";
+      packageName = "json-schema";
+      version = "0.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz";
+        sha512 = "es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==";
+      };
+    };
+    "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 = "xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==";
+      };
+    };
+    "json-schema-traverse-1.0.0" = {
+      name = "json-schema-traverse";
+      packageName = "json-schema-traverse";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz";
+        sha512 = "NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==";
+      };
+    };
+    "json-stable-stringify-1.1.0" = {
+      name = "json-stable-stringify";
+      packageName = "json-stable-stringify";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz";
+        sha512 = "zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==";
+      };
+    };
+    "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";
+        sha512 = "ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==";
+      };
+    };
+    "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 = "c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==";
+      };
+    };
+    "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";
+        sha512 = "4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==";
+      };
+    };
+    "json5-1.0.2" = {
+      name = "json5";
+      packageName = "json5";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz";
+        sha512 = "g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==";
+      };
+    };
+    "json5-2.2.3" = {
+      name = "json5";
+      packageName = "json5";
+      version = "2.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz";
+        sha512 = "XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==";
+      };
+    };
+    "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";
+        sha512 = "PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==";
+      };
+    };
+    "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";
+        sha512 = "m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==";
+      };
+    };
+    "jsonfile-6.1.0" = {
+      name = "jsonfile";
+      packageName = "jsonfile";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz";
+        sha512 = "5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==";
+      };
+    };
+    "jsonify-0.0.1" = {
+      name = "jsonify";
+      packageName = "jsonify";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz";
+        sha512 = "2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==";
+      };
+    };
+    "jsprim-1.4.2" = {
+      name = "jsprim";
+      packageName = "jsprim";
+      version = "1.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz";
+        sha512 = "P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==";
+      };
+    };
+    "keyv-3.1.0" = {
+      name = "keyv";
+      packageName = "keyv";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz";
+        sha512 = "9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==";
+      };
+    };
+    "keyv-4.5.4" = {
+      name = "keyv";
+      packageName = "keyv";
+      version = "4.5.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz";
+        sha512 = "oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==";
+      };
+    };
+    "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 = "LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==";
+      };
+    };
+    "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";
+        sha512 = "NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==";
+      };
+    };
+    "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";
+        sha512 = "24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==";
+      };
+    };
+    "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 = "dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==";
+      };
+    };
+    "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";
+        sha512 = "kuInGWCNc98b1ghOqBJfqPOvAKn9HHgm+SdluR5VNfdA7rs7uNsuXGy7CCqsP6pFKPpUoCH4s9o00GEj9xONHg==";
+      };
+    };
+    "kleur-3.0.3" = {
+      name = "kleur";
+      packageName = "kleur";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz";
+        sha512 = "eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==";
+      };
+    };
+    "kleur-4.1.5" = {
+      name = "kleur";
+      packageName = "kleur";
+      version = "4.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz";
+        sha512 = "o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==";
+      };
+    };
+    "klona-2.0.6" = {
+      name = "klona";
+      packageName = "klona";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz";
+        sha512 = "dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==";
+      };
+    };
+    "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 = "7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==";
+      };
+    };
+    "latest-version-5.1.0" = {
+      name = "latest-version";
+      packageName = "latest-version";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz";
+        sha512 = "weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==";
+      };
+    };
+    "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";
+        sha512 = "YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==";
+      };
+    };
+    "less-4.2.0" = {
+      name = "less";
+      packageName = "less";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/less/-/less-4.2.0.tgz";
+        sha512 = "P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==";
+      };
+    };
+    "lightningcss-1.22.1" = {
+      name = "lightningcss";
+      packageName = "lightningcss";
+      version = "1.22.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lightningcss/-/lightningcss-1.22.1.tgz";
+        sha512 = "Fy45PhibiNXkm0cK5FJCbfO8Y6jUpD/YcHf/BtuI+jvYYqSXKF4muk61jjE8YxCR9y+hDYIWSzHTc+bwhDE6rQ==";
+      };
+    };
+    "lines-and-columns-1.2.4" = {
+      name = "lines-and-columns";
+      packageName = "lines-and-columns";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz";
+        sha512 = "7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==";
+      };
+    };
+    "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";
+        sha512 = "cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==";
+      };
+    };
+    "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 = "Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==";
+      };
+    };
+    "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";
+        sha512 = "gkD9aSEG9UGglyPcDJqY9YBTUtCLKaBK6ihD2VP1d1X60lTfFspNZNulGBBbUZLkPygy4LySYHyxBpq+VhjObQ==";
+      };
+    };
+    "loader-utils-1.4.2" = {
+      name = "loader-utils";
+      packageName = "loader-utils";
+      version = "1.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz";
+        sha512 = "I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==";
+      };
+    };
+    "loader-utils-2.0.4" = {
+      name = "loader-utils";
+      packageName = "loader-utils";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz";
+        sha512 = "xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==";
+      };
+    };
+    "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";
+        sha512 = "NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==";
+      };
+    };
+    "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 = "7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==";
+      };
+    };
+    "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 = "t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==";
+      };
+    };
+    "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 = "8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==";
+      };
+    };
+    "lodash-4.17.21" = {
+      name = "lodash";
+      packageName = "lodash";
+      version = "4.17.21";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz";
+        sha512 = "v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==";
+      };
+    };
+    "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";
+        sha512 = "xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==";
+      };
+    };
+    "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";
+        sha512 = "t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==";
+      };
+    };
+    "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 = "84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==";
+      };
+    };
+    "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 = "stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==";
+      };
+    };
+    "lodash.truncate-4.4.2" = {
+      name = "lodash.truncate";
+      packageName = "lodash.truncate";
+      version = "4.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz";
+        sha512 = "jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==";
+      };
+    };
+    "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";
+        sha512 = "xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==";
+      };
+    };
+    "log-symbols-4.1.0" = {
+      name = "log-symbols";
+      packageName = "log-symbols";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz";
+        sha512 = "8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==";
+      };
+    };
+    "loglevel-1.8.1" = {
+      name = "loglevel";
+      packageName = "loglevel";
+      version = "1.8.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz";
+        sha512 = "tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==";
+      };
+    };
+    "lower-case-2.0.2" = {
+      name = "lower-case";
+      packageName = "lower-case";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz";
+        sha512 = "7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==";
+      };
+    };
+    "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 = "G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==";
+      };
+    };
+    "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 = "tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==";
+      };
+    };
+    "lru-cache-10.1.0" = {
+      name = "lru-cache";
+      packageName = "lru-cache";
+      version = "10.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz";
+        sha512 = "/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==";
+      };
+    };
+    "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 = "sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==";
+      };
+    };
+    "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 = "KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==";
+      };
+    };
+    "lru-cache-6.0.0" = {
+      name = "lru-cache";
+      packageName = "lru-cache";
+      version = "6.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz";
+        sha512 = "Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==";
+      };
+    };
+    "lru-cache-7.18.3" = {
+      name = "lru-cache";
+      packageName = "lru-cache";
+      version = "7.18.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz";
+        sha512 = "jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==";
+      };
+    };
+    "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 = "2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==";
+      };
+    };
+    "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 = "LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==";
+      };
+    };
+    "make-dir-3.1.0" = {
+      name = "make-dir";
+      packageName = "make-dir";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz";
+        sha512 = "g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==";
+      };
+    };
+    "make-fetch-happen-11.1.1" = {
+      name = "make-fetch-happen";
+      packageName = "make-fetch-happen";
+      version = "11.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz";
+        sha512 = "rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==";
+      };
+    };
+    "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";
+        sha512 = "8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==";
+      };
+    };
+    "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";
+        sha512 = "4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==";
+      };
+    };
+    "md5-2.3.0" = {
+      name = "md5";
+      packageName = "md5";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz";
+        sha512 = "T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==";
+      };
+    };
+    "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 = "xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==";
+      };
+    };
+    "mdn-data-2.0.14" = {
+      name = "mdn-data";
+      packageName = "mdn-data";
+      version = "2.0.14";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz";
+        sha512 = "dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==";
+      };
+    };
+    "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 = "iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==";
+      };
+    };
+    "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";
+        sha512 = "dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==";
+      };
+    };
+    "memfs-3.6.0" = {
+      name = "memfs";
+      packageName = "memfs";
+      version = "3.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/memfs/-/memfs-3.6.0.tgz";
+        sha512 = "EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ==";
+      };
+    };
+    "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";
+        sha512 = "cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==";
+      };
+    };
+    "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 = "jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==";
+      };
+    };
+    "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";
+        sha512 = "cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==";
+      };
+    };
+    "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 = "abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==";
+      };
+    };
+    "merge2-1.4.1" = {
+      name = "merge2";
+      packageName = "merge2";
+      version = "1.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz";
+        sha512 = "8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==";
+      };
+    };
+    "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";
+        sha512 = "iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==";
+      };
+    };
+    "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 = "MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==";
+      };
+    };
+    "micromatch-4.0.5" = {
+      name = "micromatch";
+      packageName = "micromatch";
+      version = "4.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz";
+        sha512 = "DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==";
+      };
+    };
+    "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 = "115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==";
+      };
+    };
+    "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 = "KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==";
+      };
+    };
+    "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 = "x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==";
+      };
+    };
+    "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 = "QgrPRJfE+riq5TPZMcHZOtm8c6K/yYrMbKIoRfapfiGLxS8OTeIfRhUGW5LU7MlRa52KOAGCfUNruqLrIBvWZw==";
+      };
+    };
+    "mime-2.4.6" = {
+      name = "mime";
+      packageName = "mime";
+      version = "2.4.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz";
+        sha512 = "RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==";
+      };
+    };
+    "mime-2.6.0" = {
+      name = "mime";
+      packageName = "mime";
+      version = "2.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz";
+        sha512 = "USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==";
+      };
+    };
+    "mime-db-1.52.0" = {
+      name = "mime-db";
+      packageName = "mime-db";
+      version = "1.52.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz";
+        sha512 = "sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==";
+      };
+    };
+    "mime-types-2.1.35" = {
+      name = "mime-types";
+      packageName = "mime-types";
+      version = "2.1.35";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz";
+        sha512 = "ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==";
+      };
+    };
+    "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 = "jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==";
+      };
+    };
+    "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 = "OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==";
+      };
+    };
+    "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 = "j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==";
+      };
+    };
+    "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 = "wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==";
+      };
+    };
+    "mimic-response-3.1.0" = {
+      name = "mimic-response";
+      packageName = "mimic-response";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz";
+        sha512 = "z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==";
+      };
+    };
+    "mini-css-extract-plugin-0.12.0" = {
+      name = "mini-css-extract-plugin";
+      packageName = "mini-css-extract-plugin";
+      version = "0.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.12.0.tgz";
+        sha512 = "z6PQCe9rd1XUwZ8gMaEVwwRyZlrYy8Ba1gRjFP5HcV51HkXX+XlwZ+a1iAYTjSYwgNBXoNR7mhx79mDpOn5fdw==";
+      };
+    };
+    "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 = "UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==";
+      };
+    };
+    "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";
+        sha512 = "JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==";
+      };
+    };
+    "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 = "yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==";
+      };
+    };
+    "minimatch-3.0.8" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "3.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz";
+        sha512 = "6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==";
+      };
+    };
+    "minimatch-3.1.2" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz";
+        sha512 = "J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==";
+      };
+    };
+    "minimatch-5.1.6" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "5.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz";
+        sha512 = "lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==";
+      };
+    };
+    "minimatch-9.0.3" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "9.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz";
+        sha512 = "RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==";
+      };
+    };
+    "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";
+        sha512 = "7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==";
+      };
+    };
+    "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 = "FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==";
+      };
+    };
+    "minimist-1.2.8" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "1.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz";
+        sha512 = "2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==";
+      };
+    };
+    "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 = "wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==";
+      };
+    };
+    "minipass-3.3.6" = {
+      name = "minipass";
+      packageName = "minipass";
+      version = "3.3.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz";
+        sha512 = "DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==";
+      };
+    };
+    "minipass-5.0.0" = {
+      name = "minipass";
+      packageName = "minipass";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz";
+        sha512 = "3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==";
+      };
+    };
+    "minipass-7.0.4" = {
+      name = "minipass";
+      packageName = "minipass";
+      version = "7.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz";
+        sha512 = "jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==";
+      };
+    };
+    "minipass-collect-1.0.2" = {
+      name = "minipass-collect";
+      packageName = "minipass-collect";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz";
+        sha512 = "6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==";
+      };
+    };
+    "minipass-fetch-3.0.4" = {
+      name = "minipass-fetch";
+      packageName = "minipass-fetch";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz";
+        sha512 = "jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==";
+      };
+    };
+    "minipass-flush-1.0.5" = {
+      name = "minipass-flush";
+      packageName = "minipass-flush";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz";
+        sha512 = "JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==";
+      };
+    };
+    "minipass-pipeline-1.2.4" = {
+      name = "minipass-pipeline";
+      packageName = "minipass-pipeline";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz";
+        sha512 = "xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==";
+      };
+    };
+    "minipass-sized-1.0.3" = {
+      name = "minipass-sized";
+      packageName = "minipass-sized";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz";
+        sha512 = "MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==";
+      };
+    };
+    "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 = "6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==";
+      };
+    };
+    "minizlib-2.1.2" = {
+      name = "minizlib";
+      packageName = "minizlib";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz";
+        sha512 = "bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==";
+      };
+    };
+    "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 = "zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==";
+      };
+    };
+    "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 = "x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==";
+      };
+    };
+    "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 = "WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==";
+      };
+    };
+    "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 = "P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==";
+      };
+    };
+    "mkdirp-0.5.6" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz";
+        sha512 = "FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==";
+      };
+    };
+    "mkdirp-1.0.4" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz";
+        sha512 = "vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==";
+      };
+    };
+    "mkdirp-3.0.1" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz";
+        sha512 = "+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==";
+      };
+    };
+    "moment-2.30.1" = {
+      name = "moment";
+      packageName = "moment";
+      version = "2.30.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz";
+        sha512 = "uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==";
+      };
+    };
+    "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";
+        sha512 = "hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==";
+      };
+    };
+    "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";
+        sha512 = "Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==";
+      };
+    };
+    "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 = "tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==";
+      };
+    };
+    "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 = "sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==";
+      };
+    };
+    "ms-2.1.3" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz";
+        sha512 = "6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==";
+      };
+    };
+    "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 = "ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==";
+      };
+    };
+    "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";
+        sha512 = "cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==";
+      };
+    };
+    "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";
+        sha512 = "g3vtW36bHHcmcGOLlI+cVUBPtaoLdPkBNVNkHE+1mKgaYfjWXF6bWOlhsU6r+V+yG8tqUyM7WveRAXvHa98dZg==";
+      };
+    };
+    "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 = "RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA==";
+      };
+    };
+    "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";
+        sha512 = "r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==";
+      };
+    };
+    "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 = "nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==";
+      };
+    };
+    "nan-2.18.0" = {
+      name = "nan";
+      packageName = "nan";
+      version = "2.18.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz";
+        sha512 = "W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==";
+      };
+    };
+    "nanoid-3.3.7" = {
+      name = "nanoid";
+      packageName = "nanoid";
+      version = "3.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz";
+        sha512 = "eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==";
+      };
+    };
+    "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 = "fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==";
+      };
+    };
+    "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";
+        sha512 = "akBX7I5X9KQDDWmYYgQlLbVbjkveTje2mioZjhLLrVt09akSZcoqXWE5LEn1E2fu8T7th1PZYGfewQsTkTLTmQ==";
+      };
+    };
+    "needle-3.3.1" = {
+      name = "needle";
+      packageName = "needle";
+      version = "3.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz";
+        sha512 = "6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==";
+      };
+    };
+    "negotiator-0.6.3" = {
+      name = "negotiator";
+      packageName = "negotiator";
+      version = "0.6.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz";
+        sha512 = "+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==";
+      };
+    };
+    "neo-async-2.6.2" = {
+      name = "neo-async";
+      packageName = "neo-async";
+      version = "2.6.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz";
+        sha512 = "Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==";
+      };
+    };
+    "next-tick-1.1.0" = {
+      name = "next-tick";
+      packageName = "next-tick";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz";
+        sha512 = "CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==";
+      };
+    };
+    "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 = "1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==";
+      };
+    };
+    "no-case-3.0.4" = {
+      name = "no-case";
+      packageName = "no-case";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz";
+        sha512 = "fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==";
+      };
+    };
+    "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 = "VQsT8QSierYGkHzRed+b4MnccQVF1+qPHunE8jBoU7jD6YpuRqCDPzEoC2zfyEJS80qVnlMZrqobLnyjzX9lJg==";
+      };
+    };
+    "node-elm-compiler-5.0.5" = {
+      name = "node-elm-compiler";
+      packageName = "node-elm-compiler";
+      version = "5.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-elm-compiler/-/node-elm-compiler-5.0.5.tgz";
+        sha512 = "vapB+VkmKMY1NRy7jjpGjzwWbKmtiRfzbgVoV/eROz5Kx30QvY0Nd5Ua7iST+9utrn1aG8cVToXC6UWdEO5BKQ==";
+      };
+    };
+    "node-elm-compiler-5.0.6" = {
+      name = "node-elm-compiler";
+      packageName = "node-elm-compiler";
+      version = "5.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-elm-compiler/-/node-elm-compiler-5.0.6.tgz";
+        sha512 = "DWTRQR8b54rvschcZRREdsz7K84lnS8A6YJu8du3QLQ8f204SJbyTaA6NzYYbfUG97OTRKRv/0KZl82cTfpLhA==";
+      };
+    };
+    "node-fetch-2.7.0" = {
+      name = "node-fetch";
+      packageName = "node-fetch";
+      version = "2.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz";
+        sha512 = "c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==";
+      };
+    };
+    "node-forge-0.10.0" = {
+      name = "node-forge";
+      packageName = "node-forge";
+      version = "0.10.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz";
+        sha512 = "PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==";
+      };
+    };
+    "node-gyp-build-4.7.1" = {
+      name = "node-gyp-build";
+      packageName = "node-gyp-build";
+      version = "4.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz";
+        sha512 = "wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==";
+      };
+    };
+    "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 = "h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==";
+      };
+    };
+    "node-releases-1.1.77" = {
+      name = "node-releases";
+      packageName = "node-releases";
+      version = "1.1.77";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz";
+        sha512 = "rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==";
+      };
+    };
+    "node-releases-2.0.14" = {
+      name = "node-releases";
+      packageName = "node-releases";
+      version = "2.0.14";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz";
+        sha512 = "y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==";
+      };
+    };
+    "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 = "z9xN2ibI6P0UylFadN7oMcIMsoTeCENC0rZyRM5MVK9AqzSPx+uGqKG6KMPeC/laOV4wOGZq/GH0PTstRNSqOA==";
+      };
+    };
+    "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";
+        sha512 = "NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==";
+      };
+    };
+    "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 = "/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==";
+      };
+    };
+    "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";
+        sha512 = "3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==";
+      };
+    };
+    "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 = "6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==";
+      };
+    };
+    "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";
+        sha512 = "bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==";
+      };
+    };
+    "normalize-url-1.9.1" = {
+      name = "normalize-url";
+      packageName = "normalize-url";
+      version = "1.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz";
+        sha512 = "A48My/mtCklowHBlI8Fq2jFWK4tX4lJ5E6ytFsSOq1fzpvT0SQSgKhSg7lN5c2uYFOrUAOQp6zhhJnpp1eMloQ==";
+      };
+    };
+    "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 = "U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==";
+      };
+    };
+    "normalize-url-4.5.1" = {
+      name = "normalize-url";
+      packageName = "normalize-url";
+      version = "4.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz";
+        sha512 = "9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==";
+      };
+    };
+    "normalize-url-6.1.0" = {
+      name = "normalize-url";
+      packageName = "normalize-url";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz";
+        sha512 = "DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==";
+      };
+    };
+    "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 = "Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==";
+      };
+    };
+    "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";
+        sha512 = "lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==";
+      };
+    };
+    "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 = "S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==";
+      };
+    };
+    "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 = "WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==";
+      };
+    };
+    "nth-check-2.1.1" = {
+      name = "nth-check";
+      packageName = "nth-check";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz";
+        sha512 = "lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==";
+      };
+    };
+    "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";
+        sha512 = "4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==";
+      };
+    };
+    "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 = "fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==";
+      };
+    };
+    "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";
+        sha512 = "rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==";
+      };
+    };
+    "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";
+        sha512 = "79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==";
+      };
+    };
+    "object-inspect-1.13.1" = {
+      name = "object-inspect";
+      packageName = "object-inspect";
+      version = "1.13.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz";
+        sha512 = "5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==";
+      };
+    };
+    "object-is-1.1.5" = {
+      name = "object-is";
+      packageName = "object-is";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz";
+        sha512 = "3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==";
+      };
+    };
+    "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 = "NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==";
+      };
+    };
+    "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";
+        sha512 = "GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==";
+      };
+    };
+    "object.assign-4.1.5" = {
+      name = "object.assign";
+      packageName = "object.assign";
+      version = "4.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz";
+        sha512 = "byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==";
+      };
+    };
+    "object.entries-1.1.7" = {
+      name = "object.entries";
+      packageName = "object.entries";
+      version = "1.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz";
+        sha512 = "jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==";
+      };
+    };
+    "object.getownpropertydescriptors-2.1.7" = {
+      name = "object.getownpropertydescriptors";
+      packageName = "object.getownpropertydescriptors";
+      version = "2.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.7.tgz";
+        sha512 = "PrJz0C2xJ58FNn11XV2lr4Jt5Gzl94qpy9Lu0JlfEj14z88sqbSBJCBEzdlNUCzY2gburhbrwOZ5BHCmuNUy0g==";
+      };
+    };
+    "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";
+        sha512 = "tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==";
+      };
+    };
+    "object.values-1.1.7" = {
+      name = "object.values";
+      packageName = "object.values";
+      version = "1.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz";
+        sha512 = "aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==";
+      };
+    };
+    "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 = "PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==";
+      };
+    };
+    "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";
+        sha512 = "ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==";
+      };
+    };
+    "on-finished-2.4.1" = {
+      name = "on-finished";
+      packageName = "on-finished";
+      version = "2.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz";
+        sha512 = "oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==";
+      };
+    };
+    "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 = "pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==";
+      };
+    };
+    "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";
+        sha512 = "lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==";
+      };
+    };
+    "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";
+        sha512 = "oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==";
+      };
+    };
+    "onetime-5.1.2" = {
+      name = "onetime";
+      packageName = "onetime";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz";
+        sha512 = "kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==";
+      };
+    };
+    "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 = "IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==";
+      };
+    };
+    "open-7.4.2" = {
+      name = "open";
+      packageName = "open";
+      version = "7.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/open/-/open-7.4.2.tgz";
+        sha512 = "MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==";
+      };
+    };
+    "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 = "YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==";
+      };
+    };
+    "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 = "PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==";
+      };
+    };
+    "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 = "q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA==";
+      };
+    };
+    "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";
+        sha512 = "bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==";
+      };
+    };
+    "ora-5.4.1" = {
+      name = "ora";
+      packageName = "ora";
+      version = "5.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz";
+        sha512 = "5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==";
+      };
+    };
+    "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 = "hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==";
+      };
+    };
+    "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";
+        sha512 = "gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==";
+      };
+    };
+    "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";
+        sha512 = "B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==";
+      };
+    };
+    "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";
+        sha512 = "PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==";
+      };
+    };
+    "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";
+        sha512 = "D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==";
+      };
+    };
+    "p-cancelable-1.1.0" = {
+      name = "p-cancelable";
+      packageName = "p-cancelable";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz";
+        sha512 = "s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==";
+      };
+    };
+    "p-cancelable-2.1.1" = {
+      name = "p-cancelable";
+      packageName = "p-cancelable";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz";
+        sha512 = "BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==";
+      };
+    };
+    "p-event-4.2.0" = {
+      name = "p-event";
+      packageName = "p-event";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz";
+        sha512 = "KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==";
+      };
+    };
+    "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";
+        sha512 = "LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==";
+      };
+    };
+    "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 = "vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==";
+      };
+    };
+    "p-limit-2.3.0" = {
+      name = "p-limit";
+      packageName = "p-limit";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz";
+        sha512 = "//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==";
+      };
+    };
+    "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";
+        sha512 = "nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==";
+      };
+    };
+    "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 = "x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==";
+      };
+    };
+    "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 = "R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==";
+      };
+    };
+    "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 = "y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==";
+      };
+    };
+    "p-map-4.0.0" = {
+      name = "p-map";
+      packageName = "p-map";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz";
+        sha512 = "/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==";
+      };
+    };
+    "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 = "XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==";
+      };
+    };
+    "p-timeout-3.2.0" = {
+      name = "p-timeout";
+      packageName = "p-timeout";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz";
+        sha512 = "rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==";
+      };
+    };
+    "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";
+        sha512 = "U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==";
+      };
+    };
+    "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 = "R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==";
+      };
+    };
+    "package-json-6.5.0" = {
+      name = "package-json";
+      packageName = "package-json";
+      version = "6.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz";
+        sha512 = "k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==";
+      };
+    };
+    "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 = "4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==";
+      };
+    };
+    "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 = "P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==";
+      };
+    };
+    "param-case-3.0.4" = {
+      name = "param-case";
+      packageName = "param-case";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz";
+        sha512 = "RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==";
+      };
+    };
+    "parent-module-1.0.1" = {
+      name = "parent-module";
+      packageName = "parent-module";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz";
+        sha512 = "GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==";
+      };
+    };
+    "parse-asn1-5.1.6" = {
+      name = "parse-asn1";
+      packageName = "parse-asn1";
+      version = "5.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz";
+        sha512 = "RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==";
+      };
+    };
+    "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";
+        sha512 = "QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==";
+      };
+    };
+    "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";
+        sha512 = "aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==";
+      };
+    };
+    "parse-json-5.2.0" = {
+      name = "parse-json";
+      packageName = "parse-json";
+      version = "5.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz";
+        sha512 = "ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==";
+      };
+    };
+    "parse-node-version-1.0.1" = {
+      name = "parse-node-version";
+      packageName = "parse-node-version";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz";
+        sha512 = "3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==";
+      };
+    };
+    "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";
+        sha512 = "1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==";
+      };
+    };
+    "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 = "CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==";
+      };
+    };
+    "pascal-case-3.1.2" = {
+      name = "pascal-case";
+      packageName = "pascal-case";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz";
+        sha512 = "uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==";
+      };
+    };
+    "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";
+        sha512 = "XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==";
+      };
+    };
+    "password-prompt-1.1.3" = {
+      name = "password-prompt";
+      packageName = "password-prompt";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/password-prompt/-/password-prompt-1.1.3.tgz";
+        sha512 = "HkrjG2aJlvF0t2BMH0e2LB/EHf3Lcq3fNMzy4GYHcQblAvOl+QQji1Lx7WRBMqpVK8p+KR7bCg7oqAMXtdgqyw==";
+      };
+    };
+    "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 = "BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==";
+      };
+    };
+    "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";
+        sha512 = "ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==";
+      };
+    };
+    "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";
+        sha512 = "yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==";
+      };
+    };
+    "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";
+        sha512 = "bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==";
+      };
+    };
+    "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 = "ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==";
+      };
+    };
+    "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";
+        sha512 = "AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==";
+      };
+    };
+    "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";
+        sha512 = "DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==";
+      };
+    };
+    "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";
+        sha512 = "fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==";
+      };
+    };
+    "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 = "ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==";
+      };
+    };
+    "path-parse-1.0.7" = {
+      name = "path-parse";
+      packageName = "path-parse";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz";
+        sha512 = "LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==";
+      };
+    };
+    "path-scurry-1.10.1" = {
+      name = "path-scurry";
+      packageName = "path-scurry";
+      version = "1.10.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz";
+        sha512 = "MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==";
+      };
+    };
+    "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";
+        sha512 = "5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==";
+      };
+    };
+    "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";
+        sha512 = "S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==";
+      };
+    };
+    "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 = "T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==";
+      };
+    };
+    "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 = "gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==";
+      };
+    };
+    "pbkdf2-3.1.2" = {
+      name = "pbkdf2";
+      packageName = "pbkdf2";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz";
+        sha512 = "iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==";
+      };
+    };
+    "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 = "TOnPtq3ZFnCniOZ+rka4pk8UIze9xG1qI+wNE7EmkiR/cg+53uVvk5QbkWZ7M6RsuOxzz62FW1hlAobJr/lTOA==";
+      };
+    };
+    "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";
+        sha512 = "7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==";
+      };
+    };
+    "picocolors-0.2.1" = {
+      name = "picocolors";
+      packageName = "picocolors";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz";
+        sha512 = "cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==";
+      };
+    };
+    "picocolors-1.0.0" = {
+      name = "picocolors";
+      packageName = "picocolors";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz";
+        sha512 = "1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==";
+      };
+    };
+    "picomatch-2.3.1" = {
+      name = "picomatch";
+      packageName = "picomatch";
+      version = "2.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz";
+        sha512 = "JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==";
+      };
+    };
+    "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";
+        sha512 = "udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==";
+      };
+    };
+    "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";
+        sha512 = "C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==";
+      };
+    };
+    "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 = "uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==";
+      };
+    };
+    "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";
+        sha512 = "MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==";
+      };
+    };
+    "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";
+        sha512 = "0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==";
+      };
+    };
+    "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 = "4hRJH3YzkUpOlShRzhyxAmThSNnAaIlWZCAb27hd0pVUAXNUAHAO7XZbsPPvsCYwBFEScTmCCL6DGE8NyZ8BdQ==";
+      };
+    };
+    "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";
+        sha512 = "ojakdnUgL5pzJYWw2AIDEupaQCX5OPbM688ZevubICjdIX01PRSYKqm33fJoCOJBRseYCTUlQRnBNX+Pchaejw==";
+      };
+    };
+    "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 = "/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==";
+      };
+    };
+    "pkg-dir-4.2.0" = {
+      name = "pkg-dir";
+      packageName = "pkg-dir";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz";
+        sha512 = "HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==";
+      };
+    };
+    "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";
+        sha512 = "fjAPuiws93rm7mPUu21RdBnkeZNrbfCFCwfAhPWY+rR3zG0ubpe5cEReHOw5fIbfmsxEV/g2kSxGTATY3Bpnwg==";
+      };
+    };
+    "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";
+        sha512 = "yO5feByMzAp96LtP58wvPKSbaKAi/1C4kV9XpTctr6EepnP6F33RBNOiVrdz9BrPA98U2BMFsTNHo44TWcbQ2A==";
+      };
+    };
+    "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";
+        sha512 = "8xCNE/aT/EXKenuMDZ+xTVwkT8gsoHN2z/Q29l80u0ppGEXVvsKRzNMbtKhg8LS8k1tJLAHHylf6p4VFmP6XUQ==";
+      };
+    };
+    "portfinder-1.0.32" = {
+      name = "portfinder";
+      packageName = "portfinder";
+      version = "1.0.32";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz";
+        sha512 = "on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==";
+      };
+    };
+    "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";
+        sha512 = "xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==";
+      };
+    };
+    "postcss-7.0.39" = {
+      name = "postcss";
+      packageName = "postcss";
+      version = "7.0.39";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz";
+        sha512 = "yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==";
+      };
+    };
+    "postcss-8.4.33" = {
+      name = "postcss";
+      packageName = "postcss";
+      version = "8.4.33";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz";
+        sha512 = "Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==";
+      };
+    };
+    "postcss-calc-7.0.5" = {
+      name = "postcss-calc";
+      packageName = "postcss-calc";
+      version = "7.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz";
+        sha512 = "1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==";
+      };
+    };
+    "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 = "WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==";
+      };
+    };
+    "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 = "Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==";
+      };
+    };
+    "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 = "RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==";
+      };
+    };
+    "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 = "ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==";
+      };
+    };
+    "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 = "B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==";
+      };
+    };
+    "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 = "IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==";
+      };
+    };
+    "postcss-flexbugs-fixes-4.2.1" = {
+      name = "postcss-flexbugs-fixes";
+      packageName = "postcss-flexbugs-fixes";
+      version = "4.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz";
+        sha512 = "9SiofaZ9CWpQWxOwRh1b/r85KD5y7GgvsNt1056k6OYLvWUun0czCvogfJgylC22uJTwW1KzY3Gz65NZRlvoiQ==";
+      };
+    };
+    "postcss-loader-4.1.0" = {
+      name = "postcss-loader";
+      packageName = "postcss-loader";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.1.0.tgz";
+        sha512 = "vbCkP70F3Q9PIk6d47aBwjqAMI4LfkXCoyxj+7NPNuVIwfTGdzv2KVQes59/RuxMniIgsYQCFSY42P3+ykJfaw==";
+      };
+    };
+    "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 = "alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==";
+      };
+    };
+    "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 = "U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==";
+      };
+    };
+    "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 = "j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==";
+      };
+    };
+    "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 = "qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==";
+      };
+    };
+    "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 = "G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==";
+      };
+    };
+    "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 = "D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==";
+      };
+    };
+    "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 = "LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==";
+      };
+    };
+    "postcss-modules-local-by-default-3.0.3" = {
+      name = "postcss-modules-local-by-default";
+      packageName = "postcss-modules-local-by-default";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz";
+        sha512 = "e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw==";
+      };
+    };
+    "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 = "YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==";
+      };
+    };
+    "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 = "1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==";
+      };
+    };
+    "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 = "gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==";
+      };
+    };
+    "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 = "3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==";
+      };
+    };
+    "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 = "Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==";
+      };
+    };
+    "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 = "qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==";
+      };
+    };
+    "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 = "RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==";
+      };
+    };
+    "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 = "acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==";
+      };
+    };
+    "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 = "od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==";
+      };
+    };
+    "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 = "p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==";
+      };
+    };
+    "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 = "tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==";
+      };
+    };
+    "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 = "2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==";
+      };
+    };
+    "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 = "gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==";
+      };
+    };
+    "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 = "EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==";
+      };
+    };
+    "postcss-safe-parser-5.0.2" = {
+      name = "postcss-safe-parser";
+      packageName = "postcss-safe-parser";
+      version = "5.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-5.0.2.tgz";
+        sha512 = "jDUfCPJbKOABhwpUKcqCVbbXiloe/QXMcbJ6Iipf3sDIihEzTqRCeMBfRaOHxhBuTYqtASrI1KJWxzztZU4qUQ==";
+      };
+    };
+    "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 = "h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==";
+      };
+    };
+    "postcss-selector-parser-6.0.15" = {
+      name = "postcss-selector-parser";
+      packageName = "postcss-selector-parser";
+      version = "6.0.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz";
+        sha512 = "rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==";
+      };
+    };
+    "postcss-svgo-4.0.3" = {
+      name = "postcss-svgo";
+      packageName = "postcss-svgo";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz";
+        sha512 = "NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==";
+      };
+    };
+    "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 = "+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==";
+      };
+    };
+    "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 = "pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==";
+      };
+    };
+    "postcss-value-parser-4.2.0" = {
+      name = "postcss-value-parser";
+      packageName = "postcss-value-parser";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz";
+        sha512 = "1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==";
+      };
+    };
+    "prepend-http-1.0.4" = {
+      name = "prepend-http";
+      packageName = "prepend-http";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz";
+        sha512 = "PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==";
+      };
+    };
+    "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";
+        sha512 = "ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==";
+      };
+    };
+    "pretty-bytes-5.6.0" = {
+      name = "pretty-bytes";
+      packageName = "pretty-bytes";
+      version = "5.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz";
+        sha512 = "FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==";
+      };
+    };
+    "pretty-error-2.1.2" = {
+      name = "pretty-error";
+      packageName = "pretty-error";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz";
+        sha512 = "EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==";
+      };
+    };
+    "pretty-format-27.5.1" = {
+      name = "pretty-format";
+      packageName = "pretty-format";
+      version = "27.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz";
+        sha512 = "Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==";
+      };
+    };
+    "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";
+        sha512 = "cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==";
+      };
+    };
+    "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";
+        sha512 = "yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==";
+      };
+    };
+    "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 = "3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==";
+      };
+    };
+    "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 = "W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==";
+      };
+    };
+    "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";
+        sha512 = "6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==";
+      };
+    };
+    "promise-retry-2.0.1" = {
+      name = "promise-retry";
+      packageName = "promise-retry";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz";
+        sha512 = "y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==";
+      };
+    };
+    "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";
+        sha512 = "SIliATETjBHvX5c2h8xhjFP0GmGie58sdq7utvoMIv1qkcow3O/NLy21ME35D3uCMYYf/ZASPzG6kFTKXZ8Yxg==";
+      };
+    };
+    "prompts-2.4.2" = {
+      name = "prompts";
+      packageName = "prompts";
+      version = "2.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz";
+        sha512 = "NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==";
+      };
+    };
+    "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";
+        sha512 = "vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==";
+      };
+    };
+    "proxy-addr-2.0.7" = {
+      name = "proxy-addr";
+      packageName = "proxy-addr";
+      version = "2.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz";
+        sha512 = "llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==";
+      };
+    };
+    "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";
+        sha512 = "yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==";
+      };
+    };
+    "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";
+        sha512 = "b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==";
+      };
+    };
+    "psl-1.9.0" = {
+      name = "psl";
+      packageName = "psl";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz";
+        sha512 = "E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==";
+      };
+    };
+    "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 = "zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==";
+      };
+    };
+    "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 = "ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==";
+      };
+    };
+    "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 = "LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==";
+      };
+    };
+    "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 = "oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==";
+      };
+    };
+    "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";
+        sha512 = "jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==";
+      };
+    };
+    "punycode-2.3.1" = {
+      name = "punycode";
+      packageName = "punycode";
+      version = "2.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz";
+        sha512 = "vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==";
+      };
+    };
+    "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";
+        sha512 = "kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==";
+      };
+    };
+    "qs-6.11.0" = {
+      name = "qs";
+      packageName = "qs";
+      version = "6.11.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz";
+        sha512 = "MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==";
+      };
+    };
+    "qs-6.11.2" = {
+      name = "qs";
+      packageName = "qs";
+      version = "6.11.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz";
+        sha512 = "tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==";
+      };
+    };
+    "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 = "eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==";
+      };
+    };
+    "qs-6.5.3" = {
+      name = "qs";
+      packageName = "qs";
+      version = "6.5.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz";
+        sha512 = "qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==";
+      };
+    };
+    "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 = "VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==";
+      };
+    };
+    "query-string-4.3.4" = {
+      name = "query-string";
+      packageName = "query-string";
+      version = "4.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz";
+        sha512 = "O2XLNDBIg1DnTOa+2XrIwSiXEV8h2KImXUnjhhn2+UsvZ+Es2uyd5CCRTNQlDGbzUQOW3aYCBx9rVA6dzsiY7Q==";
+      };
+    };
+    "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";
+        sha512 = "773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==";
+      };
+    };
+    "querystringify-2.2.0" = {
+      name = "querystringify";
+      packageName = "querystringify";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz";
+        sha512 = "FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==";
+      };
+    };
+    "queue-microtask-1.2.3" = {
+      name = "queue-microtask";
+      packageName = "queue-microtask";
+      version = "1.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz";
+        sha512 = "NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==";
+      };
+    };
+    "quick-lru-5.1.1" = {
+      name = "quick-lru";
+      packageName = "quick-lru";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz";
+        sha512 = "WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==";
+      };
+    };
+    "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 = "vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==";
+      };
+    };
+    "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 = "87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==";
+      };
+    };
+    "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 = "Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==";
+      };
+    };
+    "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";
+        sha512 = "Ss0DsBxqLxCmQkfG5yazYhtbVVTJqS9jTsZG2lhrNwqzOk2SUC7O/NB/M//CkEBqsrtmlNgJCPccJGuYSFr6Vg==";
+      };
+    };
+    "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 = "4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==";
+      };
+    };
+    "raw-body-2.5.1" = {
+      name = "raw-body";
+      packageName = "raw-body";
+      version = "2.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz";
+        sha512 = "qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==";
+      };
+    };
+    "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 = "y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==";
+      };
+    };
+    "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 = "ThbJ86coVd6wV/QiTo8klDTvdAJ1WsFCGQN07+UkN+QN9CtCSsl/+YuDJToKGeG8X4j9HMGXNKbk2QhPAZr43w==";
+      };
+    };
+    "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 = "xXUbDAZkU08aAkjtUvldqbvI04ogv+a1XdHxvYuHPYKIVk/42BIOD0zSKTHAWV4+gDy3yGm283z2072rA2gdtw==";
+      };
+    };
+    "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 = "X1Y+0jR47ImDVr54Ab6V9eGk0Hnu7fVWGeHQSOXHf/C2pF9c6uy3gef8QUeuUiWlNb0i08InPSE5a/KJzNzw1Q==";
+      };
+    };
+    "react-is-17.0.2" = {
+      name = "react-is";
+      packageName = "react-is";
+      version = "17.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz";
+        sha512 = "w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==";
+      };
+    };
+    "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";
+        sha512 = "rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==";
+      };
+    };
+    "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";
+        sha512 = "7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==";
+      };
+    };
+    "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";
+        sha512 = "WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==";
+      };
+    };
+    "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";
+        sha512 = "TXcFfb63BQe1+ySzsHZI/5v1aJPCShfqvWJ64ayNImXMsN1Cd0YGk/wm8KB7/OeessgPc9QvS9Zou8QTkFzsLw==";
+      };
+    };
+    "readable-stream-2.3.8" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "2.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz";
+        sha512 = "8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==";
+      };
+    };
+    "readable-stream-3.6.2" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "3.6.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz";
+        sha512 = "9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==";
+      };
+    };
+    "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 = "1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==";
+      };
+    };
+    "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 = "ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q==";
+      };
+    };
+    "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 = "0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==";
+      };
+    };
+    "readdirp-3.6.0" = {
+      name = "readdirp";
+      packageName = "readdirp";
+      version = "3.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz";
+        sha512 = "hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==";
+      };
+    };
+    "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 = "nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==";
+      };
+    };
+    "reflect-metadata-0.2.1" = {
+      name = "reflect-metadata";
+      packageName = "reflect-metadata";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz";
+        sha512 = "i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==";
+      };
+    };
+    "regenerate-1.4.2" = {
+      name = "regenerate";
+      packageName = "regenerate";
+      version = "1.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz";
+        sha512 = "zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==";
+      };
+    };
+    "regenerate-unicode-properties-10.1.1" = {
+      name = "regenerate-unicode-properties";
+      packageName = "regenerate-unicode-properties";
+      version = "10.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz";
+        sha512 = "X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==";
+      };
+    };
+    "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 = "MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==";
+      };
+    };
+    "regenerator-runtime-0.13.11" = {
+      name = "regenerator-runtime";
+      packageName = "regenerator-runtime";
+      version = "0.13.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz";
+        sha512 = "kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==";
+      };
+    };
+    "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";
+        sha512 = "D0Y/JJ4VhusyMOd/o25a3jdUqN/bC85EFsaoL9Oqmy/O4efCh+xhp7yj2EEOsj974qvMkcW8AwUzJ1jB/MbxCw==";
+      };
+    };
+    "regenerator-transform-0.15.2" = {
+      name = "regenerator-transform";
+      packageName = "regenerator-transform";
+      version = "0.15.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz";
+        sha512 = "hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==";
+      };
+    };
+    "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 = "J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==";
+      };
+    };
+    "regexp.prototype.flags-1.5.1" = {
+      name = "regexp.prototype.flags";
+      packageName = "regexp.prototype.flags";
+      version = "1.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz";
+        sha512 = "sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==";
+      };
+    };
+    "regexpu-core-5.3.2" = {
+      name = "regexpu-core";
+      packageName = "regexpu-core";
+      version = "5.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz";
+        sha512 = "RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==";
+      };
+    };
+    "registry-auth-token-4.2.2" = {
+      name = "registry-auth-token";
+      packageName = "registry-auth-token";
+      version = "4.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz";
+        sha512 = "PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==";
+      };
+    };
+    "registry-url-5.1.0" = {
+      name = "registry-url";
+      packageName = "registry-url";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz";
+        sha512 = "8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==";
+      };
+    };
+    "regjsparser-0.9.1" = {
+      name = "regjsparser";
+      packageName = "regjsparser";
+      version = "0.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz";
+        sha512 = "dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==";
+      };
+    };
+    "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";
+        sha512 = "G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==";
+      };
+    };
+    "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";
+        sha512 = "/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==";
+      };
+    };
+    "renderkid-2.0.7" = {
+      name = "renderkid";
+      packageName = "renderkid";
+      version = "2.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/renderkid/-/renderkid-2.0.7.tgz";
+        sha512 = "oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ==";
+      };
+    };
+    "repeat-element-1.1.4" = {
+      name = "repeat-element";
+      packageName = "repeat-element";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz";
+        sha512 = "LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==";
+      };
+    };
+    "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";
+        sha512 = "PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==";
+      };
+    };
+    "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 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
+      };
+    };
+    "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 = "MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==";
+      };
+    };
+    "request-light-0.7.0" = {
+      name = "request-light";
+      packageName = "request-light";
+      version = "0.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request-light/-/request-light-0.7.0.tgz";
+        sha512 = "lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==";
+      };
+    };
+    "request-promise-4.2.6" = {
+      name = "request-promise";
+      packageName = "request-promise";
+      version = "4.2.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz";
+        sha512 = "HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==";
+      };
+    };
+    "request-promise-core-1.1.4" = {
+      name = "request-promise-core";
+      packageName = "request-promise-core";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz";
+        sha512 = "TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==";
+      };
+    };
+    "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";
+        sha512 = "fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==";
+      };
+    };
+    "require-from-string-2.0.2" = {
+      name = "require-from-string";
+      packageName = "require-from-string";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz";
+        sha512 = "Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==";
+      };
+    };
+    "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";
+        sha512 = "IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==";
+      };
+    };
+    "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 = "NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==";
+      };
+    };
+    "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";
+        sha512 = "KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==";
+      };
+    };
+    "resolve-1.22.8" = {
+      name = "resolve";
+      packageName = "resolve";
+      version = "1.22.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz";
+        sha512 = "oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==";
+      };
+    };
+    "resolve-alpn-1.2.1" = {
+      name = "resolve-alpn";
+      packageName = "resolve-alpn";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz";
+        sha512 = "0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==";
+      };
+    };
+    "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";
+        sha512 = "ccu8zQTrzVr954472aUVPLEcB3YpKSYR3cg/3lo1okzobPBM+1INXBbBZlDbnI/hbEocnf8j0QVo43hQKrbchg==";
+      };
+    };
+    "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";
+        sha512 = "R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==";
+      };
+    };
+    "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";
+        sha512 = "GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==";
+      };
+    };
+    "resolve-from-4.0.0" = {
+      name = "resolve-from";
+      packageName = "resolve-from";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz";
+        sha512 = "pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==";
+      };
+    };
+    "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";
+        sha512 = "ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==";
+      };
+    };
+    "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";
+        sha512 = "/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==";
+      };
+    };
+    "responselike-2.0.1" = {
+      name = "responselike";
+      packageName = "responselike";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz";
+        sha512 = "4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==";
+      };
+    };
+    "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";
+        sha512 = "6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==";
+      };
+    };
+    "restore-cursor-3.1.0" = {
+      name = "restore-cursor";
+      packageName = "restore-cursor";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz";
+        sha512 = "l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==";
+      };
+    };
+    "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 = "TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==";
+      };
+    };
+    "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";
+        sha512 = "9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==";
+      };
+    };
+    "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 = "U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==";
+      };
+    };
+    "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";
+        sha512 = "xcBILK2pA9oh4SiinPEZfhP8HfrB/ha+a2fTMyl7Om2WjlDVrOQy99N2MXXlUHqGJz4qEu2duXxHJjDWuK/0xg==";
+      };
+    };
+    "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";
+        sha512 = "gDK5mkALDFER2YLqH6imYvK6g02gpNGM4ILDZ472EwWfXZnC2ZEpoB2ECXTyOVUKuk/bPJZMzwQPBYICzP+D3w==";
+      };
+    };
+    "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";
+        sha512 = "zgn5OjNQXLUTdq8m17KdaicF6w89TZs8ZU8y0AYENIU6wG8GG6LLm0yLSiPY8DmaYmHdgRW8rnApjoT0fQRfMg==";
+      };
+    };
+    "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 = "mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==";
+      };
+    };
+    "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 = "uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==";
+      };
+    };
+    "rimraf-5.0.5" = {
+      name = "rimraf";
+      packageName = "rimraf";
+      version = "5.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz";
+        sha512 = "CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==";
+      };
+    };
+    "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 = "ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==";
+      };
+    };
+    "rollup-3.29.4" = {
+      name = "rollup";
+      packageName = "rollup";
+      version = "3.29.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz";
+        sha512 = "oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==";
+      };
+    };
+    "run-async-2.4.1" = {
+      name = "run-async";
+      packageName = "run-async";
+      version = "2.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz";
+        sha512 = "tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==";
+      };
+    };
+    "run-parallel-1.2.0" = {
+      name = "run-parallel";
+      packageName = "run-parallel";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz";
+        sha512 = "5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==";
+      };
+    };
+    "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";
+        sha512 = "ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==";
+      };
+    };
+    "rxjs-6.6.7" = {
+      name = "rxjs";
+      packageName = "rxjs";
+      version = "6.6.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz";
+        sha512 = "hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==";
+      };
+    };
+    "safe-array-concat-1.0.1" = {
+      name = "safe-array-concat";
+      packageName = "safe-array-concat";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz";
+        sha512 = "6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==";
+      };
+    };
+    "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 = "kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==";
+      };
+    };
+    "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 = "Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==";
+      };
+    };
+    "safe-buffer-5.2.1" = {
+      name = "safe-buffer";
+      packageName = "safe-buffer";
+      version = "5.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz";
+        sha512 = "rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==";
+      };
+    };
+    "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";
+        sha512 = "aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==";
+      };
+    };
+    "safe-regex-test-1.0.0" = {
+      name = "safe-regex-test";
+      packageName = "safe-regex-test";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz";
+        sha512 = "JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==";
+      };
+    };
+    "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";
+        sha512 = "MEa7NKjmDdLauyshwWGBcFgwHpr8pTKG7TLMOz/6Wb79U5mOVomBAAW5yR85ecf5XMMkuwqaKX/N9w8Wi+X2wA==";
+      };
+    };
+    "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 = "YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==";
+      };
+    };
+    "sass-1.69.7" = {
+      name = "sass";
+      packageName = "sass";
+      version = "1.69.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sass/-/sass-1.69.7.tgz";
+        sha512 = "rzj2soDeZ8wtE2egyLXgOOHQvaC2iosZrkF6v3EUG+tBwEvhqUCzm0VP3k9gHF9LXbSrRhT5SksoI56Iw8NPnQ==";
+      };
+    };
+    "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 = "NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==";
+      };
+    };
+    "sax-1.3.0" = {
+      name = "sax";
+      packageName = "sax";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz";
+        sha512 = "0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==";
+      };
+    };
+    "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 = "v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==";
+      };
+    };
+    "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 = "i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==";
+      };
+    };
+    "schema-utils-2.7.1" = {
+      name = "schema-utils";
+      packageName = "schema-utils";
+      version = "2.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz";
+        sha512 = "SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==";
+      };
+    };
+    "schema-utils-3.3.0" = {
+      name = "schema-utils";
+      packageName = "schema-utils";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz";
+        sha512 = "pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==";
+      };
+    };
+    "section-matter-1.0.0" = {
+      name = "section-matter";
+      packageName = "section-matter";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz";
+        sha512 = "vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==";
+      };
+    };
+    "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";
+        sha512 = "mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==";
+      };
+    };
+    "selfsigned-1.10.14" = {
+      name = "selfsigned";
+      packageName = "selfsigned";
+      version = "1.10.14";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz";
+        sha512 = "lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==";
+      };
+    };
+    "semver-5.7.2" = {
+      name = "semver";
+      packageName = "semver";
+      version = "5.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz";
+        sha512 = "cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==";
+      };
+    };
+    "semver-6.3.1" = {
+      name = "semver";
+      packageName = "semver";
+      version = "6.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz";
+        sha512 = "BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==";
+      };
+    };
+    "semver-7.5.4" = {
+      name = "semver";
+      packageName = "semver";
+      version = "7.5.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz";
+        sha512 = "1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==";
+      };
+    };
+    "semver-regex-3.1.4" = {
+      name = "semver-regex";
+      packageName = "semver-regex";
+      version = "3.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.4.tgz";
+        sha512 = "6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==";
+      };
+    };
+    "semver-sort-1.0.0" = {
+      name = "semver-sort";
+      packageName = "semver-sort";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver-sort/-/semver-sort-1.0.0.tgz";
+        sha512 = "JicVlQKz/C//4BiPmbHEDou6HihXxo5xqB/8Hm9FaLJ6HHkRRvYgCECq4u/z0XF8kyJQ/KAZt++A/kYz/oOSSg==";
+      };
+    };
+    "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 = "E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==";
+      };
+    };
+    "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 = "BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==";
+      };
+    };
+    "send-0.18.0" = {
+      name = "send";
+      packageName = "send";
+      version = "0.18.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/send/-/send-0.18.0.tgz";
+        sha512 = "qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==";
+      };
+    };
+    "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 = "0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==";
+      };
+    };
+    "serialize-javascript-4.0.0" = {
+      name = "serialize-javascript";
+      packageName = "serialize-javascript";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz";
+        sha512 = "GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==";
+      };
+    };
+    "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";
+        sha512 = "pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==";
+      };
+    };
+    "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 = "p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==";
+      };
+    };
+    "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 = "JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==";
+      };
+    };
+    "serve-static-1.15.0" = {
+      name = "serve-static";
+      packageName = "serve-static";
+      version = "1.15.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz";
+        sha512 = "XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==";
+      };
+    };
+    "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";
+        sha512 = "KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==";
+      };
+    };
+    "set-function-length-1.1.1" = {
+      name = "set-function-length";
+      packageName = "set-function-length";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz";
+        sha512 = "VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==";
+      };
+    };
+    "set-function-name-2.0.1" = {
+      name = "set-function-name";
+      packageName = "set-function-name";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz";
+        sha512 = "tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==";
+      };
+    };
+    "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 = "JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==";
+      };
+    };
+    "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";
+        sha512 = "MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==";
+      };
+    };
+    "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";
+        sha512 = "9jphSf3UbIgpOX/RKvX02iw/rN2TKdusnsPpGfO/rkcsrd+IRqgHZb4VGnmL0Cynps8Nj2hN45wsi30BzrHDIw==";
+      };
+    };
+    "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 = "BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==";
+      };
+    };
+    "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 = "JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==";
+      };
+    };
+    "setprototypeof-1.2.0" = {
+      name = "setprototypeof";
+      packageName = "setprototypeof";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz";
+        sha512 = "E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==";
+      };
+    };
+    "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 = "QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==";
+      };
+    };
+    "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";
+        sha512 = "EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==";
+      };
+    };
+    "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 = "kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==";
+      };
+    };
+    "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";
+        sha512 = "wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==";
+      };
+    };
+    "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 = "7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==";
+      };
+    };
+    "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";
+        sha512 = "V0iQEZ/uoem3NmD91rD8XiuozJnq9/ZJnbHVXHnWqP1ucAhS3yJ7sLIIzEi57wFFcK3oi3kFUC46uSyWr35mxg==";
+      };
+    };
+    "side-channel-1.0.4" = {
+      name = "side-channel";
+      packageName = "side-channel";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz";
+        sha512 = "q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==";
+      };
+    };
+    "signal-exit-3.0.7" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "3.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz";
+        sha512 = "wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==";
+      };
+    };
+    "signal-exit-4.1.0" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz";
+        sha512 = "bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==";
+      };
+    };
+    "simple-git-3.22.0" = {
+      name = "simple-git";
+      packageName = "simple-git";
+      version = "3.22.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/simple-git/-/simple-git-3.22.0.tgz";
+        sha512 = "6JujwSs0ac82jkGjMHiCnTifvf1crOiY/+tfs/Pqih6iow7VrpNKRRNdWm6RtaXpvvv/JGNYhlUtLhGFqHF+Yw==";
+      };
+    };
+    "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";
+        sha512 = "JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==";
+      };
+    };
+    "sisteransi-1.0.5" = {
+      name = "sisteransi";
+      packageName = "sisteransi";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz";
+        sha512 = "bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==";
+      };
+    };
+    "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";
+        sha512 = "3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==";
+      };
+    };
+    "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 = "ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==";
+      };
+    };
+    "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 = "g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==";
+      };
+    };
+    "slash-4.0.0" = {
+      name = "slash";
+      packageName = "slash";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz";
+        sha512 = "3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==";
+      };
+    };
+    "slice-ansi-4.0.0" = {
+      name = "slice-ansi";
+      packageName = "slice-ansi";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz";
+        sha512 = "qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==";
+      };
+    };
+    "smart-buffer-4.2.0" = {
+      name = "smart-buffer";
+      packageName = "smart-buffer";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz";
+        sha512 = "94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==";
+      };
+    };
+    "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 = "FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==";
+      };
+    };
+    "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 = "O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==";
+      };
+    };
+    "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 = "mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==";
+      };
+    };
+    "sockjs-0.3.20" = {
+      name = "sockjs";
+      packageName = "sockjs";
+      version = "0.3.20";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz";
+        sha512 = "SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==";
+      };
+    };
+    "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";
+        sha512 = "PmPRkAYIeuRgX+ZSieViT4Z3Q23bLS2Itm/ck1tSf5P0/yVuFDiI5q9mcnpXoMdToaPSRS9MEyUx/aaBxrFzyw==";
+      };
+    };
+    "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 = "5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==";
+      };
+    };
+    "socks-2.7.1" = {
+      name = "socks";
+      packageName = "socks";
+      version = "2.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz";
+        sha512 = "7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==";
+      };
+    };
+    "socks-proxy-agent-7.0.0" = {
+      name = "socks-proxy-agent";
+      packageName = "socks-proxy-agent";
+      version = "7.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz";
+        sha512 = "Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==";
+      };
+    };
+    "sort-keys-1.1.2" = {
+      name = "sort-keys";
+      packageName = "sort-keys";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz";
+        sha512 = "vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==";
+      };
+    };
+    "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 = "qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==";
+      };
+    };
+    "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";
+        sha512 = "LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==";
+      };
+    };
+    "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 = "UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==";
+      };
+    };
+    "source-map-0.7.4" = {
+      name = "source-map";
+      packageName = "source-map";
+      version = "0.7.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz";
+        sha512 = "l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==";
+      };
+    };
+    "source-map-js-1.0.2" = {
+      name = "source-map-js";
+      packageName = "source-map-js";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz";
+        sha512 = "R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==";
+      };
+    };
+    "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 = "Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==";
+      };
+    };
+    "source-map-support-0.5.21" = {
+      name = "source-map-support";
+      packageName = "source-map-support";
+      version = "0.5.21";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz";
+        sha512 = "uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==";
+      };
+    };
+    "source-map-url-0.4.1" = {
+      name = "source-map-url";
+      packageName = "source-map-url";
+      version = "0.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz";
+        sha512 = "cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==";
+      };
+    };
+    "spdx-correct-3.2.0" = {
+      name = "spdx-correct";
+      packageName = "spdx-correct";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz";
+        sha512 = "kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==";
+      };
+    };
+    "spdx-exceptions-2.3.0" = {
+      name = "spdx-exceptions";
+      packageName = "spdx-exceptions";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz";
+        sha512 = "/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==";
+      };
+    };
+    "spdx-expression-parse-3.0.1" = {
+      name = "spdx-expression-parse";
+      packageName = "spdx-expression-parse";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz";
+        sha512 = "cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==";
+      };
+    };
+    "spdx-license-ids-3.0.16" = {
+      name = "spdx-license-ids";
+      packageName = "spdx-license-ids";
+      version = "3.0.16";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz";
+        sha512 = "eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==";
+      };
+    };
+    "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 = "r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==";
+      };
+    };
+    "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 = "hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==";
+      };
+    };
+    "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 = "mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==";
+      };
+    };
+    "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 = "NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==";
+      };
+    };
+    "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";
+        sha512 = "D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==";
+      };
+    };
+    "sshpk-1.18.0" = {
+      name = "sshpk";
+      packageName = "sshpk";
+      version = "1.18.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz";
+        sha512 = "2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==";
+      };
+    };
+    "ssri-10.0.5" = {
+      name = "ssri";
+      packageName = "ssri";
+      version = "10.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz";
+        sha512 = "bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==";
+      };
+    };
+    "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 = "XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==";
+      };
+    };
+    "ssri-6.0.2" = {
+      name = "ssri";
+      packageName = "ssri";
+      version = "6.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz";
+        sha512 = "cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==";
+      };
+    };
+    "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 = "ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==";
+      };
+    };
+    "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";
+        sha512 = "KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==";
+      };
+    };
+    "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";
+        sha512 = "72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==";
+      };
+    };
+    "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 = "zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==";
+      };
+    };
+    "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";
+        sha512 = "OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==";
+      };
+    };
+    "statuses-2.0.1" = {
+      name = "statuses";
+      packageName = "statuses";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz";
+        sha512 = "RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==";
+      };
+    };
+    "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";
+        sha512 = "ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==";
+      };
+    };
+    "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 = "nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==";
+      };
+    };
+    "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 = "vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==";
+      };
+    };
+    "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 = "+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==";
+      };
+    };
+    "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 = "AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==";
+      };
+    };
+    "streamsearch-1.1.0" = {
+      name = "streamsearch";
+      packageName = "streamsearch";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz";
+        sha512 = "Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==";
+      };
+    };
+    "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";
+        sha512 = "R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==";
+      };
+    };
+    "string-replace-loader-2.3.0" = {
+      name = "string-replace-loader";
+      packageName = "string-replace-loader";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-2.3.0.tgz";
+        sha512 = "HYBIHStViMKLZC/Lehxy42OuwsBaPzX/LjcF5mkJlE2SnHXmW6SW6eiHABTXnY8ZCm/REbdJ8qnA0ptmIzN0Ng==";
+      };
+    };
+    "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";
+        sha512 = "0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==";
+      };
+    };
+    "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 = "nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==";
+      };
+    };
+    "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 = "vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==";
+      };
+    };
+    "string-width-4.2.3" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "4.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz";
+        sha512 = "wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==";
+      };
+    };
+    "string-width-5.1.2" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz";
+        sha512 = "HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==";
+      };
+    };
+    "string-width-cjs-4.2.3" = {
+      name = "string-width-cjs";
+      packageName = "string-width-cjs";
+      version = "4.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz";
+        sha512 = "wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==";
+      };
+    };
+    "string.prototype.trim-1.2.8" = {
+      name = "string.prototype.trim";
+      packageName = "string.prototype.trim";
+      version = "1.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz";
+        sha512 = "lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==";
+      };
+    };
+    "string.prototype.trimend-1.0.7" = {
+      name = "string.prototype.trimend";
+      packageName = "string.prototype.trimend";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz";
+        sha512 = "Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==";
+      };
+    };
+    "string.prototype.trimstart-1.0.7" = {
+      name = "string.prototype.trimstart";
+      packageName = "string.prototype.trimstart";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz";
+        sha512 = "NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==";
+      };
+    };
+    "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";
+        sha512 = "ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==";
+      };
+    };
+    "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 = "n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==";
+      };
+    };
+    "string_decoder-1.3.0" = {
+      name = "string_decoder";
+      packageName = "string_decoder";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz";
+        sha512 = "hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==";
+      };
+    };
+    "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 = "rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==";
+      };
+    };
+    "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";
+        sha512 = "VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==";
+      };
+    };
+    "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";
+        sha512 = "4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==";
+      };
+    };
+    "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 = "DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==";
+      };
+    };
+    "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 = "AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==";
+      };
+    };
+    "strip-ansi-6.0.1" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz";
+        sha512 = "Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==";
+      };
+    };
+    "strip-ansi-7.1.0" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "7.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz";
+        sha512 = "iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==";
+      };
+    };
+    "strip-ansi-cjs-6.0.1" = {
+      name = "strip-ansi-cjs";
+      packageName = "strip-ansi-cjs";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz";
+        sha512 = "Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==";
+      };
+    };
+    "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";
+        sha512 = "kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==";
+      };
+    };
+    "strip-bom-string-1.0.0" = {
+      name = "strip-bom-string";
+      packageName = "strip-bom-string";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz";
+        sha512 = "uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==";
+      };
+    };
+    "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 = "kL97alc47hoyIQSV165tTt9rG5dn4w1dNnBhOQ3bOU1Nc1hel09jnXANaHJ7vzHLd4Ju8kseDGzlev96pghLFw==";
+      };
+    };
+    "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";
+        sha512 = "7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==";
+      };
+    };
+    "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 = "BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==";
+      };
+    };
+    "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";
+        sha512 = "4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==";
+      };
+    };
+    "style-loader-1.3.0" = {
+      name = "style-loader";
+      packageName = "style-loader";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz";
+        sha512 = "V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q==";
+      };
+    };
+    "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 = "7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==";
+      };
+    };
+    "stylus-0.62.0" = {
+      name = "stylus";
+      packageName = "stylus";
+      version = "0.62.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stylus/-/stylus-0.62.0.tgz";
+        sha512 = "v3YCf31atbwJQIMtPNX8hcQ+okD4NQaTuKGUWfII8eaqn+3otrbttGL1zSMZAAtiPsBztQnujVBugg/cXFUpyg==";
+      };
+    };
+    "sudo-prompt-8.2.5" = {
+      name = "sudo-prompt";
+      packageName = "sudo-prompt";
+      version = "8.2.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-8.2.5.tgz";
+        sha512 = "rlBo3HU/1zAJUrkY6jNxDOC9eVYliG6nS4JA8u8KAshITd07tafMc/Br7xQwCSseXwJ2iCcHCE8SNWX3q8Z+kw==";
+      };
+    };
+    "sugarss-4.0.1" = {
+      name = "sugarss";
+      packageName = "sugarss";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz";
+        sha512 = "WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==";
+      };
+    };
+    "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";
+        sha512 = "5uXZlaoxZLgdXpBnwN5L0Gt4/k+dGynuvJVPSzhC2suOSojupMT/5fiZCrho9onLRSaXCe5j+QoKykFekgey4w==";
+      };
+    };
+    "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";
+        sha512 = "KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==";
+      };
+    };
+    "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 = "QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==";
+      };
+    };
+    "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 = "qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==";
+      };
+    };
+    "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 = "oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==";
+      };
+    };
+    "supports-color-7.2.0" = {
+      name = "supports-color";
+      packageName = "supports-color";
+      version = "7.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz";
+        sha512 = "qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==";
+      };
+    };
+    "supports-hyperlinks-2.3.0" = {
+      name = "supports-hyperlinks";
+      packageName = "supports-hyperlinks";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz";
+        sha512 = "RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==";
+      };
+    };
+    "supports-preserve-symlinks-flag-1.0.0" = {
+      name = "supports-preserve-symlinks-flag";
+      packageName = "supports-preserve-symlinks-flag";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz";
+        sha512 = "ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==";
+      };
+    };
+    "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 = "yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==";
+      };
+    };
+    "table-6.8.1" = {
+      name = "table";
+      packageName = "table";
+      version = "6.8.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/table/-/table-6.8.1.tgz";
+        sha512 = "Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==";
+      };
+    };
+    "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 = "4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==";
+      };
+    };
+    "tar-4.4.19" = {
+      name = "tar";
+      packageName = "tar";
+      version = "4.4.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz";
+        sha512 = "a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==";
+      };
+    };
+    "tar-6.2.0" = {
+      name = "tar";
+      packageName = "tar";
+      version = "6.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz";
+        sha512 = "/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==";
+      };
+    };
+    "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 = "YfUhPQCJoNQE5N+FJQcdPz63O3x3sdT4Xju69Gj4iZe0lBKOtnAMi0SLj9xKhGkcGhsxThvTJ/usxtFPo438zQ==";
+      };
+    };
+    "temp-0.9.4" = {
+      name = "temp";
+      packageName = "temp";
+      version = "0.9.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz";
+        sha512 = "yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==";
+      };
+    };
+    "terminal-link-2.1.1" = {
+      name = "terminal-link";
+      packageName = "terminal-link";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz";
+        sha512 = "un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==";
+      };
+    };
+    "terser-4.8.1" = {
+      name = "terser";
+      packageName = "terser";
+      version = "4.8.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz";
+        sha512 = "4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==";
+      };
+    };
+    "terser-5.15.1" = {
+      name = "terser";
+      packageName = "terser";
+      version = "5.15.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz";
+        sha512 = "K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==";
+      };
+    };
+    "terser-5.26.0" = {
+      name = "terser";
+      packageName = "terser";
+      version = "5.26.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz";
+        sha512 = "dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==";
+      };
+    };
+    "terser-5.3.8" = {
+      name = "terser";
+      packageName = "terser";
+      version = "5.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser/-/terser-5.3.8.tgz";
+        sha512 = "zVotuHoIfnYjtlurOouTazciEfL7V38QMAOhGqpXDEg6yT13cF4+fEP9b0rrCEQTn+tT46uxgFsTZzhygk+CzQ==";
+      };
+    };
+    "terser-webpack-plugin-1.4.5" = {
+      name = "terser-webpack-plugin";
+      packageName = "terser-webpack-plugin";
+      version = "1.4.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz";
+        sha512 = "04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==";
+      };
+    };
+    "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";
+        sha512 = "N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==";
+      };
+    };
+    "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";
+        sha512 = "w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==";
+      };
+    };
+    "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";
+        sha512 = "/vp02SIbpmVHapNMjox4hDBzykPdAOmH5y3INcKaxGfpEPSCMqzdWXyGfqPYyxoBLo1JpxBrlh3Z9esv0vWUYw==";
+      };
+    };
+    "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 = "/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==";
+      };
+    };
+    "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 = "eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==";
+      };
+    };
+    "timers-browserify-2.0.12" = {
+      name = "timers-browserify";
+      packageName = "timers-browserify";
+      version = "2.0.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz";
+        sha512 = "9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==";
+      };
+    };
+    "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";
+        sha512 = "qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==";
+      };
+    };
+    "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";
+        sha512 = "lfyEfOppKvWNeId5CArFLwgwef+iCnbEIy0JWYf1httIEXnx4ndL4Dr1adw7hPgeQfSlTbc/gqn6iaKcROpw5Q==";
+      };
+    };
+    "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 = "jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==";
+      };
+    };
+    "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 = "J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==";
+      };
+    };
+    "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";
+        sha512 = "okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==";
+      };
+    };
+    "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";
+        sha512 = "/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==";
+      };
+    };
+    "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";
+        sha512 = "9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==";
+      };
+    };
+    "to-readable-stream-1.0.0" = {
+      name = "to-readable-stream";
+      packageName = "to-readable-stream";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz";
+        sha512 = "Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==";
+      };
+    };
+    "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 = "o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w==";
+      };
+    };
+    "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 = "FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==";
+      };
+    };
+    "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";
+        sha512 = "ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==";
+      };
+    };
+    "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 = "65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==";
+      };
+    };
+    "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 = "yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==";
+      };
+    };
+    "toidentifier-1.0.1" = {
+      name = "toidentifier";
+      packageName = "toidentifier";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz";
+        sha512 = "o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==";
+      };
+    };
+    "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 = "WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==";
+      };
+    };
+    "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 = "Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==";
+      };
+    };
+    "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 = "nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==";
+      };
+    };
+    "tr46-0.0.3" = {
+      name = "tr46";
+      packageName = "tr46";
+      version = "0.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz";
+        sha512 = "N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==";
+      };
+    };
+    "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";
+        sha512 = "iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==";
+      };
+    };
+    "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";
+        sha512 = "up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg==";
+      };
+    };
+    "ts-debounce-4.0.0" = {
+      name = "ts-debounce";
+      packageName = "ts-debounce";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz";
+        sha512 = "+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==";
+      };
+    };
+    "ts-union-2.3.0" = {
+      name = "ts-union";
+      packageName = "ts-union";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ts-union/-/ts-union-2.3.0.tgz";
+        sha512 = "OP+W9WoYvGlOMjc90D6nYz60jU1zQlXAg3VBtuSoMDejY94PaORkya9HtHjaaqqwA4I5/hN38fmKK0nSWj7jPg==";
+      };
+    };
+    "tslib-1.14.1" = {
+      name = "tslib";
+      packageName = "tslib";
+      version = "1.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz";
+        sha512 = "Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==";
+      };
+    };
+    "tslib-2.6.2" = {
+      name = "tslib";
+      packageName = "tslib";
+      version = "2.6.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz";
+        sha512 = "AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==";
+      };
+    };
+    "tsyringe-4.8.0" = {
+      name = "tsyringe";
+      packageName = "tsyringe";
+      version = "4.8.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tsyringe/-/tsyringe-4.8.0.tgz";
+        sha512 = "YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA==";
+      };
+    };
+    "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";
+        sha512 = "JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==";
+      };
+    };
+    "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";
+        sha512 = "McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==";
+      };
+    };
+    "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";
+        sha512 = "KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==";
+      };
+    };
+    "type-1.2.0" = {
+      name = "type";
+      packageName = "type";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/type/-/type-1.2.0.tgz";
+        sha512 = "+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==";
+      };
+    };
+    "type-2.7.2" = {
+      name = "type";
+      packageName = "type";
+      version = "2.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/type/-/type-2.7.2.tgz";
+        sha512 = "dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==";
+      };
+    };
+    "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 = "EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw==";
+      };
+    };
+    "type-fest-0.21.3" = {
+      name = "type-fest";
+      packageName = "type-fest";
+      version = "0.21.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz";
+        sha512 = "t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==";
+      };
+    };
+    "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 = "TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==";
+      };
+    };
+    "typed-array-buffer-1.0.0" = {
+      name = "typed-array-buffer";
+      packageName = "typed-array-buffer";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz";
+        sha512 = "Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==";
+      };
+    };
+    "typed-array-byte-length-1.0.0" = {
+      name = "typed-array-byte-length";
+      packageName = "typed-array-byte-length";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz";
+        sha512 = "Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==";
+      };
+    };
+    "typed-array-byte-offset-1.0.0" = {
+      name = "typed-array-byte-offset";
+      packageName = "typed-array-byte-offset";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz";
+        sha512 = "RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==";
+      };
+    };
+    "typed-array-length-1.0.4" = {
+      name = "typed-array-length";
+      packageName = "typed-array-length";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz";
+        sha512 = "KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==";
+      };
+    };
+    "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";
+        sha512 = "/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==";
+      };
+    };
+    "typedarray-0.0.7" = {
+      name = "typedarray";
+      packageName = "typedarray";
+      version = "0.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typedarray/-/typedarray-0.0.7.tgz";
+        sha512 = "ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==";
+      };
+    };
+    "typedarray-to-buffer-3.1.5" = {
+      name = "typedarray-to-buffer";
+      packageName = "typedarray-to-buffer";
+      version = "3.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz";
+        sha512 = "zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==";
+      };
+    };
+    "typescript-4.9.3" = {
+      name = "typescript";
+      packageName = "typescript";
+      version = "4.9.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz";
+        sha512 = "CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==";
+      };
+    };
+    "typescript-4.9.5" = {
+      name = "typescript";
+      packageName = "typescript";
+      version = "4.9.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz";
+        sha512 = "1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==";
+      };
+    };
+    "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 = "rPzPisCzW68Okj1zNrfa2dR9uEm43SevDmpR6FChoZABFk9dANGnzzBMgHYUXI3609//63fnVkyQ1SQmAMyjww==";
+      };
+    };
+    "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 = "ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==";
+      };
+    };
+    "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";
+        sha512 = "QMpnpVtYaWEeY+MwKDN/UdKlE/LsFZXM5lO1u7GaZzNgmIbGixHEmVMIKT+vqYOALu3m5GYQy9kz4Xu4IVn7Ow==";
+      };
+    };
+    "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 = "UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==";
+      };
+    };
+    "unbox-primitive-1.0.2" = {
+      name = "unbox-primitive";
+      packageName = "unbox-primitive";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz";
+        sha512 = "61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==";
+      };
+    };
+    "undici-types-5.26.5" = {
+      name = "undici-types";
+      packageName = "undici-types";
+      version = "5.26.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz";
+        sha512 = "JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==";
+      };
+    };
+    "unicode-canonical-property-names-ecmascript-2.0.0" = {
+      name = "unicode-canonical-property-names-ecmascript";
+      packageName = "unicode-canonical-property-names-ecmascript";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz";
+        sha512 = "yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==";
+      };
+    };
+    "unicode-match-property-ecmascript-2.0.0" = {
+      name = "unicode-match-property-ecmascript";
+      packageName = "unicode-match-property-ecmascript";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz";
+        sha512 = "5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==";
+      };
+    };
+    "unicode-match-property-value-ecmascript-2.1.0" = {
+      name = "unicode-match-property-value-ecmascript";
+      packageName = "unicode-match-property-value-ecmascript";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz";
+        sha512 = "qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==";
+      };
+    };
+    "unicode-property-aliases-ecmascript-2.1.0" = {
+      name = "unicode-property-aliases-ecmascript";
+      packageName = "unicode-property-aliases-ecmascript";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz";
+        sha512 = "6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==";
+      };
+    };
+    "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 = "tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==";
+      };
+    };
+    "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";
+        sha512 = "Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==";
+      };
+    };
+    "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";
+        sha512 = "mZdDpf3vBV5Efh29kMw5tXoup/buMgxLzOt/XKFKcVmi+15ManNQWr6HfZ2aiZTYlYixbdNJ0KFmIZIv52tHSQ==";
+      };
+    };
+    "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 = "Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==";
+      };
+    };
+    "unique-filename-3.0.0" = {
+      name = "unique-filename";
+      packageName = "unique-filename";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz";
+        sha512 = "afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==";
+      };
+    };
+    "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 = "zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==";
+      };
+    };
+    "unique-slug-4.0.0" = {
+      name = "unique-slug";
+      packageName = "unique-slug";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz";
+        sha512 = "WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==";
+      };
+    };
+    "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 = "rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==";
+      };
+    };
+    "universalify-2.0.1" = {
+      name = "universalify";
+      packageName = "universalify";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz";
+        sha512 = "gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==";
+      };
+    };
+    "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";
+        sha512 = "pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==";
+      };
+    };
+    "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";
+        sha512 = "vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==";
+      };
+    };
+    "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";
+        sha512 = "PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==";
+      };
+    };
+    "unzip-stream-0.3.1" = {
+      name = "unzip-stream";
+      packageName = "unzip-stream";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.1.tgz";
+        sha512 = "RzaGXLNt+CW+T41h1zl6pGz3EaeVhYlK+rdAap+7DxW5kqsqePO8kRtWPaCiVqdhZc86EctSPVYNix30YOMzmw==";
+      };
+    };
+    "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 = "aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==";
+      };
+    };
+    "upath-2.0.1" = {
+      name = "upath";
+      packageName = "upath";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz";
+        sha512 = "1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==";
+      };
+    };
+    "update-browserslist-db-1.0.13" = {
+      name = "update-browserslist-db";
+      packageName = "update-browserslist-db";
+      version = "1.0.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz";
+        sha512 = "xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==";
+      };
+    };
+    "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";
+        sha512 = "NtkVvqVCqsJo5U3mYRum2Tw6uCltOxfIJ/AfTZeTmw6U39IB5X23xF+kRZ9aiPaORqeiQQ7Q209/ibhOvxzwHA==";
+      };
+    };
+    "uri-js-4.4.1" = {
+      name = "uri-js";
+      packageName = "uri-js";
+      version = "4.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz";
+        sha512 = "7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==";
+      };
+    };
+    "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";
+        sha512 = "Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==";
+      };
+    };
+    "url-0.11.3" = {
+      name = "url";
+      packageName = "url";
+      version = "0.11.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url/-/url-0.11.3.tgz";
+        sha512 = "6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==";
+      };
+    };
+    "url-loader-4.1.1" = {
+      name = "url-loader";
+      packageName = "url-loader";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz";
+        sha512 = "3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==";
+      };
+    };
+    "url-parse-1.5.10" = {
+      name = "url-parse";
+      packageName = "url-parse";
+      version = "1.5.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz";
+        sha512 = "WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==";
+      };
+    };
+    "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";
+        sha512 = "NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==";
+      };
+    };
+    "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";
+        sha512 = "0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==";
+      };
+    };
+    "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 = "cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==";
+      };
+    };
+    "utf-8-validate-5.0.10" = {
+      name = "utf-8-validate";
+      packageName = "utf-8-validate";
+      version = "5.0.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz";
+        sha512 = "Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==";
+      };
+    };
+    "util-0.10.4" = {
+      name = "util";
+      packageName = "util";
+      version = "0.10.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util/-/util-0.10.4.tgz";
+        sha512 = "0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==";
+      };
+    };
+    "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 = "HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==";
+      };
+    };
+    "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";
+        sha512 = "EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==";
+      };
+    };
+    "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 = "i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==";
+      };
+    };
+    "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";
+        sha512 = "Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==";
+      };
+    };
+    "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";
+        sha512 = "KaciY16ate/pJ7BAwBpVcfQlgJT02WRivIv8DlCX1cvg6WxaNEXHcdqazuS9fQ7PUoU5CH2UeY3wkqq16wRiWg==";
+      };
+    };
+    "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";
+        sha512 = "pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==";
+      };
+    };
+    "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 = "HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==";
+      };
+    };
+    "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 = "DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==";
+      };
+    };
+    "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";
+        sha512 = "BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==";
+      };
+    };
+    "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 = "/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==";
+      };
+    };
+    "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";
+        sha512 = "ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==";
+      };
+    };
+    "vite-4.3.9" = {
+      name = "vite";
+      packageName = "vite";
+      version = "4.3.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz";
+        sha512 = "qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==";
+      };
+    };
+    "vite-4.5.1" = {
+      name = "vite";
+      packageName = "vite";
+      version = "4.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz";
+        sha512 = "AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==";
+      };
+    };
+    "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 = "2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==";
+      };
+    };
+    "vscode-jsonrpc-8.2.0" = {
+      name = "vscode-jsonrpc";
+      packageName = "vscode-jsonrpc";
+      version = "8.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz";
+        sha512 = "C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==";
+      };
+    };
+    "vscode-languageserver-9.0.1" = {
+      name = "vscode-languageserver";
+      packageName = "vscode-languageserver";
+      version = "9.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz";
+        sha512 = "woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==";
+      };
+    };
+    "vscode-languageserver-protocol-3.17.5" = {
+      name = "vscode-languageserver-protocol";
+      packageName = "vscode-languageserver-protocol";
+      version = "3.17.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz";
+        sha512 = "mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==";
+      };
+    };
+    "vscode-languageserver-textdocument-1.0.11" = {
+      name = "vscode-languageserver-textdocument";
+      packageName = "vscode-languageserver-textdocument";
+      version = "1.0.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz";
+        sha512 = "X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==";
+      };
+    };
+    "vscode-languageserver-types-3.17.5" = {
+      name = "vscode-languageserver-types";
+      packageName = "vscode-languageserver-types";
+      version = "3.17.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz";
+        sha512 = "Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==";
+      };
+    };
+    "vscode-uri-3.0.8" = {
+      name = "vscode-uri";
+      packageName = "vscode-uri";
+      version = "3.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz";
+        sha512 = "AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==";
+      };
+    };
+    "watchpack-1.7.5" = {
+      name = "watchpack";
+      packageName = "watchpack";
+      version = "1.7.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz";
+        sha512 = "9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==";
+      };
+    };
+    "watchpack-chokidar2-2.0.1" = {
+      name = "watchpack-chokidar2";
+      packageName = "watchpack-chokidar2";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz";
+        sha512 = "nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==";
+      };
+    };
+    "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 = "O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==";
+      };
+    };
+    "wcwidth-1.0.1" = {
+      name = "wcwidth";
+      packageName = "wcwidth";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz";
+        sha512 = "XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==";
+      };
+    };
+    "web-tree-sitter-0.20.8" = {
+      name = "web-tree-sitter";
+      packageName = "web-tree-sitter";
+      version = "0.20.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz";
+        sha512 = "weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==";
+      };
+    };
+    "webidl-conversions-3.0.1" = {
+      name = "webidl-conversions";
+      packageName = "webidl-conversions";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz";
+        sha512 = "2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==";
+      };
+    };
+    "webpack-4.44.2" = {
+      name = "webpack";
+      packageName = "webpack";
+      version = "4.44.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz";
+        sha512 = "6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==";
+      };
+    };
+    "webpack-dev-middleware-3.7.3" = {
+      name = "webpack-dev-middleware";
+      packageName = "webpack-dev-middleware";
+      version = "3.7.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz";
+        sha512 = "djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==";
+      };
+    };
+    "webpack-dev-server-3.11.0" = {
+      name = "webpack-dev-server";
+      packageName = "webpack-dev-server";
+      version = "3.11.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz";
+        sha512 = "PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==";
+      };
+    };
+    "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 = "cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==";
+      };
+    };
+    "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 = "9S6YyKKKh/Oz/eryM1RyLVDVmy3NSPV0JXMRhZ18fJsq+AwGxUY34X54VNwkzYcEmEkDwNxuEOboCZEebJXBAQ==";
+      };
+    };
+    "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 = "lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==";
+      };
+    };
+    "websocket-1.0.32" = {
+      name = "websocket";
+      packageName = "websocket";
+      version = "1.0.32";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz";
+        sha512 = "i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==";
+      };
+    };
+    "websocket-driver-0.6.5" = {
+      name = "websocket-driver";
+      packageName = "websocket-driver";
+      version = "0.6.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz";
+        sha512 = "oBx6ZM1Gs5q2jwZuSN/Qxyy/fbgomV8+vqsmipaPKB/74hjHlKuM07jNmRhn4qa2AdUwsgxrltq+gaPsHgcl0Q==";
+      };
+    };
+    "websocket-driver-0.7.4" = {
+      name = "websocket-driver";
+      packageName = "websocket-driver";
+      version = "0.7.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz";
+        sha512 = "b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==";
+      };
+    };
+    "websocket-extensions-0.1.4" = {
+      name = "websocket-extensions";
+      packageName = "websocket-extensions";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz";
+        sha512 = "OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==";
+      };
+    };
+    "whatwg-fetch-3.5.0" = {
+      name = "whatwg-fetch";
+      packageName = "whatwg-fetch";
+      version = "3.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.5.0.tgz";
+        sha512 = "jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A==";
+      };
+    };
+    "whatwg-url-5.0.0" = {
+      name = "whatwg-url";
+      packageName = "whatwg-url";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz";
+        sha512 = "saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==";
+      };
+    };
+    "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 = "HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==";
+      };
+    };
+    "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 = "N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==";
+      };
+    };
+    "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 = "BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==";
+      };
+    };
+    "which-3.0.1" = {
+      name = "which";
+      packageName = "which";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which/-/which-3.0.1.tgz";
+        sha512 = "XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==";
+      };
+    };
+    "which-boxed-primitive-1.0.2" = {
+      name = "which-boxed-primitive";
+      packageName = "which-boxed-primitive";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz";
+        sha512 = "bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==";
+      };
+    };
+    "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";
+        sha512 = "F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==";
+      };
+    };
+    "which-module-2.0.1" = {
+      name = "which-module";
+      packageName = "which-module";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz";
+        sha512 = "iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==";
+      };
+    };
+    "which-typed-array-1.1.13" = {
+      name = "which-typed-array";
+      packageName = "which-typed-array";
+      version = "1.1.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz";
+        sha512 = "P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==";
+      };
+    };
+    "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";
+        sha512 = "CPXrr+LD3DBeCEAnhPYS7DYbdq8kwhnkrVY7Px0vEROil9iZWaz0VHZHg41pNcUJc+1/PDm2obR1Lb2QGto1ZQ==";
+      };
+    };
+    "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 = "1uFkvU8JXi7L7fCHVBEEnc3asPpiAL33kO495UMcD5+arew9IbKW2rV5lpzhoWcm/qhGB89YfO4PmB/0hQwPRg==";
+      };
+    };
+    "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 = "MTSfgzIljpKLTBPROo4IpKjESD86pPFlZwlvVG32Kb70hW+aob4Jxpblud8EhNb1/L5m43DUM4q7C+W6eQMMbA==";
+      };
+    };
+    "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 = "UHdwrN3FrDvicM3AqJS/J07X0KXj67R8Cg0waq1MKEOqzo89ap6zh6LmaLnRAjpB+bDIz+7OlPye9iii9KBnxw==";
+      };
+    };
+    "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 = "Rp5qlzm6z8IOvnQNkCdO9qrDgDpoPNguovs0H8C+wswLuPgSzSp9p2afb5maUt9R1uTIwOXrVQMmPfPypv+npw==";
+      };
+    };
+    "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 = "I3C9jlLmMKPxAC1t0ExCq+QoAMd0vAAHULEgRZ7kieCdUd919n53WC0AfvokHNwqRhGn+tIIj7vcb5duCjs2Kg==";
+      };
+    };
+    "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 = "vsJLhgQsQouv9m0rpbXubT5jw0jMQdjpkum0uT+d9tTwhXcEZks7qLfQ9dGSaufTD2eimxbUOJfWLbNQpIDMPw==";
+      };
+    };
+    "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 = "xzCjAoKuOb55CBSwQrbyWBKqp35yg1vw9ohIlU2wTy06ZrYfJ8rKochb1MSGlnoBfXGWss3UPzxR5QL5guIFdg==";
+      };
+    };
+    "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 = "K076n3oFHYp16/C+F8CwrRqD25GitA6Rkd6+qAmLmMv1QHPI2jfDwYqrytOfKfYq42bYtW8Pr21ejZX7GvALOw==";
+      };
+    };
+    "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 = "piSg/2csPoIi/vPpp48t1q5JLYjMkmg5gsXBQkh/QYapCdVwwmKlU9mHdmy52KsDGIjVaqEUMFvEzn2LRaigqQ==";
+      };
+    };
+    "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 = "S+HhL9+iTFypJZ/yQSl/x2Bf5pWnbXdd3j57xnb0V60FW1LVn9LRZkPtneODklzYuFZv7qK6riZ5BNyc0R0jZA==";
+      };
+    };
+    "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 = "FkbtrODA4Imsi0p7TW9u9MXuQ5P4pVs1sWHK4dJMMChVROsbEltuE79fBoIk/BCztvOJ7yUpErMKa4z3uQLX+g==";
+      };
+    };
+    "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 = "F/+E57BmVG8dX6dCCopBlkDvvhg/zj6VDs0PigYwSN23L8hseSRwljrceU2WzTvk/+BSYICsWmRq5qHS2UYzhw==";
+      };
+    };
+    "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 = "4Kisis1f/y0ihf4l3u/+ndMkJkIT4/6UOacU3A4BwZSAC9pQ9vSvJpIi/WFGQRH/uPXvuVjF5c2RfIPQFSS2uA==";
+      };
+    };
+    "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 = "0jXdusCL2uC5gM3yYFT6QMBzKfBr2XTk0g5TPAV4y8IZDyVNDyj1a8uSXy3/XrvkVTmQvLN4O5k3JawGReXr9w==";
+      };
+    };
+    "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 = "gJ9jd8Mb8wHLbRz9ZvGN57IAmknOipD3W4XNE/Lk/4lqs5Htw4WOQgakQy/o/4CoXQlMCYldaqUg+EJ35l9MEQ==";
+      };
+    };
+    "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 = "C5gWKh6I58w3GeSc0wp2Ne+rqVw8qwcmZnQGpjiek8A2wpbxSJb1FdCoQVO+jDJs35bFgo/WETgl1fqgsxN0Hg==";
+      };
+    };
+    "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 = "rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==";
+      };
+    };
+    "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";
+        sha512 = "vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==";
+      };
+    };
+    "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 = "QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==";
+      };
+    };
+    "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 = "r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==";
+      };
+    };
+    "wrap-ansi-7.0.0" = {
+      name = "wrap-ansi";
+      packageName = "wrap-ansi";
+      version = "7.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz";
+        sha512 = "YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==";
+      };
+    };
+    "wrap-ansi-8.1.0" = {
+      name = "wrap-ansi";
+      packageName = "wrap-ansi";
+      version = "8.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz";
+        sha512 = "si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==";
+      };
+    };
+    "wrap-ansi-cjs-7.0.0" = {
+      name = "wrap-ansi-cjs";
+      packageName = "wrap-ansi-cjs";
+      version = "7.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz";
+        sha512 = "YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==";
+      };
+    };
+    "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";
+        sha512 = "l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==";
+      };
+    };
+    "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 = "o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==";
+      };
+    };
+    "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 = "8A/uRMnQy8KCQsmep1m7Bk+z/+LIkeF7w+TDMLtX1iZm5Hq9HsUDmgFGaW1ACW5Cj0b2Qo7wCvRhYN2ErUVp/A==";
+      };
+    };
+    "ws-5.2.3" = {
+      name = "ws";
+      packageName = "ws";
+      version = "5.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz";
+        sha512 = "jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==";
+      };
+    };
+    "ws-6.2.2" = {
+      name = "ws";
+      packageName = "ws";
+      version = "6.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz";
+        sha512 = "zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==";
+      };
+    };
+    "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 = "o41D/WmDeca0BqYhsr3nJzQyg9NF5X8l/UdnFNux9cS3lwB+swm8qGWX5rn+aD6xfBU3rGmtHij7g7x6LxFU3A==";
+      };
+    };
+    "ws-7.5.9" = {
+      name = "ws";
+      packageName = "ws";
+      version = "7.5.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz";
+        sha512 = "F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==";
+      };
+    };
+    "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 = "Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==";
+      };
+    };
+    "xmlbuilder-15.1.1" = {
+      name = "xmlbuilder";
+      packageName = "xmlbuilder";
+      version = "15.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz";
+        sha512 = "yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==";
+      };
+    };
+    "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 = "LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==";
+      };
+    };
+    "y18n-3.2.2" = {
+      name = "y18n";
+      packageName = "y18n";
+      version = "3.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz";
+        sha512 = "uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==";
+      };
+    };
+    "y18n-4.0.3" = {
+      name = "y18n";
+      packageName = "y18n";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz";
+        sha512 = "JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==";
+      };
+    };
+    "y18n-5.0.8" = {
+      name = "y18n";
+      packageName = "y18n";
+      version = "5.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz";
+        sha512 = "0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==";
+      };
+    };
+    "yaeti-0.0.6" = {
+      name = "yaeti";
+      packageName = "yaeti";
+      version = "0.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz";
+        sha512 = "MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==";
+      };
+    };
+    "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";
+        sha512 = "ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==";
+      };
+    };
+    "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 = "a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==";
+      };
+    };
+    "yallist-4.0.0" = {
+      name = "yallist";
+      packageName = "yallist";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz";
+        sha512 = "3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==";
+      };
+    };
+    "yaml-1.10.2" = {
+      name = "yaml";
+      packageName = "yaml";
+      version = "1.10.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz";
+        sha512 = "r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==";
+      };
+    };
+    "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 = "AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==";
+      };
+    };
+    "yargs-15.4.1" = {
+      name = "yargs";
+      packageName = "yargs";
+      version = "15.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz";
+        sha512 = "aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==";
+      };
+    };
+    "yargs-17.7.2" = {
+      name = "yargs";
+      packageName = "yargs";
+      version = "17.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz";
+        sha512 = "7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==";
+      };
+    };
+    "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";
+        sha512 = "6/QWTdisjnu5UHUzQGst+UOEuEVwIzFVGBjq3jMTFNs5WJQsH/X6nMURSaScIdF5txylr1Ao9bvbWiKi2yXbwA==";
+      };
+    };
+    "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 = "3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==";
+      };
+    };
+    "yargs-parser-18.1.3" = {
+      name = "yargs-parser";
+      packageName = "yargs-parser";
+      version = "18.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz";
+        sha512 = "o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==";
+      };
+    };
+    "yargs-parser-21.1.1" = {
+      name = "yargs-parser";
+      packageName = "yargs-parser";
+      version = "21.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz";
+        sha512 = "tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==";
+      };
+    };
+    "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";
+        sha512 = "+QQWqC2xeL0N5/TE+TY6OGEqyNRM+g2/r712PDNYgiCdXYCApXf1vzfmDSLBxfGRwV+moTq/V8FnMI24JCm2Yg==";
+      };
+    };
+    "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 = "huWiiCS4TxKc4SfgmTwW1K7JmXPPAmuXWYy4j9qjQo4+27Kni8mGhAAi1cloRWmBe2EqcLgt3IGqQoRL/MtPgg==";
+      };
+    };
+  };
+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 = "I7dgGFOc+mYDcDuyo1/HcIn3E5MiMbocStNzivsPSjCUviuEieHdDKZmJJ9uM3IdCu0fdBmRNWQBSOXtXrgzKg==";
+    };
+    dependencies = [
+      sources."accepts-1.3.8"
+      sources."ajv-6.12.6"
+      sources."array-flatten-1.1.1"
+      sources."asn1-0.2.6"
+      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.12.0"
+      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.5"
+      sources."cookie-0.3.1"
+      sources."cookie-signature-1.0.6"
+      sources."core-js-2.6.12"
+      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.3"
+      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.2.0"
+      sources."fresh-0.5.2"
+      sources."fs-extra-2.0.0"
+      sources."getpass-0.1.7"
+      sources."graceful-fs-4.2.11"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.5"
+      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.4.0"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-2.4.0"
+      sources."jsprim-1.4.2"
+      sources."lodash-4.17.21"
+      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.52.0"
+      sources."mime-types-2.1.35"
+      sources."minimist-1.2.0"
+      sources."ms-2.0.0"
+      sources."negotiator-0.6.3"
+      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.7"
+      sources."psl-1.9.0"
+      sources."punycode-2.3.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.3"
+          sources."safe-buffer-5.2.1"
+        ];
+      })
+      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.18.0"
+      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.7"
+      sources."ultron-1.0.2"
+      sources."unpipe-1.0.0"
+      sources."uri-js-4.4.1"
+      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.4.1";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-coverage/-/elm-coverage-0.4.1.tgz";
+      sha512 = "flFXaCikbA6NccBEvrFIgJj9up7rc9A8aOwe0o0Erruvk5f5idWu3/gIBfqTaos7Xc2Fz6fshYyoH5sfyt1r7g==";
+    };
+    dependencies = [
+      sources."abbrev-1.1.1"
+      sources."ajv-6.12.6"
+      sources."ansi-regex-5.0.1"
+      sources."ansi-styles-3.2.1"
+      sources."anymatch-3.1.3"
+      sources."asn1-0.2.6"
+      sources."assert-plus-1.0.0"
+      sources."astral-regex-2.0.0"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.12.0"
+      sources."balanced-match-1.0.2"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."binary-0.3.0"
+      sources."binary-extensions-2.2.0"
+      sources."binwrap-0.2.3"
+      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-2.0.0"
+      sources."cliui-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."lodash-4.17.15"
+          sources."which-2.0.1"
+        ];
+      })
+      (sources."elmi-to-json-1.2.0" // {
+        dependencies = [
+          sources."binwrap-0.2.2"
+          sources."chownr-1.1.4"
+          sources."fs-minipass-1.2.7"
+          sources."minipass-2.9.0"
+          sources."minizlib-1.3.3"
+          sources."mkdirp-0.5.6"
+          sources."tar-4.4.19"
+          sources."yallist-3.1.1"
+        ];
+      })
+      sources."emoji-regex-8.0.0"
+      sources."escape-string-regexp-1.0.5"
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.3"
+      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."lodash-4.17.15"
+        ];
+      })
+      sources."find-parent-dir-0.3.1"
+      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-2.1.0" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.3"
+      sources."get-caller-file-2.0.5"
+      sources."getpass-0.1.7"
+      sources."glob-7.1.4"
+      sources."glob-parent-5.1.2"
+      sources."graceful-fs-4.2.11"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.5"
+      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-3.0.0"
+      sources."is-glob-4.0.3"
+      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.4.0"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-4.0.0"
+      sources."jsprim-1.4.2"
+      sources."locate-path-5.0.0"
+      sources."lodash-4.17.21"
+      sources."lodash.truncate-4.4.2"
+      (sources."lru-cache-4.1.5" // {
+        dependencies = [
+          sources."yallist-2.1.2"
+        ];
+      })
+      sources."mime-db-1.52.0"
+      sources."mime-types-2.1.35"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."minipass-5.0.0"
+      (sources."minizlib-2.1.2" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      sources."mkdirp-1.0.4"
+      sources."moment-2.30.1"
+      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."lodash-4.17.15"
+          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.3.0"
+      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.3.1"
+      sources."pseudomap-1.0.2"
+      sources."psl-1.9.0"
+      sources."punycode-2.3.1"
+      sources."qs-6.5.3"
+      sources."readdirp-3.1.3"
+      sources."request-2.88.2"
+      sources."request-promise-4.2.6"
+      sources."request-promise-core-1.1.4"
+      sources."require-directory-2.1.1"
+      sources."require-from-string-2.0.2"
+      sources."require-main-filename-2.0.0"
+      sources."rimraf-2.6.3"
+      sources."safe-buffer-5.2.1"
+      sources."safer-buffer-2.1.2"
+      sources."semver-5.7.2"
+      sources."set-blocking-2.0.0"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      (sources."slice-ansi-4.0.0" // {
+        dependencies = [
+          sources."ansi-styles-4.3.0"
+          sources."color-convert-2.0.1"
+          sources."color-name-1.1.4"
+        ];
+      })
+      sources."split-1.0.1"
+      sources."sshpk-1.18.0"
+      sources."stealthy-require-1.1.1"
+      sources."string-width-4.2.3"
+      sources."strip-ansi-6.0.1"
+      (sources."supports-color-7.1.0" // {
+        dependencies = [
+          sources."has-flag-4.0.0"
+        ];
+      })
+      (sources."table-6.8.1" // {
+        dependencies = [
+          sources."ajv-8.12.0"
+          sources."json-schema-traverse-1.0.0"
+        ];
+      })
+      sources."tar-6.2.0"
+      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.1" // {
+        dependencies = [
+          sources."mkdirp-0.5.6"
+        ];
+      })
+      sources."upgrade-1.1.0"
+      sources."uri-js-4.4.1"
+      sources."uuid-3.4.0"
+      sources."verror-1.10.0"
+      sources."which-1.3.1"
+      sources."which-module-2.0.1"
+      (sources."wrap-ansi-6.2.0" // {
+        dependencies = [
+          sources."ansi-styles-4.3.0"
+          sources."color-convert-2.0.1"
+          sources."color-name-1.1.4"
+        ];
+      })
+      sources."wrappy-1.0.2"
+      sources."xmlbuilder-13.0.2"
+      sources."y18n-4.0.3"
+      sources."yallist-4.0.0"
+      sources."yargs-15.4.1"
+      sources."yargs-parser-18.1.3"
+    ];
+    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 = "5.0.5";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-doc-preview/-/elm-doc-preview-5.0.5.tgz";
+      sha512 = "GlWnbw2Bl+pA7QzRlqSYNGEQ3r3oNxMr2Nu0uiCM6AWzQ6Sk3BwtqSiUZvXLLlzWBV9pAQnY9U8xpDpPuh5rOQ==";
+    };
+    dependencies = [
+      sources."@sindresorhus/is-0.14.0"
+      sources."@szmarczak/http-timer-1.1.2"
+      sources."accepts-1.3.8"
+      sources."ansi-styles-4.3.0"
+      sources."anymatch-3.1.3"
+      sources."array-flatten-1.1.1"
+      sources."async-limiter-1.0.1"
+      sources."balanced-match-1.0.2"
+      sources."batch-0.6.1"
+      sources."binary-extensions-2.2.0"
+      sources."body-parser-1.20.1"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."bufferutil-4.0.8"
+      sources."bytes-3.1.2"
+      (sources."cacheable-request-6.1.0" // {
+        dependencies = [
+          sources."get-stream-5.2.0"
+          sources."lowercase-keys-2.0.0"
+        ];
+      })
+      sources."call-bind-1.0.5"
+      sources."chalk-3.0.0"
+      sources."chokidar-3.5.3"
+      sources."clone-response-1.0.3"
+      sources."color-convert-2.0.1"
+      sources."color-name-1.1.4"
+      sources."commander-5.1.0"
+      sources."concat-map-0.0.1"
+      sources."content-disposition-0.5.4"
+      sources."content-type-1.0.5"
+      sources."cookie-0.5.0"
+      sources."cookie-signature-1.0.6"
+      sources."cross-spawn-7.0.3"
+      sources."debug-2.6.9"
+      sources."decompress-response-3.3.0"
+      sources."deep-extend-0.6.0"
+      sources."defer-to-connect-1.1.3"
+      sources."define-data-property-1.1.1"
+      sources."depd-2.0.0"
+      sources."destroy-1.2.0"
+      sources."duplexer3-0.1.5"
+      sources."ee-first-1.1.1"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      sources."escape-html-1.0.3"
+      sources."etag-1.8.1"
+      sources."express-4.18.2"
+      (sources."express-ws-4.0.0" // {
+        dependencies = [
+          sources."ws-5.2.3"
+        ];
+      })
+      sources."fill-range-7.0.1"
+      sources."finalhandler-1.2.0"
+      sources."forwarded-0.2.0"
+      sources."fresh-0.5.2"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.3.3"
+      sources."function-bind-1.1.2"
+      sources."get-intrinsic-1.2.2"
+      sources."get-stream-4.1.0"
+      sources."glob-7.2.3"
+      sources."glob-parent-5.1.2"
+      sources."gopd-1.0.1"
+      sources."got-9.6.0"
+      sources."has-flag-4.0.0"
+      sources."has-property-descriptors-1.0.1"
+      sources."has-proto-1.0.1"
+      sources."has-symbols-1.0.3"
+      sources."hasown-2.0.0"
+      sources."http-cache-semantics-4.1.1"
+      sources."http-errors-2.0.0"
+      sources."iconv-lite-0.4.24"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."ini-1.3.8"
+      sources."ipaddr.js-1.9.1"
+      sources."is-binary-path-2.1.0"
+      sources."is-docker-2.2.1"
+      sources."is-extglob-2.1.1"
+      sources."is-glob-4.0.3"
+      sources."is-number-7.0.0"
+      sources."is-wsl-2.2.0"
+      sources."isexe-2.0.0"
+      sources."json-buffer-3.0.0"
+      sources."keyv-3.1.0"
+      sources."latest-version-5.1.0"
+      sources."lowercase-keys-1.0.1"
+      sources."media-typer-0.3.0"
+      sources."merge-descriptors-1.0.1"
+      sources."methods-1.1.2"
+      sources."mime-1.6.0"
+      sources."mime-db-1.52.0"
+      sources."mime-types-2.1.35"
+      sources."mimic-response-1.0.1"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."ms-2.0.0"
+      sources."negotiator-0.6.3"
+      sources."node-gyp-build-4.7.1"
+      sources."normalize-path-3.0.0"
+      sources."normalize-url-4.5.1"
+      sources."object-inspect-1.13.1"
+      sources."on-finished-2.4.1"
+      sources."once-1.4.0"
+      sources."open-7.4.2"
+      sources."p-cancelable-1.1.0"
+      sources."package-json-6.5.0"
+      sources."parseurl-1.3.3"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-3.1.1"
+      sources."path-to-regexp-0.1.7"
+      sources."picomatch-2.3.1"
+      sources."prepend-http-2.0.0"
+      sources."proxy-addr-2.0.7"
+      sources."pump-3.0.0"
+      sources."qs-6.11.0"
+      sources."range-parser-1.2.1"
+      sources."raw-body-2.5.1"
+      sources."rc-1.2.8"
+      sources."readdirp-3.6.0"
+      sources."registry-auth-token-4.2.2"
+      sources."registry-url-5.1.0"
+      sources."responselike-1.0.2"
+      sources."rimraf-2.7.1"
+      sources."safe-buffer-5.2.1"
+      sources."safer-buffer-2.1.2"
+      sources."semver-6.3.1"
+      (sources."send-0.18.0" // {
+        dependencies = [
+          sources."ms-2.1.3"
+        ];
+      })
+      (sources."serve-index-1.9.1" // {
+        dependencies = [
+          sources."depd-1.1.2"
+          sources."http-errors-1.6.3"
+          sources."inherits-2.0.3"
+          sources."setprototypeof-1.1.0"
+          sources."statuses-1.5.0"
+        ];
+      })
+      sources."serve-static-1.15.0"
+      sources."set-function-length-1.1.1"
+      sources."setprototypeof-1.2.0"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."side-channel-1.0.4"
+      sources."statuses-2.0.1"
+      sources."strip-json-comments-2.0.1"
+      sources."supports-color-7.2.0"
+      sources."tmp-0.1.0"
+      sources."to-readable-stream-1.0.0"
+      sources."to-regex-range-5.0.1"
+      sources."toidentifier-1.0.1"
+      sources."type-is-1.6.18"
+      sources."unpipe-1.0.0"
+      sources."url-parse-lax-3.0.0"
+      sources."utf-8-validate-5.0.10"
+      sources."utils-merge-1.0.1"
+      sources."vary-1.1.2"
+      sources."which-2.0.2"
+      sources."wrappy-1.0.2"
+      sources."ws-7.5.9"
+    ];
+    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 = "2.8.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/@elm-tooling/elm-language-server/-/elm-language-server-2.8.0.tgz";
+      sha512 = "SOmEr2EaYAy/QYK84zOyEJDxvEu0B7xDszCBzGMGaFSoksGrYAo54Ot0g9I7wEpcr2H+LLFTDjPsbaHcP1T2lA==";
+    };
+    dependencies = [
+      sources."@nodelib/fs.scandir-2.1.5"
+      sources."@nodelib/fs.stat-2.0.5"
+      sources."@nodelib/fs.walk-1.2.8"
+      sources."anymatch-3.1.3"
+      sources."array-union-2.1.0"
+      sources."binary-extensions-2.2.0"
+      sources."braces-3.0.2"
+      sources."chokidar-3.5.3"
+      sources."cross-spawn-7.0.3"
+      sources."dir-glob-3.0.1"
+      sources."escape-string-regexp-4.0.0"
+      sources."execa-5.1.1"
+      sources."fast-diff-1.3.0"
+      sources."fast-glob-3.3.2"
+      sources."fastq-1.16.0"
+      sources."fill-range-7.0.1"
+      sources."fsevents-2.3.3"
+      sources."get-stream-6.0.1"
+      sources."glob-parent-5.1.2"
+      sources."globby-11.1.0"
+      sources."human-signals-2.1.0"
+      sources."ignore-5.3.0"
+      sources."is-binary-path-2.1.0"
+      sources."is-extglob-2.1.1"
+      sources."is-glob-4.0.3"
+      sources."is-number-7.0.0"
+      sources."is-stream-2.0.1"
+      sources."isexe-2.0.0"
+      sources."merge-stream-2.0.0"
+      sources."merge2-1.4.1"
+      sources."micromatch-4.0.5"
+      sources."mimic-fn-2.1.0"
+      sources."normalize-path-3.0.0"
+      sources."npm-run-path-4.0.1"
+      sources."onetime-5.1.2"
+      sources."path-key-3.1.1"
+      sources."path-type-4.0.0"
+      sources."picomatch-2.3.1"
+      sources."pjson-1.0.9"
+      sources."queue-microtask-1.2.3"
+      sources."readdirp-3.6.0"
+      sources."reflect-metadata-0.2.1"
+      sources."request-light-0.7.0"
+      sources."reusify-1.0.4"
+      sources."run-parallel-1.2.0"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."signal-exit-3.0.7"
+      sources."slash-3.0.0"
+      sources."strip-final-newline-2.0.0"
+      sources."to-regex-range-5.0.1"
+      sources."ts-debounce-4.0.0"
+      sources."tslib-1.14.1"
+      sources."tsyringe-4.8.0"
+      sources."vscode-jsonrpc-8.2.0"
+      sources."vscode-languageserver-9.0.1"
+      sources."vscode-languageserver-protocol-3.17.5"
+      sources."vscode-languageserver-textdocument-1.0.11"
+      sources."vscode-languageserver-types-3.17.5"
+      sources."vscode-uri-3.0.8"
+      sources."web-tree-sitter-0.20.8"
+      sources."which-2.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-land = nodeEnv.buildNodePackage {
+    name = "elm-land";
+    packageName = "elm-land";
+    version = "0.19.5";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-land/-/elm-land-0.19.5.tgz";
+      sha512 = "OWcnWmd+BMzRlyLpjkKjmazUJeKlgvXsPJcrhdVYhfeSdAbDDcAok7CgvSoqReN6Y36DEUUeRE5AGJMj8HVUOA==";
+    };
+    dependencies = [
+      sources."@adobe/css-tools-4.3.2"
+      sources."@esbuild/android-arm-0.17.19"
+      sources."@esbuild/android-arm64-0.17.19"
+      sources."@esbuild/android-x64-0.17.19"
+      sources."@esbuild/darwin-arm64-0.17.19"
+      sources."@esbuild/darwin-x64-0.17.19"
+      sources."@esbuild/freebsd-arm64-0.17.19"
+      sources."@esbuild/freebsd-x64-0.17.19"
+      sources."@esbuild/linux-arm-0.17.19"
+      sources."@esbuild/linux-arm64-0.17.19"
+      sources."@esbuild/linux-ia32-0.17.19"
+      sources."@esbuild/linux-loong64-0.17.19"
+      sources."@esbuild/linux-mips64el-0.17.19"
+      sources."@esbuild/linux-ppc64-0.17.19"
+      sources."@esbuild/linux-riscv64-0.17.19"
+      sources."@esbuild/linux-s390x-0.17.19"
+      sources."@esbuild/linux-x64-0.17.19"
+      sources."@esbuild/netbsd-x64-0.17.19"
+      sources."@esbuild/openbsd-x64-0.17.19"
+      sources."@esbuild/sunos-x64-0.17.19"
+      sources."@esbuild/win32-arm64-0.17.19"
+      sources."@esbuild/win32-ia32-0.17.19"
+      sources."@esbuild/win32-x64-0.17.19"
+      sources."@jridgewell/gen-mapping-0.3.3"
+      sources."@jridgewell/resolve-uri-3.1.1"
+      sources."@jridgewell/set-array-1.1.2"
+      sources."@jridgewell/source-map-0.3.5"
+      sources."@jridgewell/sourcemap-codec-1.4.15"
+      sources."@jridgewell/trace-mapping-0.3.20"
+      sources."@types/node-20.10.6"
+      sources."acorn-8.11.3"
+      sources."anymatch-3.1.3"
+      sources."balanced-match-1.0.2"
+      sources."binary-extensions-2.2.0"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffer-from-1.1.2"
+      sources."chokidar-3.5.3"
+      sources."commander-2.20.3"
+      sources."concat-map-0.0.1"
+      sources."copy-anything-2.0.6"
+      sources."cross-spawn-6.0.5"
+      sources."debug-4.3.4"
+      sources."elm-0.19.1-6"
+      sources."errno-0.1.8"
+      sources."esbuild-0.17.19"
+      sources."fill-range-7.0.1"
+      sources."find-elm-dependencies-2.0.4"
+      sources."firstline-1.3.1"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.3.3"
+      sources."glob-7.2.3"
+      sources."glob-parent-5.1.2"
+      sources."graceful-fs-4.2.11"
+      sources."iconv-lite-0.6.3"
+      sources."image-size-0.5.5"
+      sources."immutable-4.3.4"
+      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.3"
+      sources."is-number-7.0.0"
+      sources."is-what-3.14.1"
+      sources."isexe-2.0.0"
+      sources."less-4.2.0"
+      sources."lodash-4.17.21"
+      sources."make-dir-2.1.0"
+      sources."mime-1.6.0"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."mkdirp-0.5.6"
+      sources."ms-2.1.2"
+      sources."nanoid-3.3.7"
+      sources."needle-3.3.1"
+      sources."nice-try-1.0.5"
+      sources."node-elm-compiler-5.0.6"
+      sources."normalize-path-3.0.0"
+      sources."once-1.4.0"
+      sources."parse-node-version-1.0.1"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-2.0.1"
+      sources."picocolors-1.0.0"
+      sources."picomatch-2.3.1"
+      sources."pify-4.0.1"
+      sources."postcss-8.4.33"
+      sources."prr-1.0.1"
+      sources."readdirp-3.6.0"
+      sources."rimraf-2.6.3"
+      sources."rollup-3.29.4"
+      sources."safer-buffer-2.1.2"
+      sources."sass-1.69.7"
+      sources."sax-1.3.0"
+      sources."semver-5.7.2"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."source-map-0.6.1"
+      sources."source-map-js-1.0.2"
+      sources."source-map-support-0.5.21"
+      (sources."stylus-0.62.0" // {
+        dependencies = [
+          sources."source-map-0.7.4"
+        ];
+      })
+      sources."sugarss-4.0.1"
+      sources."temp-0.9.4"
+      sources."terser-5.15.1"
+      sources."to-regex-range-5.0.1"
+      sources."tslib-2.6.2"
+      sources."typescript-4.9.3"
+      sources."undici-types-5.26.5"
+      sources."vite-4.3.9"
+      sources."which-1.3.1"
+      sources."wrappy-1.0.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Reliable web apps for everyone";
+      homepage = "https://elm.land";
+      license = "ISC";
+    };
+    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 = "4I3UvJxF6MubC14VsgtV11B0zBxaaKtdKKsWquoaa5a3UHBIGW83qgTnt/NxOj4omOLfupaftmDaE4yRMTgTcw==";
+    };
+    dependencies = [
+      sources."ansi-regex-2.1.1"
+      sources."ansi-styles-2.2.1"
+      sources."anymatch-3.1.3"
+      sources."async-limiter-1.0.1"
+      sources."binary-extensions-2.2.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.1"
+      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.15.4"
+      sources."fresh-0.5.2"
+      sources."fsevents-2.3.3"
+      sources."get-stream-4.1.0"
+      sources."glob-parent-5.1.2"
+      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.3"
+      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.3.0"
+      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.3.1"
+      sources."pseudomap-1.0.2"
+      sources."pump-3.0.0"
+      sources."range-parser-1.2.1"
+      sources."readdirp-3.6.0"
+      sources."requires-port-1.0.0"
+      sources."semver-5.7.2"
+      (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.7"
+      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-spa = nodeEnv.buildNodePackage {
+    name = "elm-spa";
+    packageName = "elm-spa";
+    version = "6.0.4";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-spa/-/elm-spa-6.0.4.tgz";
+      sha512 = "TiOBuxL1SrzqYyWkime3AZ1/xFqKa6B/Bi4SplFg7YmlwPL5d7R+u6w0dxc14cnvmP1RS2+QZAkczZtqayFK9A==";
+    };
+    dependencies = [
+      sources."anymatch-3.1.3"
+      sources."balanced-match-1.0.2"
+      sources."binary-extensions-2.2.0"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffer-from-1.1.2"
+      sources."bufferutil-4.0.8"
+      sources."chokidar-3.4.2"
+      sources."commander-2.20.3"
+      sources."concat-map-0.0.1"
+      sources."cross-spawn-6.0.5"
+      sources."d-1.0.1"
+      sources."debug-2.6.9"
+      sources."es5-ext-0.10.62"
+      sources."es6-iterator-2.0.3"
+      sources."es6-symbol-3.1.3"
+      (sources."ext-1.7.0" // {
+        dependencies = [
+          sources."type-2.7.2"
+        ];
+      })
+      sources."fill-range-7.0.1"
+      sources."find-elm-dependencies-2.0.4"
+      sources."firstline-1.3.1"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.3"
+      sources."glob-7.2.3"
+      sources."glob-parent-5.1.2"
+      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.3"
+      sources."is-number-7.0.0"
+      sources."is-typedarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."lodash-4.17.21"
+      sources."mime-2.4.6"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."mkdirp-0.5.6"
+      sources."ms-2.0.0"
+      sources."next-tick-1.1.0"
+      sources."nice-try-1.0.5"
+      sources."node-elm-compiler-5.0.5"
+      sources."node-gyp-build-4.7.1"
+      sources."normalize-path-3.0.0"
+      sources."once-1.4.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-2.0.1"
+      sources."picomatch-2.3.1"
+      sources."readdirp-3.4.0"
+      sources."rimraf-2.6.3"
+      sources."semver-5.7.2"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."source-map-0.7.4"
+      (sources."source-map-support-0.5.21" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."temp-0.9.4"
+      sources."terser-5.3.8"
+      sources."to-regex-range-5.0.1"
+      sources."type-1.2.0"
+      sources."typedarray-to-buffer-3.1.5"
+      sources."utf-8-validate-5.0.10"
+      sources."websocket-1.0.32"
+      sources."which-1.3.1"
+      sources."wrappy-1.0.2"
+      sources."yaeti-0.0.6"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "single page apps made easy";
+      homepage = "https://github.com/ryannhg/elm-spa#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-test = nodeEnv.buildNodePackage {
+    name = "elm-test";
+    packageName = "elm-test";
+    version = "0.19.1-revision12";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-test/-/elm-test-0.19.1-revision12.tgz";
+      sha512 = "5GV3WkJ8R/faOP1hwElQdNuCt8tKx2+1lsMrdeIYWSFz01Kp9gJl/R6zGtp4QUyrUtO8KnHsxjHrQNUf2CHkrg==";
+    };
+    dependencies = [
+      sources."ansi-styles-4.3.0"
+      sources."anymatch-3.1.3"
+      sources."balanced-match-1.0.2"
+      sources."binary-extensions-2.2.0"
+      sources."brace-expansion-2.0.1"
+      sources."braces-3.0.2"
+      sources."chalk-4.1.2"
+      sources."chokidar-3.5.3"
+      sources."color-convert-2.0.1"
+      sources."color-name-1.1.4"
+      sources."commander-9.5.0"
+      sources."cross-spawn-7.0.3"
+      sources."elm-solve-deps-wasm-1.0.2"
+      sources."fill-range-7.0.1"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.3.3"
+      sources."glob-8.1.0"
+      sources."glob-parent-5.1.2"
+      sources."graceful-fs-4.2.11"
+      sources."has-flag-4.0.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.3"
+      sources."is-number-7.0.0"
+      sources."isexe-2.0.0"
+      sources."minimatch-5.1.6"
+      sources."normalize-path-3.0.0"
+      sources."once-1.4.0"
+      sources."path-key-3.1.1"
+      sources."picomatch-2.3.1"
+      sources."readdirp-3.6.0"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."split-1.0.1"
+      sources."supports-color-7.2.0"
+      sources."through-2.3.8"
+      sources."to-regex-range-5.0.1"
+      sources."which-2.0.2"
+      sources."wrappy-1.0.2"
+      sources."xmlbuilder-15.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 = "SwNzV40wu9IEe35TWR9b7F8WctIRUkpl6F3lzF0AqmYnCcKjbzrxbW6G7DYfA9ICUYjuSLcyYJKm5c86oMiH8w==";
+    };
+    dependencies = [
+      sources."@sindresorhus/is-2.1.1"
+      sources."@szmarczak/http-timer-4.0.6"
+      sources."@types/cacheable-request-6.0.3"
+      sources."@types/http-cache-semantics-4.0.4"
+      sources."@types/keyv-3.1.4"
+      sources."@types/node-20.10.6"
+      sources."@types/responselike-1.0.3"
+      sources."cacheable-lookup-2.0.1"
+      sources."cacheable-request-7.0.4"
+      sources."caw-2.0.1"
+      (sources."clone-response-1.0.3" // {
+        dependencies = [
+          sources."mimic-response-1.0.1"
+        ];
+      })
+      sources."config-chain-1.1.13"
+      sources."decompress-response-5.0.0"
+      sources."defer-to-connect-2.0.1"
+      sources."duplexer3-0.1.5"
+      sources."end-of-stream-1.4.4"
+      sources."fs-extra-8.1.0"
+      sources."get-proxy-2.1.0"
+      sources."get-stream-5.2.0"
+      sources."got-10.7.0"
+      sources."graceful-fs-4.2.11"
+      sources."has-symbol-support-x-1.4.2"
+      sources."has-to-string-tag-x-1.4.1"
+      sources."http-cache-semantics-4.1.1"
+      sources."ini-1.3.8"
+      sources."is-object-1.0.2"
+      sources."isexe-2.0.0"
+      sources."isurl-1.0.0"
+      sources."json-buffer-3.0.1"
+      sources."jsonfile-4.0.0"
+      sources."keyv-4.5.4"
+      sources."lowercase-keys-2.0.0"
+      sources."lru-cache-6.0.0"
+      sources."mimic-response-2.1.0"
+      sources."normalize-url-6.1.0"
+      sources."npm-conf-1.1.3"
+      sources."once-1.4.0"
+      sources."p-cancelable-2.1.1"
+      sources."p-event-4.2.0"
+      sources."p-finally-1.0.0"
+      sources."p-timeout-3.2.0"
+      sources."pify-3.0.0"
+      sources."proto-list-1.2.4"
+      sources."pump-3.0.0"
+      sources."responselike-2.0.1"
+      sources."safe-buffer-5.2.1"
+      sources."safename-1.0.2"
+      sources."semver-7.5.4"
+      sources."to-readable-stream-2.1.0"
+      sources."tunnel-agent-0.6.0"
+      sources."type-fest-0.10.0"
+      sources."undici-types-5.26.5"
+      sources."universalify-0.1.2"
+      sources."url-to-options-1.0.1"
+      sources."which-2.0.2"
+      sources."wrappy-1.0.2"
+      sources."yallist-4.0.0"
+      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.3.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-verify-examples/-/elm-verify-examples-5.3.0.tgz";
+      sha512 = "6TG+4L/yEamiHpxVQUJPRgHoeEOmk5LhWuVRECMHTKPpvuM2BCYMGwCMUGJ0Wh64RW8oERIdnicsvUDlvDwiTg==";
+    };
+    dependencies = [
+      sources."@isaacs/cliui-8.0.2"
+      sources."ajv-6.12.6"
+      sources."ansi-regex-5.0.1"
+      sources."ansi-styles-4.3.0"
+      sources."anymatch-3.1.3"
+      sources."asn1-0.2.6"
+      sources."assert-plus-1.0.0"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.12.0"
+      sources."balanced-match-1.0.2"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."binary-0.3.0"
+      sources."binary-extensions-2.2.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-4.1.2"
+      sources."chokidar-3.2.1"
+      sources."chownr-1.1.4"
+      (sources."cliui-8.0.1" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."string-width-4.2.3"
+          sources."strip-ansi-6.0.1"
+          sources."wrap-ansi-7.0.0"
+        ];
+      })
+      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.0" // {
+        dependencies = [
+          sources."which-1.3.1"
+        ];
+      })
+      sources."dashdash-1.14.1"
+      sources."delayed-stream-1.0.0"
+      sources."eastasianwidth-0.2.0"
+      sources."ecc-jsbn-0.1.2"
+      (sources."elm-test-0.19.1" // {
+        dependencies = [
+          sources."ansi-styles-3.2.1"
+          (sources."chalk-2.4.2" // {
+            dependencies = [
+              sources."supports-color-5.5.0"
+            ];
+          })
+          sources."color-convert-1.9.3"
+          sources."color-name-1.1.3"
+          sources."fs-extra-8.1.0"
+          sources."has-flag-3.0.0"
+          (sources."supports-color-7.1.0" // {
+            dependencies = [
+              sources."has-flag-4.0.0"
+            ];
+          })
+        ];
+      })
+      sources."elmi-to-json-1.2.0"
+      sources."emoji-regex-9.2.2"
+      sources."escalade-3.1.1"
+      sources."escape-string-regexp-1.0.5"
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.3"
+      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.1"
+      sources."firstline-2.0.2"
+      sources."foreground-child-3.1.1"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      (sources."fs-extra-11.2.0" // {
+        dependencies = [
+          sources."jsonfile-6.1.0"
+          sources."universalify-2.0.1"
+        ];
+      })
+      sources."fs-minipass-1.2.7"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.3"
+      sources."get-caller-file-2.0.5"
+      sources."getpass-0.1.7"
+      sources."glob-7.1.4"
+      sources."glob-parent-5.1.2"
+      sources."graceful-fs-4.2.11"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.5"
+      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-fullwidth-code-point-3.0.0"
+      sources."is-glob-4.0.3"
+      sources."is-number-7.0.0"
+      sources."is-typedarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."isstream-0.1.2"
+      sources."jackspeak-2.3.6"
+      sources."jsbn-0.1.1"
+      sources."json-schema-0.4.0"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-4.0.0"
+      sources."jsprim-1.4.2"
+      sources."lodash-4.17.15"
+      sources."lru-cache-10.1.0"
+      sources."mime-db-1.52.0"
+      sources."mime-types-2.1.35"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-3.0.1"
+      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."path-is-absolute-1.0.1"
+      sources."path-key-3.1.1"
+      (sources."path-scurry-1.10.1" // {
+        dependencies = [
+          sources."minipass-7.0.4"
+        ];
+      })
+      sources."performance-now-2.1.0"
+      sources."picomatch-2.3.1"
+      sources."psl-1.9.0"
+      sources."punycode-2.3.1"
+      sources."qs-6.5.3"
+      sources."readdirp-3.1.3"
+      sources."request-2.88.2"
+      sources."request-promise-4.2.6"
+      (sources."request-promise-core-1.1.4" // {
+        dependencies = [
+          sources."lodash-4.17.21"
+        ];
+      })
+      sources."require-directory-2.1.1"
+      (sources."rimraf-5.0.5" // {
+        dependencies = [
+          sources."brace-expansion-2.0.1"
+          sources."glob-10.3.10"
+          sources."minimatch-9.0.3"
+          sources."minipass-7.0.4"
+        ];
+      })
+      sources."safe-buffer-5.2.1"
+      sources."safer-buffer-2.1.2"
+      sources."semver-5.7.2"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."signal-exit-4.1.0"
+      sources."split-1.0.1"
+      sources."sshpk-1.18.0"
+      sources."stealthy-require-1.1.1"
+      sources."string-width-5.1.2"
+      (sources."string-width-cjs-4.2.3" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."strip-ansi-6.0.1"
+        ];
+      })
+      (sources."strip-ansi-7.1.0" // {
+        dependencies = [
+          sources."ansi-regex-6.0.1"
+        ];
+      })
+      sources."strip-ansi-cjs-6.0.1"
+      sources."supports-color-7.2.0"
+      (sources."tar-4.4.19" // {
+        dependencies = [
+          sources."mkdirp-0.5.6"
+        ];
+      })
+      (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.1" // {
+        dependencies = [
+          sources."mkdirp-0.5.6"
+        ];
+      })
+      sources."uri-js-4.4.1"
+      sources."uuid-3.4.0"
+      sources."verror-1.10.0"
+      sources."which-2.0.1"
+      (sources."wrap-ansi-8.1.0" // {
+        dependencies = [
+          sources."ansi-styles-6.2.1"
+        ];
+      })
+      (sources."wrap-ansi-cjs-7.0.0" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."string-width-4.2.3"
+          sources."strip-ansi-6.0.1"
+        ];
+      })
+      sources."wrappy-1.0.2"
+      sources."xmlbuilder-13.0.2"
+      sources."y18n-5.0.8"
+      sources."yallist-3.1.1"
+      (sources."yargs-17.7.2" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."string-width-4.2.3"
+          sources."strip-ansi-6.0.1"
+        ];
+      })
+      sources."yargs-parser-21.1.1"
+    ];
+    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.1";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-xref/-/elm-xref-4.1.1.tgz";
+      sha512 = "1Cl3pZ8Z8Nd0VIu6277C4l4IMjDJEZuX1jkGZX/YZGdCQvGd1v0pB20NKi+U8YbfyjzaereAHah2eL3eXamn6w==";
+    };
+    dependencies = [
+      sources."bluebird-3.7.2"
+      sources."compare-versions-3.6.0"
+      sources."core-util-is-1.0.3"
+      sources."fs-extra-6.0.1"
+      sources."graceful-fs-4.2.11"
+      sources."inherits-2.0.4"
+      sources."isarray-1.0.0"
+      sources."jsonfile-4.0.0"
+      sources."klaw-2.1.1"
+      sources."minimist-1.2.8"
+      sources."process-nextick-args-2.0.1"
+      sources."readable-stream-2.3.8"
+      sources."safe-buffer-5.1.2"
+      sources."semver-6.3.1"
+      sources."semver-regex-3.1.4"
+      (sources."semver-sort-1.0.0" // {
+        dependencies = [
+          sources."semver-5.7.2"
+        ];
+      })
+      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 = "5.22.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/create-elm-app/-/create-elm-app-5.22.0.tgz";
+      sha512 = "XmYWohoM/xHxFJBPA61MJMqlMcEycBO4gUdtp4mVA6KbIgEV7PTv1UXVFYjTntUNOr5DIxvE1RcqB84rR767Uw==";
+    };
+    dependencies = [
+      sources."@babel/cli-7.12.10"
+      sources."@babel/code-frame-7.23.5"
+      sources."@babel/compat-data-7.23.5"
+      sources."@babel/core-7.12.10"
+      sources."@babel/generator-7.23.6"
+      sources."@babel/helper-annotate-as-pure-7.22.5"
+      sources."@babel/helper-builder-binary-assignment-operator-visitor-7.22.15"
+      (sources."@babel/helper-compilation-targets-7.23.6" // {
+        dependencies = [
+          sources."semver-6.3.1"
+        ];
+      })
+      (sources."@babel/helper-create-class-features-plugin-7.23.7" // {
+        dependencies = [
+          sources."semver-6.3.1"
+        ];
+      })
+      (sources."@babel/helper-create-regexp-features-plugin-7.22.15" // {
+        dependencies = [
+          sources."semver-6.3.1"
+        ];
+      })
+      sources."@babel/helper-environment-visitor-7.22.20"
+      sources."@babel/helper-function-name-7.23.0"
+      sources."@babel/helper-hoist-variables-7.22.5"
+      sources."@babel/helper-member-expression-to-functions-7.23.0"
+      sources."@babel/helper-module-imports-7.22.15"
+      sources."@babel/helper-module-transforms-7.23.3"
+      sources."@babel/helper-optimise-call-expression-7.22.5"
+      sources."@babel/helper-plugin-utils-7.22.5"
+      sources."@babel/helper-remap-async-to-generator-7.22.20"
+      sources."@babel/helper-replace-supers-7.22.20"
+      sources."@babel/helper-simple-access-7.22.5"
+      sources."@babel/helper-skip-transparent-expression-wrappers-7.22.5"
+      sources."@babel/helper-split-export-declaration-7.22.6"
+      sources."@babel/helper-string-parser-7.23.4"
+      sources."@babel/helper-validator-identifier-7.22.20"
+      sources."@babel/helper-validator-option-7.23.5"
+      sources."@babel/helper-wrap-function-7.22.20"
+      sources."@babel/helpers-7.23.7"
+      sources."@babel/highlight-7.23.4"
+      sources."@babel/parser-7.23.6"
+      sources."@babel/plugin-proposal-async-generator-functions-7.20.7"
+      sources."@babel/plugin-proposal-class-properties-7.18.6"
+      sources."@babel/plugin-proposal-dynamic-import-7.18.6"
+      sources."@babel/plugin-proposal-export-namespace-from-7.18.9"
+      sources."@babel/plugin-proposal-json-strings-7.18.6"
+      sources."@babel/plugin-proposal-logical-assignment-operators-7.20.7"
+      sources."@babel/plugin-proposal-nullish-coalescing-operator-7.18.6"
+      sources."@babel/plugin-proposal-numeric-separator-7.18.6"
+      sources."@babel/plugin-proposal-object-rest-spread-7.20.7"
+      sources."@babel/plugin-proposal-optional-catch-binding-7.18.6"
+      sources."@babel/plugin-proposal-optional-chaining-7.21.0"
+      sources."@babel/plugin-proposal-private-methods-7.18.6"
+      sources."@babel/plugin-proposal-unicode-property-regex-7.18.6"
+      sources."@babel/plugin-syntax-async-generators-7.8.4"
+      sources."@babel/plugin-syntax-class-properties-7.12.13"
+      sources."@babel/plugin-syntax-dynamic-import-7.8.3"
+      sources."@babel/plugin-syntax-export-namespace-from-7.8.3"
+      sources."@babel/plugin-syntax-json-strings-7.8.3"
+      sources."@babel/plugin-syntax-logical-assignment-operators-7.10.4"
+      sources."@babel/plugin-syntax-nullish-coalescing-operator-7.8.3"
+      sources."@babel/plugin-syntax-numeric-separator-7.10.4"
+      sources."@babel/plugin-syntax-object-rest-spread-7.8.3"
+      sources."@babel/plugin-syntax-optional-catch-binding-7.8.3"
+      sources."@babel/plugin-syntax-optional-chaining-7.8.3"
+      sources."@babel/plugin-syntax-top-level-await-7.14.5"
+      sources."@babel/plugin-transform-arrow-functions-7.23.3"
+      sources."@babel/plugin-transform-async-to-generator-7.23.3"
+      sources."@babel/plugin-transform-block-scoped-functions-7.23.3"
+      sources."@babel/plugin-transform-block-scoping-7.23.4"
+      sources."@babel/plugin-transform-classes-7.23.5"
+      sources."@babel/plugin-transform-computed-properties-7.23.3"
+      sources."@babel/plugin-transform-destructuring-7.23.3"
+      sources."@babel/plugin-transform-dotall-regex-7.23.3"
+      sources."@babel/plugin-transform-duplicate-keys-7.23.3"
+      sources."@babel/plugin-transform-exponentiation-operator-7.23.3"
+      sources."@babel/plugin-transform-for-of-7.23.6"
+      sources."@babel/plugin-transform-function-name-7.23.3"
+      sources."@babel/plugin-transform-literals-7.23.3"
+      sources."@babel/plugin-transform-member-expression-literals-7.23.3"
+      sources."@babel/plugin-transform-modules-amd-7.23.3"
+      sources."@babel/plugin-transform-modules-commonjs-7.23.3"
+      sources."@babel/plugin-transform-modules-systemjs-7.23.3"
+      sources."@babel/plugin-transform-modules-umd-7.23.3"
+      sources."@babel/plugin-transform-named-capturing-groups-regex-7.22.5"
+      sources."@babel/plugin-transform-new-target-7.23.3"
+      sources."@babel/plugin-transform-object-super-7.23.3"
+      sources."@babel/plugin-transform-parameters-7.23.3"
+      sources."@babel/plugin-transform-property-literals-7.23.3"
+      sources."@babel/plugin-transform-regenerator-7.23.3"
+      sources."@babel/plugin-transform-reserved-words-7.23.3"
+      sources."@babel/plugin-transform-runtime-7.12.10"
+      sources."@babel/plugin-transform-shorthand-properties-7.23.3"
+      sources."@babel/plugin-transform-spread-7.23.3"
+      sources."@babel/plugin-transform-sticky-regex-7.23.3"
+      sources."@babel/plugin-transform-template-literals-7.23.3"
+      sources."@babel/plugin-transform-typeof-symbol-7.23.3"
+      sources."@babel/plugin-transform-unicode-escapes-7.23.3"
+      sources."@babel/plugin-transform-unicode-regex-7.23.3"
+      sources."@babel/preset-env-7.12.10"
+      sources."@babel/preset-modules-0.1.6"
+      sources."@babel/regjsgen-0.8.0"
+      sources."@babel/runtime-7.12.5"
+      sources."@babel/template-7.22.15"
+      sources."@babel/traverse-7.23.7"
+      sources."@babel/types-7.23.6"
+      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."@jridgewell/gen-mapping-0.3.3"
+      sources."@jridgewell/resolve-uri-3.1.1"
+      sources."@jridgewell/set-array-1.1.2"
+      sources."@jridgewell/sourcemap-codec-1.4.15"
+      sources."@jridgewell/trace-mapping-0.3.20"
+      sources."@mrmlnc/readdir-enhanced-2.2.1"
+      sources."@nodelib/fs.stat-1.1.3"
+      sources."@types/glob-7.2.0"
+      sources."@types/html-minifier-terser-5.1.2"
+      sources."@types/http-proxy-1.17.14"
+      sources."@types/json-schema-7.0.15"
+      sources."@types/minimatch-5.1.2"
+      sources."@types/node-20.10.6"
+      sources."@types/parse-json-4.0.2"
+      sources."@types/q-1.5.8"
+      sources."@types/source-list-map-0.1.6"
+      sources."@types/tapable-1.0.12"
+      (sources."@types/uglify-js-3.17.4" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."@types/webpack-4.41.38" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."@types/webpack-sources-3.2.3" // {
+        dependencies = [
+          sources."source-map-0.7.4"
+        ];
+      })
+      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.8"
+      sources."acorn-6.4.2"
+      sources."address-1.0.3"
+      sources."ajv-6.12.6"
+      sources."ajv-errors-1.0.1"
+      sources."ajv-keywords-3.5.2"
+      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-5.0.1"
+      sources."ansi-styles-3.2.1"
+      sources."anymatch-3.1.3"
+      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-buffer-byte-length-1.0.0"
+      sources."array-filter-0.0.1"
+      sources."array-flatten-2.1.2"
+      sources."array-map-0.0.1"
+      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."array.prototype.reduce-1.0.6"
+      sources."arraybuffer.prototype.slice-1.0.2"
+      sources."asap-2.0.6"
+      sources."asn1-0.2.6"
+      (sources."asn1.js-5.4.1" // {
+        dependencies = [
+          sources."bn.js-4.12.0"
+        ];
+      })
+      (sources."assert-1.5.1" // {
+        dependencies = [
+          sources."inherits-2.0.3"
+          sources."util-0.10.4"
+        ];
+      })
+      sources."assert-plus-1.0.0"
+      (sources."assets-webpack-plugin-3.9.12" // {
+        dependencies = [
+          sources."lodash-4.17.15"
+        ];
+      })
+      sources."assign-symbols-1.0.0"
+      sources."async-0.9.2"
+      sources."async-each-1.0.6"
+      sources."async-limiter-1.0.1"
+      sources."asynckit-0.4.0"
+      sources."atob-2.1.2"
+      sources."autoprefixer-10.1.0"
+      sources."available-typed-arrays-1.0.5"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.12.0"
+      sources."babel-extract-comments-1.0.0"
+      (sources."babel-loader-8.2.2" // {
+        dependencies = [
+          sources."make-dir-3.1.0"
+          sources."semver-6.3.1"
+        ];
+      })
+      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.2"
+      (sources."base-0.11.2" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+        ];
+      })
+      sources."base64-js-1.5.1"
+      sources."batch-0.6.1"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."big.js-5.2.2"
+      sources."binary-extensions-2.2.0"
+      sources."bindings-1.5.0"
+      sources."bluebird-3.7.2"
+      sources."bn.js-5.2.1"
+      (sources."body-parser-1.20.1" // {
+        dependencies = [
+          sources."bytes-3.1.2"
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+          sources."qs-6.11.0"
+        ];
+      })
+      (sources."bonjour-3.5.0" // {
+        dependencies = [
+          sources."deep-equal-1.1.2"
+        ];
+      })
+      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.1.0"
+      (sources."browserify-sign-4.2.2" // {
+        dependencies = [
+          sources."readable-stream-3.6.2"
+          sources."safe-buffer-5.2.1"
+        ];
+      })
+      sources."browserify-zlib-0.2.0"
+      sources."browserslist-4.22.2"
+      sources."buffer-4.9.2"
+      sources."buffer-from-1.1.2"
+      sources."buffer-indexof-1.1.1"
+      sources."buffer-xor-1.0.3"
+      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-bind-1.0.5"
+      sources."call-me-maybe-1.0.2"
+      sources."caller-callsite-2.0.0"
+      sources."caller-path-2.0.0"
+      sources."callsites-2.0.0"
+      sources."camel-case-4.1.2"
+      sources."camelcase-5.3.1"
+      sources."caniuse-api-3.0.0"
+      sources."caniuse-lite-1.0.30001574"
+      sources."case-sensitive-paths-webpack-plugin-2.3.0"
+      sources."caseless-0.12.0"
+      (sources."chalk-2.4.2" // {
+        dependencies = [
+          sources."escape-string-regexp-1.0.5"
+        ];
+      })
+      sources."chardet-0.7.0"
+      (sources."chokidar-3.5.3" // {
+        dependencies = [
+          sources."glob-parent-5.1.2"
+        ];
+      })
+      sources."chownr-1.1.4"
+      sources."chrome-trace-event-1.0.3"
+      sources."cipher-base-1.0.4"
+      (sources."class-utils-0.3.6" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          sources."is-descriptor-0.1.7"
+        ];
+      })
+      (sources."clean-css-4.2.4" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."cli-cursor-2.1.0"
+      sources."cli-table-0.3.4"
+      sources."cli-width-2.2.1"
+      (sources."cliui-3.2.0" // {
+        dependencies = [
+          sources."ansi-regex-2.1.1"
+          sources."is-fullwidth-code-point-1.0.0"
+          sources."string-width-1.0.2"
+          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.2.1"
+      sources."color-convert-1.9.3"
+      sources."color-name-1.1.3"
+      sources."color-string-1.9.1"
+      sources."colorette-1.4.0"
+      sources."colors-1.4.0"
+      sources."combined-stream-1.0.8"
+      sources."commander-4.1.1"
+      sources."common-tags-1.8.2"
+      sources."commondir-1.0.1"
+      sources."component-emitter-1.3.1"
+      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.4" // {
+        dependencies = [
+          sources."safe-buffer-5.2.1"
+        ];
+      })
+      sources."content-type-1.0.5"
+      sources."convert-source-map-1.9.0"
+      sources."cookie-0.5.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.2" // {
+        dependencies = [
+          sources."find-cache-dir-2.1.0"
+          sources."find-up-3.0.0"
+          sources."locate-path-3.0.0"
+          sources."p-locate-3.0.0"
+          sources."path-exists-3.0.0"
+          sources."pkg-dir-3.0.0"
+          sources."schema-utils-1.0.0"
+        ];
+      })
+      sources."core-js-2.6.12"
+      sources."core-js-compat-3.35.0"
+      sources."core-util-is-1.0.3"
+      sources."cosmiconfig-5.2.1"
+      (sources."create-ecdh-4.0.4" // {
+        dependencies = [
+          sources."bn.js-4.12.0"
+        ];
+      })
+      sources."create-hash-1.2.0"
+      sources."create-hmac-1.1.7"
+      sources."cross-spawn-7.0.3"
+      sources."crypto-browserify-3.12.0"
+      sources."css-color-names-0.0.4"
+      (sources."css-declaration-sorter-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."css-loader-4.3.0" // {
+        dependencies = [
+          sources."camelcase-6.3.0"
+          sources."loader-utils-2.0.4"
+          sources."lru-cache-6.0.0"
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."semver-7.5.4"
+          sources."source-map-0.6.1"
+          sources."yallist-4.0.0"
+        ];
+      })
+      sources."css-select-4.3.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-6.1.0"
+      sources."cssesc-3.0.0"
+      (sources."cssnano-4.1.11" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."cssnano-preset-default-4.0.8" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      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."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."cssnano-util-same-parent-4.0.1"
+      (sources."csso-4.2.0" // {
+        dependencies = [
+          sources."css-tree-1.1.3"
+          sources."mdn-data-2.0.14"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."cycle-1.0.3"
+      sources."cyclist-1.0.2"
+      sources."dashdash-1.14.1"
+      sources."debug-4.3.4"
+      sources."decamelize-1.2.0"
+      sources."decode-uri-component-0.2.2"
+      sources."deep-equal-0.2.2"
+      sources."default-gateway-4.2.0"
+      sources."define-data-property-1.1.1"
+      sources."define-properties-1.2.1"
+      sources."define-property-2.0.2"
+      (sources."del-4.1.1" // {
+        dependencies = [
+          (sources."globby-6.1.0" // {
+            dependencies = [
+              sources."pify-2.3.0"
+            ];
+          })
+        ];
+      })
+      sources."delayed-stream-1.0.0"
+      sources."depd-2.0.0"
+      sources."des.js-1.1.0"
+      sources."destroy-1.2.0"
+      sources."detect-node-2.1.0"
+      (sources."detect-port-alt-1.1.6" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+        ];
+      })
+      (sources."diffie-hellman-5.0.3" // {
+        dependencies = [
+          sources."bn.js-4.12.0"
+        ];
+      })
+      sources."dir-glob-2.2.2"
+      sources."dns-equal-1.0.0"
+      sources."dns-packet-1.3.4"
+      sources."dns-txt-2.0.2"
+      sources."dom-converter-0.2.0"
+      sources."dom-serializer-1.4.1"
+      sources."domain-browser-1.2.0"
+      sources."domelementtype-2.3.0"
+      sources."domhandler-4.3.1"
+      sources."domutils-2.8.0"
+      sources."dot-case-3.0.4"
+      sources."dot-prop-5.3.0"
+      sources."dotenv-8.2.0"
+      sources."duplexer-0.1.2"
+      sources."duplexify-3.7.1"
+      sources."ecc-jsbn-0.1.2"
+      sources."ee-first-1.1.1"
+      sources."electron-to-chromium-1.4.622"
+      (sources."elliptic-6.5.4" // {
+        dependencies = [
+          sources."bn.js-4.12.0"
+        ];
+      })
+      sources."elm-0.19.1-5"
+      sources."elm-asset-webpack-loader-1.1.2"
+      sources."elm-hot-1.1.6"
+      sources."elm-hot-webpack-loader-1.1.7"
+      sources."elm-solve-deps-wasm-1.0.2"
+      (sources."elm-test-0.19.1-revision12" // {
+        dependencies = [
+          sources."ansi-styles-4.3.0"
+          sources."brace-expansion-2.0.1"
+          sources."chalk-4.1.2"
+          sources."color-convert-2.0.1"
+          sources."color-name-1.1.4"
+          sources."commander-9.5.0"
+          sources."glob-8.1.0"
+          sources."has-flag-4.0.0"
+          sources."minimatch-5.1.6"
+          sources."supports-color-7.2.0"
+        ];
+      })
+      sources."elm-webpack-loader-6.0.1"
+      sources."emoji-regex-8.0.0"
+      sources."emojis-list-3.0.0"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      (sources."enhanced-resolve-4.5.0" // {
+        dependencies = [
+          sources."memory-fs-0.5.0"
+        ];
+      })
+      sources."entities-2.2.0"
+      sources."errno-0.1.8"
+      sources."error-ex-1.3.2"
+      sources."es-abstract-1.22.3"
+      sources."es-array-method-boxes-properly-1.0.0"
+      sources."es-set-tostringtag-2.0.2"
+      sources."es-to-primitive-1.2.1"
+      sources."escalade-3.1.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.3.0" // {
+        dependencies = [
+          sources."estraverse-5.3.0"
+        ];
+      })
+      sources."estraverse-4.3.0"
+      sources."esutils-2.0.3"
+      sources."etag-1.8.1"
+      sources."eventemitter3-4.0.7"
+      sources."events-3.3.0"
+      sources."eventsource-0.1.6"
+      sources."evp_bytestokey-1.0.3"
+      (sources."execa-1.0.0" // {
+        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."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-descriptor-0.1.7"
+          sources."ms-2.0.0"
+        ];
+      })
+      sources."expand-tilde-2.0.2"
+      (sources."express-4.18.2" // {
+        dependencies = [
+          sources."array-flatten-1.1.1"
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+          sources."qs-6.11.0"
+          sources."safe-buffer-5.2.1"
+        ];
+      })
+      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.3"
+      (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.4"
+      sources."figgy-pudding-3.5.2"
+      (sources."figures-2.0.0" // {
+        dependencies = [
+          sources."escape-string-regexp-1.0.5"
+        ];
+      })
+      (sources."file-loader-6.2.0" // {
+        dependencies = [
+          sources."loader-utils-2.0.4"
+          sources."schema-utils-3.3.0"
+        ];
+      })
+      sources."file-uri-to-path-1.0.0"
+      sources."filesize-3.6.1"
+      sources."fill-range-7.0.1"
+      (sources."finalhandler-1.2.0" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+        ];
+      })
+      (sources."find-cache-dir-3.3.2" // {
+        dependencies = [
+          sources."make-dir-3.1.0"
+          sources."semver-6.3.1"
+        ];
+      })
+      sources."find-elm-dependencies-2.0.4"
+      sources."find-up-4.1.0"
+      sources."firstline-1.3.1"
+      sources."flush-write-stream-1.1.1"
+      sources."follow-redirects-1.15.4"
+      sources."for-each-0.3.3"
+      sources."for-in-1.0.2"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."forwarded-0.2.0"
+      sources."fraction.js-4.3.7"
+      sources."fragment-cache-0.2.1"
+      sources."fresh-0.5.2"
+      sources."from2-2.3.0"
+      sources."fs-extra-6.0.1"
+      sources."fs-readdir-recursive-1.1.0"
+      sources."fs-write-stream-atomic-1.0.10"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.3.3"
+      sources."function-bind-1.1.2"
+      sources."function.prototype.name-1.1.6"
+      sources."functions-have-names-1.2.3"
+      sources."gensync-1.0.0-beta.2"
+      sources."get-caller-file-1.0.3"
+      sources."get-intrinsic-1.2.2"
+      sources."get-own-enumerable-property-symbols-3.0.2"
+      sources."get-stream-4.1.0"
+      sources."get-symbol-description-1.0.0"
+      sources."get-value-2.0.6"
+      sources."getpass-0.1.7"
+      sources."glob-7.2.3"
+      (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" // {
+        dependencies = [
+          sources."which-1.3.1"
+        ];
+      })
+      sources."globals-11.12.0"
+      sources."globalthis-1.0.3"
+      (sources."globby-7.1.1" // {
+        dependencies = [
+          sources."pify-3.0.0"
+          sources."slash-1.0.0"
+        ];
+      })
+      sources."gopd-1.0.1"
+      sources."graceful-fs-4.2.11"
+      (sources."gzip-size-5.0.0" // {
+        dependencies = [
+          sources."pify-3.0.0"
+        ];
+      })
+      sources."handle-thing-2.0.1"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.5"
+      sources."has-1.0.4"
+      sources."has-bigints-1.0.2"
+      sources."has-flag-3.0.0"
+      sources."has-property-descriptors-1.0.1"
+      sources."has-proto-1.0.1"
+      sources."has-symbols-1.0.3"
+      sources."has-tostringtag-1.0.0"
+      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.1.0" // {
+        dependencies = [
+          sources."readable-stream-3.6.2"
+          sources."safe-buffer-5.2.1"
+        ];
+      })
+      sources."hash.js-1.1.7"
+      sources."hasown-2.0.0"
+      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.9"
+      sources."hpack.js-2.1.6"
+      sources."hsl-regex-1.0.0"
+      sources."hsla-regex-1.0.0"
+      sources."html-entities-1.4.0"
+      sources."html-minifier-terser-5.1.1"
+      sources."html-webpack-plugin-4.5.0"
+      sources."htmlparser2-6.1.0"
+      sources."http-deceiver-1.2.7"
+      sources."http-errors-2.0.0"
+      sources."http-parser-js-0.5.8"
+      sources."http-proxy-1.18.1"
+      sources."http-proxy-middleware-0.21.0"
+      sources."http-signature-1.2.0"
+      sources."https-browserify-1.0.0"
+      sources."i-0.3.7"
+      sources."iconv-lite-0.4.24"
+      (sources."icss-utils-4.1.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."ieee754-1.2.1"
+      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-locate-3.0.0"
+          sources."path-exists-3.0.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.8"
+      (sources."inquirer-6.2.0" // {
+        dependencies = [
+          sources."ansi-regex-3.0.1"
+          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."internal-slot-1.0.6"
+      sources."invert-kv-1.0.0"
+      sources."ip-1.1.8"
+      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.1"
+      sources."is-arguments-1.1.1"
+      sources."is-array-buffer-3.0.2"
+      sources."is-arrayish-0.2.1"
+      sources."is-bigint-1.0.4"
+      sources."is-binary-path-2.1.0"
+      sources."is-boolean-object-1.1.2"
+      sources."is-buffer-1.1.6"
+      sources."is-callable-1.2.7"
+      sources."is-color-stop-1.1.0"
+      sources."is-core-module-2.13.1"
+      sources."is-data-descriptor-1.0.1"
+      sources."is-date-object-1.0.5"
+      sources."is-descriptor-1.0.3"
+      sources."is-directory-0.3.1"
+      sources."is-extendable-0.1.1"
+      sources."is-extglob-2.1.1"
+      sources."is-fullwidth-code-point-3.0.0"
+      sources."is-glob-4.0.3"
+      sources."is-negative-zero-2.0.2"
+      sources."is-number-7.0.0"
+      sources."is-number-object-1.0.7"
+      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-regex-1.1.4"
+      sources."is-regexp-1.0.0"
+      sources."is-resolvable-1.1.0"
+      sources."is-root-2.0.0"
+      sources."is-shared-array-buffer-1.0.2"
+      sources."is-stream-1.1.0"
+      sources."is-string-1.0.7"
+      sources."is-symbol-1.0.4"
+      sources."is-typed-array-1.1.12"
+      sources."is-typedarray-1.0.0"
+      sources."is-utf8-0.2.1"
+      sources."is-weakref-1.0.2"
+      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-tokens-4.0.0"
+      sources."js-yaml-3.14.1"
+      sources."jsbn-0.1.1"
+      sources."jsesc-2.5.2"
+      sources."json-parse-better-errors-1.0.2"
+      sources."json-parse-even-better-errors-2.3.1"
+      sources."json-schema-0.4.0"
+      sources."json-schema-traverse-0.4.1"
+      (sources."json-stable-stringify-1.1.0" // {
+        dependencies = [
+          sources."isarray-2.0.5"
+        ];
+      })
+      sources."json-stringify-safe-5.0.1"
+      sources."json3-3.3.3"
+      sources."json5-2.2.3"
+      sources."jsonfile-4.0.0"
+      sources."jsonify-0.0.1"
+      sources."jsprim-1.4.2"
+      sources."killable-1.0.1"
+      sources."kind-of-6.0.3"
+      sources."klona-2.0.6"
+      sources."last-call-webpack-plugin-3.0.0"
+      sources."lcid-1.0.0"
+      sources."lines-and-columns-1.2.4"
+      (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.2" // {
+        dependencies = [
+          sources."json5-1.0.2"
+        ];
+      })
+      sources."locate-path-5.0.0"
+      sources."lodash-4.17.21"
+      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.8.1"
+      sources."lower-case-2.0.2"
+      sources."lru-cache-5.1.1"
+      sources."make-dir-2.1.0"
+      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."memory-fs-0.4.1"
+      sources."merge-descriptors-1.0.1"
+      sources."merge2-1.4.1"
+      sources."methods-1.1.2"
+      sources."micromatch-4.0.5"
+      (sources."miller-rabin-4.0.1" // {
+        dependencies = [
+          sources."bn.js-4.12.0"
+        ];
+      })
+      sources."mime-1.6.0"
+      sources."mime-db-1.52.0"
+      sources."mime-types-2.1.35"
+      sources."mimic-fn-1.2.0"
+      (sources."mini-css-extract-plugin-0.12.0" // {
+        dependencies = [
+          sources."schema-utils-1.0.0"
+        ];
+      })
+      sources."minimalistic-assert-1.0.1"
+      sources."minimalistic-crypto-utils-1.0.1"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.5"
+      sources."mississippi-3.0.0"
+      (sources."mixin-deep-1.3.2" // {
+        dependencies = [
+          sources."is-extendable-1.0.1"
+        ];
+      })
+      sources."mkdirp-0.5.3"
+      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."mute-stream-0.0.8"
+      sources."nan-2.18.0"
+      sources."nanoid-3.3.7"
+      sources."nanomatch-1.2.13"
+      sources."ncp-1.0.1"
+      sources."negotiator-0.6.3"
+      sources."neo-async-2.6.2"
+      sources."nice-try-1.0.5"
+      sources."no-case-3.0.4"
+      (sources."node-elm-compiler-5.0.6" // {
+        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."node-forge-0.10.0"
+      (sources."node-libs-browser-2.2.1" // {
+        dependencies = [
+          sources."punycode-1.4.1"
+        ];
+      })
+      sources."node-releases-2.0.14"
+      sources."normalize-package-data-2.5.0"
+      sources."normalize-path-3.0.0"
+      sources."normalize-range-0.1.2"
+      sources."normalize-url-1.9.1"
+      (sources."npm-run-path-2.0.2" // {
+        dependencies = [
+          sources."path-key-2.0.1"
+        ];
+      })
+      sources."nth-check-2.1.1"
+      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-descriptor-0.1.7"
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."object-inspect-1.13.1"
+      sources."object-is-1.1.5"
+      sources."object-keys-1.1.1"
+      sources."object-visit-1.0.1"
+      sources."object.assign-4.1.5"
+      sources."object.entries-1.1.7"
+      sources."object.getownpropertydescriptors-2.1.7"
+      sources."object.pick-1.3.0"
+      sources."object.values-1.1.7"
+      sources."obuf-1.1.2"
+      sources."on-finished-2.4.1"
+      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-locale-1.4.0"
+      sources."os-tmpdir-1.0.2"
+      sources."p-finally-1.0.0"
+      sources."p-limit-2.3.0"
+      sources."p-locate-4.1.0"
+      sources."p-map-2.1.0"
+      sources."p-retry-3.0.1"
+      sources."p-try-2.2.0"
+      sources."pako-1.0.11"
+      sources."parallel-transform-1.2.0"
+      sources."param-case-3.0.4"
+      (sources."parent-module-1.0.1" // {
+        dependencies = [
+          sources."callsites-3.1.0"
+        ];
+      })
+      sources."parse-asn1-5.1.6"
+      sources."parse-json-4.0.0"
+      sources."parse-passwd-1.0.0"
+      sources."parseurl-1.3.3"
+      sources."pascal-case-3.1.2"
+      sources."pascalcase-0.1.1"
+      sources."path-browserify-0.0.1"
+      sources."path-dirname-1.0.2"
+      sources."path-exists-4.0.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-is-inside-1.0.2"
+      sources."path-key-3.1.1"
+      sources."path-parse-1.0.7"
+      sources."path-to-regexp-0.1.7"
+      (sources."path-type-3.0.0" // {
+        dependencies = [
+          sources."pify-3.0.0"
+        ];
+      })
+      sources."pbkdf2-3.1.2"
+      sources."performance-now-2.1.0"
+      sources."picocolors-1.0.0"
+      sources."picomatch-2.3.1"
+      sources."pify-4.0.1"
+      sources."pinkie-2.0.4"
+      sources."pinkie-promise-2.0.1"
+      sources."pkg-dir-4.2.0"
+      (sources."pkg-up-2.0.0" // {
+        dependencies = [
+          sources."find-up-2.1.0"
+          sources."locate-path-2.0.0"
+          sources."p-limit-1.3.0"
+          sources."p-locate-2.0.0"
+          sources."p-try-1.0.0"
+          sources."path-exists-3.0.0"
+        ];
+      })
+      sources."pkginfo-0.4.1"
+      (sources."portfinder-1.0.32" // {
+        dependencies = [
+          sources."async-2.6.4"
+          sources."debug-3.2.7"
+          sources."minimist-1.2.8"
+          sources."mkdirp-0.5.6"
+        ];
+      })
+      sources."posix-character-classes-0.1.1"
+      sources."postcss-8.4.33"
+      (sources."postcss-calc-7.0.5" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-colormin-4.0.3" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-convert-values-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-discard-comments-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-discard-duplicates-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-discard-empty-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-discard-overridden-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-flexbugs-fixes-4.2.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-loader-4.1.0" // {
+        dependencies = [
+          sources."cosmiconfig-7.1.0"
+          sources."import-fresh-3.3.0"
+          sources."loader-utils-2.0.4"
+          sources."lru-cache-6.0.0"
+          sources."parse-json-5.2.0"
+          sources."path-type-4.0.0"
+          sources."resolve-from-4.0.0"
+          sources."schema-utils-3.3.0"
+          sources."semver-7.5.4"
+          sources."yallist-4.0.0"
+        ];
+      })
+      (sources."postcss-merge-longhand-4.0.11" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-merge-rules-4.0.3" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-selector-parser-3.1.2"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-minify-font-values-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-minify-gradients-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-minify-params-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-minify-selectors-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-selector-parser-3.1.2"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-modules-extract-imports-2.0.0" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-modules-local-by-default-3.0.3" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-modules-scope-2.2.0" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-modules-values-3.0.0" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-charset-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-display-values-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-positions-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-repeat-style-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-string-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-timing-functions-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-unicode-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-url-4.0.1" // {
+        dependencies = [
+          sources."normalize-url-3.3.0"
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-normalize-whitespace-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-ordered-values-4.1.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-reduce-initial-4.0.3" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-reduce-transforms-4.0.2" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."postcss-safe-parser-5.0.2"
+      sources."postcss-selector-parser-6.0.15"
+      (sources."postcss-svgo-4.0.3" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-value-parser-3.3.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-unique-selectors-4.0.1" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."postcss-value-parser-4.2.0"
+      sources."prepend-http-1.0.4"
+      sources."pretty-bytes-5.6.0"
+      sources."pretty-error-2.1.2"
+      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"
+      sources."proxy-addr-2.0.7"
+      sources."prr-1.0.1"
+      sources."pseudomap-1.0.2"
+      sources."psl-1.9.0"
+      (sources."public-encrypt-4.0.3" // {
+        dependencies = [
+          sources."bn.js-4.12.0"
+        ];
+      })
+      sources."pump-3.0.0"
+      (sources."pumpify-1.5.1" // {
+        dependencies = [
+          sources."pump-2.0.1"
+        ];
+      })
+      sources."punycode-2.3.1"
+      sources."q-1.5.1"
+      sources."qs-6.5.3"
+      sources."query-string-4.3.4"
+      sources."querystring-es3-0.2.1"
+      sources."querystringify-2.2.0"
+      sources."randombytes-2.1.0"
+      sources."randomfill-1.0.4"
+      sources."range-parser-1.2.1"
+      (sources."raw-body-2.5.1" // {
+        dependencies = [
+          sources."bytes-3.1.2"
+        ];
+      })
+      (sources."react-dev-utils-6.1.1" // {
+        dependencies = [
+          sources."@babel/code-frame-7.0.0"
+          sources."ansi-regex-3.0.1"
+          sources."big.js-3.2.0"
+          sources."browserslist-4.1.1"
+          sources."chalk-2.4.1"
+          sources."cross-spawn-6.0.5"
+          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."node-releases-1.1.77"
+          sources."p-locate-3.0.0"
+          sources."path-exists-3.0.0"
+          sources."path-key-2.0.1"
+          sources."pify-3.0.0"
+          sources."react-error-overlay-5.1.6"
+          sources."shebang-command-1.2.0"
+          sources."shebang-regex-1.0.0"
+          sources."slash-1.0.0"
+          sources."sockjs-client-1.1.5"
+          sources."strip-ansi-4.0.0"
+          sources."which-1.3.1"
+        ];
+      })
+      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.8"
+      sources."readdirp-3.6.0"
+      (sources."recursive-readdir-2.2.2" // {
+        dependencies = [
+          sources."minimatch-3.0.4"
+        ];
+      })
+      sources."regenerate-1.4.2"
+      sources."regenerate-unicode-properties-10.1.1"
+      sources."regenerator-runtime-0.13.11"
+      sources."regenerator-transform-0.15.2"
+      sources."regex-not-1.0.2"
+      sources."regexp.prototype.flags-1.5.1"
+      sources."regexpu-core-5.3.2"
+      (sources."regjsparser-0.9.1" // {
+        dependencies = [
+          sources."jsesc-0.5.0"
+        ];
+      })
+      sources."relateurl-0.2.7"
+      sources."remove-trailing-separator-1.1.0"
+      (sources."renderkid-2.0.7" // {
+        dependencies = [
+          sources."ansi-regex-2.1.1"
+          sources."strip-ansi-3.0.1"
+        ];
+      })
+      sources."repeat-element-1.1.4"
+      sources."repeat-string-1.6.1"
+      sources."request-2.88.2"
+      sources."require-directory-2.1.1"
+      sources."require-main-filename-1.0.1"
+      sources."requires-port-1.0.0"
+      sources."resolve-1.22.8"
+      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.1"
+      sources."run-queue-1.0.3"
+      (sources."rxjs-6.6.7" // {
+        dependencies = [
+          sources."tslib-1.14.1"
+        ];
+      })
+      (sources."safe-array-concat-1.0.1" // {
+        dependencies = [
+          sources."isarray-2.0.5"
+        ];
+      })
+      sources."safe-buffer-5.1.2"
+      sources."safe-regex-1.1.0"
+      sources."safe-regex-test-1.0.0"
+      sources."safer-buffer-2.1.2"
+      sources."sax-1.2.4"
+      sources."schema-utils-2.7.1"
+      sources."select-hose-2.0.0"
+      sources."selfsigned-1.10.14"
+      sources."semver-5.7.2"
+      (sources."send-0.18.0" // {
+        dependencies = [
+          (sources."debug-2.6.9" // {
+            dependencies = [
+              sources."ms-2.0.0"
+            ];
+          })
+          sources."ms-2.1.3"
+        ];
+      })
+      sources."serialize-javascript-4.0.0"
+      (sources."serve-index-1.9.1" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."depd-1.1.2"
+          sources."http-errors-1.6.3"
+          sources."inherits-2.0.3"
+          sources."ms-2.0.0"
+          sources."setprototypeof-1.1.0"
+          sources."statuses-1.5.0"
+        ];
+      })
+      sources."serve-static-1.15.0"
+      sources."set-blocking-2.0.0"
+      sources."set-function-length-1.1.1"
+      sources."set-function-name-2.0.1"
+      (sources."set-value-2.0.1" // {
+        dependencies = [
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."setimmediate-1.0.5"
+      sources."setprototypeof-1.2.0"
+      sources."sha.js-2.4.11"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."shell-quote-1.6.1"
+      sources."side-channel-1.0.4"
+      sources."signal-exit-3.0.7"
+      (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-descriptor-0.1.7"
+          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.20" // {
+        dependencies = [
+          sources."faye-websocket-0.10.0"
+          sources."websocket-driver-0.6.5"
+        ];
+      })
+      (sources."sockjs-client-1.4.0" // {
+        dependencies = [
+          sources."debug-3.2.7"
+          sources."eventsource-1.1.2"
+        ];
+      })
+      sources."sort-keys-1.1.2"
+      sources."source-list-map-2.0.1"
+      sources."source-map-0.5.7"
+      sources."source-map-js-1.0.2"
+      sources."source-map-resolve-0.5.3"
+      (sources."source-map-support-0.5.21" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."source-map-url-0.4.1"
+      sources."spdx-correct-3.2.0"
+      sources."spdx-exceptions-2.3.0"
+      sources."spdx-expression-parse-3.0.1"
+      sources."spdx-license-ids-3.0.16"
+      sources."spdy-4.0.2"
+      (sources."spdy-transport-3.0.0" // {
+        dependencies = [
+          sources."readable-stream-3.6.2"
+        ];
+      })
+      sources."split-1.0.1"
+      sources."split-string-3.1.0"
+      sources."sprintf-js-1.0.3"
+      sources."sshpk-1.18.0"
+      sources."ssri-6.0.2"
+      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-descriptor-0.1.7"
+        ];
+      })
+      sources."statuses-2.0.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."strict-uri-encode-1.1.0"
+      sources."string-replace-loader-2.3.0"
+      (sources."string-width-4.2.3" // {
+        dependencies = [
+          sources."strip-ansi-6.0.1"
+        ];
+      })
+      sources."string.prototype.trim-1.2.8"
+      sources."string.prototype.trimend-1.0.7"
+      sources."string.prototype.trimstart-1.0.7"
+      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"
+      sources."strip-bom-2.0.0"
+      sources."strip-comments-1.0.2"
+      sources."strip-eof-1.0.0"
+      (sources."style-loader-1.3.0" // {
+        dependencies = [
+          sources."loader-utils-2.0.4"
+        ];
+      })
+      (sources."stylehacks-4.0.3" // {
+        dependencies = [
+          sources."picocolors-0.2.1"
+          sources."postcss-7.0.39"
+          sources."postcss-selector-parser-3.1.2"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."supports-color-5.5.0"
+      sources."supports-preserve-symlinks-flag-1.0.0"
+      (sources."svgo-1.3.2" // {
+        dependencies = [
+          sources."css-select-2.1.0"
+          sources."css-what-3.4.2"
+          (sources."dom-serializer-0.2.2" // {
+            dependencies = [
+              sources."domelementtype-2.3.0"
+            ];
+          })
+          sources."domelementtype-1.3.1"
+          sources."domutils-1.7.0"
+          sources."nth-check-1.0.2"
+        ];
+      })
+      sources."tapable-1.1.3"
+      (sources."temp-0.9.4" // {
+        dependencies = [
+          sources."rimraf-2.6.3"
+        ];
+      })
+      (sources."terser-4.8.1" // {
+        dependencies = [
+          sources."commander-2.20.3"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."terser-webpack-plugin-1.4.5" // {
+        dependencies = [
+          sources."find-cache-dir-2.1.0"
+          sources."find-up-3.0.0"
+          sources."locate-path-3.0.0"
+          sources."p-locate-3.0.0"
+          sources."path-exists-3.0.0"
+          sources."pkg-dir-3.0.0"
+          sources."schema-utils-1.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.12"
+      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.1"
+      sources."tough-cookie-2.5.0"
+      sources."tslib-2.6.2"
+      sources."tty-browserify-0.0.0"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."type-is-1.6.18"
+      sources."typed-array-buffer-1.0.0"
+      sources."typed-array-byte-length-1.0.0"
+      sources."typed-array-byte-offset-1.0.0"
+      sources."typed-array-length-1.0.4"
+      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."find-cache-dir-1.0.0"
+          sources."find-up-2.1.0"
+          sources."locate-path-2.0.0"
+          sources."lru-cache-4.1.5"
+          sources."make-dir-1.3.0"
+          sources."mississippi-2.0.0"
+          sources."p-limit-1.3.0"
+          sources."p-locate-2.0.0"
+          sources."p-try-1.0.0"
+          sources."path-exists-3.0.0"
+          sources."pify-3.0.0"
+          sources."pkg-dir-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."unbox-primitive-1.0.2"
+      sources."undici-types-5.26.5"
+      sources."unicode-canonical-property-names-ecmascript-2.0.0"
+      sources."unicode-match-property-ecmascript-2.0.0"
+      sources."unicode-match-property-value-ecmascript-2.1.0"
+      sources."unicode-property-aliases-ecmascript-2.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."upath-1.2.0"
+      sources."update-browserslist-db-1.0.13"
+      sources."uri-js-4.4.1"
+      sources."urix-0.1.0"
+      (sources."url-0.11.3" // {
+        dependencies = [
+          sources."punycode-1.4.1"
+          sources."qs-6.11.2"
+        ];
+      })
+      (sources."url-loader-4.1.1" // {
+        dependencies = [
+          sources."loader-utils-2.0.4"
+          sources."schema-utils-3.3.0"
+        ];
+      })
+      sources."url-parse-1.5.10"
+      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.0"
+      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" // {
+        dependencies = [
+          sources."core-util-is-1.0.2"
+        ];
+      })
+      sources."vm-browserify-1.1.2"
+      sources."watchpack-1.7.5"
+      (sources."watchpack-chokidar2-2.0.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.13"
+          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.44.2" // {
+        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."schema-utils-1.0.0"
+          sources."to-regex-range-2.1.1"
+        ];
+      })
+      (sources."webpack-dev-middleware-3.7.3" // {
+        dependencies = [
+          sources."mime-2.6.0"
+        ];
+      })
+      (sources."webpack-dev-server-3.11.0" // {
+        dependencies = [
+          sources."ansi-regex-2.1.1"
+          sources."anymatch-2.0.0"
+          sources."binary-extensions-1.13.1"
+          sources."braces-2.3.2"
+          sources."chokidar-2.1.8"
+          (sources."cliui-5.0.0" // {
+            dependencies = [
+              sources."ansi-regex-4.1.1"
+              sources."strip-ansi-5.2.0"
+            ];
+          })
+          sources."emoji-regex-7.0.3"
+          sources."extend-shallow-2.0.1"
+          sources."fill-range-4.0.0"
+          sources."find-up-3.0.0"
+          sources."fsevents-1.2.13"
+          sources."get-caller-file-2.0.5"
+          sources."http-proxy-middleware-0.19.1"
+          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."locate-path-3.0.0"
+          sources."micromatch-3.1.10"
+          sources."normalize-path-2.1.1"
+          sources."opn-5.5.0"
+          sources."p-locate-3.0.0"
+          sources."path-exists-3.0.0"
+          sources."readdirp-2.2.1"
+          sources."require-main-filename-2.0.0"
+          sources."schema-utils-1.0.0"
+          sources."semver-6.3.1"
+          (sources."string-width-3.1.0" // {
+            dependencies = [
+              sources."ansi-regex-4.1.1"
+              sources."strip-ansi-5.2.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.1"
+          (sources."wrap-ansi-5.1.0" // {
+            dependencies = [
+              sources."ansi-regex-4.1.1"
+              sources."strip-ansi-5.2.0"
+            ];
+          })
+          sources."yargs-13.3.2"
+          sources."yargs-parser-13.1.2"
+        ];
+      })
+      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.4"
+      sources."websocket-extensions-0.1.4"
+      sources."whatwg-fetch-3.5.0"
+      sources."which-2.0.2"
+      sources."which-boxed-primitive-1.0.2"
+      sources."which-module-1.0.0"
+      sources."which-typed-array-1.1.13"
+      (sources."winston-2.1.1" // {
+        dependencies = [
+          sources."async-1.0.0"
+          sources."colors-1.0.3"
+          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."ansi-regex-2.1.1"
+          sources."is-fullwidth-code-point-1.0.0"
+          sources."string-width-1.0.2"
+          sources."strip-ansi-3.0.1"
+        ];
+      })
+      sources."wrappy-1.0.2"
+      sources."ws-6.2.2"
+      sources."xmlbuilder-15.1.1"
+      sources."xtend-4.0.2"
+      sources."y18n-4.0.3"
+      sources."yallist-3.1.1"
+      sources."yaml-1.10.2"
+      (sources."yargs-6.6.0" // {
+        dependencies = [
+          sources."ansi-regex-2.1.1"
+          sources."camelcase-3.0.0"
+          sources."is-fullwidth-code-point-1.0.0"
+          sources."string-width-1.0.2"
+          sources."strip-ansi-3.0.1"
+          sources."y18n-3.2.2"
+        ];
+      })
+      (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;
+  };
+  elm-optimize-level-2 = nodeEnv.buildNodePackage {
+    name = "elm-optimize-level-2";
+    packageName = "elm-optimize-level-2";
+    version = "0.3.5";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-optimize-level-2/-/elm-optimize-level-2-0.3.5.tgz";
+      sha512 = "t1xl8zR9UBspdmEMuLBE/qTLP+Ew3L4PzKLhSY/PsO21HU3jZ1ULmKxDtZmJPVG4ciqsY1JSl/GFbaSdQ1sX9Q==";
+    };
+    dependencies = [
+      sources."@types/jest-27.5.2"
+      sources."ansi-regex-5.0.1"
+      sources."ansi-styles-5.2.0"
+      sources."balanced-match-1.0.2"
+      sources."brace-expansion-1.1.11"
+      (sources."chalk-4.1.2" // {
+        dependencies = [
+          sources."ansi-styles-4.3.0"
+        ];
+      })
+      sources."color-convert-2.0.1"
+      sources."color-name-1.1.4"
+      sources."commander-6.2.1"
+      sources."concat-map-0.0.1"
+      sources."cross-spawn-6.0.5"
+      sources."diff-sequences-27.5.1"
+      sources."find-elm-dependencies-2.0.4"
+      sources."firstline-1.3.1"
+      sources."fs.realpath-1.0.0"
+      sources."glob-7.2.3"
+      sources."has-flag-4.0.0"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."isexe-2.0.0"
+      sources."jest-diff-27.5.1"
+      sources."jest-get-type-27.5.1"
+      sources."jest-matcher-utils-27.5.1"
+      sources."lodash-4.17.21"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."mkdirp-0.5.6"
+      sources."nice-try-1.0.5"
+      sources."node-elm-compiler-5.0.6"
+      sources."once-1.4.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-2.0.1"
+      sources."pretty-format-27.5.1"
+      sources."react-is-17.0.2"
+      sources."rimraf-2.6.3"
+      sources."semver-5.7.2"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."supports-color-7.2.0"
+      sources."temp-0.9.4"
+      sources."ts-union-2.3.0"
+      sources."typescript-4.9.5"
+      sources."which-1.3.1"
+      sources."wrappy-1.0.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "A second level of optimization for the Javascript that the Elm Compiler produces.";
+      homepage = "https://github.com/mdgriffith/elm-optimize-level-2#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-pages = nodeEnv.buildNodePackage {
+    name = "elm-pages";
+    packageName = "elm-pages";
+    version = "3.0.9";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-pages/-/elm-pages-3.0.9.tgz";
+      sha512 = "EFwDCYHm3rwCiwXwfSUKeDDcIYrQ61deChDk7ruXPN4y0PkIINIKbljLu3uOnKSYhzc5CGSc7avwiAlkxXnJsA==";
+    };
+    dependencies = [
+      sources."@adobe/css-tools-4.3.2"
+      sources."@esbuild/android-arm-0.17.19"
+      sources."@esbuild/android-arm64-0.17.19"
+      sources."@esbuild/android-x64-0.17.19"
+      sources."@esbuild/darwin-arm64-0.17.19"
+      sources."@esbuild/darwin-x64-0.17.19"
+      sources."@esbuild/freebsd-arm64-0.17.19"
+      sources."@esbuild/freebsd-x64-0.17.19"
+      sources."@esbuild/linux-arm-0.17.19"
+      sources."@esbuild/linux-arm64-0.17.19"
+      sources."@esbuild/linux-ia32-0.17.19"
+      sources."@esbuild/linux-loong64-0.17.19"
+      sources."@esbuild/linux-mips64el-0.17.19"
+      sources."@esbuild/linux-ppc64-0.17.19"
+      sources."@esbuild/linux-riscv64-0.17.19"
+      sources."@esbuild/linux-s390x-0.17.19"
+      sources."@esbuild/linux-x64-0.17.19"
+      sources."@esbuild/netbsd-x64-0.17.19"
+      sources."@esbuild/openbsd-x64-0.17.19"
+      sources."@esbuild/sunos-x64-0.17.19"
+      sources."@esbuild/win32-arm64-0.17.19"
+      sources."@esbuild/win32-ia32-0.17.19"
+      sources."@esbuild/win32-x64-0.17.19"
+      sources."@isaacs/cliui-8.0.2"
+      sources."@jridgewell/gen-mapping-0.3.3"
+      sources."@jridgewell/resolve-uri-3.1.1"
+      sources."@jridgewell/set-array-1.1.2"
+      sources."@jridgewell/source-map-0.3.5"
+      sources."@jridgewell/sourcemap-codec-1.4.15"
+      sources."@jridgewell/trace-mapping-0.3.20"
+      sources."@nodelib/fs.scandir-2.1.5"
+      sources."@nodelib/fs.stat-2.0.5"
+      sources."@nodelib/fs.walk-1.2.8"
+      (sources."@npmcli/fs-3.1.0" // {
+        dependencies = [
+          sources."lru-cache-6.0.0"
+          sources."semver-7.5.4"
+        ];
+      })
+      sources."@sindresorhus/is-0.14.0"
+      sources."@szmarczak/http-timer-1.1.2"
+      sources."@tootallnate/once-2.0.0"
+      sources."@types/configstore-2.1.1"
+      sources."@types/debug-0.0.30"
+      sources."@types/get-port-3.2.0"
+      sources."@types/glob-5.0.38"
+      sources."@types/lodash-4.14.202"
+      sources."@types/minimatch-5.1.2"
+      sources."@types/mkdirp-0.5.2"
+      sources."@types/node-8.10.66"
+      sources."@types/rimraf-2.0.5"
+      sources."@types/tmp-0.0.33"
+      sources."accepts-1.3.8"
+      sources."acorn-8.11.3"
+      (sources."agent-base-6.0.2" // {
+        dependencies = [
+          sources."debug-4.3.4"
+          sources."ms-2.1.2"
+        ];
+      })
+      sources."agentkeepalive-4.5.0"
+      sources."aggregate-error-3.1.0"
+      sources."ansi-escapes-4.3.2"
+      sources."ansi-regex-5.0.1"
+      sources."ansi-styles-4.3.0"
+      sources."anymatch-3.1.3"
+      sources."application-config-path-0.1.1"
+      sources."argparse-1.0.10"
+      sources."array-flatten-1.1.1"
+      sources."async-limiter-1.0.1"
+      sources."balanced-match-1.0.2"
+      sources."batch-0.6.1"
+      sources."binary-extensions-2.2.0"
+      (sources."body-parser-1.20.1" // {
+        dependencies = [
+          sources."on-finished-2.4.1"
+        ];
+      })
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffer-from-1.1.2"
+      sources."bufferutil-4.0.8"
+      sources."busboy-1.6.0"
+      sources."bytes-3.1.2"
+      (sources."cacache-17.1.4" // {
+        dependencies = [
+          sources."brace-expansion-2.0.1"
+          sources."glob-10.3.10"
+          sources."minimatch-9.0.3"
+          sources."minipass-7.0.4"
+        ];
+      })
+      (sources."cacheable-request-6.1.0" // {
+        dependencies = [
+          sources."get-stream-5.2.0"
+          sources."lowercase-keys-2.0.0"
+        ];
+      })
+      sources."call-bind-1.0.5"
+      sources."chalk-3.0.0"
+      sources."chokidar-3.5.3"
+      sources."chownr-2.0.0"
+      sources."clean-stack-2.2.0"
+      sources."clone-response-1.0.3"
+      sources."color-convert-2.0.1"
+      sources."color-name-1.1.4"
+      sources."command-exists-1.2.9"
+      sources."commander-10.0.1"
+      sources."concat-map-0.0.1"
+      sources."connect-3.7.0"
+      sources."content-disposition-0.5.4"
+      sources."content-type-1.0.5"
+      sources."cookie-0.5.0"
+      sources."cookie-signature-1.2.1"
+      sources."copy-anything-2.0.6"
+      (sources."cross-spawn-7.0.3" // {
+        dependencies = [
+          sources."which-2.0.2"
+        ];
+      })
+      sources."debug-2.6.9"
+      sources."decompress-response-3.3.0"
+      sources."deep-extend-0.6.0"
+      sources."defer-to-connect-1.1.3"
+      sources."define-data-property-1.1.1"
+      sources."depd-2.0.0"
+      sources."destroy-1.2.0"
+      sources."detect-libc-1.0.3"
+      (sources."devcert-1.2.2" // {
+        dependencies = [
+          sources."debug-3.2.7"
+          sources."ms-2.1.3"
+        ];
+      })
+      sources."dir-glob-3.0.1"
+      sources."duplexer3-0.1.5"
+      sources."eastasianwidth-0.2.0"
+      sources."ee-first-1.1.1"
+      (sources."elm-doc-preview-5.0.5" // {
+        dependencies = [
+          sources."commander-5.1.0"
+          sources."tmp-0.1.0"
+        ];
+      })
+      sources."elm-hot-1.1.6"
+      sources."emoji-regex-9.2.2"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      sources."eol-0.9.1"
+      sources."err-code-2.0.3"
+      sources."errno-0.1.8"
+      sources."esbuild-0.17.19"
+      sources."escape-html-1.0.3"
+      sources."esprima-4.0.1"
+      sources."etag-1.8.1"
+      (sources."express-4.18.2" // {
+        dependencies = [
+          sources."cookie-signature-1.0.6"
+          sources."finalhandler-1.2.0"
+          sources."on-finished-2.4.1"
+          sources."statuses-2.0.1"
+        ];
+      })
+      (sources."express-ws-4.0.0" // {
+        dependencies = [
+          sources."ws-5.2.3"
+        ];
+      })
+      sources."extend-shallow-2.0.1"
+      sources."fast-glob-3.3.2"
+      sources."fastq-1.16.0"
+      sources."fill-range-7.0.1"
+      sources."finalhandler-1.1.2"
+      sources."foreground-child-3.1.1"
+      sources."forwarded-0.2.0"
+      sources."fresh-0.5.2"
+      sources."fs-extra-11.2.0"
+      (sources."fs-minipass-3.0.3" // {
+        dependencies = [
+          sources."minipass-7.0.4"
+        ];
+      })
+      sources."fs-monkey-1.0.5"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.3.3"
+      sources."function-bind-1.1.2"
+      sources."get-intrinsic-1.2.2"
+      sources."get-port-3.2.0"
+      sources."get-stream-4.1.0"
+      sources."glob-7.2.3"
+      sources."glob-parent-5.1.2"
+      sources."globby-13.1.4"
+      sources."gopd-1.0.1"
+      sources."got-9.6.0"
+      sources."graceful-fs-4.2.11"
+      sources."gray-matter-4.0.3"
+      sources."has-flag-4.0.0"
+      sources."has-property-descriptors-1.0.1"
+      sources."has-proto-1.0.1"
+      sources."has-symbols-1.0.3"
+      sources."hasown-2.0.0"
+      sources."http-cache-semantics-4.1.1"
+      (sources."http-errors-2.0.0" // {
+        dependencies = [
+          sources."statuses-2.0.1"
+        ];
+      })
+      (sources."http-proxy-agent-5.0.0" // {
+        dependencies = [
+          sources."debug-4.3.4"
+          sources."ms-2.1.2"
+        ];
+      })
+      (sources."https-proxy-agent-5.0.1" // {
+        dependencies = [
+          sources."debug-4.3.4"
+          sources."ms-2.1.2"
+        ];
+      })
+      sources."humanize-ms-1.2.1"
+      sources."iconv-lite-0.4.24"
+      sources."ignore-5.3.0"
+      sources."image-size-0.5.5"
+      sources."immutable-4.3.4"
+      sources."imurmurhash-0.1.4"
+      sources."indent-string-4.0.0"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."ini-1.3.8"
+      sources."ip-2.0.0"
+      sources."ipaddr.js-1.9.1"
+      sources."is-binary-path-2.1.0"
+      sources."is-docker-2.2.1"
+      sources."is-extendable-0.1.1"
+      sources."is-extglob-2.1.1"
+      sources."is-fullwidth-code-point-3.0.0"
+      sources."is-glob-4.0.3"
+      sources."is-lambda-1.0.1"
+      sources."is-number-7.0.0"
+      sources."is-valid-domain-0.1.6"
+      sources."is-what-3.14.1"
+      sources."is-wsl-2.2.0"
+      sources."isexe-2.0.0"
+      sources."jackspeak-2.3.6"
+      sources."js-yaml-3.14.1"
+      sources."jsesc-3.0.2"
+      sources."json-buffer-3.0.0"
+      sources."jsonfile-6.1.0"
+      sources."keyv-3.1.0"
+      sources."kind-of-6.0.3"
+      sources."kleur-4.1.5"
+      sources."latest-version-5.1.0"
+      (sources."less-4.2.0" // {
+        dependencies = [
+          sources."tslib-2.6.2"
+        ];
+      })
+      sources."lightningcss-1.22.1"
+      sources."lodash-4.17.21"
+      sources."lowercase-keys-1.0.1"
+      sources."lru-cache-7.18.3"
+      (sources."make-dir-2.1.0" // {
+        dependencies = [
+          sources."semver-5.7.2"
+        ];
+      })
+      sources."make-fetch-happen-11.1.1"
+      sources."media-typer-0.3.0"
+      sources."memfs-3.6.0"
+      sources."merge-descriptors-1.0.1"
+      sources."merge2-1.4.1"
+      sources."methods-1.1.2"
+      sources."micromatch-4.0.5"
+      sources."mime-1.6.0"
+      sources."mime-db-1.52.0"
+      sources."mime-types-2.1.35"
+      sources."mimic-response-1.0.1"
+      sources."minimatch-3.1.2"
+      sources."minimist-1.2.8"
+      sources."minipass-5.0.0"
+      (sources."minipass-collect-1.0.2" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      (sources."minipass-fetch-3.0.4" // {
+        dependencies = [
+          sources."minipass-7.0.4"
+        ];
+      })
+      (sources."minipass-flush-1.0.5" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      (sources."minipass-pipeline-1.2.4" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      (sources."minipass-sized-1.0.3" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      (sources."minizlib-2.1.2" // {
+        dependencies = [
+          sources."minipass-3.3.6"
+        ];
+      })
+      sources."mkdirp-0.5.6"
+      sources."ms-2.0.0"
+      sources."nanoid-3.3.7"
+      (sources."needle-3.3.1" // {
+        dependencies = [
+          sources."iconv-lite-0.6.3"
+        ];
+      })
+      sources."negotiator-0.6.3"
+      sources."node-gyp-build-4.7.1"
+      sources."normalize-path-3.0.0"
+      sources."normalize-url-4.5.1"
+      sources."object-inspect-1.13.1"
+      sources."on-finished-2.3.0"
+      sources."once-1.4.0"
+      sources."open-7.4.2"
+      sources."os-tmpdir-1.0.2"
+      sources."p-cancelable-1.1.0"
+      sources."p-map-4.0.0"
+      sources."package-json-6.5.0"
+      sources."parse-node-version-1.0.1"
+      sources."parseurl-1.3.3"
+      sources."password-prompt-1.1.3"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-3.1.1"
+      (sources."path-scurry-1.10.1" // {
+        dependencies = [
+          sources."lru-cache-10.1.0"
+        ];
+      })
+      sources."path-to-regexp-0.1.7"
+      sources."path-type-4.0.0"
+      sources."picocolors-1.0.0"
+      sources."picomatch-2.3.1"
+      sources."pify-4.0.1"
+      sources."postcss-8.4.33"
+      sources."prepend-http-2.0.0"
+      sources."promise-retry-2.0.1"
+      sources."proxy-addr-2.0.7"
+      sources."prr-1.0.1"
+      sources."pump-3.0.0"
+      sources."punycode-2.3.1"
+      sources."qs-6.11.0"
+      sources."queue-microtask-1.2.3"
+      sources."range-parser-1.2.1"
+      sources."raw-body-2.5.1"
+      sources."rc-1.2.8"
+      sources."readdirp-3.6.0"
+      sources."registry-auth-token-4.2.2"
+      sources."registry-url-5.1.0"
+      sources."responselike-1.0.2"
+      sources."retry-0.12.0"
+      sources."reusify-1.0.4"
+      sources."rimraf-2.7.1"
+      sources."rollup-3.29.4"
+      sources."run-parallel-1.2.0"
+      sources."safe-buffer-5.2.1"
+      sources."safer-buffer-2.1.2"
+      sources."sass-1.69.7"
+      sources."sax-1.3.0"
+      sources."section-matter-1.0.0"
+      sources."semver-6.3.1"
+      (sources."send-0.18.0" // {
+        dependencies = [
+          sources."ms-2.1.3"
+          sources."on-finished-2.4.1"
+          sources."statuses-2.0.1"
+        ];
+      })
+      (sources."serve-index-1.9.1" // {
+        dependencies = [
+          sources."depd-1.1.2"
+          sources."http-errors-1.6.3"
+          sources."inherits-2.0.3"
+          sources."setprototypeof-1.1.0"
+        ];
+      })
+      sources."serve-static-1.15.0"
+      sources."set-function-length-1.1.1"
+      sources."setprototypeof-1.2.0"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."side-channel-1.0.4"
+      sources."signal-exit-4.1.0"
+      sources."slash-4.0.0"
+      sources."smart-buffer-4.2.0"
+      sources."socks-2.7.1"
+      (sources."socks-proxy-agent-7.0.0" // {
+        dependencies = [
+          sources."debug-4.3.4"
+          sources."ms-2.1.2"
+        ];
+      })
+      sources."source-map-0.6.1"
+      sources."source-map-js-1.0.2"
+      sources."source-map-support-0.5.21"
+      sources."sprintf-js-1.0.3"
+      (sources."ssri-10.0.5" // {
+        dependencies = [
+          sources."minipass-7.0.4"
+        ];
+      })
+      sources."statuses-1.5.0"
+      sources."streamsearch-1.1.0"
+      sources."string-width-5.1.2"
+      (sources."string-width-cjs-4.2.3" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."strip-ansi-6.0.1"
+        ];
+      })
+      (sources."strip-ansi-7.1.0" // {
+        dependencies = [
+          sources."ansi-regex-6.0.1"
+        ];
+      })
+      sources."strip-ansi-cjs-6.0.1"
+      sources."strip-bom-string-1.0.0"
+      sources."strip-json-comments-2.0.1"
+      (sources."stylus-0.62.0" // {
+        dependencies = [
+          sources."debug-4.3.4"
+          sources."ms-2.1.2"
+          sources."source-map-0.7.4"
+        ];
+      })
+      sources."sudo-prompt-8.2.5"
+      sources."sugarss-4.0.1"
+      sources."supports-color-7.2.0"
+      (sources."tar-6.2.0" // {
+        dependencies = [
+          (sources."fs-minipass-2.1.0" // {
+            dependencies = [
+              sources."minipass-3.3.6"
+            ];
+          })
+          sources."mkdirp-1.0.4"
+        ];
+      })
+      (sources."terser-5.26.0" // {
+        dependencies = [
+          sources."commander-2.20.3"
+        ];
+      })
+      sources."tmp-0.0.33"
+      sources."to-readable-stream-1.0.0"
+      sources."to-regex-range-5.0.1"
+      sources."toidentifier-1.0.1"
+      sources."tslib-1.14.1"
+      sources."type-fest-0.21.3"
+      sources."type-is-1.6.18"
+      sources."undici-types-5.26.5"
+      sources."unique-filename-3.0.0"
+      sources."unique-slug-4.0.0"
+      sources."universalify-2.0.1"
+      sources."unpipe-1.0.0"
+      sources."url-parse-lax-3.0.0"
+      sources."utf-8-validate-5.0.10"
+      sources."utils-merge-1.0.1"
+      sources."vary-1.1.2"
+      (sources."vite-4.5.1" // {
+        dependencies = [
+          sources."@esbuild/android-arm-0.18.20"
+          sources."@esbuild/android-arm64-0.18.20"
+          sources."@esbuild/android-x64-0.18.20"
+          sources."@esbuild/darwin-arm64-0.18.20"
+          sources."@esbuild/darwin-x64-0.18.20"
+          sources."@esbuild/freebsd-arm64-0.18.20"
+          sources."@esbuild/freebsd-x64-0.18.20"
+          sources."@esbuild/linux-arm-0.18.20"
+          sources."@esbuild/linux-arm64-0.18.20"
+          sources."@esbuild/linux-ia32-0.18.20"
+          sources."@esbuild/linux-loong64-0.18.20"
+          sources."@esbuild/linux-mips64el-0.18.20"
+          sources."@esbuild/linux-ppc64-0.18.20"
+          sources."@esbuild/linux-riscv64-0.18.20"
+          sources."@esbuild/linux-s390x-0.18.20"
+          sources."@esbuild/linux-x64-0.18.20"
+          sources."@esbuild/netbsd-x64-0.18.20"
+          sources."@esbuild/openbsd-x64-0.18.20"
+          sources."@esbuild/sunos-x64-0.18.20"
+          sources."@esbuild/win32-arm64-0.18.20"
+          sources."@esbuild/win32-ia32-0.18.20"
+          sources."@esbuild/win32-x64-0.18.20"
+          sources."@types/node-20.10.6"
+          sources."esbuild-0.18.20"
+        ];
+      })
+      sources."which-3.0.1"
+      (sources."wrap-ansi-8.1.0" // {
+        dependencies = [
+          sources."ansi-styles-6.2.1"
+        ];
+      })
+      (sources."wrap-ansi-cjs-7.0.0" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."string-width-4.2.3"
+          sources."strip-ansi-6.0.1"
+        ];
+      })
+      sources."wrappy-1.0.2"
+      sources."ws-7.5.9"
+      sources."yallist-4.0.0"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Type-safe static sites, written in pure elm with your own custom elm-markup syntax.";
+      homepage = "https://elm-pages.com";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-review = nodeEnv.buildNodePackage {
+    name = "elm-review";
+    packageName = "elm-review";
+    version = "2.10.3";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-review/-/elm-review-2.10.3.tgz";
+      sha512 = "9gBqLc5Xm3v9Ncpf8y2haEaBZZyMX25vmwQkrNqSIaNYQ2vdGOIx1eyqRtt1xwX5O8pZdqU8IWC/ENyTrOTKbw==";
+    };
+    dependencies = [
+      (sources."@isaacs/cliui-8.0.2" // {
+        dependencies = [
+          sources."ansi-styles-6.2.1"
+          sources."strip-ansi-7.1.0"
+          sources."wrap-ansi-8.1.0"
+        ];
+      })
+      sources."@sindresorhus/is-4.6.0"
+      sources."@szmarczak/http-timer-4.0.6"
+      sources."@types/cacheable-request-6.0.3"
+      sources."@types/http-cache-semantics-4.0.4"
+      sources."@types/keyv-3.1.4"
+      sources."@types/node-20.10.6"
+      sources."@types/responselike-1.0.3"
+      sources."ansi-escapes-4.3.2"
+      sources."ansi-regex-6.0.1"
+      sources."ansi-styles-4.3.0"
+      sources."anymatch-3.1.3"
+      sources."at-least-node-1.0.0"
+      sources."balanced-match-1.0.2"
+      sources."base64-js-1.5.1"
+      sources."binary-extensions-2.2.0"
+      sources."bl-4.1.0"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffer-5.7.1"
+      sources."cacheable-lookup-5.0.4"
+      sources."cacheable-request-7.0.4"
+      sources."chalk-4.1.2"
+      sources."chokidar-3.5.3"
+      sources."cli-cursor-3.1.0"
+      sources."cli-spinners-2.9.2"
+      sources."clone-1.0.4"
+      sources."clone-response-1.0.3"
+      sources."color-convert-2.0.1"
+      sources."color-name-1.1.4"
+      sources."concat-map-0.0.1"
+      sources."cross-spawn-7.0.3"
+      sources."debug-4.3.4"
+      (sources."decompress-response-6.0.0" // {
+        dependencies = [
+          sources."mimic-response-3.1.0"
+        ];
+      })
+      sources."defaults-1.0.4"
+      sources."defer-to-connect-2.0.1"
+      sources."eastasianwidth-0.2.0"
+      sources."elm-tooling-1.15.0"
+      sources."emoji-regex-9.2.2"
+      sources."end-of-stream-1.4.4"
+      sources."fastest-levenshtein-1.0.16"
+      sources."fill-range-7.0.1"
+      sources."find-up-4.1.0"
+      sources."folder-hash-3.3.3"
+      (sources."foreground-child-3.1.1" // {
+        dependencies = [
+          sources."signal-exit-4.1.0"
+        ];
+      })
+      sources."fs-extra-9.1.0"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.3.3"
+      sources."get-stream-5.2.0"
+      (sources."glob-7.2.3" // {
+        dependencies = [
+          sources."minimatch-3.1.2"
+        ];
+      })
+      sources."glob-parent-5.1.2"
+      sources."got-11.8.6"
+      sources."graceful-fs-4.2.11"
+      sources."has-flag-4.0.0"
+      sources."http-cache-semantics-4.1.1"
+      sources."http2-wrapper-1.0.3"
+      sources."ieee754-1.2.1"
+      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-3.0.0"
+      sources."is-glob-4.0.3"
+      sources."is-interactive-1.0.0"
+      sources."is-number-7.0.0"
+      sources."is-unicode-supported-0.1.0"
+      sources."isexe-2.0.0"
+      sources."jackspeak-2.3.6"
+      sources."json-buffer-3.0.1"
+      sources."jsonfile-6.1.0"
+      sources."keyv-4.5.4"
+      sources."kleur-3.0.3"
+      sources."locate-path-5.0.0"
+      sources."log-symbols-4.1.0"
+      sources."lowercase-keys-2.0.0"
+      sources."lru-cache-10.1.0"
+      sources."mimic-fn-2.1.0"
+      sources."mimic-response-1.0.1"
+      sources."minimatch-3.0.8"
+      sources."minimist-1.2.8"
+      sources."minipass-7.0.4"
+      sources."ms-2.1.2"
+      sources."normalize-path-3.0.0"
+      sources."normalize-url-6.1.0"
+      sources."once-1.4.0"
+      sources."onetime-5.1.2"
+      sources."ora-5.4.1"
+      sources."p-cancelable-2.1.1"
+      sources."p-limit-2.3.0"
+      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."path-scurry-1.10.1"
+      sources."picomatch-2.3.1"
+      sources."prompts-2.4.2"
+      sources."pump-3.0.0"
+      sources."quick-lru-5.1.1"
+      sources."readable-stream-3.6.2"
+      sources."readdirp-3.6.0"
+      sources."resolve-alpn-1.2.1"
+      sources."responselike-2.0.1"
+      sources."restore-cursor-3.1.0"
+      (sources."rimraf-5.0.5" // {
+        dependencies = [
+          sources."brace-expansion-2.0.1"
+          sources."glob-10.3.10"
+          sources."minimatch-9.0.3"
+        ];
+      })
+      sources."safe-buffer-5.2.1"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."signal-exit-3.0.7"
+      sources."sisteransi-1.0.5"
+      (sources."string-width-5.1.2" // {
+        dependencies = [
+          sources."strip-ansi-7.1.0"
+        ];
+      })
+      (sources."string-width-cjs-4.2.3" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+        ];
+      })
+      sources."string_decoder-1.3.0"
+      (sources."strip-ansi-6.0.1" // {
+        dependencies = [
+          sources."ansi-regex-5.0.1"
+        ];
+      })
+      (sources."strip-ansi-cjs-6.0.1" // {
+        dependencies = [
+          sources."ansi-regex-5.0.1"
+        ];
+      })
+      sources."supports-color-7.2.0"
+      sources."supports-hyperlinks-2.3.0"
+      sources."terminal-link-2.1.1"
+      sources."to-regex-range-5.0.1"
+      sources."type-fest-0.21.3"
+      sources."undici-types-5.26.5"
+      sources."universalify-2.0.1"
+      sources."util-deprecate-1.0.2"
+      sources."wcwidth-1.0.1"
+      sources."which-2.0.2"
+      (sources."wrap-ansi-6.2.0" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."string-width-4.2.3"
+        ];
+      })
+      (sources."wrap-ansi-cjs-7.0.0" // {
+        dependencies = [
+          sources."emoji-regex-8.0.0"
+          sources."string-width-4.2.3"
+        ];
+      })
+      sources."wrappy-1.0.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Run elm-review from Node.js";
+      homepage = "https://github.com/jfmengels/node-elm-review#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-git-install = nodeEnv.buildNodePackage {
+    name = "elm-git-install";
+    packageName = "elm-git-install";
+    version = "0.1.4";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-git-install/-/elm-git-install-0.1.4.tgz";
+      sha512 = "XQ0Jl0RruUpcB4thmX0wnTPhB3fup9klyLmWyYOj0oUcpGlNXWr65cNbEMypxguL7sljU4MRMpItQMxeczgGwg==";
+    };
+    dependencies = [
+      sources."@kwsites/file-exists-1.1.1"
+      sources."@kwsites/promise-deferred-1.1.1"
+      sources."debug-4.3.4"
+      sources."git-clone-able-0.1.2"
+      sources."lru-cache-6.0.0"
+      sources."ms-2.1.2"
+      sources."semver-7.5.4"
+      sources."simple-git-3.22.0"
+      sources."upath-2.0.1"
+      sources."yallist-4.0.0"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "A tool for installing private Elm packages from any git url.";
+      homepage = "https://github.com/robinheghan/elm-git-install#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  "@dillonkearns/elm-graphql" = nodeEnv.buildNodePackage {
+    name = "_at_dillonkearns_slash_elm-graphql";
+    packageName = "@dillonkearns/elm-graphql";
+    version = "4.3.1";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/@dillonkearns/elm-graphql/-/elm-graphql-4.3.1.tgz";
+      sha512 = "De5PhJpuv2sqcglfhxLp4iB2Zxha6ejbhvajHeziE8ZZRsVXBcoDdh+aScWOQR0GR/t5cF4iGgNf6a5aPO9faA==";
+    };
+    dependencies = [
+      sources."asynckit-0.4.0"
+      sources."balanced-match-1.0.2"
+      sources."brace-expansion-1.1.11"
+      sources."combined-stream-1.0.8"
+      sources."concat-map-0.0.1"
+      sources."cross-fetch-3.1.8"
+      sources."cross-spawn-5.1.0"
+      sources."delayed-stream-1.0.0"
+      sources."encoding-0.1.13"
+      sources."extract-files-9.0.0"
+      sources."form-data-3.0.1"
+      sources."fs.realpath-1.0.0"
+      sources."glob-7.2.3"
+      sources."graphql-16.8.1"
+      sources."graphql-request-3.7.0"
+      sources."iconv-lite-0.6.3"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."isexe-2.0.0"
+      sources."lru-cache-4.1.5"
+      sources."mime-db-1.52.0"
+      sources."mime-types-2.1.35"
+      sources."minimatch-3.1.2"
+      sources."node-fetch-2.7.0"
+      sources."once-1.4.0"
+      sources."path-is-absolute-1.0.1"
+      sources."pseudomap-1.0.2"
+      sources."safer-buffer-2.1.2"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."tr46-0.0.3"
+      sources."webidl-conversions-3.0.1"
+      sources."whatwg-url-5.0.0"
+      sources."which-1.3.1"
+      sources."wrappy-1.0.2"
+      sources."yallist-2.1.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "[![Build Status](https://github.com/dillonkearns/elm-graphql/workflows/CI/badge.svg)](https://github.com/dillonkearns/elm-graphql/actions?query=branch%3Amaster) [![Elm package](https://img.shields.io/elm-package/v/dillonkearns/elm-graphql.svg)](https://pa";
+      homepage = "https://github.com/dillonkearns/elm-graphql#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/registry.dat b/nixpkgs/pkgs/development/compilers/elm/registry.dat
new file mode 100644
index 000000000000..a1c3b2f71c3e
--- /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..ecd24de46f67
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/update.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -p cabal2nix elm2nix -i bash ../../..
+
+# We're building binaries from commit that npm installer is using since
+# November 1st release called 0.19.1-6 in npm registry.
+# These binaries are built with newer ghc version and also support Aarch64 for Linux and Darwin.
+# Upstream git tag for 0.19.1 is still pointing to original commit from 2019.
+cabal2nix https://github.com/elm/compiler --revision 2f6dd29258e880dbb7effd57a829a0470d8da48b > 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/0001-emulate-clang-sysroot-include-logic.patch b/nixpkgs/pkgs/development/compilers/emscripten/0001-emulate-clang-sysroot-include-logic.patch
new file mode 100644
index 000000000000..4171906d5e36
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/emscripten/0001-emulate-clang-sysroot-include-logic.patch
@@ -0,0 +1,38 @@
+From 86fc9ce2b381748813b372f7e86909be6f955cbd Mon Sep 17 00:00:00 2001
+From: Yureka <yuka@yuka.dev>
+Date: Sat, 7 Aug 2021 09:16:46 +0200
+Subject: [PATCH] emulate clang 'sysroot + /include' logic
+
+Authored-By: Alexander Khovansky <alex@khovansky.me>
+Co-Authored-By: Yureka <yuka@yuka.dev>
+
+Clang provided by nix patches out logic that appends 'sysroot + /include'
+to the include path as well as automatic inclusion of libcxx includes (/include/c++/v1).
+The patch below adds that logic back by introducing cflags emulating this behavior to emcc
+invocations directly.
+
+Important note: with non-nix clang, sysroot/include dir ends up being the last
+in the include search order, right after the resource root.
+Hence usage of -idirafter. Clang also documents an -isystem-after flag
+but it doesn't appear to work
+---
+ emcc.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/emcc.py b/emcc.py
+index 279f6d4d9..26e20e2cc 100644
+--- a/emcc.py
++++ b/emcc.py
+@@ -400,6 +400,9 @@ def get_cflags(user_args, is_cxx):
+   # We add these to the user's flags (newargs), but not when building .s or .S assembly files
+   cflags = get_clang_flags(user_args)
+   cflags.append('--sysroot=' + cache.get_sysroot(absolute=True))
++  cflags.append('-resource-dir=@resourceDir@')
++  cflags.append('-idirafter' + cache.get_sysroot(absolute=True) + os.path.join('/include'))
++  cflags.append('-iwithsysroot' + os.path.join('/include','c++','v1'))
+ 
+   if settings.EMSCRIPTEN_TRACING:
+     cflags.append('-D__EMSCRIPTEN_TRACING__=1')
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/compilers/emscripten/default.nix b/nixpkgs/pkgs/development/compilers/emscripten/default.nix
new file mode 100644
index 000000000000..c31f109f8908
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/emscripten/default.nix
@@ -0,0 +1,144 @@
+{ lib, stdenv, fetchFromGitHub, python3, nodejs, closurecompiler
+, jre, binaryen
+, llvmPackages
+, symlinkJoin, makeWrapper, substituteAll
+, buildNpmPackage
+, emscripten
+}:
+
+stdenv.mkDerivation rec {
+  pname = "emscripten";
+  version = "3.1.51";
+
+  llvmEnv = symlinkJoin {
+    name = "emscripten-llvm-${version}";
+    paths = with llvmPackages; [ clang-unwrapped clang-unwrapped.lib lld llvm ];
+  };
+
+  nodeModules = buildNpmPackage {
+    name = "emscripten-node-modules-${version}";
+    inherit pname version src;
+
+    npmDepsHash = "sha256-N7WbxzKvW6FljY6g3R//9RdNiezhXGEvKPbOSJgdA0g=";
+
+    dontBuild = true;
+
+    # Copy node_modules directly.
+    installPhase = ''
+      cp -r node_modules $out/
+    '';
+  };
+
+  src = fetchFromGitHub {
+    owner = "emscripten-core";
+    repo = "emscripten";
+    hash = "sha256-oXecS6B0u8YLeoybjxLwx5INGj/Kp/8GA6s3A1S0y4k=";
+    rev = version;
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ nodejs python3 ];
+
+  patches = [
+    (substituteAll {
+      src = ./0001-emulate-clang-sysroot-include-logic.patch;
+      resourceDir = "${llvmEnv}/lib/clang/17/";
+    })
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    patchShebangs .
+
+    # emscripten 3.1.50 requires LLVM tip-of-tree instead of LLVM 17
+    sed -i -e "s/EXPECTED_LLVM_VERSION = 18/EXPECTED_LLVM_VERSION = 17.0/g" tools/shared.py
+
+    # fixes cmake support
+    sed -i -e "s/print \('emcc (Emscript.*\)/sys.stderr.write(\1); sys.stderr.flush()/g" emcc.py
+
+    sed -i "/^def check_sanity/a\\  return" tools/shared.py
+
+    echo "EMSCRIPTEN_ROOT = '$out/share/emscripten'" > .emscripten
+    echo "LLVM_ROOT = '${llvmEnv}/bin'" >> .emscripten
+    echo "NODE_JS = '${nodejs}/bin/node'" >> .emscripten
+    echo "JS_ENGINES = [NODE_JS]" >> .emscripten
+    echo "CLOSURE_COMPILER = ['${closurecompiler}/bin/closure-compiler']" >> .emscripten
+    echo "JAVA = '${jre}/bin/java'" >> .emscripten
+    # to make the test(s) below work
+    # echo "SPIDERMONKEY_ENGINE = []" >> .emscripten
+    echo "BINARYEN_ROOT = '${binaryen}'" >> .emscripten
+
+    # make emconfigure/emcmake use the correct (wrapped) binaries
+    sed -i "s|^EMCC =.*|EMCC='$out/bin/emcc'|" tools/shared.py
+    sed -i "s|^EMXX =.*|EMXX='$out/bin/em++'|" tools/shared.py
+    sed -i "s|^EMAR =.*|EMAR='$out/bin/emar'|" tools/shared.py
+    sed -i "s|^EMRANLIB =.*|EMRANLIB='$out/bin/emranlib'|" tools/shared.py
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    appdir=$out/share/emscripten
+    mkdir -p $appdir
+    cp -r . $appdir
+    chmod -R +w $appdir
+
+    mkdir -p $appdir/node_modules
+    cp -r ${nodeModules}/* $appdir/node_modules
+
+    mkdir -p $out/bin
+    for b in em++ em-config emar embuilder.py emcc emcmake emconfigure emmake emranlib emrun emscons emsize; do
+      makeWrapper $appdir/$b $out/bin/$b \
+        --set NODE_PATH ${nodeModules} \
+        --set EM_EXCLUSIVE_CACHE_ACCESS 1 \
+        --set PYTHON ${python3}/bin/python
+    done
+
+    # precompile libc (etc.) in all variants:
+    pushd $TMPDIR
+    echo 'int __main_argc_argv( int a, int b ) { return 42; }' >test.c
+    for LTO in -flto ""; do
+      for BIND in "" "--bind"; do
+        # starting with emscripten 3.1.32+,
+        # if pthreads and relocatable are both used,
+        # _emscripten_thread_exit_joinable must be exported
+        # (see https://github.com/emscripten-core/emscripten/pull/18376)
+        # TODO: get library cache to build with both enabled and function exported
+        $out/bin/emcc $LTO $BIND test.c
+        $out/bin/emcc $LTO $BIND -s RELOCATABLE test.c
+        # starting with emscripten 3.1.48+,
+        # to use pthreads, _emscripten_check_mailbox must be exported
+        # (see https://github.com/emscripten-core/emscripten/pull/20604)
+        # TODO: get library cache to build with pthreads at all
+        # $out/bin/emcc $LTO $BIND -s USE_PTHREADS test.c
+      done
+    done
+    popd
+
+    export PYTHON=${python3}/bin/python
+    export NODE_PATH=${nodeModules}
+    pushd $appdir
+    python test/runner.py test_hello_world
+    popd
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    # HACK: Make emscripten look more like a cc-wrapper to GHC
+    # when building the javascript backend.
+    targetPrefix = "em";
+    bintools = emscripten;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/emscripten-core/emscripten";
+    description = "An LLVM-to-JavaScript Compiler";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ qknight matthewbauer raitobezarius willcohen ];
+    license = licenses.ncsa;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/erg/default.nix b/nixpkgs/pkgs/development/compilers/erg/default.nix
new file mode 100644
index 000000000000..ab5458855423
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/erg/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, makeWrapper
+, python3
+, which
+, stdenv
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "erg";
+  version = "0.6.30";
+
+  src = fetchFromGitHub {
+    owner = "erg-lang";
+    repo = "erg";
+    rev = "v${version}";
+    hash = "sha256-lStTLDXgdaaqyzdzU1V2JnKX8jt27Z1A23fkuZU8dt0=";
+  };
+
+  cargoHash = "sha256-MsDan3wL9RhH0uhAuq0Lg8IRBXR8a3ooEBx6n2CMAVk=";
+
+  nativeBuildInputs = [
+    makeWrapper
+    python3
+    which
+  ];
+
+  buildFeatures = [ "full" ];
+
+  env = {
+    BUILD_DATE = "1970/01/01 00:00:00";
+    CASE_SENSITIVE = lib.boolToString (!stdenv.isDarwin);
+    GIT_HASH_SHORT = src.rev;
+  };
+
+  # TODO(figsoda): fix tests
+  doCheck = false;
+
+  # the build script is impure and also assumes we are in a git repository
+  postPatch = ''
+    rm crates/erg_common/build.rs
+  '';
+
+  preBuild = ''
+    export HOME=$(mktemp -d)
+    export CARGO_ERG_PATH=$HOME/.erg
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share
+    mv "$CARGO_ERG_PATH" $out/share/erg
+
+    wrapProgram $out/bin/erg \
+      --set-default ERG_PATH $out/share/erg
+  '';
+
+  meta = with lib; {
+    description = "A statically typed language that can deeply improve the Python ecosystem";
+    homepage = "https://github.com/erg-lang/erg";
+    changelog = "https://github.com/erg-lang/erg/releases/tag/${src.rev}";
+    license = with licenses; [ asl20 mit ];
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch b/nixpkgs/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch
new file mode 100644
index 000000000000..10f812e3814a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch
@@ -0,0 +1,28 @@
+From da8a4b9c1094a568f443c525ca1ce11f686be1bc Mon Sep 17 00:00:00 2001
+From: timor <timor.dd@googlemail.com>
+Date: Thu, 8 Aug 2019 14:13:09 +0200
+Subject: [PATCH] adjust unit test for finding executables in path for NixOS
+
+---
+ basis/io/standard-paths/unix/unix-tests.factor | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/basis/io/standard-paths/unix/unix-tests.factor b/basis/io/standard-paths/unix/unix-tests.factor
+index acd5029..870537f 100644
+--- a/basis/io/standard-paths/unix/unix-tests.factor
++++ b/basis/io/standard-paths/unix/unix-tests.factor
+@@ -5,13 +5,13 @@ sequences tools.test ;
+
+ { f } [ "" find-in-path ] unit-test
+ { t } [
+-    "ls" find-in-path { "/bin/ls" "/usr/bin/ls" } member?
++    "ls" find-in-path not not
+ ] unit-test
+
+ { t } [
+     "/sbin:" "PATH" os-env append "PATH" [
+         "ps" find-in-path
+-        { "/bin/ps" "/sbin/ps" "/usr/bin/ps" } member?
++        not not
+     ] with-os-env
+ ] unit-test
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/factor99.nix b/nixpkgs/pkgs/development/compilers/factor-lang/factor99.nix
new file mode 100644
index 000000000000..85ff98a28ba1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/factor99.nix
@@ -0,0 +1,224 @@
+{ lib
+, stdenv
+, cairo
+, curl
+, fetchurl
+, freealut
+, gdk-pixbuf
+, git
+, glib
+, gnome2
+, graphviz
+, gtk2-x11
+, interpreter
+, libGL
+, libGLU
+, libogg
+, librsvg
+, libvorbis
+, makeWrapper
+, ncurses
+, openal
+, openssl
+, pango
+, pcre
+, runCommand
+, runtimeShell
+, tzdata
+, udis86
+, unzip
+, writeScriptBin
+, zlib
+}:
+let
+  runtimeLibs = [
+    cairo
+    freealut
+    gdk-pixbuf
+    glib
+    gnome2.gtkglext
+    graphviz
+    gtk2-x11
+    libGL
+    libGLU
+    libogg
+    libvorbis
+    openal
+    openssl
+    pango
+    pcre
+    udis86
+    zlib
+  ];
+
+  wrapFactorScript = { from, to ? false, runtimeLibs }: ''
+    # Set Gdk pixbuf loaders file to the one from the build dependencies here
+    unset GDK_PIXBUF_MODULE_FILE
+    # Defined in gdk-pixbuf setup hook
+    findGdkPixbufLoaders "${librsvg}"
+
+    ${if to then "makeWrapper ${from} ${to}" else "wrapProgram ${from}"} \
+      --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+      --argv0 factor \
+      --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs} \
+      --prefix PATH : ${lib.makeBinPath [ graphviz ]}
+  '';
+
+  wrapFactor = runtimeLibs:
+    runCommand (lib.appendToName "with-libs" interpreter).name
+      {
+        nativeBuildInputs = [ makeWrapper ];
+        buildInputs = [ gdk-pixbuf ];
+        passthru.runtimeLibs = runtimeLibs ++ interpreter.runtimeLibs;
+      }
+      (wrapFactorScript {
+        from = "${interpreter}/lib/factor/.factor.wrapped";
+        to = "$out/bin/factor";
+        runtimeLibs = (runtimeLibs ++ interpreter.runtimeLibs);
+      });
+
+  # Development helper for use in nix shell
+  wrapLocalFactor = writeScriptBin "wrapFactor" ''
+    #!${runtimeShell}
+    ${wrapFactorScript { from = "./factor"; inherit runtimeLibs; }}
+    ln -sf factor.image .factor-wrapped.image
+  '';
+  rev = "e10b64dbc53a8583098e73580a1eb9ff4ce0c709";
+  version = "0.99";
+
+in
+stdenv.mkDerivation {
+  pname = "factor-lang";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
+    sha256 = "f5626bb3119bd77de9ac3392fdbe188bffc26557fab3ea34f7ca21e372a8443e";
+  };
+
+  patches = [
+    ./staging-command-line-0.99-pre.patch
+    ./workdir-0.99-pre.patch
+    ./adjust-paths-in-unit-tests.patch
+  ];
+
+  nativeBuildInputs = [ git makeWrapper curl unzip wrapLocalFactor ];
+  buildInputs = runtimeLibs;
+
+  postPatch = ''
+    sed -ie '4i GIT_LABEL = heads/master-${rev}' GNUmakefile
+
+    # There is no ld.so.cache in NixOS so we patch out calls to that completely.
+    # This should work as long as no application code relies on `find-library*`
+    # to return a match, which currently is the case and also a justified assumption.
+
+    sed -ie "s#/sbin/ldconfig -p#cat $out/lib/factor/ld.so.cache#g" \
+      basis/alien/libraries/finder/linux/linux.factor
+
+    # Some other hard-coded paths to fix:
+    sed -i 's#/usr/share/zoneinfo/#${tzdata}/share/zoneinfo/#g' \
+      extra/tzinfo/tzinfo.factor
+
+    sed -i 's#/usr/share/terminfo#${ncurses.out}/share/terminfo#g' \
+      extra/terminfo/terminfo.factor
+
+    # De-memoize xdg-* functions, otherwise they break the image.
+    sed -ie 's/^MEMO:/:/' basis/xdg/xdg.factor
+
+    # update default paths in factor-listener.el for fuel mode
+    substituteInPlace misc/fuel/fuel-listener.el \
+      --replace '(defcustom fuel-factor-root-dir nil' "(defcustom fuel-factor-root-dir \"$out/lib/factor\""
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    # Necessary here, because ld.so.cache is needed in its final location during rebuild.
+    mkdir -p $out/bin $out/lib/factor
+    patchShebangs ./build.sh
+    # 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 ${lib.makeLibraryPath runtimeLibs} | 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
+
+    make -j$NIX_BUILD_CORES linux-x86-64
+    printf "First build from upstream boot image\n" >&2
+    ./build.sh bootstrap
+    printf "Rebuild boot image\n" >&2
+    ./factor -script -e='"unix-x86.64" USING: system bootstrap.image memory ; make-image save 0 exit'
+    printf "Second build from local boot image\n" >&2
+    ./build.sh bootstrap
+    runHook postBuild
+  '';
+
+  # For now, the check phase runs, but should always return 0. This way the logs
+  # contain the test failures until all unit tests are fixed. Then, it should
+  # return 1 if any test failures have occured.
+  doCheck = false;
+  checkPhase = ''
+    runHook preCheck
+    set +e
+    ./factor -e='USING: tools.test zealot.factor sequences namespaces formatting ;
+      zealot-core-vocabs "compiler" suffix [ test ] each :test-failures
+      test-failures get length "Number of failed Tests: %d\n" printf'
+    [ $? -eq 0 ] || {
+      mkdir -p "$out/nix-support"
+      touch "$out/nix-support/failed"
+    }
+    set -e
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    cp -r factor factor.image LICENSE.txt README.md basis core extra misc $out/lib/factor
+
+    # Create a wrapper in bin/ and lib/factor/
+    ${wrapFactorScript { from = "$out/lib/factor/factor"; inherit runtimeLibs; }}
+    mv $out/lib/factor/factor.image $out/lib/factor/.factor-wrapped.image
+    cp $out/lib/factor/factor $out/bin/
+
+    # Emacs fuel expects the image being named `factor.image` in the factor base dir
+    ln -s $out/lib/factor/.factor-wrapped.image $out/lib/factor/factor.image
+
+    # install fuel mode for emacs
+    mkdir -p $out/share/emacs/site-lisp
+    ln -s $out/lib/factor/misc/fuel/*.el $out/share/emacs/site-lisp/
+    runHook postInstall
+  '';
+
+  passthru = {
+    inherit runtimeLibs wrapFactorScript;
+    withLibs = wrapFactor;
+  };
+
+  meta = with lib; {
+    homepage = "https://factorcode.org/";
+    description = "A concatenative, stack-based programming language";
+    longDescription = ''
+      The Factor programming language is a concatenative, stack-based
+      programming language with high-level features including dynamic types,
+      extensible syntax, macros, and garbage collection. On a practical side,
+      Factor has a full-featured library, supports many different platforms, and
+      has been extensively documented.
+
+      The implementation is fully compiled for performance, while still
+      supporting interactive development. Factor applications are portable
+      between all common platforms. Factor can deploy stand-alone applications
+      on all platforms. Full source code for the Factor project is available
+      under a BSD license.
+    '';
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ vrthra spacefrogg ];
+    platforms = lib.intersectLists platforms.x86_64 platforms.linux;
+    mainProgram = "factor";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/scope.nix b/nixpkgs/pkgs/development/compilers/factor-lang/scope.nix
new file mode 100644
index 000000000000..af0d7af1293f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/scope.nix
@@ -0,0 +1,16 @@
+{ lib, pkgs
+, overrides ? (self: super: {})}:
+
+let
+  inside = (self:
+  let callPackage = pkgs.newScope self;
+  in rec {
+    interpreter = callPackage ./factor99.nix { inherit (pkgs) stdenv; };
+
+    # Convenience access for using the returned attribute the same way as the
+    # interpreter derivation. Takes a list of runtime libraries as its only
+    # argument.
+    inherit (self.interpreter) withLibs;
+  });
+  extensible-self = lib.makeExtensible (lib.extends overrides inside);
+in extensible-self
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch b/nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch
new file mode 100644
index 000000000000..a9631664a35d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch
@@ -0,0 +1,13 @@
+diff --git a/basis/tools/deploy/backend/backend.factor b/basis/tools/deploy/backend/backend.factor
+index cfcca0d..87a2b01 100644
+--- a/basis/tools/deploy/backend/backend.factor
++++ b/basis/tools/deploy/backend/backend.factor
+@@ -72,7 +72,7 @@ ERROR: can't-deploy-library-file library ;
+             [ staging-image-name "-output-image=" prepend , ]
+             [ join-words "-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.99-pre.patch b/nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.99-pre.patch
new file mode 100644
index 000000000000..f1e7a5920627
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.99-pre.patch
@@ -0,0 +1,13 @@
+diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor
+index a172fe4..40858bc 100644
+--- a/core/io/pathnames/pathnames.factor
++++ b/core/io/pathnames/pathnames.factor
+@@ -166,6 +166,8 @@ GENERIC: absolute-path ( path -- path' )
+
+ M: string absolute-path
+     {
++        { [ "resource:work" ?head ]
++          [ trim-head-separators "/var/lib/factor" prepend-path absolute-path ] }
+         { [ "resource:" ?head ] [ trim-head-separators resource-path absolute-path ] }
+         { [ "vocab:" ?head ] [ trim-head-separators vocab-path absolute-path ] }
+         { [ "~" ?head ] [ trim-head-separators home prepend-path absolute-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..f23e9540928a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fasm/bin.nix
@@ -0,0 +1,28 @@
+{ stdenvNoCC, lib, fetchurl }:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "fasm-bin";
+  version = "1.73.32";
+
+  src = fetchurl {
+    url = "https://flatassembler.net/fasm-${finalAttrs.version}.tgz";
+    hash = "sha256-WVXL4UNWXa9e7K3MSS0CXK3lczgog9V4XUoYChvvym8=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D fasm${lib.optionalString stdenvNoCC.isx86_64 ".x64"} $out/bin/fasm
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "x86(-64) macro assembler to binary, MZ, PE, COFF, and ELF";
+    homepage = "https://flatassembler.net/download.php";
+    license = lib.licenses.bsd2;
+    mainProgram = "fasm";
+    maintainers = with lib.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/fasmg/default.nix b/nixpkgs/pkgs/development/compilers/fasmg/default.nix
new file mode 100644
index 000000000000..ec915bcb04bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fasmg/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv
+, fetchzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fasmg";
+  version = "j27m";
+
+  src = fetchzip {
+    url = "https://flatassembler.net/fasmg.${version}.zip";
+    sha256 = "0qmklb24n3r0my2risid8r61pi88gqrvm1c0xvyd0bp1ans6d7zd";
+    stripRoot = false;
+  };
+
+  buildPhase = let
+    inherit (stdenv.hostPlatform) system;
+
+    path = {
+      x86_64-linux = {
+        bin = "fasmg.x64";
+        asm = "source/linux/x64/fasmg.asm";
+      };
+      x86_64-darwin = {
+        bin = "source/macos/x64/fasmg";
+        asm = "source/macos/x64/fasmg.asm";
+      };
+      x86-linux = {
+        bin = "fasmg";
+        asm = "source/linux/fasmg.asm";
+      };
+      x86-darwin = {
+        bin = "source/macos/fasmg";
+        asm = "source/macos/fasmg.asm";
+      };
+    }.${system} or (throw "Unsupported system: ${system}");
+
+  in ''
+    chmod +x ${path.bin}
+    ./${path.bin} ${path.asm} fasmg
+  '';
+
+  outputs = [ "out" "doc" ];
+
+  installPhase = ''
+    install -Dm755 fasmg $out/bin/fasmg
+
+    mkdir -p $doc/share/doc/fasmg
+    cp docs/*.txt $doc/share/doc/fasmg
+  '';
+
+  meta = with lib; {
+    description = "x86(-64) macro assembler to binary, MZ, PE, COFF, and ELF";
+    homepage = "https://flatassembler.net";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ orivej luc65r ];
+    platforms = with platforms; intersectLists (linux ++ darwin) x86;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fbc/default.nix b/nixpkgs/pkgs/development/compilers/fbc/default.nix
new file mode 100644
index 000000000000..631bf9c7bfe0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fbc/default.nix
@@ -0,0 +1,136 @@
+{ stdenv
+, buildPackages
+, lib
+, fetchzip
+, gpm
+, libffi
+, libGL
+, libX11
+, libXext
+, libXpm
+, libXrandr
+, ncurses
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fbc";
+  version = "1.10.1";
+
+  src = fetchzip {
+    # Bootstrap tarball has sources pretranslated from FreeBASIC to C
+    url = "https://github.com/freebasic/fbc/releases/download/${version}/FreeBASIC-${version}-source-bootstrap.tar.xz";
+    hash = "sha256-LBROv3m1DrEfSStMbNuLC+fldYNfSS+D09bJyNMNPP0=";
+  };
+
+  postPatch = ''
+    patchShebangs tests/warnings/test.sh
+  '';
+
+  dontConfigure = true;
+
+  depsBuildBuild = [
+    buildPackages.stdenv.cc
+    buildPackages.ncurses
+    buildPackages.libffi
+  ];
+
+  buildInputs = [
+    ncurses
+    libffi
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    gpm
+    libGL
+    libX11
+    libXext
+    libXpm
+    libXrandr
+  ];
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [
+    "format"
+  ];
+
+  makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "TARGET=${stdenv.hostPlatform.config}"
+  ];
+
+  preBuild = ''
+    export buildJobs=$NIX_BUILD_CORES
+    if [ -z "$enableParallelBuilding" ]; then
+      buildJobs=1
+    fi
+
+    echo Bootstrap an unpatched build compiler
+    make bootstrap-minimal -j$buildJobs \
+      BUILD_PREFIX=${buildPackages.stdenv.cc.targetPrefix} LD=${buildPackages.stdenv.cc.targetPrefix}ld
+
+    echo Compile patched build compiler and host rtlib
+    make compiler -j$buildJobs \
+      "FBC=$PWD/bin/fbc${stdenv.buildPlatform.extensions.executable} -i $PWD/inc" \
+      BUILD_PREFIX=${buildPackages.stdenv.cc.targetPrefix} LD=${buildPackages.stdenv.cc.targetPrefix}ld
+    make rtlib -j$buildJobs \
+      "FBC=$PWD/bin/fbc${stdenv.buildPlatform.extensions.executable} -i $PWD/inc" \
+      ${if (stdenv.buildPlatform == stdenv.hostPlatform) then
+        "BUILD_PREFIX=${buildPackages.stdenv.cc.targetPrefix} LD=${buildPackages.stdenv.cc.targetPrefix}ld"
+      else
+        "TARGET=${stdenv.hostPlatform.config}"
+      }
+
+    echo Install patched build compiler and host rtlib to local directory
+    make install-compiler prefix=$PWD/patched-fbc
+    make install-rtlib prefix=$PWD/patched-fbc ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) "TARGET=${stdenv.hostPlatform.config}"}
+    make clean
+
+    echo Compile patched host everything with previous patched stage
+    buildFlagsArray+=("FBC=$PWD/patched-fbc/bin/fbc${stdenv.buildPlatform.extensions.executable} -i $PWD/inc")
+  '';
+
+  installFlags = [
+    "prefix=${placeholder "out"}"
+  ];
+
+  # Tests do not work when cross-compiling even if build platform can execute
+  # host binaries, compiler struggles to find the cross compiler's libgcc_s
+  doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
+
+  checkTarget = "unit-tests warning-tests log-tests";
+
+  checkFlags = [
+    "UNITTEST_RUN_ARGS=--verbose" # see what unit-tests are doing
+    "ABORT_CMD=false" # abort log-tests on failure
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+
+    # Some tests fail with too much parallelism
+    export maxCheckJobs=50
+    export checkJobs=$(($NIX_BUILD_CORES<=$maxCheckJobs ? $NIX_BUILD_CORES : $maxCheckJobs))
+    if [ -z "$enableParallelChecking" ]; then
+      checkJobs=1
+    fi
+
+    # Run check targets in series, else the logs are a mess
+    for target in $checkTarget; do
+      make $target -j$checkJobs $makeFlags $checkFlags
+    done
+
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.freebasic.net/";
+    description = "A multi-platform BASIC Compiler";
+    longDescription = ''
+      FreeBASIC is a completely free, open-source, multi-platform BASIC compiler (fbc),
+      with syntax similar to (and support for) MS-QuickBASIC, that adds new features
+      such as pointers, object orientation, unsigned data types, inline assembly,
+      and many others.
+    '';
+    license = licenses.gpl2Plus; # runtime & graphics libraries are LGPLv2+ w/ static linking exception
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = with platforms; windows ++ linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fbc/mac-bin.nix b/nixpkgs/pkgs/development/compilers/fbc/mac-bin.nix
new file mode 100644
index 000000000000..937283721817
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fbc/mac-bin.nix
@@ -0,0 +1,35 @@
+{ stdenvNoCC
+, lib
+, fetchzip
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "fbc-mac-bin";
+  version = "1.06-darwin-wip20160505";
+
+  src = fetchzip {
+    url = "https://tmc.castleparadox.com/temp/fbc-${version}.tar.bz2";
+    sha256 = "sha256-hD3SRUkk50sf0MhhgHNMvBoJHTKz/71lyFxaAXM4/qI=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -R * $out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://rpg.hamsterrepublic.com/ohrrpgce/Compiling_in_Mac_OS_X";
+    description = "FreeBASIC, a multi-platform BASIC Compiler (precompiled Darwin build by OHRRPGCE team)";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.gpl2Plus; # runtime & graphics libraries are LGPLv2+ w/ static linking exception
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = [ "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/firrtl/default.nix b/nixpkgs/pkgs/development/compilers/firrtl/default.nix
new file mode 100644
index 000000000000..5a59060b6f21
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/firrtl/default.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, jre, setJavaClassPath, coursier, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "firrtl";
+  version = "1.5.3";
+  scalaVersion = "2.13"; # pin, for determinism
+
+  deps = stdenv.mkDerivation {
+    pname = "${pname}-deps";
+    inherit version;
+    nativeBuildInputs = [ coursier ];
+    buildCommand = ''
+      export COURSIER_CACHE=$(pwd)
+      cs fetch edu.berkeley.cs:${pname}_${scalaVersion}:${version} > deps
+      mkdir -p $out/share/java
+      cp $(< deps) $out/share/java
+    '';
+    outputHashMode = "recursive";
+    outputHash = "sha256-xy3zdJZk6Q2HbEn5tRQ9Z0AjyXEteXepoWDaATjiUUw=";
+  };
+
+  nativeBuildInputs = [ makeWrapper setJavaClassPath ];
+  buildInputs = [ deps ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    makeWrapper ${jre}/bin/java $out/bin/${pname} \
+      --add-flags "-cp $CLASSPATH firrtl.stage.FirrtlMain"
+
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/firrtl --firrtl-source "${''
+        circuit test:
+          module test:
+            input a: UInt<8>
+            input b: UInt<8>
+            output o: UInt
+            o <= add(a, not(b))
+      ''}" -o test.v
+    cat test.v
+    grep -qFe "module test" -e "endmodule" test.v
+  '';
+
+  meta = with lib; {
+    description = "Flexible Intermediate Representation for RTL";
+    longDescription = ''
+      Firrtl is an intermediate representation (IR) for digital circuits
+      designed as a platform for writing circuit-level transformations.
+    '';
+    homepage = "https://www.chisel-lang.org/firrtl/";
+    license = licenses.asl20;
+    maintainers =  with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/flasm/default.nix b/nixpkgs/pkgs/development/compilers/flasm/default.nix
new file mode 100644
index 000000000000..c1d2cfedc984
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flasm/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchzip, unzip, fetchpatch, bison, flex, gperf, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "flasm";
+  version = "1.64";
+
+  src = fetchzip {
+    url = "https://www.nowrap.de/download/flasm16src.zip";
+    sha256 = "03hvxm66rb6rjwbr07hc3k7ia5rim2xlhxbd9qmcai9xwmyiqafg";
+    stripRoot = false;
+  };
+
+  patches = [
+    # Pull patch pending upstream inclusion for -fno-common toolchains:
+    #  https://sourceforge.net/p/flasm/patches/2/
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://sourceforge.net/p/flasm/patches/2/attachment/0001-flasm-fix-build-on-gcc-10-fno-common.patch";
+      sha256 = "0ic7k1mmyvhpnxam89dbg8i9bfzk70zslfdxgpmkszx097bj1hv6";
+    })
+  ];
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  nativeBuildInputs = [ unzip bison flex gperf ];
+
+  buildInputs = [ zlib ];
+
+  installPhase = ''
+    install -Dm755 flasm -t $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Assembler and disassembler for Flash (SWF) bytecode";
+    homepage = "https://flasm.sourceforge.net/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ siraben ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/flix/default.nix b/nixpkgs/pkgs/development/compilers/flix/default.nix
new file mode 100644
index 000000000000..92216dccbf89
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flix/default.nix
@@ -0,0 +1,35 @@
+{ lib, fetchurl, stdenvNoCC, makeWrapper, jre }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "flix";
+  version = "0.44.0";
+
+  src = fetchurl {
+    url = "https://github.com/flix/flix/releases/download/v${version}/flix.jar";
+    sha256 = "sha256-osoUV05e1MCKs41j0dNIJi+0e7X+gHizgZSWicIJ678=";
+  };
+
+  dontUnpack = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    export JAR=$out/share/java/flix/flix.jar
+    install -D $src $JAR
+    makeWrapper ${jre}/bin/java $out/bin/flix \
+      --add-flags "-jar $JAR"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "The Flix Programming Language";
+    homepage = "https://github.com/flix/flix";
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    license = licenses.asl20;
+    maintainers = with maintainers; [ athas ];
+    inherit (jre.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix b/nixpkgs/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix
new file mode 100644
index 000000000000..0e1ce6e678cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix
@@ -0,0 +1,73 @@
+# Schema:
+# ${flutterVersion}.${targetPlatform}.${hostPlatform}
+#
+# aarch64-darwin as a host is not yet supported.
+# https://github.com/flutter/flutter/issues/60118
+{ lib
+, runCommand
+, xorg
+, cacert
+, unzip
+
+, flutterPlatform
+, systemPlatform
+, flutter
+, hash
+}:
+
+let
+  flutterPlatforms = [
+    "android"
+    "ios"
+    "web"
+    "linux"
+    "windows"
+    "macos"
+    "fuchsia"
+    "universal"
+  ];
+
+  flutter' = flutter.override {
+    # Use a version of Flutter with just enough capabilities to download
+    # artifacts.
+    supportedTargetFlutterPlatforms = [ ];
+
+    # Modify flutter-tool's system platform in order to get the desired platform's hashes.
+    flutter = flutter.unwrapped.override {
+      flutterTools = flutter.unwrapped.tools.override {
+        inherit systemPlatform;
+      };
+    };
+  };
+in
+runCommand "flutter-artifacts-${flutterPlatform}-${systemPlatform}"
+{
+  nativeBuildInputs = [ xorg.lndir flutter' unzip ];
+
+  NIX_FLUTTER_TOOLS_VM_OPTIONS = "--root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt";
+  NIX_FLUTTER_OPERATING_SYSTEM = {
+    "x86_64-linux" = "linux";
+    "aarch64-linux" = "linux";
+    "x86_64-darwin" = "macos";
+    "aarch64-darwin" = "macos";
+  }.${systemPlatform};
+
+  outputHash = hash;
+  outputHashMode = "recursive";
+  outputHashAlgo = "sha256";
+
+  passthru = {
+    inherit flutterPlatform;
+  };
+} ''
+  export FLUTTER_ROOT="$NIX_BUILD_TOP"
+  lndir -silent '${flutter'}' "$FLUTTER_ROOT"
+  rm -rf "$FLUTTER_ROOT/bin/cache"
+  mkdir "$FLUTTER_ROOT/bin/cache"
+
+  HOME="$(mktemp -d)" flutter precache -v '--${flutterPlatform}' ${builtins.concatStringsSep " " (map (p: "'--no-${p}'") (lib.remove flutterPlatform flutterPlatforms))}
+  rm -rf "$FLUTTER_ROOT/bin/cache/lockfile"
+  find "$FLUTTER_ROOT" -type l -lname '${flutter'}/*' -delete
+
+  cp -r bin/cache "$out"
+''
diff --git a/nixpkgs/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix b/nixpkgs/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix
new file mode 100644
index 000000000000..bc6114415b90
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix
@@ -0,0 +1,10 @@
+{ gtk3
+}:
+
+{ buildInputs ? [ ]
+, ...
+}:
+
+{
+  buildInputs = buildInputs ++ [ gtk3 ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix b/nixpkgs/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix
new file mode 100644
index 000000000000..def75e280da7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix
@@ -0,0 +1,26 @@
+{ lib
+, stdenv
+, callPackage
+, autoPatchelfHook
+, src
+}:
+
+(stdenv.mkDerivation {
+  inherit (src) name;
+  inherit src;
+
+  nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out/bin"
+    cp -r . "$out/bin/cache"
+
+    runHook postInstall
+  '';
+}).overrideAttrs (
+  if builtins.pathExists (./overrides + "/${src.flutterPlatform}.nix")
+  then callPackage (./overrides + "/${src.flutterPlatform}.nix") { }
+  else ({ ... }: { })
+)
diff --git a/nixpkgs/pkgs/development/compilers/flutter/default.nix b/nixpkgs/pkgs/development/compilers/flutter/default.nix
new file mode 100644
index 000000000000..6d2d90466033
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/default.nix
@@ -0,0 +1,72 @@
+{ callPackage, fetchzip, fetchFromGitHub, dart, lib, stdenv }:
+let
+  mkCustomFlutter = args: callPackage ./flutter.nix args;
+  wrapFlutter = flutter: callPackage ./wrapper.nix { inherit flutter; };
+  getPatches = dir:
+    let files = builtins.attrNames (builtins.readDir dir);
+    in if (builtins.pathExists dir) then map (f: dir + ("/" + f)) files else [ ];
+  mkFlutter =
+    { version
+    , engineVersion
+    , dartVersion
+    , flutterHash
+    , dartHash
+    , patches
+    , pubspecLock
+    , artifactHashes
+    }:
+    let
+      args = {
+        inherit version engineVersion patches pubspecLock artifactHashes;
+
+        dart = dart.override {
+          version = dartVersion;
+          sources = {
+            "${dartVersion}-x86_64-linux" = fetchzip {
+              url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
+              sha256 = dartHash.x86_64-linux;
+            };
+            "${dartVersion}-aarch64-linux" = fetchzip {
+              url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
+              sha256 = dartHash.aarch64-linux;
+            };
+            "${dartVersion}-x86_64-darwin" = fetchzip {
+              url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-macos-x64-release.zip";
+              sha256 = dartHash.x86_64-darwin;
+            };
+            "${dartVersion}-aarch64-darwin" = fetchzip {
+              url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-macos-arm64-release.zip";
+              sha256 = dartHash.aarch64-darwin;
+            };
+          };
+        };
+        src = fetchFromGitHub {
+          owner = "flutter";
+          repo = "flutter";
+          rev = version;
+          hash = flutterHash;
+        };
+      };
+    in
+    (mkCustomFlutter args).overrideAttrs (prev: next: {
+      passthru = next.passthru // rec {
+        inherit wrapFlutter mkCustomFlutter mkFlutter;
+        buildFlutterApplication = callPackage ../../../build-support/flutter { flutter = wrapFlutter (mkCustomFlutter args); };
+      };
+    });
+
+  flutterVersions = lib.mapAttrs'
+    (version: _:
+      let
+        versionDir = ./versions + "/${version}";
+        data = lib.importJSON (versionDir + "/data.json");
+      in
+      lib.nameValuePair "v${version}" (wrapFlutter (mkFlutter ({
+        patches = (getPatches ./patches) ++ (getPatches (versionDir + "/patches"));
+      } // data))))
+    (builtins.readDir ./versions);
+in
+flutterVersions // {
+  stable = flutterVersions.${lib.last (lib.naturalSort (builtins.attrNames flutterVersions))};
+  inherit wrapFlutter mkFlutter;
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/flutter-tools.nix b/nixpkgs/pkgs/development/compilers/flutter/flutter-tools.nix
new file mode 100644
index 000000000000..55fee5630c16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/flutter-tools.nix
@@ -0,0 +1,49 @@
+{ systemPlatform
+, buildDartApplication
+, git
+, which
+, dart
+, version
+, flutterSrc
+, patches ? [ ]
+, pubspecLock
+}:
+
+buildDartApplication.override { inherit dart; } rec {
+  pname = "flutter-tools";
+  inherit version;
+  dartOutputType = "jit-snapshot";
+
+  src = flutterSrc;
+  sourceRoot = "source/packages/flutter_tools";
+  postUnpack = ''chmod -R u+w "$NIX_BUILD_TOP/source"'';
+
+  inherit patches;
+  # The given patches are made for the entire SDK source tree.
+  prePatch = ''pushd "$NIX_BUILD_TOP/source"'';
+  postPatch = ''popd'';
+
+  # When the JIT snapshot is being built, the application needs to run.
+  # It attempts to generate configuration files, and relies on a few external
+  # tools.
+  nativeBuildInputs = [ git which ];
+  preConfigure = ''
+    export HOME=.
+    export FLUTTER_ROOT="$NIX_BUILD_TOP/source"
+    mkdir -p "$FLUTTER_ROOT/bin/cache"
+    ln -s '${dart}' "$FLUTTER_ROOT/bin/cache/dart-sdk"
+  '';
+
+  dartEntryPoints."flutter_tools.snapshot" = "bin/flutter_tools.dart";
+  dartCompileFlags = [ "--define=NIX_FLUTTER_HOST_PLATFORM=${systemPlatform}" ];
+
+  # The Dart wrapper launchers are useless for the Flutter tool - it is designed
+  # to be launched from a snapshot by the SDK.
+  postInstall = ''
+    pushd "$out"
+    rm ${builtins.concatStringsSep " " (builtins.attrNames dartEntryPoints)}
+    popd
+  '';
+
+  inherit pubspecLock;
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
new file mode 100644
index 000000000000..42129501ca12
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
@@ -0,0 +1,144 @@
+{ version
+, engineVersion
+, patches
+, dart
+, src
+, pubspecLock
+, artifactHashes ? null
+, lib
+, stdenv
+, callPackage
+, makeWrapper
+, darwin
+, git
+, which
+, jq
+, flutterTools ? callPackage ./flutter-tools.nix {
+    inherit dart version;
+    flutterSrc = src;
+    inherit patches;
+    inherit pubspecLock;
+    systemPlatform = stdenv.hostPlatform.system;
+  }
+}:
+
+let
+  unwrapped =
+    stdenv.mkDerivation {
+      name = "flutter-${version}-unwrapped";
+      inherit src patches version;
+
+      buildInputs = [ git ];
+      nativeBuildInputs = [ makeWrapper jq ]
+        ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
+
+      preConfigure = ''
+        if [ "$(< bin/internal/engine.version)" != '${engineVersion}' ]; then
+          echo 1>&2 "The given engine version (${engineVersion}) does not match the version required by the Flutter SDK ($(< bin/internal/engine.version))."
+          exit 1
+        fi
+      '';
+
+      postPatch = ''
+        patchShebangs --build ./bin/
+      '';
+
+      buildPhase = ''
+        # The flutter_tools package tries to run many Git commands. In most
+        # cases, unexpected output is handled gracefully, but commands are never
+        # expected to fail completely. A blank repository needs to be created.
+        rm -rf .git # Remove any existing Git directory
+        git init -b nixpkgs
+        GIT_AUTHOR_NAME=Nixpkgs GIT_COMMITTER_NAME=Nixpkgs \
+        GIT_AUTHOR_EMAIL= GIT_COMMITTER_EMAIL= \
+        GIT_AUTHOR_DATE='1/1/1970 00:00:00 +0000' GIT_COMMITTER_DATE='1/1/1970 00:00:00 +0000' \
+          git commit --allow-empty -m "Initial commit"
+        (. '${../../../build-support/fetchgit/deterministic-git}'; make_deterministic_repo .)
+
+        mkdir -p bin/cache
+
+        # Add a flutter_tools artifact stamp, and build a snapshot.
+        # This is the Flutter CLI application.
+        echo "$(git rev-parse HEAD)" > bin/cache/flutter_tools.stamp
+        ln -s '${flutterTools}/share/flutter_tools.snapshot' bin/cache/flutter_tools.snapshot
+
+        # Some of flutter_tools's dependencies contain static assets. The
+        # application attempts to read its own package_config.json to find these
+        # assets at runtime.
+        mkdir -p packages/flutter_tools/.dart_tool
+        ln -s '${flutterTools.pubcache}/package_config.json' packages/flutter_tools/.dart_tool/package_config.json
+
+        echo -n "${version}" > version
+        cat <<EOF > bin/cache/flutter.version.json
+        {
+          "devToolsVersion": "$(cat "${dart}/bin/resources/devtools/version.json" | jq -r .version)",
+          "flutterVersion": "${version}",
+          "frameworkVersion": "${version}",
+          "channel": "stable",
+          "repositoryUrl": "https://github.com/flutter/flutter.git",
+          "frameworkRevision": "nixpkgs000000000000000000000000000000000",
+          "frameworkCommitDate": "1970-01-01 00:00:00",
+          "engineRevision": "${engineVersion}",
+          "dartSdkVersion": "${dart.version}"
+        }
+        EOF
+      '';
+
+      installPhase = ''
+        runHook preInstall
+
+        mkdir -p $out
+        cp -r . $out
+        rm -rf $out/bin/cache/dart-sdk
+        ln -sf ${dart} $out/bin/cache/dart-sdk
+
+        # The regular launchers are designed to download/build/update SDK
+        # components, and are not very useful in Nix.
+        # Replace them with simple links and wrappers.
+        rm "$out/bin"/{dart,flutter}
+        ln -s "$out/bin/cache/dart-sdk/bin/dart" "$out/bin/dart"
+        makeShellWrapper "$out/bin/dart" "$out/bin/flutter" \
+          --set-default FLUTTER_ROOT "$out" \
+          --set FLUTTER_ALREADY_LOCKED true \
+          --add-flags "--disable-dart-dev \$NIX_FLUTTER_TOOLS_VM_OPTIONS $out/bin/cache/flutter_tools.snapshot"
+
+        runHook postInstall
+      '';
+
+      doInstallCheck = true;
+      nativeInstallCheckInputs = [ which ]
+        ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
+      installCheckPhase = ''
+        runHook preInstallCheck
+
+        export HOME="$(mktemp -d)"
+        $out/bin/flutter config --android-studio-dir $HOME
+        $out/bin/flutter config --android-sdk $HOME
+        $out/bin/flutter --version | fgrep -q '${builtins.substring 0 10 engineVersion}'
+
+        runHook postInstallCheck
+      '';
+
+      passthru = {
+        inherit dart engineVersion artifactHashes;
+        tools = flutterTools;
+        # The derivation containing the original Flutter SDK files.
+        # When other derivations wrap this one, any unmodified files
+        # found here should be included as-is, for tooling compatibility.
+        sdk = unwrapped;
+      };
+
+      meta = with 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" "aarch64-linux" "x86_64-darwin" ];
+        maintainers = with maintainers; [ babariviere ericdallo FlafyDev hacker1024 ];
+      };
+    };
+in
+unwrapped
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/copy-without-perms.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/copy-without-perms.patch
new file mode 100644
index 000000000000..281b3840891f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/copy-without-perms.patch
@@ -0,0 +1,17 @@
+diff --git a/packages/flutter_tools/lib/src/build_system/targets/assets.dart b/packages/flutter_tools/lib/src/build_system/targets/assets.dart
+index 5f458bd53e..7a6c59f98d 100644
+--- a/packages/flutter_tools/lib/src/build_system/targets/assets.dart
++++ b/packages/flutter_tools/lib/src/build_system/targets/assets.dart
+@@ -128,7 +128,11 @@ Future<Depfile> copyAssets(
+               break;
+           }
+           if (doCopy) {
+-            await (content.file as File).copy(file.path);
++            // Not using File.copy because it preserves permissions.
++            final sourceFile = content.file as File;
++            final destinationFile = file;
++
++            await destinationFile.writeAsBytes(await sourceFile.readAsBytes(), flush: true);
+           }
+         } else {
+           await file.writeAsBytes(await entry.value.contentsAsBytes());
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/deregister-pub-dependencies-artifact.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/deregister-pub-dependencies-artifact.patch
new file mode 100644
index 000000000000..01e34c6d292c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/deregister-pub-dependencies-artifact.patch
@@ -0,0 +1,19 @@
+diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart
+index 252021cf78..e50ef0885d 100644
+--- a/packages/flutter_tools/lib/src/flutter_cache.dart
++++ b/packages/flutter_tools/lib/src/flutter_cache.dart
+@@ -51,14 +51,6 @@ class FlutterCache extends Cache {
+       registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform));
+     }
+     registerArtifact(FontSubsetArtifacts(this, platform: platform));
+-    registerArtifact(PubDependencies(
+-      logger: logger,
+-      // flutter root and pub must be lazily initialized to avoid accessing
+-      // before the version is determined.
+-      flutterRoot: () => Cache.flutterRoot!,
+-      pub: () => pub,
+-      projectFactory: projectFactory,
+-    ));
+   }
+ }
+ 
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/disable-auto-update.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/disable-auto-update.patch
new file mode 100644
index 000000000000..05960c01b737
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/disable-auto-update.patch
@@ -0,0 +1,37 @@
+diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
+index b7e624b4e2..edfdde118b 100644
+--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
+@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
+ 
+     // Populate the cache. We call this before pub get below so that the
+     // sky_engine package is available in the flutter cache for pub to find.
+-    if (shouldUpdateCache) {
++    if (false) {
+       // First always update universal artifacts, as some of these (e.g.
+       // ios-deploy on macOS) are required to determine `requiredArtifacts`.
+       final bool offline;
+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 5d6d78639f..90a4dfa555 100644
+--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
+           globals.flutterUsage.suppressAnalytics = true;
+         }
+ 
+-        globals.flutterVersion.ensureVersionFile();
+         final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false;
+         final bool ci = await globals.botDetector.isRunningOnBot;
+         final bool redirectedCompletion = !globals.stdio.hasTerminal &&
+@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
+         final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false;
+         final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag;
+ 
+-        if (topLevelResults.command?.name != 'upgrade' &&
+-            (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) {
+-          await globals.flutterVersion.checkFlutterVersionFreshness();
+-        }
+-
+         // See if the user specified a specific device.
+         final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?;
+         if (specifiedDeviceId != null) {
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/dont-validate-executable-location.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/dont-validate-executable-location.patch
new file mode 100644
index 000000000000..5f391265ce15
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/dont-validate-executable-location.patch
@@ -0,0 +1,12 @@
+diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart
+index 651dc6cf36..236eb370e1 100644
+--- a/packages/flutter_tools/lib/src/doctor.dart
++++ b/packages/flutter_tools/lib/src/doctor.dart
+@@ -515,7 +515,6 @@ class FlutterValidator extends DoctorValidator {
+       final String flutterRoot = _flutterRoot();
+       messages.add(_getFlutterVersionMessage(frameworkVersion, versionChannel, flutterRoot));
+ 
+-      _validateRequiredBinaries(flutterRoot).forEach(messages.add);
+       messages.add(_getFlutterUpstreamMessage(version));
+       if (gitUrl != null) {
+         messages.add(ValidationMessage(_userMessages.flutterGitUrl(gitUrl)));
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/flutter-pub-dart-override.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/flutter-pub-dart-override.patch
new file mode 100644
index 000000000000..9d1de65c320d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/flutter-pub-dart-override.patch
@@ -0,0 +1,34 @@
+From ddb81649092776ecac635af7040685588798b5a5 Mon Sep 17 00:00:00 2001
+From: hacker1024 <hacker1024@users.sourceforge.net>
+Date: Sun, 27 Aug 2023 22:47:24 +1000
+Subject: [PATCH] Allow replacing the Dart binary used for Pub commands with
+ NIX_FLUTTER_PUB_DART
+
+---
+ packages/flutter_tools/lib/src/dart/pub.dart | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart
+index 40e60f9005..22fd3cebc7 100644
+--- a/packages/flutter_tools/lib/src/dart/pub.dart
++++ b/packages/flutter_tools/lib/src/dart/pub.dart
+@@ -3,6 +3,7 @@
+ // found in the LICENSE file.
+ 
+ import 'dart:async';
++import 'dart:io' as io;
+ 
+ import 'package:meta/meta.dart';
+ import 'package:package_config/package_config.dart';
+@@ -544,7 +545,7 @@ class _DefaultPub implements Pub {
+ 
+   List<String> _computePubCommand() {
+     // TODO(zanderso): refactor to use artifacts.
+-    final String sdkPath = _fileSystem.path.joinAll(<String>[
++    final String sdkPath = io.Platform.environment['NIX_FLUTTER_PUB_DART'] ?? _fileSystem.path.joinAll(<String>[
+       Cache.flutterRoot!,
+       'bin',
+       'cache',
+-- 
+2.41.0
+
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/git-dir.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/git-dir.patch
new file mode 100644
index 000000000000..6e6ae4e6fb98
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/git-dir.patch
@@ -0,0 +1,84 @@
+diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart
+index 9f33a22cc3..c46255742c 100644
+--- a/dev/bots/prepare_package.dart
++++ b/dev/bots/prepare_package.dart
+@@ -602,7 +602,7 @@ class ArchiveCreator {
+ 
+   Future<String> _runGit(List<String> args, {Directory? workingDirectory}) {
+     return _processRunner.runProcess(
+-      <String>['git', ...args],
++      <String>['git', '--git-dir', '.git', ...args],
+       workingDirectory: workingDirectory ?? flutterRoot,
+     );
+   }
+diff --git a/packages/flutter_tools/lib/src/commands/downgrade.dart b/packages/flutter_tools/lib/src/commands/downgrade.dart
+index a58b75c009..02da0daeb7 100644
+--- a/packages/flutter_tools/lib/src/commands/downgrade.dart
++++ b/packages/flutter_tools/lib/src/commands/downgrade.dart
+@@ -120,7 +120,7 @@ class DowngradeCommand extends FlutterCommand {
+     // Detect unknown versions.
+     final ProcessUtils processUtils = _processUtils!;
+     final RunResult parseResult = await processUtils.run(<String>[
+-      'git', 'describe', '--tags', lastFlutterVersion,
++      'git', '--git-dir', '.git', 'describe', '--tags', lastFlutterVersion,
+     ], workingDirectory: workingDirectory);
+     if (parseResult.exitCode != 0) {
+       throwToolExit('Failed to parse version for downgrade:\n${parseResult.stderr}');
+@@ -192,7 +192,7 @@ class DowngradeCommand extends FlutterCommand {
+         continue;
+       }
+       final RunResult parseResult = await _processUtils!.run(<String>[
+-        'git', 'describe', '--tags', sha,
++        'git', '--git-dir', '.git', 'describe', '--tags', sha,
+       ], workingDirectory: workingDirectory);
+       if (parseResult.exitCode == 0) {
+         buffer.writeln('Channel "${getNameForChannel(channel)}" was previously on: ${parseResult.stdout}.');
+diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart
+index 0702b35e7e..36b2a95b65 100644
+--- a/packages/flutter_tools/lib/src/version.dart
++++ b/packages/flutter_tools/lib/src/version.dart
+@@ -407,7 +407,7 @@ abstract class FlutterVersion {
+   /// wrapper that does that.
+   @visibleForTesting
+   static List<String> gitLog(List<String> args) {
+-    return <String>['git', '-c', 'log.showSignature=false', 'log'] + args;
++    return <String>['git', '--git-dir','.git', '-c', 'log.showSignature=false', 'log'] + args;
+   }
+ }
+ 
+@@ -559,7 +559,7 @@ class _FlutterVersionGit extends FlutterVersion {
+   String? get repositoryUrl {
+     if (_repositoryUrl == null) {
+       final String gitChannel = _runGit(
+-        'git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
++        'git --git-dir .git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
+         globals.processUtils,
+         flutterRoot,
+       );
+@@ -567,7 +567,7 @@ class _FlutterVersionGit extends FlutterVersion {
+       if (slash != -1) {
+         final String remote = gitChannel.substring(0, slash);
+         _repositoryUrl = _runGit(
+-          'git ls-remote --get-url $remote',
++          'git --git-dir .git ls-remote --get-url $remote',
+           globals.processUtils,
+           flutterRoot,
+         );
+@@ -952,7 +952,7 @@ class GitTagVersion {
+     }
+     // find all tags attached to the given [gitRef]
+     final List<String> tags = _runGit(
+-      'git tag --points-at $gitRef', processUtils, workingDirectory).trim().split('\n');
++      'git --git-dir .git tag --points-at $gitRef', processUtils, workingDirectory).trim().split('\n');
+ 
+     // Check first for a stable tag
+     final RegExp stableTagPattern = RegExp(r'^\d+\.\d+\.\d+$');
+@@ -973,7 +973,7 @@ class GitTagVersion {
+     // recent tag and number of commits past.
+     return parse(
+       _runGit(
+-        'git describe --match *.*.* --long --tags $gitRef',
++        'git --git-dir .git describe --match *.*.* --long --tags $gitRef',
+         processUtils,
+         workingDirectory,
+       )
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/override-host-platform.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/override-host-platform.patch
new file mode 100644
index 000000000000..51dcfdb5cc57
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/override-host-platform.patch
@@ -0,0 +1,21 @@
+diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart
+index 1ce1951cef..1bd7602318 100644
+--- a/packages/flutter_tools/lib/src/base/os.dart
++++ b/packages/flutter_tools/lib/src/base/os.dart
+@@ -260,7 +260,15 @@ class _PosixUtils extends OperatingSystemUtils {
+   @override
+   String get pathVarSeparator => ':';
+ 
+-  HostPlatform? _hostPlatform;
++  // uname outputs build platform characteristics, not host platform characteristics.
++  // _MacOSUtils uses sysctl instead, which is still incorrect.
++  HostPlatform? _hostPlatform = switch (const String.fromEnvironment('NIX_FLUTTER_HOST_PLATFORM')) {
++    'x86_64-linux' => HostPlatform.linux_x64,
++    'aarch64-linux' => HostPlatform.linux_arm64,
++    'x86_64-darwin' => HostPlatform.darwin_x64,
++    'arm64-darwin' => HostPlatform.darwin_arm64,
++    String value => throw ArgumentError.value(value, 'NIX_FLUTTER_HOST_PLATFORM', 'Unknown Nix host platform!'),
++  };
+ 
+   @override
+   HostPlatform get hostPlatform {
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/override-operating-system.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/override-operating-system.patch
new file mode 100644
index 000000000000..07d57175bd9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/override-operating-system.patch
@@ -0,0 +1,13 @@
+diff --git a/packages/flutter_tools/lib/src/base/platform.dart b/packages/flutter_tools/lib/src/base/platform.dart
+index 45da89ad4c..2d79dbaece 100644
+--- a/packages/flutter_tools/lib/src/base/platform.dart
++++ b/packages/flutter_tools/lib/src/base/platform.dart
+@@ -132,7 +132,7 @@ class LocalPlatform extends Platform {
+   String get pathSeparator => io.Platform.pathSeparator;
+
+   @override
+-  String get operatingSystem => io.Platform.operatingSystem;
++  String get operatingSystem => io.Platform.environment['NIX_FLUTTER_OPERATING_SYSTEM'] ?? io.Platform.operatingSystem;
+
+   @override
+   String get operatingSystemVersion => io.Platform.operatingSystemVersion;
diff --git a/nixpkgs/pkgs/development/compilers/flutter/sdk-symlink.nix b/nixpkgs/pkgs/development/compilers/flutter/sdk-symlink.nix
new file mode 100644
index 000000000000..044a508805f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/sdk-symlink.nix
@@ -0,0 +1,37 @@
+{ symlinkJoin
+, makeWrapper
+}: flutter:
+
+let
+  self =
+    symlinkJoin {
+      name = "${flutter.name}-sdk-links";
+      paths = [ flutter flutter.cacheDir flutter.sdk ];
+
+      nativeBuildInputs = [ makeWrapper ];
+      postBuild = ''
+        wrapProgram "$out/bin/flutter" \
+          --set-default FLUTTER_ROOT "$out"
+
+        # symlinkJoin seems to be missing the .git directory for some reason.
+        if [ -d '${flutter.sdk}/.git' ]; then
+          ln -s '${flutter.sdk}/.git' "$out"
+        fi
+      '';
+
+      passthru = flutter.passthru // {
+        # Update the SDK attribute.
+        # This allows any modified SDK files to be included
+        # in future invocations.
+        sdk = self;
+      };
+
+      meta = flutter.meta // {
+        longDescription = ''
+          ${flutter.meta.longDescription}
+          Modified binaries are linked into the original SDK directory for use with tools that use the whole SDK.
+        '';
+      };
+    };
+in
+self
diff --git a/nixpkgs/pkgs/development/compilers/flutter/update/get-artifact-hashes.nix.in b/nixpkgs/pkgs/development/compilers/flutter/update/get-artifact-hashes.nix.in
new file mode 100644
index 000000000000..069bcdb95718
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/update/get-artifact-hashes.nix.in
@@ -0,0 +1,48 @@
+{ callPackage
+, flutterPackages
+, lib
+, symlinkJoin
+,
+}:
+let
+  nixpkgsRoot = "@nixpkgs_root@";
+  flutterCompactVersion = "@flutter_compact_version@";
+
+  flutterPlatforms = [
+    "android"
+    "ios"
+    "web"
+    "linux"
+    "windows"
+    "macos"
+    "fuchsia"
+    "universal"
+  ];
+  systemPlatforms = [
+    "x86_64-linux"
+    "aarch64-linux"
+    "x86_64-darwin"
+  ];
+
+  derivations =
+    lib.foldl'
+      (
+        acc: flutterPlatform:
+          acc
+          ++ (map
+            (systemPlatform:
+              callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix" {
+                flutter = flutterPackages."v${flutterCompactVersion}";
+                inherit flutterPlatform;
+                inherit systemPlatform;
+                hash = lib.fakeSha256;
+              })
+            systemPlatforms)
+      ) [ ]
+      flutterPlatforms;
+in
+symlinkJoin {
+  name = "evaluate-derivations";
+  paths = derivations;
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/flutter/update/get-dart-hashes.nix.in b/nixpkgs/pkgs/development/compilers/flutter/update/get-dart-hashes.nix.in
new file mode 100644
index 000000000000..f900c863195a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/update/get-dart-hashes.nix.in
@@ -0,0 +1,26 @@
+let
+  dartVersion = "@dart_version@";
+  platform = "@platform@";
+in
+{
+  x86_64-linux = { fetchzip }:
+    fetchzip {
+      url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
+      sha256 = "0000000000000000000000000000000000000000000000000000";
+    };
+  aarch64-linux = { fetchzip }:
+    fetchzip {
+      url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
+      sha256 = "0000000000000000000000000000000000000000000000000000";
+    };
+  x86_64-darwin = { fetchzip }:
+    fetchzip {
+      url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-macos-x64-release.zip";
+      sha256 = "0000000000000000000000000000000000000000000000000000";
+    };
+  aarch64-darwin = { fetchzip }:
+    fetchzip {
+      url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-macos-arm64-release.zip";
+      sha256 = "0000000000000000000000000000000000000000000000000000";
+    };
+}.${platform}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/update/get-flutter.nix.in b/nixpkgs/pkgs/development/compilers/flutter/update/get-flutter.nix.in
new file mode 100644
index 000000000000..81680797229b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/update/get-flutter.nix.in
@@ -0,0 +1,7 @@
+{ fetchFromGitHub }:
+fetchFromGitHub {
+  owner = "flutter";
+  repo = "flutter";
+  rev = "@flutter_version@";
+  hash = "@hash@";
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/update/get-pubspec-lock.nix.in b/nixpkgs/pkgs/development/compilers/flutter/update/get-pubspec-lock.nix.in
new file mode 100644
index 000000000000..ff72046bcecb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/update/get-pubspec-lock.nix.in
@@ -0,0 +1,30 @@
+{ flutterPackages
+, stdenv
+, cacert
+,
+}:
+let
+  flutterCompactVersion = "@flutter_compact_version@";
+  inherit (flutterPackages."v${flutterCompactVersion}") dart;
+in
+stdenv.mkDerivation {
+  name = "pubspec-lock";
+  src = @flutter_src@;
+
+  nativeBuildInputs = [ dart ];
+
+  outputHashAlgo = "sha256";
+  outputHashMode = "recursive";
+  outputHash = "@hash@";
+
+  buildPhase = ''
+    cd ./packages/flutter_tools
+
+    export HOME="$(mktemp -d)"
+    dart --root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt pub get -v
+  '';
+
+  installPhase = ''
+    cp -r ./pubspec.lock $out
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/update/update.py b/nixpkgs/pkgs/development/compilers/flutter/update/update.py
new file mode 100755
index 000000000000..618fae5468e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/update/update.py
@@ -0,0 +1,339 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i python3 -p python3Packages.pyyaml
+
+import shutil
+import json
+import urllib.request
+import tempfile
+from sys import exit
+import os
+import subprocess
+import re
+import json
+import argparse
+import yaml
+import json
+
+
+NIXPKGS_ROOT = subprocess.Popen(['git',
+                                 'rev-parse',
+                                 '--show-toplevel'],
+                                stdout=subprocess.PIPE,
+                                text=True).communicate()[0].strip()
+
+
+def load_code(name, **kwargs):
+    with open(f"{NIXPKGS_ROOT}/pkgs/development/compilers/flutter/update/{name}.in", 'r') as f:
+        code = f.read()
+
+    for (key, value) in kwargs.items():
+        code = code.replace(f"@{key}@", value)
+
+    return code
+
+
+# Return out paths
+def nix_build(code):
+    temp = tempfile.NamedTemporaryFile(mode='w')
+    temp.write(code)
+    temp.flush()
+    os.fsync(temp.fileno())
+
+    process = subprocess.Popen(
+        [
+            "nix-build",
+            "--impure",
+            "--no-out-link",
+            "--expr",
+            f"with import {NIXPKGS_ROOT} {{}}; callPackage {temp.name} {{}}"],
+        stdout=subprocess.PIPE,
+        text=True)
+
+    process.wait()
+    temp.close()
+    return process.stdout.read().strip().splitlines()[0]
+
+
+# Return errors
+def nix_build_to_fail(code):
+    temp = tempfile.NamedTemporaryFile(mode='w')
+    temp.write(code)
+    temp.flush()
+    os.fsync(temp.fileno())
+
+    process = subprocess.Popen(
+        [
+            "nix-build",
+            "--impure",
+            "--keep-going",
+            "--no-link",
+            "--expr",
+            f"with import {NIXPKGS_ROOT} {{}}; callPackage {temp.name} {{}}"],
+        stderr=subprocess.PIPE,
+        text=True)
+
+    stderr = ""
+    while True:
+        line = process.stderr.readline()
+        if not line:
+            break
+        stderr += line
+        print(line.strip())
+
+    process.wait()
+    temp.close()
+    return stderr
+
+
+def get_artifact_hashes(flutter_compact_version):
+    code = load_code("get-artifact-hashes.nix",
+                     nixpkgs_root=NIXPKGS_ROOT,
+                     flutter_compact_version=flutter_compact_version)
+
+    stderr = nix_build_to_fail(code)
+
+    pattern = re.compile(
+        r"/nix/store/.*-flutter-artifacts-(.+?)-(.+?).drv':\n\s+specified: .*\n\s+got:\s+(.+?)\n")
+    matches = pattern.findall(stderr)
+    result_dict = {}
+
+    for match in matches:
+        flutter_platform, architecture, got = match
+        result_dict.setdefault(flutter_platform, {})[architecture] = got
+
+    def sort_dict_recursive(d):
+        return {
+            k: sort_dict_recursive(v) if isinstance(
+                v, dict) else v for k, v in sorted(
+                d.items())}
+    result_dict = sort_dict_recursive(result_dict)
+
+    return result_dict
+
+
+def get_dart_hashes(dart_version):
+    platforms = [
+        "x86_64-linux",
+        "aarch64-linux",
+        "x86_64-darwin",
+        "aarch64-darwin"]
+    result_dict = {}
+    for platform in platforms:
+        code = load_code(
+            "get-dart-hashes.nix",
+            dart_version=dart_version,
+            platform=platform)
+        stderr = nix_build_to_fail(code)
+
+        pattern = re.compile(r"got:\s+(.+?)\n")
+        result_dict[platform] = pattern.findall(stderr)[0]
+
+    return result_dict
+
+
+def get_flutter_hash_and_src(flutter_version):
+    code = load_code(
+        "get-flutter.nix",
+        flutter_version=flutter_version,
+        hash="")
+
+    stderr = nix_build_to_fail(code)
+    pattern = re.compile(r"got:\s+(.+?)\n")
+    hash = pattern.findall(stderr)[0]
+
+    code = load_code(
+        "get-flutter.nix",
+        flutter_version=flutter_version,
+        hash=hash)
+
+    return (hash, nix_build(code))
+
+
+def get_pubspec_lock(flutter_compact_version, flutter_src):
+    code = load_code(
+        "get-pubspec-lock.nix",
+        flutter_compact_version=flutter_compact_version,
+        flutter_src=flutter_src,
+        hash="")
+
+    stderr = nix_build_to_fail(code)
+    pattern = re.compile(r"got:\s+(.+?)\n")
+    hash = pattern.findall(stderr)[0]
+
+    code = load_code(
+        "get-pubspec-lock.nix",
+        flutter_compact_version=flutter_compact_version,
+        flutter_src=flutter_src,
+        hash=hash)
+
+    pubspec_lock_file = nix_build(code)
+
+    with open(pubspec_lock_file, 'r') as f:
+        pubspec_lock_yaml = f.read()
+
+    return yaml.safe_load(pubspec_lock_yaml)
+
+
+def write_data(
+        nixpkgs_flutter_version_directory,
+        flutter_version,
+        engine_hash,
+        dart_version,
+        dart_hash,
+        flutter_hash,
+        artifact_hashes,
+        pubspec_lock):
+    with open(f"{nixpkgs_flutter_version_directory}/data.json", "w") as f:
+        f.write(json.dumps({
+            "version": flutter_version,
+            "engineVersion": engine_hash,
+            "dartVersion": dart_version,
+            "dartHash": dart_hash,
+            "flutterHash": flutter_hash,
+            "artifactHashes": artifact_hashes,
+            "pubspecLock": pubspec_lock,
+        }, indent=2).strip() + "\n")
+
+
+def update_all_packages():
+    versions_directory = f"{NIXPKGS_ROOT}/pkgs/development/compilers/flutter/versions"
+    versions = [directory for directory in os.listdir(versions_directory)]
+    versions = sorted(versions, key=lambda x: (
+        int(x.split('_')[0]), int(x.split('_')[1])), reverse=True)
+
+    new_content = [
+        "flutterPackages = recurseIntoAttrs (callPackage ../development/compilers/flutter { });",
+        "flutter = flutterPackages.stable;",
+    ] + [f"flutter{version.replace('_', '')} = flutterPackages.v{version};" for version in versions]
+
+    with open(f"{NIXPKGS_ROOT}/pkgs/top-level/all-packages.nix", 'r') as file:
+        lines = file.read().splitlines(keepends=True)
+
+    start = -1
+    end = -1
+    for i, line in enumerate(lines):
+        if "flutterPackages = recurseIntoAttrs (callPackage ../development/compilers/flutter { });" in line:
+            start = i
+        if start != -1 and len(line.strip()) == 0:
+            end = i
+            break
+
+    if start != -1 and end != -1:
+        del lines[start:end]
+        lines[start:start] = [f"  {l}\n" for l in new_content]
+
+    with open(f"{NIXPKGS_ROOT}/pkgs/top-level/all-packages.nix", 'w') as file:
+        file.write("".join(lines))
+
+
+# Finds Flutter version, Dart version, and Engine hash.
+# If the Flutter version is given, it uses that. Otherwise finds the
+# latest stable Flutter version.
+def find_versions(flutter_version=None):
+    engine_hash = None
+    dart_version = None
+
+    releases = json.load(urllib.request.urlopen(
+        "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json"))
+
+    if not flutter_version:
+        stable_hash = releases['current_release']['stable']
+        release = next(
+            filter(
+                lambda release: release['hash'] == stable_hash,
+                releases['releases']))
+        flutter_version = release['version']
+
+    tags = subprocess.Popen(['git',
+                             'ls-remote',
+                             '--tags',
+                             'https://github.com/flutter/engine.git'],
+                            stdout=subprocess.PIPE,
+                            text=True).communicate()[0].strip()
+
+    try:
+        engine_hash = next(
+            filter(
+                lambda line: line.endswith(f'refs/tags/{flutter_version}'),
+                tags.splitlines())).split('refs')[0].strip()
+    except StopIteration:
+        exit(
+            f"Couldn't find Engine hash for Flutter version: {flutter_version}")
+
+    try:
+        dart_version = next(
+            filter(
+                lambda release: release['version'] == flutter_version,
+                releases['releases']))['dart_sdk_version']
+    except StopIteration:
+        exit(
+            f"Couldn't find Dart version for Flutter version: {flutter_version}")
+
+    return (flutter_version, engine_hash, dart_version)
+
+
+def main():
+    parser = argparse.ArgumentParser(description='Update Flutter in Nixpkgs')
+    parser.add_argument('--version', type=str, help='Specify Flutter version')
+    parser.add_argument('--artifact-hashes', action='store_true',
+                        help='Whether to get artifact hashes')
+    args = parser.parse_args()
+
+    (flutter_version, engine_hash, dart_version) = find_versions(args.version)
+
+    flutter_compact_version = '_'.join(flutter_version.split('.')[:2])
+
+    if args.artifact_hashes:
+        print(
+            json.dumps(
+                get_artifact_hashes(flutter_compact_version),
+                indent=2).strip() +
+            "\n")
+        return
+
+    print(f"Flutter version: {flutter_version} ({flutter_compact_version})")
+    print(f"Engine hash: {engine_hash}")
+    print(f"Dart version: {dart_version}")
+
+    dart_hash = get_dart_hashes(dart_version)
+    (flutter_hash, flutter_src) = get_flutter_hash_and_src(flutter_version)
+
+    nixpkgs_flutter_version_directory = f"{NIXPKGS_ROOT}/pkgs/development/compilers/flutter/versions/{flutter_compact_version}"
+
+    if os.path.exists(f"{nixpkgs_flutter_version_directory}/data.json"):
+        os.remove(f"{nixpkgs_flutter_version_directory}/data.json")
+    os.makedirs(nixpkgs_flutter_version_directory, exist_ok=True)
+
+    update_all_packages()
+
+    common_data_args = {
+        "nixpkgs_flutter_version_directory": nixpkgs_flutter_version_directory,
+        "flutter_version": flutter_version,
+        "dart_version": dart_version,
+        "engine_hash": engine_hash,
+        "flutter_hash": flutter_hash,
+        "dart_hash": dart_hash,
+    }
+
+    write_data(
+        pubspec_lock={},
+        artifact_hashes={},
+        **common_data_args)
+
+    pubspec_lock = get_pubspec_lock(flutter_compact_version, flutter_src)
+
+    write_data(
+        pubspec_lock=pubspec_lock,
+        artifact_hashes={},
+        **common_data_args)
+
+    artifact_hashes = get_artifact_hashes(flutter_compact_version)
+
+    write_data(
+        pubspec_lock=pubspec_lock,
+        artifact_hashes=artifact_hashes,
+        **common_data_args)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/nixpkgs/pkgs/development/compilers/flutter/versions/3_13/data.json b/nixpkgs/pkgs/development/compilers/flutter/versions/3_13/data.json
new file mode 100644
index 000000000000..72e002f144d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_13/data.json
@@ -0,0 +1,901 @@
+{
+  "version": "3.13.8",
+  "engineVersion": "767d8c75e898091b925519803830fc2721658d07",
+  "dartVersion": "3.1.4",
+  "dartHash": {
+    "x86_64-linux": "sha256-42wrqzjRcFDWw2aEY6+/faX+QE9PA8FmRWP4M/NkgBE=",
+    "aarch64-linux": "sha256-/tWWWwTOgXHbwzotc7ZDDZa8+cbX6NODGYrjLK9gPPg=",
+    "x86_64-darwin": "sha256-BchKowKd6BscVuk/dXibcQzdFkW9//GDfll77mHEI4M=",
+    "aarch64-darwin": "sha256-9yrx09vYrOTmdqkfJI7mfh7DI1/rg67tPlf82m5+iKI="
+  },
+  "flutterHash": "sha256-00G030FvZZTsdf9ruFs9jdIHcC5h+xpp4NlmL64qVZA=",
+  "artifactHashes": {
+    "android": {
+      "x86_64-linux": "sha256-Uc36aBq8wQo2aEvjAPOoixZElWOE/GNRm2GUfhbwT3Y=",
+      "aarch64-linux": "sha256-Uc36aBq8wQo2aEvjAPOoixZElWOE/GNRm2GUfhbwT3Y=",
+      "x86_64-darwin": "sha256-v/6/GTj7732fEOIgSaoM00yaw2qNwOMuvbuoCvii7vQ="
+    },
+    "fuchsia": {
+      "x86_64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "aarch64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
+    },
+    "ios": {
+      "x86_64-linux": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao=",
+      "aarch64-linux": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao=",
+      "x86_64-darwin": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao="
+    },
+    "linux": {
+      "x86_64-linux": "sha256-0gIOwux3YBdmcXgwICr8dpftj1CauaBUX8Rt5GG0WSs=",
+      "aarch64-linux": "sha256-drGHsuJoOCLqrhVrXczqJRCOtpeWVlqdWW0OSMS/l5M=",
+      "x86_64-darwin": "sha256-0gIOwux3YBdmcXgwICr8dpftj1CauaBUX8Rt5GG0WSs="
+    },
+    "macos": {
+      "x86_64-linux": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc=",
+      "aarch64-linux": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc=",
+      "x86_64-darwin": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc="
+    },
+    "universal": {
+      "x86_64-linux": "sha256-wATt1UPjo/fh7RFO1vvcUAdo0dMAaaOUIuzYodsM0v0=",
+      "aarch64-linux": "sha256-Z9bszNaIpCccG7OfvE5WFsw36dITiyCQAZ6p29+Yq68=",
+      "x86_64-darwin": "sha256-qN5bAXRfQ78TWF3FLBIxWzUB5y5OrZVQTEilY5J/+2k="
+    },
+    "web": {
+      "x86_64-linux": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0=",
+      "aarch64-linux": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0=",
+      "x86_64-darwin": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0="
+    },
+    "windows": {
+      "x86_64-linux": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI=",
+      "aarch64-linux": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI=",
+      "x86_64-darwin": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI="
+    }
+  },
+  "pubspecLock": {
+    "packages": {
+      "_fe_analyzer_shared": {
+        "dependency": "direct main",
+        "description": {
+          "name": "_fe_analyzer_shared",
+          "sha256": "ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "61.0.0"
+      },
+      "analyzer": {
+        "dependency": "direct main",
+        "description": {
+          "name": "analyzer",
+          "sha256": "ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.13.0"
+      },
+      "archive": {
+        "dependency": "direct main",
+        "description": {
+          "name": "archive",
+          "sha256": "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.3.2"
+      },
+      "args": {
+        "dependency": "direct main",
+        "description": {
+          "name": "args",
+          "sha256": "eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.4.2"
+      },
+      "async": {
+        "dependency": "direct main",
+        "description": {
+          "name": "async",
+          "sha256": "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.11.0"
+      },
+      "boolean_selector": {
+        "dependency": "direct main",
+        "description": {
+          "name": "boolean_selector",
+          "sha256": "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.1"
+      },
+      "browser_launcher": {
+        "dependency": "direct main",
+        "description": {
+          "name": "browser_launcher",
+          "sha256": "6ee4c6b1f68a42e769ef6e663c4f56708522f7bce9d2ab6e308a37b612ffa4ec",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.1"
+      },
+      "built_collection": {
+        "dependency": "direct main",
+        "description": {
+          "name": "built_collection",
+          "sha256": "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.1.1"
+      },
+      "built_value": {
+        "dependency": "direct main",
+        "description": {
+          "name": "built_value",
+          "sha256": "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "8.6.1"
+      },
+      "checked_yaml": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "checked_yaml",
+          "sha256": "feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.3"
+      },
+      "clock": {
+        "dependency": "direct main",
+        "description": {
+          "name": "clock",
+          "sha256": "cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.1"
+      },
+      "collection": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "collection",
+          "sha256": "f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.17.2"
+      },
+      "completion": {
+        "dependency": "direct main",
+        "description": {
+          "name": "completion",
+          "sha256": "f11b7a628e6c42b9edc9b0bc3aa490e2d930397546d2f794e8e1325909d11c60",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.1"
+      },
+      "convert": {
+        "dependency": "direct main",
+        "description": {
+          "name": "convert",
+          "sha256": "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.1"
+      },
+      "coverage": {
+        "dependency": "direct main",
+        "description": {
+          "name": "coverage",
+          "sha256": "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.6.3"
+      },
+      "crypto": {
+        "dependency": "direct main",
+        "description": {
+          "name": "crypto",
+          "sha256": "ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.3"
+      },
+      "csslib": {
+        "dependency": "direct main",
+        "description": {
+          "name": "csslib",
+          "sha256": "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.0"
+      },
+      "dap": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dap",
+          "sha256": "2120d4a8cbad45e5dbd518b713e8f064274e0a4c0e3edcaef1f4cf9ccbc90cd9",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.0"
+      },
+      "dds": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dds",
+          "sha256": "397c3c80919ee187b2efc28205af3c0378b6b757ea6d059083dece145a2e31e9",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.9.0+hotfix"
+      },
+      "dds_service_extensions": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dds_service_extensions",
+          "sha256": "9ac669bef49a4c13ed62073685089be121200fb213800ec59c202e90d569ea44",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.5.0"
+      },
+      "devtools_shared": {
+        "dependency": "direct main",
+        "description": {
+          "name": "devtools_shared",
+          "sha256": "ad58ac3a5df41adf08d0d6f0a4d73349533edcc383ee93a30ac3d0fd0bb6df49",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.24.0"
+      },
+      "dwds": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dwds",
+          "sha256": "b6dad73ae56f00bff7647f531b9db018005f713328e816e7a277b544184e9170",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "19.0.1+1"
+      },
+      "fake_async": {
+        "dependency": "direct main",
+        "description": {
+          "name": "fake_async",
+          "sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.3.1"
+      },
+      "file": {
+        "dependency": "direct main",
+        "description": {
+          "name": "file",
+          "sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.1.4"
+      },
+      "file_testing": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "file_testing",
+          "sha256": "0aaadb4025bd350403f4308ad6c4cea953278d9407814b8342558e4946840fb5",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.0"
+      },
+      "fixnum": {
+        "dependency": "direct main",
+        "description": {
+          "name": "fixnum",
+          "sha256": "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.0"
+      },
+      "flutter_template_images": {
+        "dependency": "direct main",
+        "description": {
+          "name": "flutter_template_images",
+          "sha256": "fd3e55af73c577b9e3f88d4080d3e366cb5c8ef3fbd50b94dfeca56bb0235df6",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.2.0"
+      },
+      "frontend_server_client": {
+        "dependency": "direct main",
+        "description": {
+          "name": "frontend_server_client",
+          "sha256": "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.2.0"
+      },
+      "glob": {
+        "dependency": "direct main",
+        "description": {
+          "name": "glob",
+          "sha256": "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.2"
+      },
+      "html": {
+        "dependency": "direct main",
+        "description": {
+          "name": "html",
+          "sha256": "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.15.4"
+      },
+      "http": {
+        "dependency": "direct main",
+        "description": {
+          "name": "http",
+          "sha256": "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.13.6"
+      },
+      "http_multi_server": {
+        "dependency": "direct main",
+        "description": {
+          "name": "http_multi_server",
+          "sha256": "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.2.1"
+      },
+      "http_parser": {
+        "dependency": "direct main",
+        "description": {
+          "name": "http_parser",
+          "sha256": "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.0.2"
+      },
+      "intl": {
+        "dependency": "direct main",
+        "description": {
+          "name": "intl",
+          "sha256": "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.18.1"
+      },
+      "io": {
+        "dependency": "direct main",
+        "description": {
+          "name": "io",
+          "sha256": "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "js": {
+        "dependency": "direct main",
+        "description": {
+          "name": "js",
+          "sha256": "f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.6.7"
+      },
+      "json_annotation": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "json_annotation",
+          "sha256": "b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.8.1"
+      },
+      "json_rpc_2": {
+        "dependency": "direct main",
+        "description": {
+          "name": "json_rpc_2",
+          "sha256": "5e469bffa23899edacb7b22787780068d650b106a21c76db3c49218ab7ca447e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.2"
+      },
+      "logging": {
+        "dependency": "direct main",
+        "description": {
+          "name": "logging",
+          "sha256": "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.0"
+      },
+      "matcher": {
+        "dependency": "direct main",
+        "description": {
+          "name": "matcher",
+          "sha256": "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.12.16"
+      },
+      "meta": {
+        "dependency": "direct main",
+        "description": {
+          "name": "meta",
+          "sha256": "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.9.1"
+      },
+      "mime": {
+        "dependency": "direct main",
+        "description": {
+          "name": "mime",
+          "sha256": "e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "multicast_dns": {
+        "dependency": "direct main",
+        "description": {
+          "name": "multicast_dns",
+          "sha256": "80e54aba906a7cc68fdc6a201e76b135af27155e2f8e958181d85e2b73786591",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.3.2+3"
+      },
+      "mustache_template": {
+        "dependency": "direct main",
+        "description": {
+          "name": "mustache_template",
+          "sha256": "a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.0"
+      },
+      "native_stack_traces": {
+        "dependency": "direct main",
+        "description": {
+          "name": "native_stack_traces",
+          "sha256": "c797830b9910d13b0f4e70ddef15cde034214fe3bdb8092c4ea5ffad2f74013f",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.5.6"
+      },
+      "node_preamble": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "node_preamble",
+          "sha256": "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.2"
+      },
+      "package_config": {
+        "dependency": "direct main",
+        "description": {
+          "name": "package_config",
+          "sha256": "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.0"
+      },
+      "path": {
+        "dependency": "direct main",
+        "description": {
+          "name": "path",
+          "sha256": "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.8.3"
+      },
+      "petitparser": {
+        "dependency": "direct main",
+        "description": {
+          "name": "petitparser",
+          "sha256": "cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.4.0"
+      },
+      "platform": {
+        "dependency": "direct main",
+        "description": {
+          "name": "platform",
+          "sha256": "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.0"
+      },
+      "pool": {
+        "dependency": "direct main",
+        "description": {
+          "name": "pool",
+          "sha256": "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.5.1"
+      },
+      "process": {
+        "dependency": "direct main",
+        "description": {
+          "name": "process",
+          "sha256": "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.2.4"
+      },
+      "pub_semver": {
+        "dependency": "direct main",
+        "description": {
+          "name": "pub_semver",
+          "sha256": "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.4"
+      },
+      "pubspec_parse": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "pubspec_parse",
+          "sha256": "c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.3"
+      },
+      "shelf": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf",
+          "sha256": "ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.4.1"
+      },
+      "shelf_packages_handler": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_packages_handler",
+          "sha256": "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.2"
+      },
+      "shelf_proxy": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_proxy",
+          "sha256": "a71d2307f4393211930c590c3d2c00630f6c5a7a77edc1ef6436dfd85a6a7ee3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "shelf_static": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_static",
+          "sha256": "a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.2"
+      },
+      "shelf_web_socket": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_web_socket",
+          "sha256": "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "source_map_stack_trace": {
+        "dependency": "direct main",
+        "description": {
+          "name": "source_map_stack_trace",
+          "sha256": "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.1"
+      },
+      "source_maps": {
+        "dependency": "direct main",
+        "description": {
+          "name": "source_maps",
+          "sha256": "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.10.12"
+      },
+      "source_span": {
+        "dependency": "direct main",
+        "description": {
+          "name": "source_span",
+          "sha256": "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.10.0"
+      },
+      "sse": {
+        "dependency": "direct main",
+        "description": {
+          "name": "sse",
+          "sha256": "3ff9088cac3f45aa8b91336f1962e3ea6c81baaba0bbba361c05f8aa7fb59442",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.1.2"
+      },
+      "stack_trace": {
+        "dependency": "direct main",
+        "description": {
+          "name": "stack_trace",
+          "sha256": "c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.11.0"
+      },
+      "standard_message_codec": {
+        "dependency": "direct main",
+        "description": {
+          "name": "standard_message_codec",
+          "sha256": "906e66549f0ea90d87c5320e0b0f04738c5d14bc7fb121a15da31b60e84f5b15",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.0.1+3"
+      },
+      "stream_channel": {
+        "dependency": "direct main",
+        "description": {
+          "name": "stream_channel",
+          "sha256": "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.1"
+      },
+      "string_scanner": {
+        "dependency": "direct main",
+        "description": {
+          "name": "string_scanner",
+          "sha256": "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.0"
+      },
+      "sync_http": {
+        "dependency": "direct main",
+        "description": {
+          "name": "sync_http",
+          "sha256": "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.3.1"
+      },
+      "term_glyph": {
+        "dependency": "direct main",
+        "description": {
+          "name": "term_glyph",
+          "sha256": "a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.1"
+      },
+      "test": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "test",
+          "sha256": "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.24.3"
+      },
+      "test_api": {
+        "dependency": "direct main",
+        "description": {
+          "name": "test_api",
+          "sha256": "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.6.0"
+      },
+      "test_core": {
+        "dependency": "direct main",
+        "description": {
+          "name": "test_core",
+          "sha256": "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.5.3"
+      },
+      "typed_data": {
+        "dependency": "direct main",
+        "description": {
+          "name": "typed_data",
+          "sha256": "facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.3.2"
+      },
+      "unified_analytics": {
+        "dependency": "direct main",
+        "description": {
+          "name": "unified_analytics",
+          "sha256": "4f9f29e5fd357d68fce270e37c7ad9bb489ee20098529199d6bc786b2b624298",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.0"
+      },
+      "usage": {
+        "dependency": "direct main",
+        "description": {
+          "name": "usage",
+          "sha256": "0bdbde65a6e710343d02a56552eeaefd20b735e04bfb6b3ee025b6b22e8d0e15",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.1.1"
+      },
+      "uuid": {
+        "dependency": "direct main",
+        "description": {
+          "name": "uuid",
+          "sha256": "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.7"
+      },
+      "vm_service": {
+        "dependency": "direct main",
+        "description": {
+          "name": "vm_service",
+          "sha256": "c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "11.7.1"
+      },
+      "vm_snapshot_analysis": {
+        "dependency": "direct main",
+        "description": {
+          "name": "vm_snapshot_analysis",
+          "sha256": "5a79b9fbb6be2555090f55b03b23907e75d44c3fd7bdd88da09848aa5a1914c8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.7.6"
+      },
+      "watcher": {
+        "dependency": "direct main",
+        "description": {
+          "name": "watcher",
+          "sha256": "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.0"
+      },
+      "web_socket_channel": {
+        "dependency": "direct main",
+        "description": {
+          "name": "web_socket_channel",
+          "sha256": "d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.4.0"
+      },
+      "webdriver": {
+        "dependency": "direct main",
+        "description": {
+          "name": "webdriver",
+          "sha256": "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.2"
+      },
+      "webkit_inspection_protocol": {
+        "dependency": "direct main",
+        "description": {
+          "name": "webkit_inspection_protocol",
+          "sha256": "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.0"
+      },
+      "xml": {
+        "dependency": "direct main",
+        "description": {
+          "name": "xml",
+          "sha256": "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.3.0"
+      },
+      "yaml": {
+        "dependency": "direct main",
+        "description": {
+          "name": "yaml",
+          "sha256": "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.2"
+      }
+    },
+    "sdks": {
+      "dart": ">=3.0.0 <4.0.0"
+    }
+  }
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/versions/3_13/patches/disable-auto-update-shared.patch b/nixpkgs/pkgs/development/compilers/flutter/versions/3_13/patches/disable-auto-update-shared.patch
new file mode 100644
index 000000000000..be08c419fe1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_13/patches/disable-auto-update-shared.patch
@@ -0,0 +1,13 @@
+diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
+index 3532c23114..25dfcae4c7 100644
+--- a/bin/internal/shared.sh
++++ b/bin/internal/shared.sh
+@@ -229,8 +229,6 @@ function shared::execute() {
+     exit 1
+   fi
+ 
+-  upgrade_flutter 7< "$PROG_NAME"
+-
+   BIN_NAME="$(basename "$PROG_NAME")"
+   case "$BIN_NAME" in
+     flutter*)
diff --git a/nixpkgs/pkgs/development/compilers/flutter/versions/3_16/data.json b/nixpkgs/pkgs/development/compilers/flutter/versions/3_16/data.json
new file mode 100644
index 000000000000..100b2bd427d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_16/data.json
@@ -0,0 +1,951 @@
+{
+  "version": "3.16.7",
+  "engineVersion": "4a585b79294e830fa89c24924d58a27cc8fbf406",
+  "dartVersion": "3.2.4",
+  "dartHash": {
+    "x86_64-linux": "sha256-qslf+wgmNz9r+e45o3Bg9/vDj75GkM9gQE2tb5rbIvw=",
+    "aarch64-linux": "sha256-Wsm8GKi7PR5iGx/lNtp2qBK+lMk2NIHf/RvO5G94QnQ=",
+    "x86_64-darwin": "sha256-8DXMj0yhKpxHdqS0vr5C/RwhQGxvUmvxJA6mOgqBXU8=",
+    "aarch64-darwin": "sha256-ic6txmbhsv4CarUwG+4xqXsaQrMN4AQrWwg8DxsZGps="
+  },
+  "flutterHash": "sha256-j+tc8hMgZMBhju89n4e9tKRrq+CFBGOyeE0y+Z4FtHE=",
+  "artifactHashes": {
+    "android": {
+      "aarch64-linux": "sha256-j8jstEE1RsTVHJbq6f6We0An+CyJz9JH/YClyNA4mwg=",
+      "x86_64-darwin": "sha256-0FBI0CGMcxyttkzrdyjJlkGAjFd/yMuAQS3pDrNXZZw=",
+      "x86_64-linux": "sha256-j8jstEE1RsTVHJbq6f6We0An+CyJz9JH/YClyNA4mwg="
+    },
+    "fuchsia": {
+      "aarch64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "x86_64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
+    },
+    "ios": {
+      "aarch64-linux": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw=",
+      "x86_64-darwin": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw=",
+      "x86_64-linux": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw="
+    },
+    "linux": {
+      "aarch64-linux": "sha256-LWpou3L7bAWGn8i4nDT/BZez2Uhf/LbqC2C4Z98hCHQ=",
+      "x86_64-darwin": "sha256-BzjmO4F8B9GagYPbdvoT55r+YgZcP4BUaKgJPGZDXOU=",
+      "x86_64-linux": "sha256-BzjmO4F8B9GagYPbdvoT55r+YgZcP4BUaKgJPGZDXOU="
+    },
+    "macos": {
+      "aarch64-linux": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk=",
+      "x86_64-darwin": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk=",
+      "x86_64-linux": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk="
+    },
+    "universal": {
+      "aarch64-linux": "sha256-uB2YZRjioP/koMbPvaBHsezjPO0w5a+BpxZaDuiINIY=",
+      "x86_64-darwin": "sha256-Qwf12gMqrW5nDC9Is08oxWTbKMptRQRAIb58JETq3xA=",
+      "x86_64-linux": "sha256-quSFKx7TZRJpK+4YDt5f9jwr7rZsSsaXMxhJ8vIcczQ="
+    },
+    "web": {
+      "aarch64-linux": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw=",
+      "x86_64-darwin": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw=",
+      "x86_64-linux": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw="
+    },
+    "windows": {
+      "aarch64-linux": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU=",
+      "x86_64-darwin": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU=",
+      "x86_64-linux": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU="
+    }
+  },
+  "pubspecLock": {
+    "packages": {
+      "_fe_analyzer_shared": {
+        "dependency": "direct main",
+        "description": {
+          "name": "_fe_analyzer_shared",
+          "sha256": "eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "64.0.0"
+      },
+      "analyzer": {
+        "dependency": "direct main",
+        "description": {
+          "name": "analyzer",
+          "sha256": "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.2.0"
+      },
+      "archive": {
+        "dependency": "direct main",
+        "description": {
+          "name": "archive",
+          "sha256": "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.3.2"
+      },
+      "args": {
+        "dependency": "direct main",
+        "description": {
+          "name": "args",
+          "sha256": "eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.4.2"
+      },
+      "async": {
+        "dependency": "direct main",
+        "description": {
+          "name": "async",
+          "sha256": "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.11.0"
+      },
+      "boolean_selector": {
+        "dependency": "direct main",
+        "description": {
+          "name": "boolean_selector",
+          "sha256": "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.1"
+      },
+      "browser_launcher": {
+        "dependency": "direct main",
+        "description": {
+          "name": "browser_launcher",
+          "sha256": "6ee4c6b1f68a42e769ef6e663c4f56708522f7bce9d2ab6e308a37b612ffa4ec",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.1"
+      },
+      "built_collection": {
+        "dependency": "direct main",
+        "description": {
+          "name": "built_collection",
+          "sha256": "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.1.1"
+      },
+      "built_value": {
+        "dependency": "direct main",
+        "description": {
+          "name": "built_value",
+          "sha256": "a8de5955205b4d1dbbbc267daddf2178bd737e4bab8987c04a500478c9651e74",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "8.6.3"
+      },
+      "checked_yaml": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "checked_yaml",
+          "sha256": "feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.3"
+      },
+      "cli_config": {
+        "dependency": "direct main",
+        "description": {
+          "name": "cli_config",
+          "sha256": "76910209e4aee158f5e26721509c98d7cbb97085da637f62b7c461298033752d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.1.1"
+      },
+      "clock": {
+        "dependency": "direct main",
+        "description": {
+          "name": "clock",
+          "sha256": "cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.1"
+      },
+      "collection": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "collection",
+          "sha256": "ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.18.0"
+      },
+      "completion": {
+        "dependency": "direct main",
+        "description": {
+          "name": "completion",
+          "sha256": "f11b7a628e6c42b9edc9b0bc3aa490e2d930397546d2f794e8e1325909d11c60",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.1"
+      },
+      "convert": {
+        "dependency": "direct main",
+        "description": {
+          "name": "convert",
+          "sha256": "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.1"
+      },
+      "coverage": {
+        "dependency": "direct main",
+        "description": {
+          "name": "coverage",
+          "sha256": "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.6.3"
+      },
+      "crypto": {
+        "dependency": "direct main",
+        "description": {
+          "name": "crypto",
+          "sha256": "ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.3"
+      },
+      "csslib": {
+        "dependency": "direct main",
+        "description": {
+          "name": "csslib",
+          "sha256": "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.0"
+      },
+      "dap": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dap",
+          "sha256": "1dc9a11bc60836b151672d3edb6a56a18383ecf122e56eaf5837b32c81641aeb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.0"
+      },
+      "dds": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dds",
+          "sha256": "b7c2e57d24edda6b1d37fbd0748aefc1d75d9257a7dd0328d31398754144eac4",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.9.5"
+      },
+      "dds_service_extensions": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dds_service_extensions",
+          "sha256": "609d0a5d928502f7d160e4466f644474352721f4880c840ec9e8d208fff16d95",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.6.0"
+      },
+      "devtools_shared": {
+        "dependency": "direct main",
+        "description": {
+          "name": "devtools_shared",
+          "sha256": "2fc4a90ba419b5cb59c6c7a060e94e9c4fdd993d96ef598910c572cb107f1f42",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.26.1"
+      },
+      "dwds": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dwds",
+          "sha256": "44778de6f92203fad32c550ca0d7a9bd1377e6926272ff7eda7c7a1bdde0cf2b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "21.0.0+1"
+      },
+      "fake_async": {
+        "dependency": "direct main",
+        "description": {
+          "name": "fake_async",
+          "sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.3.1"
+      },
+      "file": {
+        "dependency": "direct main",
+        "description": {
+          "name": "file",
+          "sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.1.4"
+      },
+      "file_testing": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "file_testing",
+          "sha256": "0aaadb4025bd350403f4308ad6c4cea953278d9407814b8342558e4946840fb5",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.0"
+      },
+      "fixnum": {
+        "dependency": "direct main",
+        "description": {
+          "name": "fixnum",
+          "sha256": "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.0"
+      },
+      "flutter_template_images": {
+        "dependency": "direct main",
+        "description": {
+          "name": "flutter_template_images",
+          "sha256": "fd3e55af73c577b9e3f88d4080d3e366cb5c8ef3fbd50b94dfeca56bb0235df6",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.2.0"
+      },
+      "frontend_server_client": {
+        "dependency": "direct main",
+        "description": {
+          "name": "frontend_server_client",
+          "sha256": "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.2.0"
+      },
+      "glob": {
+        "dependency": "direct main",
+        "description": {
+          "name": "glob",
+          "sha256": "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.2"
+      },
+      "graphs": {
+        "dependency": "direct main",
+        "description": {
+          "name": "graphs",
+          "sha256": "aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.3.1"
+      },
+      "html": {
+        "dependency": "direct main",
+        "description": {
+          "name": "html",
+          "sha256": "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.15.4"
+      },
+      "http": {
+        "dependency": "direct main",
+        "description": {
+          "name": "http",
+          "sha256": "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.13.6"
+      },
+      "http_multi_server": {
+        "dependency": "direct main",
+        "description": {
+          "name": "http_multi_server",
+          "sha256": "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.2.1"
+      },
+      "http_parser": {
+        "dependency": "direct main",
+        "description": {
+          "name": "http_parser",
+          "sha256": "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.0.2"
+      },
+      "intl": {
+        "dependency": "direct main",
+        "description": {
+          "name": "intl",
+          "sha256": "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.18.1"
+      },
+      "io": {
+        "dependency": "direct main",
+        "description": {
+          "name": "io",
+          "sha256": "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "js": {
+        "dependency": "direct main",
+        "description": {
+          "name": "js",
+          "sha256": "f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.6.7"
+      },
+      "json_annotation": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "json_annotation",
+          "sha256": "b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.8.1"
+      },
+      "json_rpc_2": {
+        "dependency": "direct main",
+        "description": {
+          "name": "json_rpc_2",
+          "sha256": "5e469bffa23899edacb7b22787780068d650b106a21c76db3c49218ab7ca447e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.2"
+      },
+      "logging": {
+        "dependency": "direct main",
+        "description": {
+          "name": "logging",
+          "sha256": "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.0"
+      },
+      "matcher": {
+        "dependency": "direct main",
+        "description": {
+          "name": "matcher",
+          "sha256": "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.12.16"
+      },
+      "meta": {
+        "dependency": "direct main",
+        "description": {
+          "name": "meta",
+          "sha256": "a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.10.0"
+      },
+      "mime": {
+        "dependency": "direct main",
+        "description": {
+          "name": "mime",
+          "sha256": "e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "multicast_dns": {
+        "dependency": "direct main",
+        "description": {
+          "name": "multicast_dns",
+          "sha256": "f4fd1c3365171fac5160afcb1a283001d3413dee5fd41c61d80888952d609379",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.3.2+4"
+      },
+      "mustache_template": {
+        "dependency": "direct main",
+        "description": {
+          "name": "mustache_template",
+          "sha256": "a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.0"
+      },
+      "native_assets_builder": {
+        "dependency": "direct main",
+        "description": {
+          "name": "native_assets_builder",
+          "sha256": "83e92c0f4917cfea0af594aac9ab5ee7d396fbcee1c19839ff33b8e1666cd84e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.2.3"
+      },
+      "native_assets_cli": {
+        "dependency": "direct main",
+        "description": {
+          "name": "native_assets_cli",
+          "sha256": "51d1af3ebc2437f5883ed749f1877cb82d6a569b0712dad02c8370e6e4f2b5e3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.2.0"
+      },
+      "native_stack_traces": {
+        "dependency": "direct main",
+        "description": {
+          "name": "native_stack_traces",
+          "sha256": "c797830b9910d13b0f4e70ddef15cde034214fe3bdb8092c4ea5ffad2f74013f",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.5.6"
+      },
+      "node_preamble": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "node_preamble",
+          "sha256": "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.2"
+      },
+      "package_config": {
+        "dependency": "direct main",
+        "description": {
+          "name": "package_config",
+          "sha256": "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.0"
+      },
+      "path": {
+        "dependency": "direct main",
+        "description": {
+          "name": "path",
+          "sha256": "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.8.3"
+      },
+      "petitparser": {
+        "dependency": "direct main",
+        "description": {
+          "name": "petitparser",
+          "sha256": "eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.0.1"
+      },
+      "platform": {
+        "dependency": "direct main",
+        "description": {
+          "name": "platform",
+          "sha256": "ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.2"
+      },
+      "pool": {
+        "dependency": "direct main",
+        "description": {
+          "name": "pool",
+          "sha256": "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.5.1"
+      },
+      "process": {
+        "dependency": "direct main",
+        "description": {
+          "name": "process",
+          "sha256": "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.2.4"
+      },
+      "pub_semver": {
+        "dependency": "direct main",
+        "description": {
+          "name": "pub_semver",
+          "sha256": "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.4"
+      },
+      "pubspec_parse": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "pubspec_parse",
+          "sha256": "c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.3"
+      },
+      "shelf": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf",
+          "sha256": "ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.4.1"
+      },
+      "shelf_packages_handler": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_packages_handler",
+          "sha256": "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.2"
+      },
+      "shelf_proxy": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_proxy",
+          "sha256": "a71d2307f4393211930c590c3d2c00630f6c5a7a77edc1ef6436dfd85a6a7ee3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "shelf_static": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_static",
+          "sha256": "a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.2"
+      },
+      "shelf_web_socket": {
+        "dependency": "direct main",
+        "description": {
+          "name": "shelf_web_socket",
+          "sha256": "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "source_map_stack_trace": {
+        "dependency": "direct main",
+        "description": {
+          "name": "source_map_stack_trace",
+          "sha256": "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.1"
+      },
+      "source_maps": {
+        "dependency": "direct main",
+        "description": {
+          "name": "source_maps",
+          "sha256": "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.10.12"
+      },
+      "source_span": {
+        "dependency": "direct main",
+        "description": {
+          "name": "source_span",
+          "sha256": "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.10.0"
+      },
+      "sse": {
+        "dependency": "direct main",
+        "description": {
+          "name": "sse",
+          "sha256": "3ff9088cac3f45aa8b91336f1962e3ea6c81baaba0bbba361c05f8aa7fb59442",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.1.2"
+      },
+      "stack_trace": {
+        "dependency": "direct main",
+        "description": {
+          "name": "stack_trace",
+          "sha256": "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.11.1"
+      },
+      "standard_message_codec": {
+        "dependency": "direct main",
+        "description": {
+          "name": "standard_message_codec",
+          "sha256": "fc7dd712d191b7e33196a0ecf354c4573492bb95995e7166cb6f73b047f9cae0",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.0.1+4"
+      },
+      "stream_channel": {
+        "dependency": "direct main",
+        "description": {
+          "name": "stream_channel",
+          "sha256": "ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.2"
+      },
+      "string_scanner": {
+        "dependency": "direct main",
+        "description": {
+          "name": "string_scanner",
+          "sha256": "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.0"
+      },
+      "sync_http": {
+        "dependency": "direct main",
+        "description": {
+          "name": "sync_http",
+          "sha256": "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.3.1"
+      },
+      "term_glyph": {
+        "dependency": "direct main",
+        "description": {
+          "name": "term_glyph",
+          "sha256": "a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.1"
+      },
+      "test": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "test",
+          "sha256": "9b0dd8e36af4a5b1569029949d50a52cb2a2a2fdaa20cebb96e6603b9ae241f9",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.24.6"
+      },
+      "test_api": {
+        "dependency": "direct main",
+        "description": {
+          "name": "test_api",
+          "sha256": "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.6.1"
+      },
+      "test_core": {
+        "dependency": "direct main",
+        "description": {
+          "name": "test_core",
+          "sha256": "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.5.6"
+      },
+      "typed_data": {
+        "dependency": "direct main",
+        "description": {
+          "name": "typed_data",
+          "sha256": "facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.3.2"
+      },
+      "unified_analytics": {
+        "dependency": "direct main",
+        "description": {
+          "name": "unified_analytics",
+          "sha256": "fbcb0ad896a15c1ddea7ec45e8bfc92a894490e5792e07b74b2e6e992f4c77f8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.8.0"
+      },
+      "usage": {
+        "dependency": "direct main",
+        "description": {
+          "name": "usage",
+          "sha256": "0bdbde65a6e710343d02a56552eeaefd20b735e04bfb6b3ee025b6b22e8d0e15",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.1.1"
+      },
+      "uuid": {
+        "dependency": "direct main",
+        "description": {
+          "name": "uuid",
+          "sha256": "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.7"
+      },
+      "vm_service": {
+        "dependency": "direct main",
+        "description": {
+          "name": "vm_service",
+          "sha256": "c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "11.10.0"
+      },
+      "vm_snapshot_analysis": {
+        "dependency": "direct main",
+        "description": {
+          "name": "vm_snapshot_analysis",
+          "sha256": "5a79b9fbb6be2555090f55b03b23907e75d44c3fd7bdd88da09848aa5a1914c8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.7.6"
+      },
+      "watcher": {
+        "dependency": "direct main",
+        "description": {
+          "name": "watcher",
+          "sha256": "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.1.0"
+      },
+      "web_socket_channel": {
+        "dependency": "direct main",
+        "description": {
+          "name": "web_socket_channel",
+          "sha256": "d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.4.0"
+      },
+      "webdriver": {
+        "dependency": "direct main",
+        "description": {
+          "name": "webdriver",
+          "sha256": "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.2"
+      },
+      "webkit_inspection_protocol": {
+        "dependency": "direct main",
+        "description": {
+          "name": "webkit_inspection_protocol",
+          "sha256": "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.1"
+      },
+      "xml": {
+        "dependency": "direct main",
+        "description": {
+          "name": "xml",
+          "sha256": "af5e77e9b83f2f4adc5d3f0a4ece1c7f45a2467b695c2540381bac793e34e556",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.4.2"
+      },
+      "yaml": {
+        "dependency": "direct main",
+        "description": {
+          "name": "yaml",
+          "sha256": "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.2"
+      },
+      "yaml_edit": {
+        "dependency": "direct main",
+        "description": {
+          "name": "yaml_edit",
+          "sha256": "1579d4a0340a83cf9e4d580ea51a16329c916973bffd5bd4b45e911b25d46bfd",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.1"
+      }
+    },
+    "sdks": {
+      "dart": ">=3.2.0-36.0.dev <4.0.0"
+    }
+  }
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update-shared.patch b/nixpkgs/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update-shared.patch
new file mode 100644
index 000000000000..961b41f7327c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update-shared.patch
@@ -0,0 +1,13 @@
+diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
+index 75d9d3013e..657ad3cb78 100644
+--- a/bin/internal/shared.sh
++++ b/bin/internal/shared.sh
+@@ -245,7 +245,7 @@ function shared::execute() {
+   # and will corrupt each others' downloads.
+   #
+   # SHARED_NAME itself is prepared by the caller script.
+-  upgrade_flutter 7< "$SHARED_NAME"
++  # upgrade_flutter 7< "$SHARED_NAME"
+ 
+   BIN_NAME="$(basename "$PROG_NAME")"
+   case "$BIN_NAME" in
diff --git a/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix b/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix
new file mode 100644
index 000000000000..4a7aedf97d38
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix
@@ -0,0 +1,160 @@
+{ lib
+, stdenv
+, darwin
+, callPackage
+, flutter
+, supportedTargetFlutterPlatforms ? [
+    "universal"
+    "web"
+  ]
+  ++ lib.optional stdenv.hostPlatform.isLinux "linux"
+  ++ lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isDarwin) "android"
+  ++ lib.optionals stdenv.hostPlatform.isDarwin [ "macos" "ios" ]
+, artifactHashes ? flutter.artifactHashes
+, extraPkgConfigPackages ? [ ]
+, extraLibraries ? [ ]
+, extraIncludes ? [ ]
+, extraCxxFlags ? [ ]
+, extraCFlags ? [ ]
+, extraLinkerFlags ? [ ]
+, makeWrapper
+, runCommandLocal
+, writeShellScript
+, wrapGAppsHook
+, git
+, which
+, pkg-config
+, atk
+, cairo
+, gdk-pixbuf
+, glib
+, gtk3
+, harfbuzz
+, libepoxy
+, pango
+, libX11
+, xorgproto
+, libdeflate
+, zlib
+, cmake
+, ninja
+, clang
+, lndir
+, symlinkJoin
+}:
+
+let
+  supportsLinuxDesktopTarget = builtins.elem "linux" supportedTargetFlutterPlatforms;
+
+  flutterPlatformArtifacts = lib.genAttrs supportedTargetFlutterPlatforms (flutterPlatform:
+    (callPackage ./artifacts/prepare-artifacts.nix {
+      src = callPackage ./artifacts/fetch-artifacts.nix {
+        inherit flutterPlatform;
+        systemPlatform = stdenv.hostPlatform.system;
+        flutter = callPackage ./wrapper.nix { inherit flutter; };
+        hash = artifactHashes.${flutterPlatform}.${stdenv.hostPlatform.system} or "";
+      };
+    }));
+
+  cacheDir = symlinkJoin rec {
+    name = "flutter-cache-dir";
+    paths = builtins.attrValues flutterPlatformArtifacts;
+    postBuild = ''
+      mkdir -p "$out/bin/cache"
+      ln -s '${flutter}/bin/cache/dart-sdk' "$out/bin/cache"
+    '';
+    passthru.flutterPlatform = flutterPlatformArtifacts;
+  };
+
+  # By default, Flutter stores downloaded files (such as the Pub cache) in the SDK directory.
+  # Wrap it to ensure that it does not do that, preferring home directories instead.
+  immutableFlutter = writeShellScript "flutter_immutable" ''
+    export PUB_CACHE=''${PUB_CACHE:-"$HOME/.pub-cache"}
+    ${flutter}/bin/flutter "$@"
+  '';
+
+  # Tools that the Flutter tool depends on.
+  tools = [ git which ];
+
+  # Libraries that Flutter apps depend on at runtime.
+  appRuntimeDeps = lib.optionals supportsLinuxDesktopTarget [
+    atk
+    cairo
+    gdk-pixbuf
+    glib
+    gtk3
+    harfbuzz
+    libepoxy
+    pango
+    libX11
+    libdeflate
+  ];
+
+  # Development packages required for compilation.
+  appBuildDeps =
+    let
+      # https://discourse.nixos.org/t/handling-transitive-c-dependencies/5942/3
+      deps = pkg: builtins.filter lib.isDerivation ((pkg.buildInputs or [ ]) ++ (pkg.propagatedBuildInputs or [ ]));
+      collect = pkg: lib.unique ([ pkg ] ++ deps pkg ++ builtins.concatMap collect (deps pkg));
+    in
+    builtins.concatMap collect appRuntimeDeps;
+
+  # Some header files and libraries are not properly located by the Flutter SDK.
+  # They must be manually included.
+  appStaticBuildDeps = (lib.optionals supportsLinuxDesktopTarget [ libX11 xorgproto zlib ]) ++ extraLibraries;
+
+  # Tools used by the Flutter SDK to compile applications.
+  buildTools = lib.optionals supportsLinuxDesktopTarget [
+    pkg-config
+    cmake
+    ninja
+    clang
+  ];
+
+  # Nix-specific compiler configuration.
+  pkgConfigPackages = map (lib.getOutput "dev") (appBuildDeps ++ extraPkgConfigPackages);
+  includeFlags = map (pkg: "-isystem ${lib.getOutput "dev" pkg}/include") (appStaticBuildDeps ++ extraIncludes);
+  linkerFlags = (map (pkg: "-rpath,${lib.getOutput "lib" pkg}/lib") appRuntimeDeps) ++ extraLinkerFlags;
+in
+(callPackage ./sdk-symlink.nix { }) (stdenv.mkDerivation
+{
+  pname = "flutter-wrapped";
+  inherit (flutter) version;
+
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]
+    ++ lib.optionals supportsLinuxDesktopTarget [ glib wrapGAppsHook ];
+
+  passthru = flutter.passthru // {
+    inherit (flutter) version;
+    unwrapped = flutter;
+    updateScript = ./update/update.py;
+    inherit cacheDir;
+  };
+
+  dontUnpack = true;
+  dontWrapGApps = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    for path in ${builtins.concatStringsSep " " (builtins.foldl' (paths: pkg: paths ++ (map (directory: "'${pkg}/${directory}/pkgconfig'") ["lib" "share"])) [ ] pkgConfigPackages)}; do
+      addToSearchPath FLUTTER_PKG_CONFIG_PATH "$path"
+    done
+
+    mkdir -p $out/bin
+    makeWrapper '${immutableFlutter}' $out/bin/flutter \
+      --set-default ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \
+      --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \
+      --suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \
+      --suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \
+      --prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCxxFlags)}' \
+      --prefix CFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCFlags)}' \
+      --prefix LDFLAGS "''\t" '${builtins.concatStringsSep " " (map (flag: "-Wl,${flag}") linkerFlags)}' \
+      ''${gappsWrapperArgs[@]}
+
+    runHook postInstall
+  '';
+
+  inherit (flutter) meta;
+})
diff --git a/nixpkgs/pkgs/development/compilers/flux/default.nix b/nixpkgs/pkgs/development/compilers/flux/default.nix
new file mode 100644
index 000000000000..75386f21f743
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flux/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "flux";
+  version = "2013-09-20";
+
+  src = fetchFromGitHub {
+    owner = "deniskropp";
+    repo = pname;
+    rev = "e45758aa9384b9740ff021ea952399fd113eb0e9";
+    sha256 = "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  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-darwin.sh b/nixpkgs/pkgs/development/compilers/fpc/binary-builder-darwin.sh
new file mode 100755
index 000000000000..8a8600f1f639
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/binary-builder-darwin.sh
@@ -0,0 +1,18 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+source $stdenv/setup
+
+pkgdir=$(pwd)/pkg
+deploydir=$(pwd)/deploy
+
+undmg $src
+mkdir $out
+mkdir $pkgdir
+mkdir $deploydir
+
+pkg=*.mpkg/Contents/Packages/*.pkg
+xar -xf $pkg -C $pkgdir
+pushd $deploydir
+cat $pkgdir/Payload | gunzip -dc | cpio -i
+popd
+echo $deploydir
+cp -r $deploydir/usr/local/* $out
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..568c3094107a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/binary-builder.sh
@@ -0,0 +1,15 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+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..e4c8a2358fc8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/binary.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, undmg, cpio, xar, lib }:
+
+stdenv.mkDerivation rec {
+  pname = "fpc-binary";
+  version = "3.2.2";
+
+  src =
+    if stdenv.hostPlatform.system == "i686-linux" then
+      fetchurl {
+        url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.i386-linux.tar";
+        sha256 = "f62980ac0b2861221f79fdbff67836aa6912a4256d4192cfa4dfa0ac5b419958";
+      }
+    else if stdenv.hostPlatform.system == "x86_64-linux" then
+      fetchurl {
+        url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.x86_64-linux.tar";
+        sha256 = "5adac308a5534b6a76446d8311fc340747cbb7edeaacfe6b651493ff3fe31e83";
+      }
+    else if stdenv.hostPlatform.system == "aarch64-linux" then
+      fetchurl {
+        url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.aarch64-linux.tar";
+        sha256 = "b39470f9b6b5b82f50fc8680a5da37d2834f2129c65c24c5628a80894d565451";
+      }
+    else if stdenv.isDarwin then
+      fetchurl {
+        url = "mirror://sourceforge/project/freepascal/Mac%20OS%20X/${version}/fpc-${version}.intelarm64-macosx.dmg";
+        sha256 = "05d4510c8c887e3c68de20272abf62171aa5b2ef1eba6bce25e4c0bc41ba8b7d";
+      }
+    else throw "Not supported on ${stdenv.hostPlatform.system}.";
+
+
+  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
+    undmg
+    xar
+    cpio
+  ];
+
+  builder =
+    if stdenv.hostPlatform.isLinux then
+      ./binary-builder.sh
+    else if stdenv.hostPlatform.isDarwin then
+      ./binary-builder-darwin.sh
+    else throw "Not supported on ${stdenv.hostPlatform}.";
+
+  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..3c9eb60d57c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/default.nix
@@ -0,0 +1,80 @@
+{ lib, stdenv, fetchurl, gawk, fetchpatch, undmg, cpio, xar, darwin, libiconv }:
+
+let startFPC = import ./binary.nix { inherit stdenv fetchurl undmg cpio xar lib; }; in
+
+stdenv.mkDerivation rec {
+  version = "3.2.2";
+  pname = "fpc";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/freepascal/fpcbuild-${version}.tar.gz";
+    sha256 = "85ef993043bb83f999e2212f1bca766eb71f6f973d362e2290475dbaaf50161f";
+  };
+
+  buildInputs = [ startFPC gawk ]
+    ++ lib.optionals stdenv.isDarwin [
+      libiconv
+      darwin.apple_sdk.frameworks.CoreFoundation
+    ];
+
+  glibc = stdenv.cc.libc.out;
+
+  # Patch paths for linux systems. Other platforms will need their own patches.
+  patches = [
+    ./mark-paths.patch # mark paths for later substitution in postPatch
+  ] ++ lib.optional stdenv.isAarch64 (fetchpatch {
+    # backport upstream patch for aarch64 glibc 2.34
+    url = "https://gitlab.com/freepascal.org/fpc/source/-/commit/a20a7e3497bccf3415bf47ccc55f133eb9d6d6a0.patch";
+    hash = "sha256-xKTBwuOxOwX9KCazQbBNLhMXCqkuJgIFvlXewHY63GM=";
+    stripLen = 1;
+    extraPrefix = "fpcsrc/";
+  });
+
+  postPatch = ''
+    # substitute the markers set by the mark-paths patch
+    substituteInPlace fpcsrc/compiler/systems/t_linux.pas --subst-var-by dynlinker-prefix "${glibc}"
+    substituteInPlace fpcsrc/compiler/systems/t_linux.pas --subst-var-by syslibpath "${glibc}/lib"
+    # Replace the `codesign --remove-signature` command with a custom script, since `codesign` is not available
+    # in nixpkgs
+    # Remove the -no_uuid strip flag which does not work on llvm-strip, only
+    # Apple strip.
+    substituteInPlace fpcsrc/compiler/Makefile \
+      --replace \
+        "\$(CODESIGN) --remove-signature" \
+        "${./remove-signature.sh}" \
+      --replace "ifneq (\$(CODESIGN),)" "ifeq (\$(OS_TARGET), darwin)" \
+      --replace "-no_uuid" ""
+  '';
+
+  NIX_LDFLAGS = lib.optionalString
+    stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks");
+
+  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/
+
+    # Generate config files in /etc since on darwin, ppc* does not follow symlinks
+    # to resolve the location of /etc
+    mkdir -p $out/etc
+    $out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/etc
+  '';
+
+  passthru = {
+    bootstrap = startFPC;
+  };
+
+  meta = with lib; {
+    description = "Free Pascal Compiler from a source distribution";
+    homepage = "https://www.freepascal.org";
+    maintainers = [ maintainers.raskin ];
+    license = with licenses; [ gpl2 lgpl2 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fpc/lazarus.nix b/nixpkgs/pkgs/development/compilers/fpc/lazarus.nix
new file mode 100644
index 000000000000..54b81b80e994
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/lazarus.nix
@@ -0,0 +1,111 @@
+{ stdenv, lib, fetchurl, makeWrapper, writeText
+, fpc, gtk2, glib, pango, atk, gdk-pixbuf
+, libXi, xorgproto, libX11, libXext
+, gdb, gnumake, binutils
+, withQt ? false, qtbase ? null, libqt5pas ? null, wrapQtAppsHook ? null
+}:
+
+# TODO:
+#  1. the build date is embedded in the binary through `$I %DATE%` - we should dump that
+
+let
+  version = "2.2.2-0";
+
+  # as of 2.0.10 a suffix is being added. That may or may not disappear and then
+  # come back, so just leave this here.
+  majorMinorPatch = v:
+    builtins.concatStringsSep "." (lib.take 3 (lib.splitVersion v));
+
+  overrides = writeText "revision.inc" (lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v:
+    "const ${k} = '${v}';") {
+      # this is technically the SVN revision but as we don't have that replace
+      # it with the version instead of showing "Unknown"
+      RevisionStr = version;
+    }));
+
+in
+stdenv.mkDerivation rec {
+  pname = "lazarus-${LCL_PLATFORM}";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${majorMinorPatch version}/lazarus-${version}.tar.gz";
+    sha256 = "a9832004cffec8aca69de87290441d54772bf95d5d04372249d5a5491fb674c4";
+  };
+
+  postPatch = ''
+    cp ${overrides} ide/${overrides.name}
+  '';
+
+  buildInputs = [
+    # we need gtk2 unconditionally as that is the default target when building applications with lazarus
+    fpc gtk2 glib libXi xorgproto
+    libX11 libXext pango atk
+    stdenv.cc gdk-pixbuf
+  ]
+  ++ lib.optionals withQt [ libqt5pas qtbase ];
+
+  # Disable parallel build, errors:
+  #  Fatal: (1018) Compilation aborted
+  enableParallelBuilding = false;
+
+  nativeBuildInputs = [
+    makeWrapper
+  ] ++ lib.optional withQt wrapQtAppsHook;
+
+  makeFlags = [
+    "FPC=fpc"
+    "PP=fpc"
+    "LAZARUS_INSTALL_DIR=${placeholder "out"}/share/lazarus/"
+    "INSTALL_PREFIX=${placeholder "out"}/"
+    "REQUIRE_PACKAGES+=tachartlazaruspkg"
+    "bigide"
+  ];
+
+  LCL_PLATFORM = if withQt then "qt5" else "gtk2";
+
+  NIX_LDFLAGS = lib.concatStringsSep " " ([
+    "-L${stdenv.cc.cc.lib}/lib"
+    "-lX11"
+    "-lXext"
+    "-lXi"
+    "-latk-1.0"
+    "-lc"
+    "-lcairo"
+    "-lgcc_s"
+    "-lgdk-x11-2.0"
+    "-lgdk_pixbuf-2.0"
+    "-lglib-2.0"
+    "-lgtk-x11-2.0"
+    "-lpango-1.0"
+  ]
+  ++ lib.optionals withQt [
+    "-L${lib.getLib libqt5pas}/lib"
+    "-lQt5Pas"
+  ]);
+
+  preBuild = ''
+    mkdir -p $out/share "$out/lazarus"
+    tar xf ${fpc.src} --strip-components=1 -C $out/share -m
+    substituteInPlace ide/include/unix/lazbaseconf.inc \
+      --replace '/usr/fpcsrc' "$out/share/fpcsrc"
+  '';
+
+  postInstall = let
+    ldFlags = ''$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')'';
+  in ''
+    wrapProgram $out/bin/startlazarus \
+      --prefix NIX_LDFLAGS ' ' "${ldFlags}" \
+      --prefix NIX_LDFLAGS_${binutils.suffixSalt} ' ' "${ldFlags}" \
+      --prefix LCL_PLATFORM ' ' "$LCL_PLATFORM" \
+      --prefix PATH ':' "${lib.makeBinPath [ fpc gdb gnumake binutils ]}"
+  '';
+
+  meta = with lib; {
+    description = "Graphical IDE for the FreePascal language";
+    homepage = "https://www.lazarus.freepascal.org";
+    license = licenses.gpl2Plus ;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fpc/libqt5pas.nix b/nixpkgs/pkgs/development/compilers/fpc/libqt5pas.nix
new file mode 100644
index 000000000000..f3ddfe9edc23
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/libqt5pas.nix
@@ -0,0 +1,24 @@
+{ mkDerivation, lib, lazarus, qmake, qtbase, qtx11extras }:
+
+mkDerivation {
+  pname = "libqt5pas";
+  inherit (lazarus) version src;
+
+  sourceRoot = "lazarus/lcl/interfaces/qt5/cbindings";
+
+  postPatch = ''
+    substituteInPlace Qt5Pas.pro \
+      --replace 'target.path = $$[QT_INSTALL_LIBS]' "target.path = $out/lib"
+  '';
+
+  nativeBuildInputs = [ qmake ];
+
+  buildInputs = [ qtbase qtx11extras ];
+
+  meta = with lib; {
+    description = "Free Pascal Qt5 binding library";
+    homepage = "https://wiki.freepascal.org/Qt5_Interface#libqt5pas";
+    maintainers = with maintainers; [ sikmir ];
+    inherit (lazarus.meta) license platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fpc/mark-paths.patch b/nixpkgs/pkgs/development/compilers/fpc/mark-paths.patch
new file mode 100644
index 000000000000..145339fe41ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/mark-paths.patch
@@ -0,0 +1,109 @@
+diff --git a/fpcsrc/compiler/systems/t_linux.pas b/fpcsrc/compiler/systems/t_linux.pas
+index a7398fb9..8e46fec0 100644
+--- a/fpcsrc/compiler/systems/t_linux.pas
++++ b/fpcsrc/compiler/systems/t_linux.pas
+@@ -135,13 +135,13 @@ begin
+       LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib64',true);
+       { /lib64 should be the really first, so add it before everything else }
+       LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib',true);
+-      LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64',true);
++      LibrarySearchPath.AddLibraryPath(sysrootpath,'=@syslibpath@',true);
+ {$else}
+ {$ifdef powerpc64}
+       if target_info.abi<>abi_powerpc_elfv2 then
+-        LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64;=/usr/lib64;=/usr/X11R6/lib64',true)
++        LibrarySearchPath.AddLibraryPath(sysrootpath,'=/@syslibpath@;=/usr/lib64;=/usr/X11R6/lib64',true)
+       else
+-        LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64;=/usr/lib/powerpc64le-linux-gnu;=/usr/X11R6/powerpc64le-linux-gnu',true);
++        LibrarySearchPath.AddLibraryPath(sysrootpath,'=/@syslibpath@;=/usr/lib/powerpc64le-linux-gnu;=/usr/X11R6/powerpc64le-linux-gnu',true);
+ {$else powerpc64}
+       LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true);
+ {$endif powerpc64}
+@@ -165,7 +165,7 @@ begin
+ {$endif i386}
+ {$ifdef aarch64}
+       LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib64',true);
+-      LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/aarch64-linux-gnu',true);
++      LibrarySearchPath.AddLibraryPath(sysrootpath,'=@syslibpath@',true);
+ {$endif aarch64}
+ {$ifdef powerpc}
+       LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/powerpc-linux-gnu',true);
+@@ -186,53 +186,53 @@ begin
+ end;
+ 
+ {$ifdef m68k}
+-  const defdynlinker='/lib/ld.so.1';
++  const defdynlinker='@dynlinker-prefix@/lib/ld.so.1';
+ {$endif m68k}
+ 
+ {$ifdef i386}
+-  const defdynlinker='/lib/ld-linux.so.2';
++  const defdynlinker='@dynlinker-prefix@/lib/ld-linux.so.2';
+ {$endif}
+ 
+ {$ifdef x86_64}
+-  const defdynlinker='/lib64/ld-linux-x86-64.so.2';
++  const defdynlinker='@dynlinker-prefix@/lib64/ld-linux-x86-64.so.2';
+ {$endif x86_64}
+ 
+ {$ifdef sparc}
+-  const defdynlinker='/lib/ld-linux.so.2';
++  const defdynlinker='@dynlinker-prefix@/lib/ld-linux.so.2';
+ {$endif sparc}
+ 
+ {$ifdef powerpc}
+-  const defdynlinker='/lib/ld.so.1';
++  const defdynlinker='@dynlinker-prefix@/lib/ld.so.1';
+ {$endif powerpc}
+ 
+ {$ifdef powerpc64}
+-  const defdynlinkerv1='/lib64/ld64.so.1';
+-  const defdynlinkerv2='/lib64/ld64.so.2';
++  const defdynlinkerv1='@dynlinker-prefix@/lib64/ld64.so.1';
++  const defdynlinkerv2='@dynlinker-prefix@/lib64/ld64.so.2';
+   var defdynlinker: string;
+ {$endif powerpc64}
+ 
+ {$ifdef arm}
+ {$ifdef FPC_ARMHF}
+-  const defdynlinker='/lib/ld-linux-armhf.so.3';
++  const defdynlinker='@dynlinker-prefix@/lib/ld-linux-armhf.so.3';
+ {$else FPC_ARMHF}
+ {$ifdef FPC_ARMEL}
+-  const defdynlinker='/lib/ld-linux.so.3';
++  const defdynlinker='@dynlinker-prefix@/lib/ld-linux.so.3';
+ {$else FPC_ARMEL}
+-  const defdynlinker='/lib/ld-linux.so.2';
++  const defdynlinker='@dynlinker-prefix@/lib/ld-linux.so.2';
+ {$endif FPC_ARMEL}
+ {$endif FPC_ARMHF}
+ {$endif arm}
+ 
+ {$ifdef aarch64}
+-const defdynlinker='/lib/ld-linux-aarch64.so.1';
++const defdynlinker='@dynlinker-prefix@/lib/ld-linux-aarch64.so.1';
+ {$endif aarch64}
+ 
+ {$ifdef mips}
+-  const defdynlinker='/lib/ld.so.1';
++  const defdynlinker='@dynlinker-prefix@/lib/ld.so.1';
+ {$endif mips}
+ 
+ {$ifdef sparc64}
+-  const defdynlinker='/lib64/ld-linux.so.2';
++  const defdynlinker='@dynlinker-prefix@/lib64/ld-linux.so.2';
+ {$endif sparc64}
+ 
+ 
+@@ -267,9 +267,9 @@ begin
+       libctype:=uclibc;
+     end
+ {$ifdef i386}
+-  else if FileExists(sysrootpath+'/lib/ld-linux.so.1',false) then
++  else if FileExists(sysrootpath+'@dynlinker-prefix@/lib/ld-linux.so.1',false) then
+     begin
+-      DynamicLinker:='/lib/ld-linux.so.1';
++      DynamicLinker:='@dynlinker-prefix@/lib/ld-linux.so.1';
+       libctype:=glibc2;
+     end
+ {$endif i386}
diff --git a/nixpkgs/pkgs/development/compilers/fpc/remove-signature.sh b/nixpkgs/pkgs/development/compilers/fpc/remove-signature.sh
new file mode 100755
index 000000000000..9fed8ab057ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/remove-signature.sh
@@ -0,0 +1,3 @@
+source $stdenv/setup
+
+codesign_allocate -r -i "$1" -o "$1"
diff --git a/nixpkgs/pkgs/development/compilers/fsharp/default.nix b/nixpkgs/pkgs/development/compilers/fsharp/default.nix
new file mode 100644
index 000000000000..0d731e38d839
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fsharp/default.nix
@@ -0,0 +1,50 @@
+# Temporarily avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
+
+{ lib, stdenv, fetchFromGitHub, mono, pkg-config, dotnetbuildhelpers, autoconf, automake, which }:
+
+stdenv.mkDerivation rec {
+  pname = "fsharp";
+  version = "4.0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "fsharp";
+    repo = "fsharp";
+    rev = version;
+    sha256 = "sha256-dgTEM2aL8lVjVMuW0+HLc+TUA39IiuBv/RfHYNURh5s=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf automake ];
+  buildInputs = [ mono dotnetbuildhelpers 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 = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ thoughtpolice raskin ];
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fstar/default.nix b/nixpkgs/pkgs/development/compilers/fstar/default.nix
new file mode 100644
index 000000000000..3b3ad0ff5569
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fstar/default.nix
@@ -0,0 +1,83 @@
+{ callPackage
+, fetchFromGitHub
+, installShellFiles
+, lib
+, makeWrapper
+, ocamlPackages
+, removeReferencesTo
+, stdenv
+, writeScript
+, z3
+}:
+
+let
+
+  version = "2024.01.13";
+
+  src = fetchFromGitHub {
+    owner = "FStarLang";
+    repo = "FStar";
+    rev = "v${version}";
+    hash = "sha256-xjSWDP8mSjLcn+0hsRpEdzsBgBR+mKCZB8yLmHl+WqE=";
+  };
+
+  fstar-dune = ocamlPackages.callPackage ./dune.nix { inherit version src; };
+
+  fstar-ulib = callPackage ./ulib.nix { inherit version src fstar-dune z3; };
+
+in
+
+stdenv.mkDerivation {
+  pname = "fstar";
+  inherit version src;
+
+  nativeBuildInputs = [
+    installShellFiles
+    makeWrapper
+    removeReferencesTo
+  ];
+
+  inherit (fstar-dune) propagatedBuildInputs;
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir $out
+
+    CP="cp -r --no-preserve=mode"
+    $CP ${fstar-dune}/* $out
+    $CP ${fstar-ulib}/* $out
+
+    PREFIX=$out make -C src/ocaml-output install-sides
+
+    chmod +x $out/bin/fstar.exe
+    wrapProgram $out/bin/fstar.exe --prefix PATH ":" ${z3}/bin
+    remove-references-to -t '${ocamlPackages.ocaml}' $out/bin/fstar.exe
+
+    substituteInPlace $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstar/dune-package \
+      --replace ${fstar-dune} $out
+
+    installShellCompletion --bash .completion/bash/fstar.exe.bash
+    installShellCompletion --fish .completion/fish/fstar.exe.fish
+    installShellCompletion --zsh --name _fstar.exe .completion/zsh/__fstar.exe
+  '';
+
+  passthru.updateScript = writeScript "update-fstar" ''
+    #!/usr/bin/env nix-shell
+    #!nix-shell -i bash -p git gnugrep common-updater-scripts
+    set -eu -o pipefail
+
+    version="$(git ls-remote --tags git@github.com:FStarLang/FStar.git | grep -Po 'v\K\d{4}\.\d{2}\.\d{2}' | sort | tail -n1)"
+    update-source-version fstar "$version"
+  '';
+
+  meta = with lib; {
+    description = "ML-like functional programming language aimed at program verification";
+    homepage = "https://www.fstar-lang.org";
+    changelog = "https://github.com/FStarLang/FStar/raw/v${version}/CHANGES.md";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ gebner pnmadelaine ];
+    mainProgram = "fstar.exe";
+    platforms = with platforms; darwin ++ linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fstar/dune.nix b/nixpkgs/pkgs/development/compilers/fstar/dune.nix
new file mode 100644
index 000000000000..1ca476838c8b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fstar/dune.nix
@@ -0,0 +1,51 @@
+{ batteries
+, buildDunePackage
+, memtrace
+, menhir
+, menhirLib
+, pprint
+, ppx_deriving
+, ppx_deriving_yojson
+, ppxlib
+, process
+, sedlex
+, src
+, stdint
+, version
+, yojson
+, zarith
+}:
+
+buildDunePackage {
+  pname = "fstar";
+  inherit version src;
+
+  postPatch = ''
+    patchShebangs ocaml/fstar-lib/make_fstar_version.sh
+    cd ocaml
+  '';
+
+  nativeBuildInputs = [
+    menhir
+  ];
+
+  buildInputs = [
+    memtrace
+  ];
+
+  propagatedBuildInputs = [
+    batteries
+    menhirLib
+    pprint
+    ppx_deriving
+    ppx_deriving_yojson
+    ppxlib
+    process
+    sedlex
+    stdint
+    yojson
+    zarith
+  ];
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/fstar/ulib.nix b/nixpkgs/pkgs/development/compilers/fstar/ulib.nix
new file mode 100644
index 000000000000..4390a7bdb55e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fstar/ulib.nix
@@ -0,0 +1,26 @@
+{ fstar-dune
+, src
+, stdenv
+, version
+, z3
+}:
+
+stdenv.mkDerivation {
+  pname = "fstar-ulib";
+  inherit version src;
+
+  nativeBuildInputs = [
+    z3
+  ];
+
+  postPatch = ''
+    mkdir -p bin
+    cp ${fstar-dune}/bin/fstar.exe bin
+    patchShebangs ulib/install-ulib.sh
+    cd ulib
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix b/nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix
new file mode 100644
index 000000000000..753938e95aa3
--- /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.5";
+
+  src = fetchurl {
+    url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz";
+    sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";
+  };
+
+  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 ./gsc-boot $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..60b9fb792d2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/build.nix
@@ -0,0 +1,138 @@
+{ gccStdenv, lib, pkgs,
+  git, openssl, autoconf, gcc, coreutils, gnused, gnugrep,
+  makeStaticLibraries,
+  src, version, git-version,
+  stampYmd ? 0, stampHms ? 0,
+  gambit-support,
+  optimizationSetting ? "-O1",
+  gambit-params ? pkgs.gambit-support.stable-params,
+  rev ? git-version }:
+
+# 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;
+
+  passthru = {
+    inherit src version git-version rev stampYmd stampHms optimizationSetting openssl;
+  };
+
+
+  nativeBuildInputs = [ git autoconf ];
+
+  # 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 = [ 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-targets=${gambit-params.targets}"
+    "--enable-single-host"
+    "--enable-c-opt=${optimizationSetting}"
+    "--enable-c-opt-rts=-O2"
+    "--enable-gcc-opts"
+    "--enable-trust-c-tco"
+    "--enable-shared"
+    "--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it.
+    "--enable-openssl"
+    "--enable-dynamic-clib"
+    #"--enable-default-compile-options='(compactness 9)'" # Make life easier on the JS backend
+    "--enable-default-runtime-options=${gambit-params.defaultRuntimeOptions}"
+    # "--enable-rtlib-debug" # used by Geiser, but only on recent-enough gambit, and messes js runtime
+    # "--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
+    # "--enable-march=native" # Nope, makes it not work on machines older than the builder
+  ] ++ gambit-params.extraOptions
+    # TODO: pick an appropriate architecture to optimize on on x86-64?
+    # https://gcc.gnu.org/onlinedocs/gcc-4.8.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options
+    # ++ lib.optional pkgs.stdenv.isx86_64 "--enable-march=core-avx2"
+    # Do not enable poll on darwin due to https://github.com/gambit/gambit/issues/498
+    ++ lib.optional (!gccStdenv.isDarwin) "--enable-poll";
+
+  configurePhase = ''
+    export CC=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc \
+           CXX=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}g++ \
+           CPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \
+           CXXCPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \
+           LD=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}ld \
+           XMKMF=${coreutils}/bin/false
+    unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
+
+    ${gambit-params.fixStamp git-version stampYmd stampHms}
+
+    ./configure --prefix=$out/gambit ${builtins.concatStringsSep " " configureFlags}
+
+    # OS-specific paths are hardcoded in ./configure
+    substituteInPlace config.status \
+      ${lib.optionalString (gccStdenv.isDarwin && !gambit-params.stable)
+         ''--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}"''} \
+        --replace "/usr/local/opt/openssl" "${lib.getLib openssl}"
+
+    ./config.status
+  '';
+
+  buildPhase = ''
+    # The MAKEFLAGS setting is a workaround for https://github.com/gambit/gambit/issues/833
+    export MAKEFLAGS="--output-sync=recurse"
+    echo "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/
+    echo > include/stamp.h # No stamp needed for the bootstrap compiler
+    ./configure
+    for i in lib gsi gsc ; do (cd $i ; make -j$NIX_BUILD_CORES) ; done
+    cd ..
+    cp boot/gsc/gsc gsc-boot
+
+    echo "Now use the bootstrap compiler to build the real thing!"
+    make -j$NIX_BUILD_CORES from-scratch
+    ${lib.optionalString gambit-params.modules "make -j$NIX_BUILD_CORES modules"}
+  '';
+
+  postInstall = ''
+    mkdir $out/bin
+    cd $out/bin
+    ln -s ../gambit/bin/* .
+  '';
+
+  doCheck = true;
+  dontStrip = 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..a0f95192cbfc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/default.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./build.nix rec {
+  version = "4.9.5";
+  git-version = "v${version}";
+  src = fetchurl {
+    url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz";
+    sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";
+  };
+}
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..1209ca10aa16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix
@@ -0,0 +1,42 @@
+{ pkgs, lib }:
+
+rec {
+  stable-params = {
+    stable = true;
+    defaultRuntimeOptions = "iL,fL,-L,tL";
+    buildRuntimeOptions = "i8,f8,-8,t8";
+    targets = "js"; # arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64
+    #fixStamp = _: _: _: "";
+    fixStamp = git-version: stampYmd: stampHms: ''
+      echo "Fixing timestamp recipe in Makefile"
+      substituteInPlace configure \
+        --replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
+        --replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
+      substituteInPlace include/makefile.in \
+        --replace "\$\$(\$(GIT) describe --tag --always | sed 's/-bootstrap\$\$//')" "v${git-version}" \
+        --replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"v${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
+      grep -i ' version=\|echo..#define ___STAMP_VERSION' include/makefile.in # XXX DEBUG -- REMOVE ME
+    '';
+    modules = true;
+    extraOptions = ["CFLAGS=-foptimize-sibling-calls"];
+  };
+
+  unstable-params = stable-params // {
+    stable = false;
+    extraOptions = []; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable
+  };
+
+  export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";
+
+  gambit-bootstrap = import ./bootstrap.nix ( pkgs );
+
+  meta = with lib; {
+    description = "Optimizing Scheme to C compiler";
+    homepage    = "http://gambitscheme.org";
+    license     = licenses.lgpl21Only; # dual, also asl20
+    # NB regarding platforms: continuously tested on Linux x86_64 and regularly tested on macOS x86_64.
+    # *should* work everywhere.
+    platforms   = platforms.unix;
+    maintainers = with 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..f8c19640dd58
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/unstable.nix
@@ -0,0 +1,16 @@
+{ callPackage, fetchFromGitHub, gambit-support }:
+
+callPackage ./build.nix rec {
+  version = "unstable-2023-12-04";
+  git-version = "4.9.5-84-g6b19d0c9";
+  stampYmd = 20231204;
+  stampHms = 204859;
+  rev = "6b19d0c9084341306bbb7d6895321090a82988a0";
+  src = fetchFromGitHub {
+    owner = "gambit";
+    repo = "gambit";
+    inherit rev;
+    sha256 = "0njcz9krak8nfyk3x6bc6m1rixzsjc1fyzhbz2g3aq5v8kz9mkl5";
+  };
+  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..d77ff0b8e6aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gavrasm/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchzip, fpc , lang ? "en" } :
+
+assert lib.assertOneOf "lang" lang ["cn" "de" "en" "fr" "tr"];
+
+stdenv.mkDerivation rec {
+  pname = "gavrasm";
+  version = "5.4";
+  flatVersion = lib.strings.replaceStrings ["."] [""] version;
+
+  src = fetchzip {
+    url = "http://www.avr-asm-tutorial.net/gavrasm/v${flatVersion}/gavrasm_sources_lin_${flatVersion}.zip";
+    sha256 = "sha256-uTalb8Wzn2RAoUKZx9RZFCX+V9HUEtUnJ4eSltFumh0=";
+    stripRoot=false;
+  };
+
+  nativeBuildInputs = [ fpc ];
+
+  configurePhase = ''
+    runHook preConfigure
+    cp gavrlang_${lang}.pas gavrlang.pas
+    runHook postConfigure
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    fpc gavrasm.pas
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    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
+    runHook postInstall
+  '';
+
+  meta = with 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/gbforth/default.nix b/nixpkgs/pkgs/development/compilers/gbforth/default.nix
new file mode 100644
index 000000000000..e85e621cff16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gbforth/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, gforth
+}:
+
+stdenv.mkDerivation {
+  pname = "gbforth";
+  version = "unstable-2023-03-02";
+
+  src = fetchFromGitHub {
+    owner = "ams-hackers";
+    repo = "gbforth";
+    rev = "428fcf5054fe301e90ac74b1d920ee3ecc375b5b";
+    hash = "sha256-v1bdwT15Wg1VKpo74Cc3tsTl1uOKvKdlHWtbZkJ/qbA=";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/gbforth $out/bin
+    cp -r lib shared src gbforth.fs $out/share/gbforth/
+    makeWrapper ${gforth}/bin/gforth $out/bin/gbforth \
+      --set GBFORTH_PATH $out/share/gbforth/lib \
+      --add-flags $out/share/gbforth/gbforth.fs
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+    $out/bin/gbforth examples/simon/simon.fs
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://gbforth.org/";
+    description = "A Forth-based Game Boy development kit";
+    longDescription = ''
+      A Forth-based Game Boy development kit.
+      It features a Forth-based assembler, a cross-compiler with support for
+      lazy code generation and a library of useful words.
+    '';
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fgaz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix
new file mode 100644
index 000000000000..ad690cb26fa2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "10.3.1";
+  release = "10.3-2021.10";
+
+  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/${release}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2";
+    sha256 = {
+      aarch64-linux = "020j8gkzc0i0b74vz98gvngnwjm5222j1gk5nswfk6587krba1gn";
+      x86_64-darwin = "0fr8pki2g4bfk1rk90dzwql37d0b71ngzs9zyx0g2jainan3sqgv";
+      x86_64-linux  = "18y92vpl22hf74yqdvmpw8adrkl92s4crzzs6avm05md37qb9nwp";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 ]} "$f" || true
+    done
+  '';
+
+  meta = with 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 prtzl ];
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/11/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/11/default.nix
new file mode 100644
index 000000000000..ad132f5bbf6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/11/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+, python38
+, libxcrypt-legacy
+, runtimeShell
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "11.3.rel1";
+
+  platform = {
+    aarch64-linux = "aarch64";
+    x86_64-darwin = "darwin-x86_64";
+    x86_64-linux  = "x86_64";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu/${version}/binrel/arm-gnu-toolchain-${version}-${platform}-arm-none-eabi.tar.xz";
+    sha256 = {
+      aarch64-linux = "0pmm5r0k5mxd5drbn2s8a7qkm8c4fi8j5y31c70yrp0qs08kqwbc";
+      x86_64-darwin = "1kr9kd9p2xk84fa99zf3gz5lkww2i9spqkjigjwakfkzbva56qw2";
+      x86_64-linux  = "08b1w1zmj4z80k59zmlc1bf34lg8d7z65fwvp5ir2pb1d1zxh86l";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
+    done
+  '';
+
+  postFixup = ''
+    mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
+    cat <<EOF > $out/bin/arm-none-eabi-gdb
+    #!${runtimeShell}
+    export PYTHONPATH=${python38}/lib/python3.8
+    export PYTHONHOME=${python38}/bin/python3.8
+    exec $out/bin/arm-none-eabi-gdb-unwrapped "\$@"
+    EOF
+    chmod +x $out/bin/arm-none-eabi-gdb
+  '';
+
+  meta = with 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" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/12/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/12/default.nix
new file mode 100644
index 000000000000..8f18579f93f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/12/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+, python38
+, libxcrypt-legacy
+, runtimeShell
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "12.3.rel1";
+
+  platform = {
+    aarch64-darwin = "darwin-arm64";
+    aarch64-linux  = "aarch64";
+    x86_64-darwin  = "darwin-x86_64";
+    x86_64-linux   = "x86_64";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu/${version}/binrel/arm-gnu-toolchain-${version}-${platform}-arm-none-eabi.tar.xz";
+    sha256 = {
+      aarch64-darwin = "sha256-Oy7uC99xwbvrPDt0JPv3vZ1cPw9aOkp4FZyeOtIZ570=";
+      aarch64-linux  = "sha256-FMBIfVdT9gcdJOVoiB98fmf4DdgxZd7FFks3MTlK9DE=";
+      x86_64-darwin  = "sha256-5u2L+TD62c4z4SCrkLNpV7H3efzKpt5snKmliYLAQpE=";
+      x86_64-linux   = "sha256-EqKBVkQxjrzOr4S+q7Zl0JJLbnniEEhFLFMxpWMyswk=";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
+    done
+  '';
+
+  postFixup = ''
+    mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
+    cat <<EOF > $out/bin/arm-none-eabi-gdb
+    #!${runtimeShell}
+    export PYTHONPATH=${python38}/lib/python3.8
+    export PYTHONHOME=${python38}/bin/python3.8
+    exec $out/bin/arm-none-eabi-gdb-unwrapped "\$@"
+    EOF
+    chmod +x $out/bin/arm-none-eabi-gdb
+  '';
+
+  meta = with 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 prtzl ];
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/13/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/13/default.nix
new file mode 100644
index 000000000000..14d7d215a00d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/13/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+, python38
+, libxcrypt-legacy
+, runtimeShell
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "13.2.rel1";
+
+  platform = {
+    aarch64-darwin = "darwin-arm64";
+    aarch64-linux  = "aarch64";
+    x86_64-darwin  = "darwin-x86_64";
+    x86_64-linux   = "x86_64";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu/${version}/binrel/arm-gnu-toolchain-${version}-${platform}-arm-none-eabi.tar.xz";
+    sha256 = {
+      aarch64-darwin = "39c44f8af42695b7b871df42e346c09fee670ea8dfc11f17083e296ea2b0d279";
+      aarch64-linux  = "8fd8b4a0a8d44ab2e195ccfbeef42223dfb3ede29d80f14dcf2183c34b8d199a";
+      x86_64-darwin  = "075faa4f3e8eb45e59144858202351a28706f54a6ec17eedd88c9fb9412372cc";
+      x86_64-linux   = "6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
+    done
+  '';
+
+  postFixup = ''
+    mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
+    cat <<EOF > $out/bin/arm-none-eabi-gdb
+    #!${runtimeShell}
+    export PYTHONPATH=${python38}/lib/python3.8
+    export PYTHONHOME=${python38}/bin/python3.8
+    exec $out/bin/arm-none-eabi-gdb-unwrapped "\$@"
+    EOF
+    chmod +x $out/bin/arm-none-eabi-gdb
+  '';
+
+  meta = with 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 prtzl ];
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
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..d805c24e002c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "6.3.1";
+  release = "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-${release}-${suffix}.tar.bz2";
+    sha256 = {
+      x86_64-darwin = "0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
+      x86_64-linux  = "1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 ]} "$f" || true
+    done
+  '';
+
+  meta = with 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" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
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..13d8c12f52ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "7.3.1";
+  release = "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-${release}-${suffix}.tar.bz2";
+    sha256 = {
+      x86_64-darwin = "0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
+      x86_64-linux  = "0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 ]} "$f" || true
+    done
+  '';
+
+  meta = with 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" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
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..a6448baa7919
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "8.3.1";
+  release = "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-${release}-${suffix}.tar.bz2";
+    sha256 = {
+      x86_64-darwin = "fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085";
+      x86_64-linux  = "b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 ]} "$f" || true
+    done
+  '';
+
+  meta = with 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" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
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..4c2b34b0c5b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchurl
+, ncurses5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "9.3.1";
+  release = "9-2020-q2-update";
+  subdir = "9-2020q2";
+
+  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-${release}-${suffix}.tar.bz2";
+    sha256 = {
+      aarch64-linux = "1b5q2y710hy7lddj8vj3zl54gfl74j30kx3hk3i81zrcbv16ah8z";
+      x86_64-darwin = "1ils9z16wrvglh72m428y5irmd36biq79yj86756whib8izbifdv";
+      x86_64-linux  = "07zi2yr5gvhpbij5pnj49zswb9g2gw7zqp4xwwniqmq477h2xp2s";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  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 ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 ]} "$f" || true
+    done
+  '';
+
+  meta = with 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" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc/all.nix b/nixpkgs/pkgs/development/compilers/gcc/all.nix
new file mode 100644
index 000000000000..70b4b75369a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/all.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, gccStdenv
+, gcc7Stdenv
+, callPackage
+, isl_0_11, isl_0_14, isl_0_17, isl_0_20
+, libcCross
+, threadsCrossFor
+, noSysDirs
+, texinfo5
+, cloog_0_18_0, cloog
+, lowPrio
+, wrapCC
+}@args:
+
+let
+  versions = import ./versions.nix;
+  gccForMajorMinorVersion = majorMinorVersion:
+    let
+      atLeast = lib.versionAtLeast majorMinorVersion;
+      attrName = "gcc${lib.replaceStrings ["."] [""] majorMinorVersion}";
+      pkg = lowPrio (wrapCC (callPackage ./default.nix ({
+        inherit noSysDirs;
+        inherit majorMinorVersion;
+        reproducibleBuild = true;
+        profiledCompiler = false;
+        libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then args.libcCross else null;
+        threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCrossFor majorMinorVersion else { };
+        isl = if       stdenv.isDarwin then null
+              else if    atLeast "9"   then isl_0_20
+              else if    atLeast "7"   then isl_0_17
+              else if    atLeast "6"   then (if stdenv.targetPlatform.isRedox then isl_0_17 else isl_0_14)
+              else if    atLeast "4.9" then isl_0_11
+              else            /* "4.8" */   isl_0_14;
+      } // lib.optionalAttrs (majorMinorVersion == "4.8") {
+        texinfo = texinfo5; # doesn't validate since 6.1 -> 6.3 bump
+      } // lib.optionalAttrs (!(atLeast "6")) {
+        cloog = if stdenv.isDarwin
+                then null
+                else if atLeast "4.9" then cloog_0_18_0
+                else          /* 4.8 */    cloog;
+      } // lib.optionalAttrs (atLeast "6" && !(atLeast "9")) {
+        # gcc 10 is too strict to cross compile gcc <= 8
+        stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
+      })));
+    in
+      lib.nameValuePair attrName pkg;
+in
+lib.listToAttrs (map gccForMajorMinorVersion versions.allMajorVersions)
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/builder.nix b/nixpkgs/pkgs/development/compilers/gcc/common/builder.nix
new file mode 100644
index 000000000000..98525b5e237e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/builder.nix
@@ -0,0 +1,287 @@
+{ lib
+, stdenv
+, enableMultilib
+}:
+
+let
+  forceLibgccToBuildCrtStuff =
+    import ./libgcc-buildstuff.nix { inherit lib stdenv; };
+in
+
+originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
+  passthru = (originalAttrs.passthru or {}) // { inherit forceLibgccToBuildCrtStuff; };
+  preUnpack = ''
+    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 -g \
+            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))
+                if [ -e ''${!curBintools}/nix-support/ld-set-dynamic-linker ]; then
+                    extraLDFlags=-dynamic-linker=$(< ''${!curBintools}/nix-support/dynamic-linker)
+                fi
+
+                # 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 -g 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-crt1-cflags") $(< "''${!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 -g NIX_FIXINC_DUMMY''${post}="$libc_devdir/include"
+            else
+                # Hack: support impure environments.
+                extraFlags=("-isystem" "/usr/include")
+                declare -g 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 -g 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 "$withoutTargetLibc" == 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
+
+    eval "$oldOpts"
+  '';
+
+  preConfigure = (originalAttrs.preConfigure or "") + ''
+    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 -n "$crossMingw" -a -n "$withoutTargetLibc"; then
+        mkdir -p ../mingw
+        # --with-build-sysroot expects that:
+        cp -R $libcCross/include ../mingw
+        configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
+    fi
+
+    # Perform the build in a different directory.
+    mkdir ../build
+    cd ../build
+    configureScript=../$sourceRoot/configure
+  '';
+
+  postConfigure = ''
+    # Avoid store paths when embedding ./configure flags into gcc.
+    # Mangled arguments are still useful when reporting bugs upstream.
+    sed -e "/TOPLEVEL_CONFIGURE_ARGUMENTS=/ s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i Makefile
+  '';
+
+  preInstall = ''
+    mkdir -p "$out/''${targetConfig}/lib"
+    mkdir -p "''${!outputLib}/''${targetConfig}/lib"
+  '' +
+  # Make `lib64` symlinks to `lib`.
+  lib.optionalString (!enableMultilib && stdenv.hostPlatform.is64bit && !stdenv.hostPlatform.isMips64n32) ''
+    ln -s lib "$out/''${targetConfig}/lib64"
+    ln -s lib "''${!outputLib}/''${targetConfig}/lib64"
+  '' +
+  # On mips platforms, gcc follows the IRIX naming convention:
+  #
+  #  $PREFIX/lib   = mips32
+  #  $PREFIX/lib32 = mips64n32
+  #  $PREFIX/lib64 = mips64
+  #
+  # Make `lib32` symlinks to `lib`.
+  lib.optionalString (!enableMultilib && stdenv.targetPlatform.isMips64n32) ''
+    ln -s lib "$out/''${targetConfig}/lib32"
+    ln -s lib "''${!outputLib}/''${targetConfig}/lib32"
+  '';
+
+  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 "''${targetConfig+$targetConfig/}lib/lib*.dll" "''${!outputLib}"
+    moveToOutput "share/gcc-*/python" "''${!outputLib}"
+
+    if [ -z "$enableShared" ]; then
+        moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.a" "''${!outputLib}"
+    fi
+
+    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}"
+        moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.dll.a" "''${!outputLib}"
+        moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.dll" "''${!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 "install_name_tool"; then
+        for i in "''${!outputLib}"/lib/*.*.dylib "''${!outputLib}"/lib/*.so.[0-9]; 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,sys/mount.h,bits/statx.h}
+
+    # 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)
+    for i in "$out"/share/man/man1/*g++.1; do
+        if test -e "$i"; then
+            man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"`
+            ln -sf "$man_prefix"gcc.1 "$i"
+        fi
+    done
+  '';
+}))
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/checksum.nix b/nixpkgs/pkgs/development/compilers/gcc/common/checksum.nix
new file mode 100644
index 000000000000..7a20ed1b8ba3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/checksum.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, nukeReferences
+, langC
+, langCC
+, runtimeShell
+}:
+
+let
+  enableChecksum = (with stdenv; buildPlatform == hostPlatform && hostPlatform == targetPlatform) && langC && langCC && !stdenv.hostPlatform.isDarwin;
+in
+(pkg: pkg.overrideAttrs (previousAttrs: lib.optionalAttrs enableChecksum {
+  outputs = previousAttrs.outputs ++ lib.optionals enableChecksum [ "checksum" ];
+  # This is a separate phase because gcc assembles its phase scripts
+  # in bash instead of nix (we should fix that).
+  preFixupPhases = (previousAttrs.preFixupPhases or []) ++ [ "postInstallSaveChecksumPhase" ];
+  #
+  # gcc uses an auxiliary utility `genchecksum` to md5-hash (most of) its
+  # `.o` and `.a` files prior to linking (in case the linker is
+  # nondeterministic).  Since we want to compare across gccs built from two
+  # separate derivations, we wrap `genchecksum` with a `nuke-references`
+  # call.  We also stash copies of the inputs to `genchecksum` in
+  # `$checksum/inputs/` -- this is extremely helpful for debugging since
+  # it's hard to get Nix to not delete the $NIX_BUILD_TOP of a successful
+  # build.
+  #
+  postInstallSaveChecksumPhase = ''
+    mv gcc/build/genchecksum gcc/build/.genchecksum-wrapped
+    cat > gcc/build/genchecksum <<\EOF
+    #!${runtimeShell}
+    ${nukeReferences}/bin/nuke-refs $@
+    for INPUT in "$@"; do install -Dt $INPUT $checksum/inputs/; done
+    exec build/.genchecksum-wrapped $@
+    EOF
+    chmod +x gcc/build/genchecksum
+    rm gcc/*-checksum.*
+    make -C gcc cc1-checksum.o cc1plus-checksum.o
+    install -Dt $checksum/checksums/ gcc/cc*-checksum.o
+  '';
+}))
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..b8dccf9fcc57
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix
@@ -0,0 +1,261 @@
+{ lib, stdenv
+, targetPackages
+
+, withoutTargetLibc, libcCross
+, threadsCross
+, version
+
+, binutils, gmp, mpfr, libmpc, isl
+, cloog ? null
+
+, enableLTO
+, enableMultilib
+, enablePlugin
+, disableGdbPlugin ? !enablePlugin
+, enableShared
+
+, langC
+, langCC
+, langD ? false
+, langFortran
+, langJava ? false, javaAwtGtk ? false, javaAntlr ? null, javaEcj ? null
+, langAda ? false
+, langGo
+, langObjC
+, langObjCpp
+, langJit
+, disableBootstrap ? stdenv.targetPlatform != stdenv.hostPlatform
+}:
+
+assert !enablePlugin -> disableGdbPlugin;
+assert langJava -> 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;
+
+  # See https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903
+  disableBootstrap' = disableBootstrap && !langFortran && !langGo;
+
+  crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW;
+  crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
+
+  targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+                  "${stdenv.targetPlatform.config}-";
+
+  crossConfigureFlags =
+    # Ensure that -print-prog-name is able to find the correct programs.
+    [
+      "--with-as=${if targetPackages.stdenv.cc.bintools.isLLVM then binutils else targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
+      "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld"
+    ]
+    ++ (if withoutTargetLibc then [
+      "--disable-libssp"
+      "--disable-nls"
+      "--without-headers"
+      "--disable-threads"
+      "--disable-libgomp"
+      "--disable-libquadmath"
+      (lib.enableFeature enableShared "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 (threadsCross.model or "win32")
+                          else "single"}"
+      "--enable-nls"
+    ] ++ lib.optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
+      # libsanitizer requires netrom/netrom.h which is not
+      # available in uclibc.
+      "--disable-libsanitizer"
+    ] ++ lib.optional (targetPlatform.libc == "newlib" || targetPlatform.libc == "newlib-nano") "--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.optionals (!withoutTargetLibc) [
+      (if libcCross == null
+       then "--with-native-system-header-dir=${lib.getDev stdenv.cc.libc}/include"
+       else "--with-native-system-header-dir=${lib.getDev libcCross}${libcCross.incdir or "/include"}")
+      # gcc builds for cross-compilers (build != host) or cross-built
+      # gcc (host != target) always apply the offset prefix to disentangle
+      # target headers from build or host headers:
+      #     ${with_build_sysroot}${native_system_header_dir}
+      #  or ${test_exec_prefix}/${target_noncanonical}/sys-include
+      #  or ${with_sysroot}${native_system_header_dir}
+      # While native build (build == host == target) uses passed headers
+      # path as is:
+      #    ${with_build_sysroot}${native_system_header_dir}
+      #
+      # Nixpkgs uses flat directory structure for both native and cross
+      # cases. As a result libc headers don't get found for cross case
+      # and many modern features get disabled (libssp is used instead of
+      # target-specific implementations and similar). More details at:
+      #   https://github.com/NixOS/nixpkgs/pull/181802#issuecomment-1186822355
+      #
+      # We pick "/" path to effectively avoid sysroot offset and make it work
+      # as a native case.
+      "--with-build-sysroot=/"
+      # Same with the stdlibc++ headers embedded in the gcc output
+      "--with-gxx-include-dir=${placeholder "out"}/include/c++/${version}/"
+    ]
+
+    # Basic configuration
+    ++ [
+      # Force target prefix. The behavior if `--target` and `--host`
+      # are specified is inconsistent: Sometimes specifying `--target`
+      # always causes a prefix to be generated, sometimes it's only
+      # added if the `--host` and `--target` differ. This means that
+      # sometimes there may be a prefix even though nixpkgs doesn't
+      # expect one and sometimes there may be none even though nixpkgs
+      # expects one (since not all information is serialized into the
+      # config attribute). The easiest way out of these problems is to
+      # always set the program prefix, so gcc will conform to our
+      # expectations.
+      "--program-prefix=${targetPrefix}"
+
+      (lib.enableFeature enableLTO "lto")
+      "--disable-libstdcxx-pch"
+      "--without-included-gettext"
+      "--with-system-zlib"
+      "--enable-static"
+      "--enable-languages=${
+        lib.concatStringsSep ","
+          (  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.singleton (lib.enableFeature enablePlugin "plugin")
+    # Libcc1 is the GCC cc1 plugin for the GDB debugger which is only used by gdb
+    ++ lib.optional disableGdbPlugin "--disable-libcc1"
+
+    # Support -m32 on powerpc64le/be
+    ++ lib.optional (targetPlatform.system == "powerpc64le-linux")
+      "--enable-targets=powerpcle-linux"
+    ++ lib.optional (targetPlatform.system == "powerpc64-linux")
+      "--enable-targets=powerpc-linux"
+
+    # Fix "unknown long double size, cannot define BFP_FMT"
+    ++ lib.optional (targetPlatform.isPower && targetPlatform.isMusl)
+      "--disable-decimal-float"
+
+    # Optional features
+    ++ lib.optional (isl != null) "--with-isl=${isl}"
+    ++ lib.optionals (lib.versionOlder version "5" && cloog != null) [
+      "--with-cloog=${cloog}"
+      "--disable-cloog-version-check"
+      "--enable-cloog-backend=isl"
+    ]
+
+    # Ada options, gcc can't build the runtime library for a cross compiler
+    ++ lib.optional langAda
+      (if hostPlatform == targetPlatform
+       then "--enable-libada"
+       else "--disable-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)  targetPlatform; inherit lib; }
+    ++ lib.optionals (targetPlatform != hostPlatform) crossConfigureFlags
+    ++ lib.optional disableBootstrap' "--disable-bootstrap"
+
+    # Platform-specific flags
+    ++ lib.optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
+    ++ lib.optional targetPlatform.isNetBSD "--disable-libssp" # Provided by libc.
+    ++ 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.optional (targetPlatform.libc == "musl")
+      # musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
+      "--disable-libmpx"
+    ++ 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"
+    ]
+    # On mips64-unknown-linux-gnu libsanitizer defines collide with
+    # glibc's definitions and fail the build. It was fixed in gcc-13+.
+    ++ lib.optionals (targetPlatform.isMips && targetPlatform.parsed.abi.name == "gnu" && lib.versions.major version == "12") [
+      "--disable-libsanitizer"
+    ]
+    ++ lib.optionals targetPlatform.isAlpha [
+      # Workaround build failures like:
+      #   cc1: error: fp software completion requires '-mtrap-precision=i' [-Werror]
+      "--disable-werror"
+    ]
+  ;
+
+in configureFlags
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/dependencies.nix b/nixpkgs/pkgs/development/compilers/gcc/common/dependencies.nix
new file mode 100644
index 000000000000..a38cdcb9e20f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/dependencies.nix
@@ -0,0 +1,92 @@
+{ lib
+, stdenv
+, version
+, buildPackages
+, targetPackages
+, texinfo
+, which
+, gettext
+, pkg-config ? null
+, gnused
+, patchelf
+, gmp
+, mpfr
+, libmpc
+, libucontext ? null
+, libxcrypt ? null
+, cloog ? null
+, isl ? null
+, zlib ? null
+, gnat-bootstrap ? null
+, flex ? null
+, boehmgc ? null
+, zip ? null
+, unzip ? null
+, gtk2 ? null
+, libart_lgpl ? null
+, perl ? null
+, xlibs ? null
+, langJava ? false
+, javaAwtGtk ? false
+, langAda ? false
+, langGo ? false
+, withoutTargetLibc ? null
+, threadsCross ? null
+}:
+
+let
+  inherit (lib) optionals;
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+in
+
+{
+  # same for all gcc's
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  nativeBuildInputs = [
+    texinfo
+    which
+    gettext
+  ]
+  ++ optionals (perl != null) [ perl ]
+  ++ optionals javaAwtGtk [ pkg-config ]
+  ++ optionals (with stdenv.targetPlatform; isVc4 || isRedox && flex != null) [ flex ]
+  ++ optionals langAda [ gnat-bootstrap ]
+  # 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.
+  ++ optionals buildPlatform.isDarwin [ gnused ]
+  ;
+
+  # For building runtime libs
+  # same for all gcc's
+  depsBuildTarget =
+    (
+      if hostPlatform == buildPlatform then [
+        targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+      ] else assert targetPlatform == hostPlatform; [
+        # build != host == target
+        stdenv.cc
+      ]
+    )
+    ++ optionals targetPlatform.isLinux [ patchelf ];
+
+  buildInputs = [
+    gmp
+    mpfr
+    libmpc
+  ]
+  ++ optionals (lib.versionAtLeast version "10") [ libxcrypt ]
+  ++ [
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ]
+  ++ optionals (lib.versionOlder version "5" && cloog != null) [ cloog ]
+  ++ optionals (isl != null) [ isl ]
+  ++ optionals (zlib != null) [ zlib ]
+  ++ optionals langJava [ boehmgc zip unzip ]
+  ++ optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)
+  ++ optionals (langGo && stdenv.hostPlatform.isMusl) [ libucontext ]
+  ;
+
+  # threadsCross.package after gcc6 so i assume its okay for 4.8 and 4.9 too
+  depsTargetTarget = optionals (!withoutTargetLibc && threadsCross != { } && threadsCross.package != null) [ threadsCross.package ];
+}
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..30a24185e3b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/extra-target-flags.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, withoutTargetLibc, langD ? false, libcCross, threadsCross }:
+
+let
+  inherit (stdenv) 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"}"
+      ] ++ lib.optionals (! withoutTargetLibc) [
+        "-B${lib.getLib dep}${dep.libdir or "/lib"}"
+      ]);
+    in mkFlags libcCross langD
+       ++ lib.optionals (!withoutTargetLibc) (mkFlags (threadsCross.package or null) langD)
+    ;
+
+  EXTRA_LDFLAGS_FOR_TARGET = let
+      mkFlags = dep: lib.optionals (targetPlatform != hostPlatform && dep != null) ([
+        "-Wl,-L${lib.getLib dep}${dep.libdir or "/lib"}"
+      ] ++ (if withoutTargetLibc 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 (!withoutTargetLibc) (mkFlags (threadsCross.package or null))
+    ;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix b/nixpkgs/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix
new file mode 100644
index 000000000000..991efc20eee5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+}:
+
+# Trick to build a gcc that is capable of emitting shared libraries *without* having the
+# targetPlatform libc available beforehand.  Taken from:
+#   https://web.archive.org/web/20170222224855/http://frank.harvard.edu/~coldwell/toolchain/
+#   https://web.archive.org/web/20170224235700/http://frank.harvard.edu/~coldwell/toolchain/t-linux.diff
+let
+  # crt{i,n}.o are the first and last (respectively) object file
+  # linked when producing an executable.  Traditionally these
+  # files are delivered as part of the C library, but on GNU
+  # systems they are in fact built by GCC.  Since libgcc needs to
+  # build before glibc, we can't wait for them to be copied by
+  # glibc.  At this early pre-glibc stage these files sometimes
+  # have different names.
+  crtstuff-ofiles =
+    if stdenv.targetPlatform.isPower
+    then "ecrti.o ecrtn.o ncrti.o ncrtn.o"
+    else "crti.o crtn.o";
+
+  # Normally, `SHLIB_LC` is set to `-lc`, which means that
+  # `libgcc_s.so` cannot be built until `libc.so` is available.
+  # The assignment below clobbers this variable, removing the
+  # `-lc`.
+  #
+  # On PowerPC we add `-mnewlib`, which means "libc has not been
+  # built yet".  This causes libgcc's Makefile to use the
+  # gcc-built `{e,n}crt{n,i}.o` instead of failing to find the
+  # versions which have been repackaged in libc as `crt{n,i}.o`
+  #
+  SHLIB_LC = lib.optionalString stdenv.targetPlatform.isPower "-mnewlib";
+
+in
+''
+  echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in
+  echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in
+''
+
+  # Meanwhile, crt{i,n}.S are not present on certain platforms
+  # (e.g. LoongArch64), resulting in the following error:
+  #
+  # No rule to make target '../../../gcc-xx.x.x/libgcc/config/loongarch/crti.S', needed by 'crti.o'.  Stop.
+  #
+  # For LoongArch64 and S390, a hacky workaround is to simply touch them,
+  # as the platform forces .init_array support.
+  #
+  # https://www.openwall.com/lists/musl/2022/11/09/3
+  #
+  # 'parsed.cpu.family' won't be correct for every platform.
++ lib.optionalString (stdenv.targetPlatform.isLoongArch64 || stdenv.targetPlatform.isS390 || stdenv.targetPlatform.isAlpha) ''
+  touch libgcc/config/${stdenv.targetPlatform.parsed.cpu.family}/crt{i,n}.S
+''
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/libgcc.nix b/nixpkgs/pkgs/development/compilers/gcc/common/libgcc.nix
new file mode 100644
index 000000000000..c8342ae90054
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/libgcc.nix
@@ -0,0 +1,164 @@
+{ lib
+, stdenv
+, version
+, langC
+, langCC
+, langJit
+, enableShared
+, targetPlatform
+, hostPlatform
+, withoutTargetLibc
+, libcCross
+}:
+
+assert !stdenv.targetPlatform.hasSharedLibraries -> !enableShared;
+
+drv: lib.pipe drv
+
+([
+
+  (pkg: pkg.overrideAttrs (previousAttrs:
+    lib.optionalAttrs (
+      targetPlatform != hostPlatform &&
+      (enableShared || targetPlatform.isMinGW) &&
+      withoutTargetLibc
+    ) {
+      makeFlags = [ "all-gcc" "all-target-libgcc" ];
+      installTargets = "install-gcc install-target-libgcc";
+    }))
+
+] ++
+
+# nixpkgs did not add the "libgcc" output until gcc11.  In theory
+# the following condition can be changed to `true`, but that has not
+# been tested.
+lib.optionals (lib.versionAtLeast version "11.0")
+
+(let
+  targetPlatformSlash =
+    if hostPlatform == targetPlatform
+    then ""
+    else "${targetPlatform.config}/";
+
+  # If we are building a cross-compiler and the target libc provided
+  # to us at build time has a libgcc, use that instead of building a
+  # new one.  This avoids having two separate (but identical) libgcc
+  # outpaths in the closure of most packages, which can be confusing.
+  useLibgccFromTargetLibc =
+    libcCross != null &&
+    libcCross?passthru.libgcc;
+
+  enableLibGccOutput =
+    (!stdenv.targetPlatform.isWindows || (with stdenv; targetPlatform == hostPlatform)) &&
+    !langJit &&
+    !stdenv.hostPlatform.isDarwin &&
+    enableShared &&
+    !useLibgccFromTargetLibc
+  ;
+
+  # For some reason libgcc_s.so has major-version "2" on m68k but
+  # "1" everywhere else.  Might be worth changing this to "*".
+  libgcc_s-version-major =
+    if targetPlatform.isM68k
+    then "2"
+    else "1";
+
+in
+[
+
+(pkg: pkg.overrideAttrs (previousAttrs: lib.optionalAttrs useLibgccFromTargetLibc {
+  passthru = (previousAttrs.passthru or {}) // {
+    inherit (libcCross) libgcc;
+  };
+}))
+
+(pkg: pkg.overrideAttrs (previousAttrs: lib.optionalAttrs ((!langC) || langJit || enableLibGccOutput) {
+  outputs = previousAttrs.outputs ++ lib.optionals enableLibGccOutput [ "libgcc" ];
+  # This is a separate phase because gcc assembles its phase scripts
+  # in bash instead of nix (we should fix that).
+  preFixupPhases = (previousAttrs.preFixupPhases or []) ++ lib.optionals ((!langC) || enableLibGccOutput) [ "preFixupLibGccPhase" ];
+  preFixupLibGccPhase =
+    # delete extra/unused builds of libgcc_s in non-langC builds
+    # (i.e. libgccjit, gnat, etc) to avoid potential confusion
+    lib.optionalString (!langC) ''
+      rm -f $out/lib/libgcc_s.so*
+    ''
+    + lib.optionalString (hostPlatform != targetPlatform) ''
+      mkdir -p $lib/lib/
+      ln -s ${targetPlatformSlash}lib $lib/lib
+    ''
+
+    # TODO(amjoseph): remove the `libgcc_s.so` symlinks below and replace them
+    # with a `-L${gccForLibs.libgcc}/lib` in cc-wrapper's
+    # `$out/nix-support/cc-flags`.  See also:
+    # - https://github.com/NixOS/nixpkgs/pull/209870#discussion_r1130614895
+    # - https://github.com/NixOS/nixpkgs/pull/209870#discussion_r1130635982
+    # - https://github.com/NixOS/nixpkgs/commit/404155c6acfa59456aebe6156b22fe385e7dec6f
+    #
+    # move `libgcc_s.so` into its own output, `$libgcc`
+    + lib.optionalString enableLibGccOutput (''
+      # move libgcc from lib to its own output (libgcc)
+      mkdir -p $libgcc/lib
+      mv    $lib/${targetPlatformSlash}lib/libgcc_s.so      $libgcc/lib/
+      mv    $lib/${targetPlatformSlash}lib/libgcc_s.so.${libgcc_s-version-major}    $libgcc/lib/
+      ln -s $libgcc/lib/libgcc_s.so   $lib/${targetPlatformSlash}lib/
+      ln -s $libgcc/lib/libgcc_s.so.${libgcc_s-version-major} $lib/${targetPlatformSlash}lib/
+    ''
+    #
+    # Nixpkgs ordinarily turns dynamic linking into pseudo-static linking:
+    # libraries are still loaded dynamically, exactly which copy of each
+    # library is loaded is permanently fixed at compile time (via RUNPATH).
+    # For libgcc_s we must revert to the "impure dynamic linking" style found
+    # in imperative software distributions.  We must do this because
+    # `libgcc_s` calls `malloc()` and therefore has a `DT_NEEDED` for `libc`,
+    # which creates two problems:
+    #
+    #  1. A circular package dependency `glibc`<-`libgcc`<-`glibc`
+    #
+    #  2. According to the `-Wl,-rpath` flags added by Nixpkgs' `ld-wrapper`,
+    #     the two versions of `glibc` in the cycle above are actually
+    #     different packages.  The later one is compiled by this `gcc`, but
+    #     the earlier one was compiled by the compiler *that compiled* this
+    #     `gcc` (usually the bootstrapFiles).  In any event, the `glibc`
+    #     dynamic loader won't honor that specificity without namespaced
+    #     manual loads (`dlmopen()`).  Once a `libc` is present in the address
+    #     space of a process, that `libc` will be used to satisfy all
+    #     `DT_NEEDED`s for `libc`, regardless of `RUNPATH`s.
+    #
+    # So we wipe the RUNPATH using `patchelf --set-rpath ""`.  We can't use
+    # `patchelf --remove-rpath`, because at least as of patchelf 0.15.0 it
+    # will leave the old RUNPATH string in the file where the reference
+    # scanner can still find it:
+    #
+    #   https://github.com/NixOS/patchelf/issues/453
+    #
+    # Note: we might be using the bootstrapFiles' copy of patchelf, so we have
+    # to keep doing it this way until both the issue is fixed *and* all the
+    # bootstrapFiles are regenerated, on every platform.
+    #
+    # This patchelfing is *not* effectively equivalent to copying
+    # `libgcc_s` into `glibc`'s outpath.  There is one minor and one
+    # major difference:
+    #
+    # 1. (Minor): multiple builds of `glibc` (say, with different
+    #    overrides or parameters) will all reference a single store
+    #    path:
+    #
+    #      /nix/store/xxx...xxx-gcc-libgcc/lib/libgcc_s.so.1
+    #
+    #    This many-to-one referrer relationship will be visible in the store's
+    #    dependency graph, and will be available to `nix-store -q` queries.
+    #    Copying `libgcc_s` into each of its referrers would lose that
+    #    information.
+    #
+    # 2. (Major): by referencing `libgcc_s.so.1`, rather than copying it, we
+    #    are still able to run `nix-store -qd` on it to find out how it got
+    #    built!  Most importantly, we can see from that deriver which compiler
+    #    was used to build it (or if it is part of the unpacked
+    #    bootstrap-files).  Copying `libgcc_s.so.1` from one outpath to
+    #    another eliminates the ability to make these queries.
+    #
+    + ''
+      patchelf --set-rpath "" $libgcc/lib/libgcc_s.so.${libgcc_s-version-major}
+    '');
+}))]))
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/meta.nix b/nixpkgs/pkgs/development/compilers/gcc/common/meta.nix
new file mode 100644
index 000000000000..84c3dc189b1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/meta.nix
@@ -0,0 +1,19 @@
+{ lib, version, }:
+
+with lib; {
+  homepage = "https://gcc.gnu.org/";
+  license = licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
+  description = "GNU Compiler Collection, version ${version}";
+  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.
+  '';
+
+  platforms = platforms.unix;
+  maintainers = if versionOlder version "5" then [ maintainers.veprbl ] else teams.gcc.members;
+
+}
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..cc6a67d64057
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/platform-flags.nix
@@ -0,0 +1,32 @@
+{ lib, targetPlatform }:
+
+let
+  isAarch64Darwin = targetPlatform.isDarwin && targetPlatform.isAarch64;
+  gcc = targetPlatform.gcc or {};
+  p =  gcc
+    // targetPlatform.parsed.abi;
+in lib.concatLists [
+  # --with-arch= is unknown flag on x86_64 and aarch64-darwin.
+  (lib.optional (!targetPlatform.isx86_64 && !isAarch64Darwin && p ? arch) "--with-arch=${p.arch}")
+  # --with-cpu on aarch64-darwin fails with "Unknown cpu used in --with-cpu=apple-a13".
+  (lib.optional (!isAarch64Darwin && 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.optionals targetPlatform.isPower64
+    # musl explicitly rejects 128-bit long double on
+    # powerpc64; see musl/arch/powerpc64/bits/float.h
+    (lib.optionals
+      (!targetPlatform.isMusl
+       && (targetPlatform.isLittleEndian ||
+           # "... --with-long-double-format is only supported if the default cpu is power7 or newer"
+           #  https://github.com/NixOS/nixpkgs/pull/170215#issuecomment-1202164709
+           (lib.lists.elem
+             (lib.strings.substring 0 6 (p.cpu or ""))
+             [ "power7" "power8" "power9" "power1"/*0, 11, etc*/ ]))) [
+      "--with-long-double-128"
+      "--with-long-double-format=${gcc.long-double-format or "ieee"}"
+    ]))
+  (lib.optional targetPlatform.isMips64n32 "--disable-libsanitizer") # libsanitizer does not compile on mips64n32
+]
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..77179d739768
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix
@@ -0,0 +1,129 @@
+{ lib
+, stdenv
+, version, buildPlatform, hostPlatform, targetPlatform
+, gnat-bootstrap ? null
+, langAda ? false
+, langFortran
+, langJava ? false
+, langJit ? false
+, langGo
+, withoutTargetLibc
+, enableShared
+, enableMultilib
+, pkgsBuildTarget
+}:
+
+assert langJava -> lib.versionOlder version "7";
+assert langAda -> gnat-bootstrap != null; let
+  needsLib
+    =  (lib.versionOlder version "7" && (langJava || langGo))
+    || (lib.versions.major version == "4" && lib.versions.minor version == "9" && targetPlatform.isDarwin);
+in 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 needsLib ''
+  export lib=$out;
+'' + lib.optionalString langAda ''
+  export PATH=${gnat-bootstrap}/bin:$PATH
+''
+
+# For a cross-built native compiler, i.e. build!=(host==target), the
+# bundled libgfortran needs a gfortran which can run on the
+# buildPlatform and emit code for the targetPlatform.  The compiler
+# which is built alongside gfortran in this configuration doesn't
+# meet that need: it runs on the hostPlatform.
++ lib.optionalString (langFortran && (with stdenv; buildPlatform != hostPlatform && hostPlatform == targetPlatform)) ''
+  export GFORTRAN_FOR_TARGET=${pkgsBuildTarget.gfortran}/bin/${stdenv.targetPlatform.config}-gfortran
+''
+
+# On x86_64-darwin, the gnat-bootstrap bootstrap compiler that we need to build a
+# native GCC with Ada support emits assembly that is accepted by the Clang
+# integrated assembler, but not by the GNU assembler in cctools-port that Nix
+# usually in the x86_64-darwin stdenv.  In particular, x86_64-darwin gnat-bootstrap
+# emits MOVQ as the mnemonic for quadword interunit moves, such as between XMM
+# and general registers (e.g "movq %xmm0, %rbp"); the cctools-port assembler,
+# however, only recognises MOVD for such moves.
+#
+# Therefore, for native x86_64-darwin builds that support Ada, we have to use
+# the Clang integrated assembler to build (at least stage 1 of) GCC, but have to
+# target GCC at the cctools-port GNU assembler.  In the wrapped x86_64-darwin
+# gnat-bootstrap, the former is provided as `as`, while the latter is provided as
+# `gas`.
+#
++ lib.optionalString (
+    langAda
+    && buildPlatform == hostPlatform
+    && hostPlatform == targetPlatform
+    && targetPlatform.isx86_64
+    && targetPlatform.isDarwin
+  ) ''
+  export AS_FOR_BUILD=${gnat-bootstrap}/bin/as
+  export AS_FOR_TARGET=${gnat-bootstrap}/bin/gas
+''
+
+# NOTE 2020/3/18: This environment variable prevents configure scripts from
+# detecting the presence of aligned_alloc on Darwin.  There are many facts that
+# collectively make this fix necessary:
+#  - Nix uses a fixed set of standard library headers on all MacOS systems,
+#    regardless of their actual version.  (Nix uses version 10.12 headers.)
+#  - Nix uses the native standard library binaries for the build system.  That
+#    means the standard library binaries may not exactly match the standard
+#    library headers.
+#  - The aligned_alloc procedure is present in MacOS 10.15 (Catalina), but not
+#    in earlier versions.  Therefore on Catalina systems, aligned_alloc is
+#    linkable (i.e. present in the binary libraries) but not present in the
+#    headers.
+#  - Configure scripts detect a procedure's existence by checking whether it is
+#    linkable.  They do not check whether it is present in the headers.
+#  - GCC throws an error during compilation because aligned_alloc is not
+#    defined in the headers---even though the linker can see it.
+#
+# This fix would not be necessary if ANY of the above were false:
+#  - If Nix used native headers for each different MacOS version, aligned_alloc
+#    would be in the headers on Catalina.
+#  - If Nix used the same library binaries for each MacOS version, aligned_alloc
+#    would not be in the library binaries.
+#  - If Catalina did not include aligned_alloc, this wouldn't be a problem.
+#  - If the configure scripts looked for header presence as well as
+#    linkability, they would see that aligned_alloc is missing.
+#  - If GCC allowed implicit declaration of symbols, it would not fail during
+#    compilation even if the configure scripts did not check header presence.
+#
++ lib.optionalString (buildPlatform.isDarwin) ''
+    export build_configargs=ac_cv_func_aligned_alloc=no
+'' + lib.optionalString (hostPlatform.isDarwin) ''
+    export host_configargs=ac_cv_func_aligned_alloc=no
+'' + lib.optionalString (targetPlatform.isDarwin) ''
+    export target_configargs=ac_cv_func_aligned_alloc=no
+''
+
+# In order to properly install libgccjit on macOS Catalina, strip(1)
+# upon installation must not remove external symbols, otherwise the
+# install step errors with "symbols referenced by indirect symbol
+# table entries that can't be stripped".
++ lib.optionalString (hostPlatform.isDarwin && langJit) ''
+  export STRIP='strip -x'
+''
+
+# HACK: if host and target config are the same, but the platforms are
+# actually different we need to convince the configure script that it
+# is in fact building a cross compiler although it doesn't believe it.
++ lib.optionalString (targetPlatform.config == hostPlatform.config && targetPlatform != hostPlatform) ''
+  substituteInPlace configure --replace is_cross_compiler=no is_cross_compiler=yes
+''
+
+# Normally (for host != target case) --without-headers automatically
+# enables 'inhibit_libc=true' in gcc's gcc/configure.ac. But case of
+# gcc->clang or dynamic->static "cross"-compilation manages to evade it: there
+# hostPlatform != targetPlatform, hostPlatform.config == targetPlatform.config.
+# We explicitly inhibit libc headers use in this case as well.
++ lib.optionalString (targetPlatform != hostPlatform &&
+                      withoutTargetLibc &&
+                      targetPlatform.config == hostPlatform.config) ''
+  export inhibit_libc=true
+''
+
++ lib.optionalString (targetPlatform != hostPlatform && withoutTargetLibc && enableShared)
+  (import ./libgcc-buildstuff.nix { inherit lib stdenv; })
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/strip-attributes.nix b/nixpkgs/pkgs/development/compilers/gcc/common/strip-attributes.nix
new file mode 100644
index 000000000000..f2f0efb1264a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/strip-attributes.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, langJit }:
+
+{
+  # Note [Cross-compiler stripping]
+  # gcc requires delicate stripping as it installs ELF files for both
+  # HOST and TARGET platforms. It requires according strip tool otherwise
+  # strip could remove sections it's not aware of.
+  # Example ARM breakage by x86_64 strip: https://bugs.gentoo.org/697428
+  #
+  # Let's recap the file layout for directories with object files for a
+  # cross-compiler:
+  #
+  # $out (host != target)
+  # `- bin: HOST
+  #    lib/*.{a,o}: HOST
+  #      `- gcc/<TARGET>/<VERSION>/*.{a,o}: TARGET
+  #                               `- plugin/: HOST
+  #  `- lib{,32,64,x32}: symlink to lib or identical layout
+  #  `- libexec/: HOST
+  #  `- <TARGET>/: TARGET
+  #
+  # $out (host == target) has identical directory layout.
+  #
+  # $lib (host != target):
+  # `- <TARGET>/lib/*.{la,so}: TARGET
+  #
+  # $lib (host == target):
+  # `- lib/*.{la,so}: HOST
+
+  # The rest of stripDebugList{Host,Target} will be populated in
+  # postInstall to disambiguate lib/ object files.
+  stripDebugList = [ "bin" "libexec" ];
+  stripDebugListTarget = [ stdenv.targetPlatform.config ];
+
+  preFixup = ''
+    # Populate most delicated lib/ part of stripDebugList{,Target}
+    updateDebugListPaths() {
+      local oldOpts
+      oldOpts="$(shopt -p nullglob)" || true
+      shopt -s nullglob
+
+      pushd $out
+      local -ar outHostFiles=(
+        lib{,32,64}/*.{a,o,so*}
+        lib{,32,64}/gcc/${stdenv.targetPlatform.config}/*/plugin
+      )
+      local -ar outTargetFiles=(
+        lib{,32,64}/gcc/${stdenv.targetPlatform.config}/*/*.{a,o,so*}
+      )
+      popd
+  '' + lib.optionalString (!langJit) ''
+    ${/*keep indentation*/ ""}
+      pushd $lib
+      local -ar libHostFiles=(
+        lib{,32,64}/*.{a,o,so*}
+      )
+      local -ar libTargetFiles=(
+        lib{,32,64}/${stdenv.targetPlatform.config}/*.{a,o,so*}
+      )
+      popd
+
+  '' + ''
+      eval "$oldOpts"
+
+      stripDebugList="$stripDebugList ''${outHostFiles[*]} ''${libHostFiles[*]}"
+      stripDebugListTarget="$stripDebugListTarget ''${outTargetFiles[*]} ''${libTargetFiles[*]}"
+    }
+    updateDebugListPaths
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc/default.nix b/nixpkgs/pkgs/development/compilers/gcc/default.nix
new file mode 100644
index 000000000000..53bc057a5b25
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/default.nix
@@ -0,0 +1,457 @@
+{ lib, 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
+, reproducibleBuild ? true
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? stdenv.targetPlatform.hasSharedLibraries
+, enableLTO ? stdenv.hostPlatform.hasSharedLibraries
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man)
+, gmp, mpfr, libmpc, gettext, which, patchelf, binutils
+, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null
+, libucontext ? null
+, gnat-bootstrap ? null
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, withoutTargetLibc ? false
+, gnused ? null
+, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, buildPackages
+, pkgsBuildTarget
+, libxcrypt
+, disableGdbPlugin ? !enablePlugin || (stdenv.targetPlatform.isAvr && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+, nukeReferences
+, callPackage
+, majorMinorVersion
+, darwin
+
+# only for gcc<=6.x
+, langJava ? false
+, flex
+, boehmgc ? null
+, zip ? null, unzip ? null, pkg-config ? 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
+}:
+
+let
+  versions = import ./versions.nix;
+  version = versions.fromMajorMinor majorMinorVersion;
+
+  majorVersion = lib.versions.major version;
+  atLeast13 = lib.versionAtLeast version "13";
+  atLeast12 = lib.versionAtLeast version "12";
+  atLeast11 = lib.versionAtLeast version "11";
+  atLeast10 = lib.versionAtLeast version "10";
+  atLeast9  = lib.versionAtLeast version  "9";
+  atLeast8  = lib.versionAtLeast version  "8";
+  atLeast7  = lib.versionAtLeast version  "7";
+  atLeast6  = lib.versionAtLeast version  "6";
+  atLeast49 = lib.versionAtLeast version  "4.9";
+  is13 = majorVersion == "13";
+  is12 = majorVersion == "12";
+  is11 = majorVersion == "11";
+  is10 = majorVersion == "10";
+  is9  = majorVersion == "9";
+  is8  = majorVersion == "8";
+  is7  = majorVersion == "7";
+  is6  = majorVersion == "6";
+  is49 = majorVersion == "4" && lib.versions.minor version == "9";
+  is48 = majorVersion == "4" && lib.versions.minor version == "8";
+in
+
+# We enable the isl cloog backend.
+assert !atLeast6 -> (cloog != null -> isl != null);
+
+assert langJava -> !atLeast7 && zip != null && unzip != null && zlib != null && boehmgc != null && perl != null;  # for `--enable-java-home'
+
+# Make sure we get GNU sed.
+assert stdenv.buildPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+assert (atLeast6 && !is7 && !is8) -> (langAda -> gnat-bootstrap != null);
+
+# TODO: fixup D bootstapping, probably by using gdc11 (and maybe other changes).
+#   error: GDC is required to build d
+assert atLeast12 -> !langD;
+
+# threadsCross is just for MinGW
+assert threadsCross != {} -> stdenv.targetPlatform.isWindows;
+
+# profiledCompiler builds inject non-determinism in one of the compilation stages.
+# If turned on, we can't provide reproducible builds anymore
+assert reproducibleBuild -> profiledCompiler == false;
+
+with lib;
+with builtins;
+
+let inherit version;
+    disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler);
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches = callFile ./patches {};
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW;
+    stageNameAddon = optionalString withoutTargetLibc "-nolibc";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}${stageNameAddon}-";
+
+    javaAwtGtk = langJava && x11Support;
+    xlibs = [
+      libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
+      xorgproto
+    ];
+    callFile = lib.callPackageWith ({
+      # lets
+      inherit
+        majorVersion
+        version
+        buildPlatform
+        hostPlatform
+        targetPlatform
+        patches
+        crossMingw
+        stageNameAddon
+        crossNameAddon
+      ;
+      # inherit generated with 'nix eval --json --impure --expr "with import ./. {}; lib.attrNames (lib.functionArgs gcc${majorVersion}.cc.override)" | jq '.[]' --raw-output'
+      inherit
+        binutils
+        buildPackages
+        cloog
+        withoutTargetLibc
+        disableBootstrap
+        disableGdbPlugin
+        enableLTO
+        enableMultilib
+        enablePlugin
+        enableShared
+        fetchpatch
+        fetchurl
+        gettext
+        gmp
+        gnat-bootstrap
+        gnused
+        isl
+        langAda
+        langC
+        langCC
+        langD
+        langFortran
+        langGo
+        langJit
+        langObjC
+        langObjCpp
+        lib
+        libcCross
+        libmpc
+        libucontext
+        libxcrypt
+        mpfr
+        name
+        noSysDirs
+        nukeReferences
+        patchelf
+        perl
+        pkgsBuildTarget
+        profiledCompiler
+        reproducibleBuild
+        staticCompiler
+        stdenv
+        targetPackages
+        texinfo
+        threadsCross
+        which
+        zip
+        zlib
+      ;
+    } // lib.optionalAttrs (!atLeast7) {
+      inherit
+        boehmgc
+        flex
+        gnat-bootstrap
+        gtk2
+        langAda
+        langJava
+        libICE
+        libSM
+        libX11
+        libXi
+        libXrandr
+        libXrender
+        libXt
+        libXtst
+        libart_lgpl
+        pkg-config
+        unzip
+        x11Support
+        xorgproto
+        javaAwtGtk
+        xlibs
+      ;
+      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";
+      };
+    });
+
+in
+
+# We need all these X libraries when building AWT with GTK.
+assert !atLeast7 -> (x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []);
+
+lib.pipe ((callFile ./common/builder.nix {}) ({
+  pname = "${crossNameAddon}${name}";
+  inherit version;
+
+  src = if is6 && stdenv.targetPlatform.isVc4 then fetchFromGitHub {
+    owner = "itszor";
+    repo = "gcc-vc4";
+    rev = "e90ff43f9671c760cf0d1dd62f569a0fb9bf8918";
+    sha256 = "0gxf66hwqk26h8f853sybphqa5ca0cva2kmrw5jsiv6139g0qnp8";
+  } else if is6 && stdenv.targetPlatform.isRedox then fetchFromGitHub {
+    owner = "redox-os";
+    repo = "gcc";
+    rev = "f360ac095028d286fc6dde4d02daed48f59813fa"; # `redox` branch
+    sha256 = "1an96h8l58pppyh3qqv90g8hgcfd9hj7igvh2gigmkxbrx94khfl";
+  } else fetchurl {
+    url = if atLeast7
+          then "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"
+          else if atLeast6
+          then "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz"
+          else "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
+    ${if is10 || is11 || is13 then "hash" else "sha256"} =
+      versions.srcHashForVersion version;
+  };
+
+  inherit patches;
+
+  outputs =
+    if atLeast7
+    then [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib"
+    else if atLeast49 && (langJava || langGo || (if atLeast6 then langJit else targetPlatform.isDarwin)) then ["out" "man" "info"]
+    else [ "out" "lib" "man" "info" ];
+
+  setOutputFlags = false;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  hardeningDisable = [ "format" "pie" ]
+  ++ lib.optionals (is11 && langAda) [ "fortify3" ];
+
+  postPatch = lib.optionalString atLeast7 ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  ''
+  # This should kill all the stdinc frameworks that gcc and friends like to
+  # insert into default search paths.
+  + lib.optionalString (atLeast6 && hostPlatform.isDarwin) ''
+    substituteInPlace gcc/config/darwin-c.c${lib.optionalString atLeast12 "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"
+  ''
+  + (
+    lib.optionalString (targetPlatform != hostPlatform || stdenv.cc.libc != null)
+      # 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,UCLIBC,MUSL}_DYNAMIC_LINKER macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q ${lib.optionalString (!atLeast6) "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' \
+                 -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
+             done
+        '' + lib.optionalString (atLeast6 && targetPlatform.libc == "musl") ''
+           sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
+        ''
+        )
+    ))
+      + lib.optionalString (atLeast7 && targetPlatform.isAvr) (''
+            makeFlagsArray+=(
+               '-s' # workaround for hitting hydra log limit
+               'LIMITS_H_TEST=false'
+            )
+          '');
+
+  inherit noSysDirs staticCompiler withoutTargetLibc
+    libcCross crossMingw;
+
+  inherit (callFile ./common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
+
+  preConfigure = (callFile ./common/pre-configure.nix { }) + lib.optionalString atLeast10 ''
+    ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h
+  '';
+
+  dontDisableStatic = true;
+
+  configurePlatforms = [ "build" "host" "target" ];
+
+  configureFlags = (callFile ./common/configure-flags.nix { })
+    ++ optional (is7 && targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419"
+    ++ optional (is7 && targetPlatform.isNetBSD) "--disable-libcilkrts";
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags =
+    # we do not yet have Nix-driven profiling
+    assert atLeast12 -> (profiledCompiler -> !disableBootstrap);
+    if atLeast11
+    then let target =
+               lib.optionalString (profiledCompiler) "profiled" +
+               lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap";
+         in lib.optional (target != "") target
+    else
+      optional
+        (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+        (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  inherit (callFile ./common/strip-attributes.nix { })
+    stripDebugList
+    stripDebugListTarget
+    preFixup;
+
+  # https://gcc.gnu.org/PR109898
+  enableParallelInstalling = false;
+
+  env = mapAttrs (_: v: toString v) ({
+
+    NIX_NO_SELF_RPATH = true;
+
+    # 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 (callFile ./common/extra-target-flags.nix { })
+      EXTRA_FLAGS_FOR_TARGET
+      EXTRA_LDFLAGS_FOR_TARGET
+      ;
+  } // optionalAttrs is7 {
+    NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"
+      # Downgrade register storage class specifier errors to warnings when building a cross compiler from a clang stdenv.
+      + lib.optionalString (stdenv.cc.isClang && targetPlatform != hostPlatform) " -Wno-register";
+  } // optionalAttrs (!is7 && !atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) {
+    NIX_CFLAGS_COMPILE = "-Wno-register";
+  } // optionalAttrs (!atLeast7) {
+    inherit langJava;
+  } // optionalAttrs atLeast6 {
+    NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
+  });
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langAda langFortran langGo langD langJava version;
+    isGNU = true;
+    hardeningUnsupportedFlags = lib.optional is48 "stackprotector"
+      ++ lib.optional (!atLeast11) "zerocallusedregs"
+      ++ lib.optional (!atLeast12) "fortify3"
+      ++ lib.optionals (langFortran) [ "fortify" "format" ];
+  };
+
+  enableParallelBuilding = true;
+  inherit enableShared enableMultilib;
+
+  meta = {
+    inherit (callFile ./common/meta.nix { })
+      homepage
+      license
+      description
+      longDescription
+      platforms
+      maintainers
+    ;
+  } // lib.optionalAttrs (!atLeast11) {
+    badPlatforms =
+      # avr-gcc8 is maintained for the `qmk` package
+      if (is8 && targetPlatform.isAvr) then []
+      else if !(is48 || is49) then [ "aarch64-darwin" ]
+      else lib.platforms.darwin;
+  } // lib.optionalAttrs is11 {
+    badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ];
+  };
+} // lib.optionalAttrs (!atLeast10 && stdenv.targetPlatform.isDarwin) {
+  # GCC <10 requires default cctools `strip` instead of `llvm-strip` used by Darwin bintools.
+  preBuild = ''
+    makeFlagsArray+=('STRIP=${lib.getBin darwin.cctools-port}/bin/${stdenv.cc.targetPrefix}strip')
+  '';
+} // optionalAttrs (!atLeast8) {
+  doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
+} // optionalAttrs enableMultilib {
+  dontMoveLib64 = true;
+} // optionalAttrs (((is49 && !stdenv.hostPlatform.isDarwin) || is6) && langJava) {
+  postFixup = ''
+    target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
+    patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
+  '';
+}
+))
+([
+  (callPackage ./common/libgcc.nix   { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc enableShared libcCross; })
+] ++ optionals atLeast11 [
+  (callPackage ./common/checksum.nix { inherit langC langCC; })
+])
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/10/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/10/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..d9809e828f10
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/10/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,306 @@
+From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Wed, 25 Apr 2018 21:54:19 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ libstdc++-v3/src/c++11/thread.cc        |  9 +++++++++
+ 16 files changed, 80 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 46a9029acec..112c24e95a3 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index 484dc7a9e9f..a15bbeea500 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index 0612b87199a..76cea94f3b7 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index 6121e163259..52f0e00efe6 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11693,7 +11693,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b066cc609e1..4ecdba88de7 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1612,7 +1612,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index ea8c34f8c71..23134ad7363 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -145,7 +145,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 11b4acaff55..9fbd38650bd 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -737,6 +737,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -761,6 +764,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index b2f3f870844..eff889dc3b3 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5451,6 +5451,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index ba094be6f15..979a5ab9ace 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15187,6 +15187,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index de920d714c6..665fb74bd6b 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++extern "C" int
++__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 3a2ec3ad0d6..8b4cc96199b 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #include <bits/atomic_lockfree_defines.h>
+@@ -425,3 +446,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
+index 8238817c2e9..0c6a1f85f6f 100644
+--- a/libstdc++-v3/src/c++11/thread.cc
++++ b/libstdc++-v3/src/c++11/thread.cc
+@@ -55,6 +55,15 @@ static inline int get_nprocs()
+ #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN)
+ # include <unistd.h>
+ # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN)
++#elif defined(_WIN32)
++# include <windows.h>
++static inline int get_nprocs()
++{
++  SYSTEM_INFO sysinfo;
++  GetSystemInfo(&sysinfo);
++  return (int)sysinfo.dwNumberOfProcessors;
++}
++# define _GLIBCXX_NPROCS get_nprocs()
+ #else
+ # define _GLIBCXX_NPROCS 0
+ #endif
+-- 
+2.17.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..77202438e47d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,306 @@
+From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Wed, 25 Apr 2018 21:54:19 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ libstdc++-v3/src/c++11/thread.cc        |  9 +++++++++
+ 16 files changed, 80 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 46a9029acec..112c24e95a3 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index 484dc7a9e9f..a15bbeea500 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index 0612b87199a..76cea94f3b7 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index 6121e163259..52f0e00efe6 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11693,7 +11693,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b066cc609e1..4ecdba88de7 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1612,7 +1612,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index ea8c34f8c71..23134ad7363 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -145,7 +145,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 11b4acaff55..9fbd38650bd 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -737,6 +737,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -761,6 +764,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index b2f3f870844..eff889dc3b3 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5451,6 +5451,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index ba094be6f15..979a5ab9ace 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15187,6 +15187,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index de920d714c6..665fb74bd6b 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++namespace __cxxabiv1 {
++extern "C" int
++__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++}
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 3a2ec3ad0d6..8b4cc96199b 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #include <bits/atomic_lockfree_defines.h>
+@@ -425,3 +446,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
+index 8238817c2e9..0c6a1f85f6f 100644
+--- a/libstdc++-v3/src/c++11/thread.cc
++++ b/libstdc++-v3/src/c++11/thread.cc
+@@ -55,6 +55,15 @@ static inline int get_nprocs()
+ #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN)
+ # include <unistd.h>
+ # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN)
++#elif defined(_WIN32)
++# include <windows.h>
++static inline int get_nprocs()
++{
++  SYSTEM_INFO sysinfo;
++  GetSystemInfo(&sysinfo);
++  return (int)sysinfo.dwNumberOfProcessors;
++}
++# define _GLIBCXX_NPROCS get_nprocs()
+ #else
+ # define _GLIBCXX_NPROCS 0
+ #endif
+-- 
+2.17.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/11/gcc-issue-103910.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/11/gcc-issue-103910.patch
new file mode 100644
index 000000000000..c3edd960f097
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/11/gcc-issue-103910.patch
@@ -0,0 +1,41 @@
+From d243f4009d8071b734df16cd70f4c5d09a373769 Mon Sep 17 00:00:00 2001
+From: Andrew Pinski <apinski@marvell.com>
+Date: Wed, 5 Jan 2022 22:00:07 +0000
+Subject: [PATCH] Fix target/103910: missing GTY on x86_mfence causing PCH
+ usage to ICE
+
+With -O3 -march=opteron, a mfence builtin is added after the loop
+to say the nontemporal stores are no longer needed. This all good
+without precompiled headers as the function decl that is referneced
+by x86_mfence is referenced in another variable but with precompiled
+headers, x86_mfence is all messed up and the decl was GC'ed away.
+This fixes the problem by marking x86_mfence as GTY to save/restore
+during precompiled headers just like most other variables in
+the header file.
+
+Committed as obvious after a bootstrap/test on x86_64-linux-gnu.
+
+gcc/ChangeLog:
+
+	PR target/103910
+	* config/i386/i386.h (x86_mfence): Mark with GTY.
+---
+ gcc/config/i386/i386.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
+index f027608eefa..3ac0f698ae2 100644
+--- a/gcc/config/i386/i386.h
++++ b/gcc/config/i386/i386.h
+@@ -486,7 +486,7 @@ extern unsigned char ix86_prefetch_sse;
+ 
+ /* Fence to use after loop using storent.  */
+ 
+-extern tree x86_mfence;
++extern GTY(()) tree x86_mfence;
+ #define FENCE_FOLLOWING_MOVNT x86_mfence
+ 
+ /* Once GDB has been enhanced to deal with functions without frame
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/11/libgcc-aarch64-darwin-detection.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/11/libgcc-aarch64-darwin-detection.patch
new file mode 100644
index 000000000000..08dbfec6b249
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/11/libgcc-aarch64-darwin-detection.patch
@@ -0,0 +1,21 @@
+diff -u a/libgcc/config.host b/libgcc/config.host
+--- a/libgcc/config.host	2023-11-05 11:01:55.778638446 -0500
++++ b/libgcc/config.host	2023-11-05 11:07:29.405103979 -0500
+@@ -227,7 +227,7 @@
+   tmake_file="$tmake_file t-slibgcc-darwin"
+   # newer toolsets produce warnings when building for unsupported versions.
+   case ${host} in
+-    *-*-darwin1[89]* | *-*-darwin2* )
++    *-*-darwin1[89]* | *-*-darwin2* | aarch64*-*-darwin*)
+       tmake_file="t-darwin-min-8 $tmake_file"
+       ;;
+     *-*-darwin9* | *-*-darwin1[0-7]*)
+diff -ur a/libgcc/config/t-darwin-rpath b/libgcc/config/t-darwin-rpath
+--- a/libgcc/config/t-darwin-rpath	2023-11-05 11:34:18.691150009 -0500
++++ b/libgcc/config/t-darwin-rpath	2023-11-05 11:50:36.968920904 -0500
+@@ -2,4 +2,4 @@
+ SHLIB_RPATH = @rpath
+
+ # Which does not work for Darwin < 9
+-HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.5
++SHLIB_LOADER_PATH = -Wl,-rpath,@loader_path
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/12/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/12/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..77202438e47d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/12/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,306 @@
+From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Wed, 25 Apr 2018 21:54:19 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ libstdc++-v3/src/c++11/thread.cc        |  9 +++++++++
+ 16 files changed, 80 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 46a9029acec..112c24e95a3 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index 484dc7a9e9f..a15bbeea500 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index 0612b87199a..76cea94f3b7 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index 6121e163259..52f0e00efe6 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11693,7 +11693,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b066cc609e1..4ecdba88de7 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1612,7 +1612,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index ea8c34f8c71..23134ad7363 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -145,7 +145,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 11b4acaff55..9fbd38650bd 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -737,6 +737,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -761,6 +764,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index b2f3f870844..eff889dc3b3 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5451,6 +5451,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index ba094be6f15..979a5ab9ace 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15187,6 +15187,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index de920d714c6..665fb74bd6b 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++namespace __cxxabiv1 {
++extern "C" int
++__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++}
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 3a2ec3ad0d6..8b4cc96199b 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #include <bits/atomic_lockfree_defines.h>
+@@ -425,3 +446,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
+index 8238817c2e9..0c6a1f85f6f 100644
+--- a/libstdc++-v3/src/c++11/thread.cc
++++ b/libstdc++-v3/src/c++11/thread.cc
+@@ -55,6 +55,15 @@ static inline int get_nprocs()
+ #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN)
+ # include <unistd.h>
+ # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN)
++#elif defined(_WIN32)
++# include <windows.h>
++static inline int get_nprocs()
++{
++  SYSTEM_INFO sysinfo;
++  GetSystemInfo(&sysinfo);
++  return (int)sysinfo.dwNumberOfProcessors;
++}
++# define _GLIBCXX_NPROCS get_nprocs()
+ #else
+ # define _GLIBCXX_NPROCS 0
+ #endif
+-- 
+2.17.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch
new file mode 100644
index 000000000000..a27a8a08d9d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch
@@ -0,0 +1,77 @@
+https://gcc.gnu.org/PR109241
+
+Fix ICE on ccache.
+
+From 396a4e76afec30d2461638f569cae18955eb4ad2 Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Wed, 22 Mar 2023 16:11:47 -0400
+Subject: [PATCH] c++: local class in nested generic lambda [PR109241]
+
+In this testcase, the tree walk to look for bare parameter packs was
+confused by finding a type with no TREE_BINFO.  But it should be fine that
+it's unset; we already checked for unexpanded packs at parse time.
+
+I also tried doing the partial instantiation of the local class, which is
+probably the long-term direction we want to go, but for stage 4 let's go
+with this safer change.
+
+	PR c++/109241
+
+gcc/cp/ChangeLog:
+
+	* pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
+
+gcc/testsuite/ChangeLog:
+
+	* g++.dg/cpp1y/lambda-generic-local-class2.C: New test.
+---
+ gcc/cp/pt.cc                                        | 12 ++++++++----
+ .../g++.dg/cpp1y/lambda-generic-local-class2.C      | 13 +++++++++++++
+ 2 files changed, 21 insertions(+), 4 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
+
+diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
+index c7f4a95a723..79bc9c014c8 100644
+--- a/gcc/cp/pt.cc
++++ b/gcc/cp/pt.cc
+@@ -4106,10 +4106,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
+     case TAG_DEFN:
+       t = TREE_TYPE (t);
+       if (CLASS_TYPE_P (t))
+-	/* Local class, need to look through the whole definition.  */
+-	for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
+-	  cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
+-			ppd, ppd->visited);
++	{
++	  /* Local class, need to look through the whole definition.
++	     TYPE_BINFO might be unset for a partial instantiation.  */
++	  if (TYPE_BINFO (t))
++	    for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
++	      cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
++			    ppd, ppd->visited);
++	}
+       else
+ 	/* Enum, look at the values.  */
+ 	for (tree l = TYPE_VALUES (t); l; l = TREE_CHAIN (l))
+diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
+new file mode 100644
+index 00000000000..83856de1f41
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
+@@ -0,0 +1,13 @@
++// PR c++/109241
++// { dg-do compile { target c++14 } }
++// { dg-options "" } no pedantic
++
++void g() {
++  [](auto) {
++    [](auto) {
++      ({
++        struct A {};
++      });
++    };
++  }(1);
++}
+-- 
+2.40.1
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/12/mangle-NIX_STORE-in-__FILE__.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/12/mangle-NIX_STORE-in-__FILE__.patch
new file mode 100644
index 000000000000..51078925eeb8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/12/mangle-NIX_STORE-in-__FILE__.patch
@@ -0,0 +1,97 @@
+From b10785c1be469319a09b10bc69db21159b0599ee Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Fri, 22 Sep 2023 22:41:49 +0100
+Subject: [PATCH] gcc/file-prefix-map.cc: always mangle __FILE__ into invalid
+ store path
+
+Without the change `__FILE__` used in static inline functions in headers
+embed paths to header files into executable images. For local headers
+it's not a problem, but for headers in `/nix/store` this causes `-dev`
+inputs to be retained in runtime closure.
+
+Typical examples are `nix` -> `nlohmann_json` and `pipewire` ->
+`lttng-ust.dev`.
+
+For this reason we want to remove the occurrences of hashes in the
+expansion of `__FILE__`. `nuke-references` does it by replacing hashes
+by `eeeeee...` but those paths are also used for debug symbols. It is
+handy to be able to invert the transformation to go back to the original
+store path for debuginfod servers. The chosen solution is to make the
+hash uppercase:
+- it does not trigger runtime references (except for all digit hashes,
+  which are unlikely enough)
+- it visually looks like a bogus store path
+- it is easy to find the original store path if required
+
+Ideally we would like to use `-fmacro-prefix-map=` feature of `gcc` as:
+
+  -fmacro-prefix-map=/nix/store/$hash1-nlohmann-json-ver=/nix/store/$HASH1-nlohmann-json-ver
+  -fmacro-prefix-map=/nix/...
+
+In practice it quickly exhausts argument length limit due to `gcc`
+deficiency: https://gcc.gnu.org/PR111527
+
+Until it's fixed let's hardcode header mangling if $NIX_STORE variable
+is present in the environment.
+
+Tested as:
+
+    $ printf "# 0 \"/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store ./gcc/xgcc -Bgcc -x c - -S -o -
+    ...
+    .string "/nix/store/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-pppppp-vvvvvvv"
+    ...
+
+Mangled successfully.
+--- a/gcc/file-prefix-map.cc
++++ b/gcc/file-prefix-map.cc
+@@ -60,6 +60,9 @@ add_prefix_map (file_prefix_map *&maps, const char *arg, const char *opt)
+   maps = map;
+ }
+ 
++/* Forward declaration for a $NIX_STORE remap hack below. */
++static file_prefix_map *macro_prefix_maps; /* -fmacro-prefix-map  */
++
+ /* Perform user-specified mapping of filename prefixes.  Return the
+    GC-allocated new name corresponding to FILENAME or FILENAME if no
+    remapping was performed.  */
+@@ -76,7 +79,31 @@ remap_filename (file_prefix_map *maps, const char *filename)
+     if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
+       break;
+   if (!map)
+-    return filename;
++    {
++      if (maps == macro_prefix_maps)
++	{
++	  /* Remap the 32 characters after $NIX_STORE/ to uppercase
++	  *
++	  * That way we avoid argument parameters explosion
++	  * and still avoid embedding headers into runtime closure:
++	  *   https://gcc.gnu.org/PR111527
++	  */
++	  char * nix_store = getenv("NIX_STORE");
++	  size_t nix_store_len = nix_store ? strlen(nix_store) : 0;
++	  const char * name = filename;
++	  size_t name_len = strlen(name);
++	  if (nix_store && name_len >= nix_store_len + 1 + 32 && memcmp(name, nix_store, nix_store_len) == 0)
++	    {
++	       s = (char *) ggc_alloc_atomic (name_len + 1);
++	       memcpy(s, name, name_len + 1);
++	       for (int i = nix_store_len + 1; i < nix_store_len + 1 + 32; i++) {
++		 s[i] = TOUPPER(s[i]);
++	       }
++	       return s;
++	    }
++	}
++      return filename;
++    }
+   name = filename + map->old_len;
+   name_len = strlen (name) + 1;
+ 
+@@ -90,7 +117,6 @@ remap_filename (file_prefix_map *maps, const char *filename)
+    ignore it in DW_AT_producer (dwarf2out.cc).  */
+ 
+ /* Linked lists of file_prefix_map structures.  */
+-static file_prefix_map *macro_prefix_maps; /* -fmacro-prefix-map  */
+ static file_prefix_map *debug_prefix_maps; /* -fdebug-prefix-map  */
+ static file_prefix_map *profile_prefix_maps; /* -fprofile-prefix-map  */
+ 
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/13/ICE-PR110280.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/13/ICE-PR110280.patch
new file mode 100644
index 000000000000..7338b3dd1ede
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/13/ICE-PR110280.patch
@@ -0,0 +1,60 @@
+From f4029de35fb1b293a4fd586574b1b4b73ddf7880 Mon Sep 17 00:00:00 2001
+From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+Date: Wed, 26 Jul 2023 22:36:26 +0530
+Subject: [PATCH] [aarch64/match.pd] Fix ICE observed in PR110280.
+
+gcc/ChangeLog:
+	PR tree-optimization/110280
+	* match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector
+	using build_vector_from_val with the element of input operand, and
+	mask's type if operand and mask's types don't match.
+
+gcc/testsuite/ChangeLog:
+	PR tree-optimization/110280
+	* gcc.target/aarch64/sve/pr110280.c: New test.
+
+(cherry picked from commit 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04)
+---
+ gcc/match.pd                                    |  9 ++++++++-
+ gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
+
+diff --git a/gcc/match.pd b/gcc/match.pd
+index 9118244825054..c3bb4fbc0a7a2 100644
+--- a/gcc/match.pd
++++ b/gcc/match.pd
+@@ -8292,7 +8292,14 @@ and,
+ 
+ (simplify
+  (vec_perm vec_same_elem_p@0 @0 @1)
+- @0)
++ (if (types_match (type, TREE_TYPE (@0)))
++  @0
++  (with
++   {
++     tree elem = uniform_vector_p (@0);
++   }
++   (if (elem)
++    { build_vector_from_val (type, elem); }))))
+ 
+ /* Push VEC_PERM earlier if that may help FMA perception (PR101895).  */
+ (simplify
+diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
+new file mode 100644
+index 0000000000000..d3279f383629f
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
+@@ -0,0 +1,12 @@
++/* { dg-do compile } */
++/* { dg-options "-O3 -fdump-tree-optimized" } */
++
++#include "arm_sve.h"
++
++svuint32_t l()
++{
++  _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0};
++  return svld1rq_u32(svptrue_b8(), lanes);
++}
++
++/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/13/mangle-NIX_STORE-in-__FILE__.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/13/mangle-NIX_STORE-in-__FILE__.patch
new file mode 100644
index 000000000000..351d6d0f764b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/13/mangle-NIX_STORE-in-__FILE__.patch
@@ -0,0 +1,95 @@
+From b10785c1be469319a09b10bc69db21159b0599ee Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Fri, 22 Sep 2023 22:41:49 +0100
+Subject: [PATCH] gcc/file-prefix-map.cc: always mangle __FILE__ into invalid
+ store path
+
+Without the change `__FILE__` used in static inline functions in headers
+embed paths to header files into executable images. For local headers
+it's not a problem, but for headers in `/nix/store` this causes `-dev`
+inputs to be retained in runtime closure.
+
+Typical examples are `nix` -> `nlohmann_json` and `pipewire` ->
+`lttng-ust.dev`.
+
+For this reason we want to remove the occurrences of hashes in the
+expansion of `__FILE__`. `nuke-references` does it by replacing hashes
+by `eeeeee...` but those paths are also used for debug symbols. It is
+handy to be able to invert the transformation to go back to the original
+store path for debuginfod servers. The chosen solution is to make the
+hash uppercase:
+- it does not trigger runtime references (except for all digit hashes,
+  which are unlikely enough)
+- it visually looks like a bogus store path
+- it is easy to find the original store path if required
+
+Ideally we would like to use `-fmacro-prefix-map=` feature of `gcc` as:
+
+  -fmacro-prefix-map=/nix/store/$hash1-nlohmann-json-ver=/nix/store/$HASH1-nlohmann-json-ver
+  -fmacro-prefix-map=/nix/...
+
+In practice it quickly exhausts argument length limit due to `gcc`
+deficiency: https://gcc.gnu.org/PR111527
+
+Until it's fixed let's hardcode header mangling if $NIX_STORE variable
+is present in the environment.
+
+Tested as:
+
+    $ printf "# 0 \"/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store ./gcc/xgcc -Bgcc -x c - -S -o -
+    ...
+    .string "/nix/store/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-pppppp-vvvvvvv"
+    ...
+
+Mangled successfully.
+--- a/gcc/file-prefix-map.cc
++++ b/gcc/file-prefix-map.cc
+@@ -69,6 +69,9 @@ add_prefix_map (file_prefix_map *&maps, const char *arg, const char *opt)
+   maps = map;
+ }
+ 
++/* Forward declaration for a $NIX_STORE remap hack below. */
++static file_prefix_map *macro_prefix_maps; /* -fmacro-prefix-map  */
++
+ /* Perform user-specified mapping of filename prefixes.  Return the
+    GC-allocated new name corresponding to FILENAME or FILENAME if no
+    remapping was performed.  */
+@@ -102,6 +105,30 @@ remap_filename (file_prefix_map *maps, const char *filename)
+       break;
+   if (!map)
+     {
++      if (maps == macro_prefix_maps)
++	{
++	  /* Remap all fo $NIX_STORE/.{32} paths to uppercase
++	   *
++	   * That way we avoid argument parameters explosion
++	   * and still avoid embedding headers into runtime closure:
++	   *   https://gcc.gnu.org/PR111527
++	   */
++	   char * nix_store = getenv("NIX_STORE");
++	   size_t nix_store_len = nix_store ? strlen(nix_store) : 0;
++	   const char * name = realname ? realname : filename;
++	   size_t name_len = strlen(name);
++	   if (nix_store && name_len >= nix_store_len + 1 + 32 && memcmp(name, nix_store, nix_store_len) == 0)
++	     {
++		s = (char *) ggc_alloc_atomic (name_len + 1);
++		memcpy(s, name, name_len + 1);
++		for (int i = nix_store_len + 1; i < nix_store_len + 1 + 32; i++) {
++		  s[i] = TOUPPER(s[i]);
++		}
++		if (realname != filename)
++		  free (const_cast <char *> (realname));
++		return s;
++	     }
++	}
+       if (realname != filename)
+ 	free (const_cast <char *> (realname));
+       return filename;
+@@ -124,7 +151,6 @@ remap_filename (file_prefix_map *maps, const char *filename)
+    ignore it in DW_AT_producer (gen_command_line_string in opts.cc).  */
+ 
+ /* Linked lists of file_prefix_map structures.  */
+-static file_prefix_map *macro_prefix_maps; /* -fmacro-prefix-map  */
+ static file_prefix_map *debug_prefix_maps; /* -fdebug-prefix-map  */
+ static file_prefix_map *profile_prefix_maps; /* -fprofile-prefix-map  */
+ 
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/13/no-sys-dirs-riscv.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/13/no-sys-dirs-riscv.patch
new file mode 100644
index 000000000000..add4d59b41ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/13/no-sys-dirs-riscv.patch
@@ -0,0 +1,13 @@
+--- a/gcc/config/riscv/linux.h
++++ b/gcc/config/riscv/linux.h
+@@ -69,9 +69,5 @@
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define STARTFILE_PREFIX_SPEC 			\
+-   "/lib" XLEN_SPEC "/" ABI_SPEC "/ "		\
+-   "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ "	\
+-   "/lib/ "					\
+-   "/usr/lib/ "
++#define STARTFILE_PREFIX_SPEC ""
+ 
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch
new file mode 100644
index 000000000000..095713eb6c8c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch
@@ -0,0 +1,16 @@
+diff -ur a/libgcc/config/t-darwin b/libgcc/config/t-darwin
+--- a/libgcc/config/t-darwin	2012-07-14 09:50:59.000000000 -0400
++++ b/libgcc/config/t-darwin	2023-11-05 21:26:11.696825584 -0500
+@@ -7,12 +7,6 @@
+ crttme.o: $(srcdir)/config/darwin-crt-tm.c
+ 	$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DEND -c $<
+ 
+-# -pipe because there's an assembler bug, 4077127, which causes
+-# it to not properly process the first # directive, causing temporary
+-# file names to appear in stabs, causing the bootstrap to fail.  Using -pipe
+-# works around this by not having any temporary file names.
+-HOST_LIBGCC2_CFLAGS += -pipe
+-
+ # Use unwind-dw2-fde-darwin
+ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \
+   $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/libsanitizer.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/libsanitizer.patch
new file mode 100644
index 000000000000..f1a438a4e5f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/libsanitizer.patch
@@ -0,0 +1,24 @@
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index aec950454..5bda9b3a3 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -156,18 +156,13 @@ namespace __sanitizer {
+ #elif defined(__sparc__)
+ # if defined(__arch64__)
+     unsigned mode;
+-    unsigned short __pad1;
+-# else
+-    unsigned short __pad1;
+-    unsigned short mode;
+     unsigned short __pad2;
+ # endif
+     unsigned short __seq;
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/parallel-strsignal.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/4.9/parallel-strsignal.patch
new file mode 100644
index 000000000000..4c98ca273a54
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/6/0001-Fix-build-for-glibc-2.31.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/6/0001-Fix-build-for-glibc-2.31.patch
new file mode 100644
index 000000000000..0cd04e218caf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/6/0001-Fix-build-for-glibc-2.31.patch
@@ -0,0 +1,62 @@
+From 8b55f1047cf3491429c1af607e5dac08a81db6e1 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Thu, 20 Feb 2020 15:08:36 +0100
+Subject: [PATCH] Fix build for glibc 2.31
+
+---
+ .../sanitizer_platform_limits_posix.cc            |  5 +++--
+ .../sanitizer_platform_limits_posix.h             | 15 +--------------
+ 2 files changed, 4 insertions(+), 16 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 069d8d557..c49c28c6e 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+ #endif
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++   on many architectures.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 304d04e39..568081a79 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -200,27 +200,14 @@ namespace __sanitizer {
+     unsigned __seq;
+     u64 __unused1;
+     u64 __unused2;
+-#elif defined(__mips__) || defined(__aarch64__)
+-    unsigned int mode;
+-    unsigned short __seq;
+-    unsigned short __pad1;
+-    unsigned long __unused1;
+-    unsigned long __unused2;
+ #elif defined(__sparc__)
+-# if defined(__arch64__)
+     unsigned mode;
+-    unsigned short __pad1;
+-# else
+-    unsigned short __pad1;
+-    unsigned short mode;
+     unsigned short __pad2;
+-# endif
+     unsigned short __seq;
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
+-- 
+2.25.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..25e3a902cbf2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,285 @@
+From 30534f48c6ede142dad0008d1641392d82b8a137 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Mon, 18 Apr 2016 11:50:55 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ 15 files changed, 71 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 858b878d4b3..6f745790d64 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1722,6 +1722,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index fe11333a2d1..cac85802f38 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index e04818966fa..7b75a372506 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index 954673c1c43..6b5667f1c70 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11702,7 +11702,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 4c65d441e72..e6fa04ada4f 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1593,7 +1593,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index eab2765d7fd..f4058b6f4a2 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -124,7 +124,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 2b139b8befc..fb18d2a042e 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -712,6 +712,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -736,6 +739,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index e7d6c75a6f7..664d0f852c4 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5077,6 +5077,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index b5ae4213f94..c484d3aee5f 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15177,6 +15177,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index e6520c1094f..3d6907796dd 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++extern "C" int
++__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -163,3 +179,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 9b617998ffe..a441fdbb616 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
+@@ -424,3 +445,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+-- 
+2.12.1
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/6/gnat-glibc234.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/6/gnat-glibc234.patch
new file mode 100644
index 000000000000..2d29cd7fa77f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/6/gnat-glibc234.patch
@@ -0,0 +1,30 @@
+Fix build with glibc 2.34.  Adapted from:
+https://github.com/gcc-mirror/gcc/commit/331763de7d4850702a0f67298f36017c73cdb103
+--- a/gcc/ada/init.c
++++ b/gcc/ada/init.c
+@@ -579,12 +579,8 @@
+ 
+ #ifndef __ia64__
+ #define HAVE_GNAT_ALTERNATE_STACK 1
+-/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size.
+-   It must be larger than MINSIGSTKSZ and hopefully near 2 * SIGSTKSZ.  */
+-# if 16 * 1024 < MINSIGSTKSZ
+-#  error "__gnat_alternate_stack too small"
+-# endif
+-char __gnat_alternate_stack[16 * 1024];
++/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size.  */
++char __gnat_alternate_stack[32 * 1024];
+ #endif
+ 
+ #ifdef __XENO__
+--- a/gcc/ada/s-osinte-linux.ads
++++ b/gcc/ada/s-osinte-linux.ads
+@@ -328,7 +328,7 @@
+       oss : access stack_t) return int;
+    pragma Import (C, sigaltstack, "sigaltstack");
+ 
+-   Alternate_Stack_Size : constant := 16 * 1024;
++   Alternate_Stack_Size : constant := 32 * 1024;
+    --  This must be in keeping with init.c:__gnat_alternate_stack
+ 
+    Alternate_Stack : aliased char_array (1 .. Alternate_Stack_Size);
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch
new file mode 100644
index 000000000000..bc11f990e5e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch
@@ -0,0 +1,14 @@
+diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
+index dd456e907..24e607c7b 100755
+--- a/libgo/mksysinfo.sh
++++ b/libgo/mksysinfo.sh
+@@ -148,9 +148,6 @@ cat > sysinfo.c <<EOF
+ #if defined(HAVE_LINUX_ETHER_H)
+ #include <linux/ether.h>
+ #endif
+-#if defined(HAVE_LINUX_FS_H)
+-#include <linux/fs.h>
+-#endif
+ #if defined(HAVE_LINUX_REBOOT_H)
+ #include <linux/reboot.h>
+ #endif
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch
new file mode 100644
index 000000000000..571644410def
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch
@@ -0,0 +1,26 @@
+Backported from GCC 7.
+
+diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
+index 304a7f5aff6..d1a189d93d0 100644
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -234,7 +234,7 @@ case "${host_os}" in
+     os_include_dir="os/newlib"
+     OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
+     ;;
+-  darwin | darwin[1-7] | darwin[1-7].*)
++  darwin[1-7] | darwin[1-7].*)
+     # On Darwin, performance is improved if libstdc++ is single-module.
+     # Up to at least 10.3.7, -flat_namespace is required for proper
+     # treatment of coalesced symbols.
+@@ -252,6 +252,10 @@ case "${host_os}" in
+     esac
+     os_include_dir="os/bsd/darwin"
+     ;;
++  darwin*)
++    # Post Darwin8, defaults should be sufficient.
++    os_include_dir="os/bsd/darwin"
++    ;;
+   *djgpp*)      # leading * picks up "msdosdjgpp"
+     os_include_dir="os/djgpp"
+     error_constants_dir="os/djgpp"
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch
new file mode 100644
index 000000000000..d8aad14942bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch
@@ -0,0 +1,62 @@
+From 2d03b6eaf823fc2db6a32b4a95e18f8a7474b47f Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Thu, 20 Feb 2020 01:56:42 +0100
+Subject: [PATCH] Fix build for glibc 2.31
+
+---
+ .../sanitizer_platform_limits_posix.cc            |  5 +++--
+ .../sanitizer_platform_limits_posix.h             | 15 +--------------
+ 2 files changed, 4 insertions(+), 16 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 97eae3fc7..4089d4695 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1145,8 +1145,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++   on many architectures.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index c13932283..3456fb2db 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -204,27 +204,14 @@ namespace __sanitizer {
+     unsigned __seq;
+     u64 __unused1;
+     u64 __unused2;
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
+-    unsigned int mode;
+-    unsigned short __seq;
+-    unsigned short __pad1;
+-    unsigned long __unused1;
+-    unsigned long __unused2;
+ #elif defined(__sparc__)
+-# if defined(__arch64__)
+     unsigned mode;
+-    unsigned short __pad1;
+-# else
+-    unsigned short __pad1;
+-    unsigned short mode;
+     unsigned short __pad2;
+-# endif
+     unsigned short __seq;
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
+-- 
+2.25.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..0c5d0ee9e460
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,285 @@
+From d3cb66e4751fcbd581b81a14a973de2d78fc02ad Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Mon, 18 Apr 2016 11:50:55 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ 15 files changed, 71 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 8f91197f34e..59db37cac04 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1719,6 +1719,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index 270ec0dd037..88966f79695 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index e5f014cb473..989cfbe894e 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index ea73b151a4e..317200e5620 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11681,7 +11681,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 9d4c792a33f..d51899a5676 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1612,7 +1612,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index b8af3ab2546..73248438a8c 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -125,7 +125,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index b279a6458f9..20d22f585da 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -710,6 +710,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -734,6 +737,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index 45c459788c3..8fc569ef16e 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5086,6 +5086,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 2406cb9d946..50e7e4ced89 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15182,6 +15182,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index 923a0707556..a55d85aad2d 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++extern "C" int
++__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 19953bc52f0..72fd5f26d5b 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #include <bits/atomic_lockfree_defines.h>
+@@ -425,3 +446,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+-- 
+2.12.1
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/7/gcc8-asan-glibc-2.34.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/7/gcc8-asan-glibc-2.34.patch
new file mode 100644
index 000000000000..5645b97c1d89
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/7/gcc8-asan-glibc-2.34.patch
@@ -0,0 +1,70 @@
+From ef195a39d0d3b929cc676302d074b42c25460601 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Sat, 17 Apr 2021 11:27:14 +0200
+Subject: [PATCH] sanitizer: Fix asan against glibc 2.34 [PR100114]
+
+As mentioned in the PR, SIGSTKSZ is no longer a compile time constant in
+glibc 2.34 and later, so
+static const uptr kAltStackSize = SIGSTKSZ * 4;
+needs dynamic initialization, but is used by a function called indirectly
+from .preinit_array and therefore before the variable is constructed.
+This results in using 0 size instead and all asan instrumented programs
+die with:
+==91==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22)
+
+Here is a cherry-pick from upstream to fix this.
+
+2021-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/100114
+	* sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick
+	llvm-project revisions 82150606fb11d28813ae6da1101f5bda638165fe
+	and b93629dd335ffee2fc4b9b619bf86c3f9e6b0023.
+
+(cherry picked from commit 950bac27d63c1c2ac3a6ed867692d6a13f21feb3)
+---
+ .../sanitizer_common/sanitizer_posix_libcdep.cc     | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc
+index 1a37118c299..066079b3954 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc
+@@ -159,7 +159,11 @@ bool SupportsColoredOutput(fd_t fd) {
+ 
+ #if !SANITIZER_GO
+ // TODO(glider): different tools may require different altstack size.
+-static const uptr kAltStackSize = SIGSTKSZ * 4;  // SIGSTKSZ is not enough.
++static uptr GetAltStackSize() {
++  // SIGSTKSZ is not enough.
++  static const uptr kAltStackSize = SIGSTKSZ * 4;
++  return kAltStackSize;
++}
+ 
+ void SetAlternateSignalStack() {
+   stack_t altstack, oldstack;
+@@ -170,10 +174,9 @@ void SetAlternateSignalStack() {
+   // TODO(glider): the mapped stack should have the MAP_STACK flag in the
+   // future. It is not required by man 2 sigaltstack now (they're using
+   // malloc()).
+-  void* base = MmapOrDie(kAltStackSize, __func__);
+-  altstack.ss_sp = (char*) base;
++  altstack.ss_size = GetAltStackSize();
++  altstack.ss_sp = (char *)MmapOrDie(altstack.ss_size, __func__);
+   altstack.ss_flags = 0;
+-  altstack.ss_size = kAltStackSize;
+   CHECK_EQ(0, sigaltstack(&altstack, nullptr));
+ }
+ 
+@@ -181,7 +184,7 @@ void UnsetAlternateSignalStack() {
+   stack_t altstack, oldstack;
+   altstack.ss_sp = nullptr;
+   altstack.ss_flags = SS_DISABLE;
+-  altstack.ss_size = kAltStackSize;  // Some sane value required on Darwin.
++  altstack.ss_size = GetAltStackSize();  // Some sane value required on Darwin.
+   CHECK_EQ(0, sigaltstack(&altstack, &oldstack));
+   UnmapOrDie(oldstack.ss_sp, oldstack.ss_size);
+ }
+-- 
+2.27.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/7/riscv-no-relax.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/7/riscv-no-relax.patch
new file mode 100644
index 000000000000..93d9cd1d60f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/7/riscv-pthread-reentrant.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/7/riscv-pthread-reentrant.patch
new file mode 100644
index 000000000000..c7527ffb2b16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/8/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/8/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..d9809e828f10
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/8/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,306 @@
+From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Wed, 25 Apr 2018 21:54:19 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ libstdc++-v3/src/c++11/thread.cc        |  9 +++++++++
+ 16 files changed, 80 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 46a9029acec..112c24e95a3 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index 484dc7a9e9f..a15bbeea500 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index 0612b87199a..76cea94f3b7 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index 6121e163259..52f0e00efe6 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11693,7 +11693,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b066cc609e1..4ecdba88de7 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1612,7 +1612,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index ea8c34f8c71..23134ad7363 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -145,7 +145,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 11b4acaff55..9fbd38650bd 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -737,6 +737,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -761,6 +764,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index b2f3f870844..eff889dc3b3 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5451,6 +5451,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index ba094be6f15..979a5ab9ace 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15187,6 +15187,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index de920d714c6..665fb74bd6b 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++extern "C" int
++__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 3a2ec3ad0d6..8b4cc96199b 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #include <bits/atomic_lockfree_defines.h>
+@@ -425,3 +446,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
+index 8238817c2e9..0c6a1f85f6f 100644
+--- a/libstdc++-v3/src/c++11/thread.cc
++++ b/libstdc++-v3/src/c++11/thread.cc
+@@ -55,6 +55,15 @@ static inline int get_nprocs()
+ #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN)
+ # include <unistd.h>
+ # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN)
++#elif defined(_WIN32)
++# include <windows.h>
++static inline int get_nprocs()
++{
++  SYSTEM_INFO sysinfo;
++  GetSystemInfo(&sysinfo);
++  return (int)sysinfo.dwNumberOfProcessors;
++}
++# define _GLIBCXX_NPROCS get_nprocs()
+ #else
+ # define _GLIBCXX_NPROCS 0
+ #endif
+-- 
+2.17.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/8/avr-gcc-8-darwin.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/8/avr-gcc-8-darwin.patch
new file mode 100644
index 000000000000..3705ed99c49a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/8/avr-gcc-8-darwin.patch
@@ -0,0 +1,16 @@
+From https://gist.githubusercontent.com/DavidEGrayson/88bceb3f4e62f45725ecbb9248366300/raw/c1f515475aff1e1e3985569d9b715edb0f317648/gcc-11-arm-darwin.patch
+
+diff -ur a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
+--- a/gcc/config/host-darwin.c	2021-04-27 03:00:13.000000000 -0700
++++ b/gcc/config/host-darwin.c	2021-06-11 14:49:13.754000000 -0700
+@@ -22,6 +22,10 @@
+ #include "coretypes.h"
+ #include "diagnostic-core.h"
+ #include "config/host-darwin.h"
++#include "hosthooks.h"
++#include "hosthooks-def.h"
++
++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
+ 
+ /* Yes, this is really supposed to work.  */
+ /* This allows for a pagesize of 16384, which we have on Darwin20, but should
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch
new file mode 100644
index 000000000000..1ac870e57298
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch
@@ -0,0 +1,96 @@
+Backported from https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b2cee5e1e89c8f939bc36fe9756befcb93d96982
+
+diff -ur a/gcc/config/darwin.h b/gcc/config/darwin.h
+--- a/gcc/config/darwin.h	2021-05-14 04:42:08.000000000 -0400
++++ b/gcc/config/darwin.h	2023-11-06 08:53:27.629155053 -0500
+@@ -233,12 +233,18 @@
+ 
+ #define DSYMUTIL "\ndsymutil"
+ 
++/* Spec that controls whether the debug linker is run automatically for
++   a link step.  This needs to be done if there is a source file on the
++   command line which will result in a temporary object (and debug is
++   enabled).  */
++
+ #define DSYMUTIL_SPEC \
+    "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+     %{v} \
+-    %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
+-    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
+-    %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
++    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
++    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|\
++      .f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \
++    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
+ 
+ #define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC
+ 
+@@ -469,18 +475,31 @@
+ /* Default ASM_DEBUG_SPEC.  Darwin's as cannot currently produce dwarf
+    debugging data.  */
+ 
++#ifdef HAS_AS_STABS_DIRECTIVE
++/* We only pass a debug option to the assembler if that supports stabs, since
++   dwarf is not uniformly supported in the assemblers.  */
+ #define ASM_DEBUG_SPEC  "%{g*:%{%:debug-level-gt(0):%{!gdwarf*:--gstabs}}}"
++#else
++#define ASM_DEBUG_SPEC ""
++#endif
++
++#undef  ASM_DEBUG_OPTION_SPEC
++#define ASM_DEBUG_OPTION_SPEC  ""
++
+ #define ASM_FINAL_SPEC \
+   "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform } %<gsplit-dwarf"
+ 
+-/* We still allow output of STABS if the assembler supports it.  */
++/* We now require C++11 to bootstrap and newer tools than those based on
++   stabs, so require DWARF-2, even if stabs is supported by the assembler.  */
++
++#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
++#define DARWIN_PREFER_DWARF
++#define DWARF2_DEBUGGING_INFO 1
++
+ #ifdef HAVE_AS_STABS_DIRECTIVE
+ #define DBX_DEBUGGING_INFO 1
+-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+ #endif
+ 
+-#define DWARF2_DEBUGGING_INFO 1
+-
+ #define DEBUG_FRAME_SECTION	  "__DWARF,__debug_frame,regular,debug"
+ #define DEBUG_INFO_SECTION	  "__DWARF,__debug_info,regular,debug"
+ #define DEBUG_ABBREV_SECTION	  "__DWARF,__debug_abbrev,regular,debug"
+diff -ur a/gcc/config/darwin9.h b/gcc/config/darwin9.h
+--- a/gcc/config/darwin9.h	2021-05-14 04:42:08.000000000 -0400
++++ b/gcc/config/darwin9.h	2023-11-06 08:54:02.663945206 -0500
+@@ -18,29 +18,6 @@
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+-/* Prefer DWARF2.  */
+-#undef PREFERRED_DEBUGGING_TYPE
+-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+-#define DARWIN_PREFER_DWARF
+-
+-/* Since DWARF2 is default, conditions for running dsymutil are different.  */
+-#undef DSYMUTIL_SPEC
+-#define DSYMUTIL_SPEC \
+-   "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+-    %{v} \
+-    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
+-    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|.f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \
+-    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
+-
+-/* Tell collect2 to run dsymutil for us as necessary.  */
+-#define COLLECT_RUN_DSYMUTIL 1
+-
+-/* Only ask as for debug data if the debug style is stabs (since as doesn't
+-   yet generate dwarf.)  */
+-
+-#undef  ASM_DEBUG_SPEC
+-#define ASM_DEBUG_SPEC  "%{g*:%{%:debug-level-gt(0):%{gstabs:--gstabs}}}"
+-
+ #undef  ASM_OUTPUT_ALIGNED_COMMON
+ #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
+   do {									\
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/9/Added-mcf-thread-model-support-from-mcfgthread.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/9/Added-mcf-thread-model-support-from-mcfgthread.patch
new file mode 100644
index 000000000000..d9809e828f10
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/9/Added-mcf-thread-model-support-from-mcfgthread.patch
@@ -0,0 +1,306 @@
+From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001
+From: Liu Hao <lh_mouse@126.com>
+Date: Wed, 25 Apr 2018 21:54:19 +0800
+Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
+
+Signed-off-by: Liu Hao <lh_mouse@126.com>
+---
+ config/gthr.m4                          |  1 +
+ gcc/config.gcc                          |  3 +++
+ gcc/config/i386/mingw-mcfgthread.h      |  1 +
+ gcc/config/i386/mingw-w64.h             |  2 +-
+ gcc/config/i386/mingw32.h               | 11 ++++++++++-
+ gcc/configure                           |  2 +-
+ gcc/configure.ac                        |  2 +-
+ libatomic/configure.tgt                 |  2 +-
+ libgcc/config.host                      |  6 ++++++
+ libgcc/config/i386/gthr-mcf.h           |  1 +
+ libgcc/config/i386/t-mingw-mcfgthread   |  2 ++
+ libgcc/configure                        |  1 +
+ libstdc++-v3/configure                  |  1 +
+ libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
+ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++
+ libstdc++-v3/src/c++11/thread.cc        |  9 +++++++++
+ 16 files changed, 80 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/config/i386/mingw-mcfgthread.h
+ create mode 100644 libgcc/config/i386/gthr-mcf.h
+ create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
+
+diff --git a/config/gthr.m4 b/config/gthr.m4
+index 7b29f1f3327..82e21fe1709 100644
+--- a/config/gthr.m4
++++ b/config/gthr.m4
+@@ -21,6 +21,7 @@ case $1 in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ AC_SUBST(thread_header)
+ ])
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 46a9029acec..112c24e95a3 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
+ 	if test x$enable_threads = xposix ; then
+ 		tm_file="${tm_file} i386/mingw-pthread.h"
+ 	fi
++	if test x$enable_threads = xmcf ; then
++		tm_file="${tm_file} i386/mingw-mcfgthread.h"
++	fi
+ 	tm_file="${tm_file} i386/mingw32.h"
+ 	# This makes the logic if mingw's or the w64 feature set has to be used
+ 	case ${target} in
+diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
+new file mode 100644
+index 00000000000..ec381a7798f
+--- /dev/null
++++ b/gcc/config/i386/mingw-mcfgthread.h
+@@ -0,0 +1 @@
++#define TARGET_USE_MCFGTHREAD 1
+diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
+index 484dc7a9e9f..a15bbeea500 100644
+--- a/gcc/config/i386/mingw-w64.h
++++ b/gcc/config/i386/mingw-w64.h
+@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-		 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ #undef SPEC_32
+ #undef SPEC_64
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index 0612b87199a..76cea94f3b7 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see
+ 	 | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
+ 	 | MASK_MS_BITFIELD_LAYOUT)
+ 
++#ifndef TARGET_USE_MCFGTHREAD
++#define CPP_MCFGTHREAD()  ((void)0)
++#define LIB_MCFGTHREAD     ""
++#else
++#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__"))
++#define LIB_MCFGTHREAD     " -lmcfgthread "
++#endif
++
+ /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
+    is for compatibility with native compiler.  */
+ #define EXTRA_OS_CPP_BUILTINS()					\
+@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
+ 	  builtin_define_std ("WIN64");				\
+ 	  builtin_define ("_WIN64");				\
+ 	}							\
++	CPP_MCFGTHREAD();	\
+     }								\
+   while (0)
+ 
+@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see
+ 		 "%{mwindows:-lgdi32 -lcomdlg32} " \
+      "%{fvtable-verify=preinit:-lvtv -lpsapi; \
+         fvtable-verify=std:-lvtv -lpsapi} " \
+-                 "-ladvapi32 -lshell32 -luser32 -lkernel32"
++                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
+ 
+ /* Weak symbols do not get resolved if using a Windows dll import lib.
+    Make the unwind registration references strong undefs.  */
+diff --git a/gcc/configure b/gcc/configure
+index 6121e163259..52f0e00efe6 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11693,7 +11693,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index b066cc609e1..4ecdba88de7 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1612,7 +1612,7 @@ case ${enable_threads} in
+     target_thread_file='single'
+     ;;
+   aix | dce | lynx | mipssde | posix | rtems | \
+-  single | tpf | vxworks | win32)
++  single | tpf | vxworks | win32 | mcf)
+     target_thread_file=${enable_threads}
+     ;;
+   *)
+diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
+index ea8c34f8c71..23134ad7363 100644
+--- a/libatomic/configure.tgt
++++ b/libatomic/configure.tgt
+@@ -145,7 +145,7 @@ case "${target}" in
+   *-*-mingw*)
+ 	# OS support for atomic primitives.
+         case ${target_thread_file} in
+-          win32)
++          win32 | mcf)
+             config_path="${config_path} mingw"
+             ;;
+           posix)
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 11b4acaff55..9fbd38650bd 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -737,6 +737,9 @@ i[34567]86-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+@@ -761,6 +764,9 @@ x86_64-*-mingw*)
+ 	  posix)
+ 	    tmake_file="i386/t-mingw-pthread $tmake_file"
+ 	    ;;
++	  mcf)
++	    tmake_file="i386/t-mingw-mcfgthread $tmake_file"
++	    ;;
+ 	esac
+ 	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ 	if test x$ac_cv_sjlj_exceptions = xyes; then
+diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
+new file mode 100644
+index 00000000000..5ea2908361f
+--- /dev/null
++++ b/libgcc/config/i386/gthr-mcf.h
+@@ -0,0 +1 @@
++#include <mcfgthread/gthread.h>
+diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
+new file mode 100644
+index 00000000000..4b9b10e32d6
+--- /dev/null
++++ b/libgcc/config/i386/t-mingw-mcfgthread
+@@ -0,0 +1,2 @@
++SHLIB_PTHREAD_CFLAG =
++SHLIB_PTHREAD_LDFLAG = -lmcfgthread
+diff --git a/libgcc/configure b/libgcc/configure
+index b2f3f870844..eff889dc3b3 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -5451,6 +5451,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index ba094be6f15..979a5ab9ace 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15187,6 +15187,7 @@ case $target_thread_file in
+     tpf)	thread_header=config/s390/gthr-tpf.h ;;
+     vxworks)	thread_header=config/gthr-vxworks.h ;;
+     win32)	thread_header=config/i386/gthr-win32.h ;;
++    mcf)	thread_header=config/i386/gthr-mcf.h ;;
+ esac
+ 
+ 
+diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
+index de920d714c6..665fb74bd6b 100644
+--- a/libstdc++-v3/libsupc++/atexit_thread.cc
++++ b/libstdc++-v3/libsupc++/atexit_thread.cc
+@@ -25,6 +25,22 @@
+ #include <cstdlib>
+ #include <new>
+ #include "bits/gthr.h"
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++extern "C" int
++__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
++				 void *obj, void *dso_handle)
++  _GLIBCXX_NOTHROW
++{
++  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
++  (void)dso_handle;
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
+ }
+ 
+ #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
++
++#endif // __USING_MCFGTHREAD__
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 3a2ec3ad0d6..8b4cc96199b 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -28,6 +28,27 @@
+ #include <cxxabi.h>
+ #include <exception>
+ #include <new>
++
++#ifdef __USING_MCFGTHREAD__
++
++#include <mcfgthread/gthread.h>
++
++namespace __cxxabiv1 {
++
++extern "C" int __cxa_guard_acquire(__guard *g){
++	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
++}
++extern "C" void __cxa_guard_abort(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
++}
++extern "C" void __cxa_guard_release(__guard *g) throw() {
++	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
++}
++
++}
++
++#else // __USING_MCFGTHREAD__
++
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
+ #include <bits/atomic_lockfree_defines.h>
+@@ -425,3 +446,5 @@ namespace __cxxabiv1
+ #endif
+   }
+ }
++
++#endif
+diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
+index 8238817c2e9..0c6a1f85f6f 100644
+--- a/libstdc++-v3/src/c++11/thread.cc
++++ b/libstdc++-v3/src/c++11/thread.cc
+@@ -55,6 +55,15 @@ static inline int get_nprocs()
+ #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN)
+ # include <unistd.h>
+ # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN)
++#elif defined(_WIN32)
++# include <windows.h>
++static inline int get_nprocs()
++{
++  SYSTEM_INFO sysinfo;
++  GetSystemInfo(&sysinfo);
++  return (int)sysinfo.dwNumberOfProcessors;
++}
++# define _GLIBCXX_NPROCS get_nprocs()
+ #else
+ # define _GLIBCXX_NPROCS 0
+ #endif
+-- 
+2.17.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch
new file mode 100644
index 000000000000..5b4abfd02e0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch
@@ -0,0 +1,31 @@
+Derived from ../11/fix-struct-redefinition-on-glibc-2.36.patch (upstream commit d2356ebb0084a0d80dbfe33040c9afe938c15d19)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+index e8fce8a02..cb1ac806e 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -65,7 +65,9 @@
+ #include <sys/vt.h>
+ #include <linux/cdrom.h>
+ #include <linux/fd.h>
++#if SANITIZER_ANDROID
+ #include <linux/fs.h>
++#endif
+ #include <linux/hdreg.h>
+ #include <linux/input.h>
+ #include <linux/ioctl.h>
+@@ -846,10 +848,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT;
+   unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT;
+ #endif
+-  unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
+-  unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
+-  unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
+-  unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
++  unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long);
++  unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long);
++  unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long);
++  unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long);
+   unsigned IOCTL_GIO_CMAP = GIO_CMAP;
+   unsigned IOCTL_GIO_FONT = GIO_FONT;
+   unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP;
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch
new file mode 100644
index 000000000000..454139c5396c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch
@@ -0,0 +1,99 @@
+Backported from https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b2cee5e1e89c8f939bc36fe9756befcb93d96982
+
+diff -ur a/gcc/config/darwin.h b/gcc/config/darwin.h
+--- a/gcc/config/darwin.h	2022-05-27 03:21:10.947379000 -0400
++++ b/gcc/config/darwin.h	2023-11-06 12:18:27.209236423 -0500
+@@ -230,12 +230,18 @@
+ 
+ #define DSYMUTIL "\ndsymutil"
+ 
++/* Spec that controls whether the debug linker is run automatically for
++   a link step.  This needs to be done if there is a source file on the
++   command line which will result in a temporary object (and debug is
++   enabled).  */
++
+ #define DSYMUTIL_SPEC \
+    "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+     %{v} \
+-    %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
+-    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
+-    %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
++    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
++    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|\
++      .f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \
++    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
+ 
+ #define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC
+ 
+@@ -463,21 +469,31 @@
+   %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
+   %{static}" ASM_MMACOSX_VERSION_MIN_SPEC
+ 
+-/* Default ASM_DEBUG_SPEC.  Darwin's as cannot currently produce dwarf
+-   debugging data.  */
+-
++#ifdef HAS_AS_STABS_DIRECTIVE
++/* We only pass a debug option to the assembler if that supports stabs, since
++   dwarf is not uniformly supported in the assemblers.  */
+ #define ASM_DEBUG_SPEC  "%{g*:%{%:debug-level-gt(0):%{!gdwarf*:--gstabs}}}"
++#else
++#define ASM_DEBUG_SPEC ""
++#endif
++
++#undef  ASM_DEBUG_OPTION_SPEC
++#define ASM_DEBUG_OPTION_SPEC  ""
++
+ #define ASM_FINAL_SPEC \
+   "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} %<gsplit-dwarf"
+ 
+-/* We still allow output of STABS if the assembler supports it.  */
++/* We now require C++11 to bootstrap and newer tools than those based on
++   stabs, so require DWARF-2, even if stabs is supported by the assembler.  */
++
++#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
++#define DARWIN_PREFER_DWARF
++#define DWARF2_DEBUGGING_INFO 1
++
+ #ifdef HAVE_AS_STABS_DIRECTIVE
+ #define DBX_DEBUGGING_INFO 1
+-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+ #endif
+ 
+-#define DWARF2_DEBUGGING_INFO 1
+-
+ #define DEBUG_FRAME_SECTION	  "__DWARF,__debug_frame,regular,debug"
+ #define DEBUG_INFO_SECTION	  "__DWARF,__debug_info,regular,debug"
+ #define DEBUG_ABBREV_SECTION	  "__DWARF,__debug_abbrev,regular,debug"
+diff -ur a/gcc/config/darwin9.h b/gcc/config/darwin9.h
+--- a/gcc/config/darwin9.h	2022-05-27 03:21:10.947379000 -0400
++++ b/gcc/config/darwin9.h	2023-11-06 12:18:48.325260590 -0500
+@@ -18,29 +18,6 @@
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+-/* Prefer DWARF2.  */
+-#undef PREFERRED_DEBUGGING_TYPE
+-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+-#define DARWIN_PREFER_DWARF
+-
+-/* Since DWARF2 is default, conditions for running dsymutil are different.  */
+-#undef DSYMUTIL_SPEC
+-#define DSYMUTIL_SPEC \
+-   "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+-    %{v} \
+-    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\
+-    %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|.f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \
+-    %{g*:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}"
+-
+-/* Tell collect2 to run dsymutil for us as necessary.  */
+-#define COLLECT_RUN_DSYMUTIL 1
+-
+-/* Only ask as for debug data if the debug style is stabs (since as doesn't
+-   yet generate dwarf.)  */
+-
+-#undef  ASM_DEBUG_SPEC
+-#define ASM_DEBUG_SPEC  "%{g*:%{%:debug-level-gt(0):%{gstabs:--gstabs}}}"
+-
+ #undef  ASM_OUTPUT_ALIGNED_COMMON
+ #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
+   do {									\
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/ada-cctools-as-detection-configure.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/ada-cctools-as-detection-configure.patch
new file mode 100644
index 000000000000..e6b5b3653322
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/ada-cctools-as-detection-configure.patch
@@ -0,0 +1,33 @@
+As originally implemented, the error message check
+described in the configure script
+breaks detection of Ada compiler support on x86_64-darwin,
+because the assembler in the version of cctools currently used
+unconditionally emits a deprecation message to stdout,
+with no way to disable it.
+
+Furthermore, GCC 3.4 was the minimum version needed to build GNAT
+as far back as GCC 4.4 (see the GCC git repo, tags/releases/gcc-4.4.0,
+gcc/doc/install.texi, lines 2052-2053 [1]);
+GCC 3.4 is newer than any of the broken GCC versions
+that the configure script works around
+(see the part of the comment in the configure script
+before the context in the patch below),
+and GCC 4.4 is older than any GCC that Nix currently packages (GCC 4.8).
+
+We therefore choose to not check for error messages,
+and just check for an error code.
+There's no harm in still checking for an object file being created, though.
+
+[1]: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/doc/install.texi;h=6bdfbece981f7fb6c26da672d45e5d3ba7879c69;hb=b7fc996728085c0591ea7c5d0e1c84a8f6a29bd8#l2052
+--- a/configure        2022-08-19 18:09:52.000000000 +1000
++++ b/configure        2022-12-26 17:30:49.000000000 +1100
+@@ -5622,8 +5622,7 @@
+ # Other compilers, like HP Tru64 UNIX cc, exit successfully when
+ # given a .adb file, but produce no object file.  So we must check
+ # if an object file was really produced to guard against this.
+-errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
+-if test x"$errors" = x && test -f conftest.$ac_objext; then
++if ${CC} -c conftest.adb && test -f conftest.$ac_objext; then
+   acx_cv_cc_gcc_supports_ada=yes
+ fi
+ rm -f conftest.*
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/clang-genconditions.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/clang-genconditions.patch
new file mode 100644
index 000000000000..655afd2abbc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/clang-genconditions.patch
@@ -0,0 +1,34 @@
+From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92061#c5
+
+--- a/gcc/genconditions.c	2019-01-01 12:37:19.064943662 +0100
++++ b/gcc/genconditions.c	2019-10-11 10:57:11.464595789 +0200
+@@ -57,8 +57,9 @@ write_header (void)
+ \n\
+ /* It is necessary, but not entirely safe, to include the headers below\n\
+    in a generator program.  As a defensive measure, don't do so when the\n\
+-   table isn't going to have anything in it.  */\n\
+-#if GCC_VERSION >= 3001\n\
++   table isn't going to have anything in it.\n\
++   Clang 9 is buggy and doesn't handle __builtin_constant_p correctly.  */\n\
++#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
+ \n\
+ /* Do not allow checking to confuse the issue.  */\n\
+ #undef CHECKING_P\n\
+@@ -170,7 +171,7 @@ struct c_test\n\
+    vary at run time.  It works in 3.0.1 and later; 3.0 only when not\n\
+    optimizing.  */\n\
+ \n\
+-#if GCC_VERSION >= 3001\n\
++#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
+ static const struct c_test insn_conditions[] = {\n");
+ 
+   traverse_c_tests (write_one_condition, 0);
+@@ -191,7 +192,7 @@ write_writer (void)
+ 	"  unsigned int i;\n"
+         "  const char *p;\n"
+         "  puts (\"(define_conditions [\");\n"
+-	"#if GCC_VERSION >= 3001\n"
++	"#if GCC_VERSION >= 3001 && __clang_major__ < 9\n"
+ 	"  for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
+ 	"    {\n"
+ 	"      printf (\"  (%d \\\"\", insn_conditions[i].value);\n"
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/default.nix b/nixpkgs/pkgs/development/compilers/gcc/patches/default.nix
new file mode 100644
index 000000000000..9cb2f701df57
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/default.nix
@@ -0,0 +1,335 @@
+{ lib, stdenv
+, langC
+, langAda
+, langObjC
+, langObjCpp
+, langD
+, langFortran
+, langGo
+, reproducibleBuild
+, profiledCompiler
+, langJit
+, staticCompiler
+, enableShared
+, enableLTO
+, version
+, fetchpatch
+, majorVersion
+, targetPlatform
+, hostPlatform
+, noSysDirs
+, buildPlatform
+, fetchurl
+, withoutTargetLibc
+, threadsCross
+}:
+
+let
+  atLeast13 = lib.versionAtLeast version "13";
+  atLeast12 = lib.versionAtLeast version "12";
+  atLeast11 = lib.versionAtLeast version "11";
+  atLeast10 = lib.versionAtLeast version "10";
+  atLeast9  = lib.versionAtLeast version  "9";
+  atLeast8  = lib.versionAtLeast version  "8";
+  atLeast7  = lib.versionAtLeast version  "7";
+  atLeast6  = lib.versionAtLeast version  "6";
+  atLeast49 = lib.versionAtLeast version  "4.9";
+  is13 = majorVersion == "13";
+  is12 = majorVersion == "12";
+  is11 = majorVersion == "11";
+  is10 = majorVersion == "10";
+  is9  = majorVersion == "9";
+  is8  = majorVersion == "8";
+  is7  = majorVersion == "7";
+  is6  = majorVersion == "6";
+  is49 = majorVersion == "4" && lib.versions.minor version == "9";
+  is48 = majorVersion == "4" && lib.versions.minor version == "8";
+  inherit (lib) optionals optional;
+in
+
+#
+#  Patches below are organized into three general categories:
+#  1. Patches relevant to gcc>=12 on every platform
+#  2. Patches relevant to gcc>=12 on specific platforms
+#  3. Patches relevant only to gcc<12
+#
+
+
+## 1. Patches relevant to gcc>=12 on every platform ####################################
+
+[]
+++ optional (atLeast6 && !atLeast12) ./fix-bug-80431.patch
+++ optional (targetPlatform != hostPlatform) ./libstdc++-target.patch
+++ optionals (noSysDirs) (
+  [(if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch)] ++
+  ({
+    "13" = [ ./13/no-sys-dirs-riscv.patch ./13/mangle-NIX_STORE-in-__FILE__.patch ];
+    "12" = [ ./no-sys-dirs-riscv.patch ./12/mangle-NIX_STORE-in-__FILE__.patch ];
+    "11" = [ ./no-sys-dirs-riscv.patch ];
+    "10" = [ ./no-sys-dirs-riscv.patch ];
+    "9"  = [ ./no-sys-dirs-riscv-gcc9.patch ];
+  }."${majorVersion}" or [])
+)
+++ optional (atLeast12 && langAda) ./gnat-cflags-11.patch
+++ optional langFortran (if atLeast12 then ./gcc-12-gfortran-driving.patch else ./gfortran-driving.patch)
+++ optional atLeast7 ./ppc-musl.patch
+++ optional is12 ./12/lambda-ICE-PR109241.patch # backport ICE fix on ccache code
+++ optional is13 ./13/ICE-PR110280.patch # backport ICE fix on const_unop
+++ optional (atLeast9 && langD) ./libphobos.patch
+
+
+
+## 2. Patches relevant to gcc>=12 on specific platforms ####################################
+
+### Musl+Go+gcc12
+
+# backport fixes to build gccgo with musl libc
+++ optionals (stdenv.hostPlatform.isMusl && langGo && atLeast12) [
+  (fetchpatch {
+    excludes = [ "gcc/go/gofrontend/MERGE" ];
+    url = "https://github.com/gcc-mirror/gcc/commit/cf79b1117bd177d3d4c6ed24b6fa243c3628ac2d.diff";
+    hash = "sha256-mS5ZiYi5D8CpGXrWg3tXlbhp4o86ew1imCTwaHLfl+I=";
+  })
+  (fetchpatch {
+    excludes = [ "gcc/go/gofrontend/MERGE" ];
+    url = "https://github.com/gcc-mirror/gcc/commit/7f195a2270910a6ed08bd76e3a16b0a6503f9faf.diff";
+    hash = "sha256-Ze/cFM0dQofKH00PWPDoklXUlwWhwA1nyTuiDAZ6FKo=";
+  })
+  (fetchpatch {
+    excludes = [ "gcc/go/gofrontend/MERGE" ];
+    url = "https://github.com/gcc-mirror/gcc/commit/762fd5e5547e464e25b4bee435db6df4eda0de90.diff";
+    hash = "sha256-o28upwTcHAnHG2Iq0OewzwSBEhHs+XpBGdIfZdT81pk=";
+  })
+  (fetchpatch {
+    excludes = [ "gcc/go/gofrontend/MERGE" ];
+    url = "https://github.com/gcc-mirror/gcc/commit/e73d9fcafbd07bc3714fbaf8a82db71d50015c92.diff";
+    hash = "sha256-1SjYCVHLEUihdON2TOC3Z2ufM+jf2vH0LvYtZL+c1Fo=";
+  })
+  (fetchpatch {
+    excludes = [ "gcc/go/gofrontend/MERGE" ];
+    url = "https://github.com/gcc-mirror/gcc/commit/b6c6a3d64f2e4e9347733290aca3c75898c44b2e.diff";
+    hash = "sha256-RycJ3YCHd3MXtYFjxP0zY2Wuw7/C4bWoBAQtTKJZPOQ=";
+  })
+  (fetchpatch {
+    excludes = [ "gcc/go/gofrontend/MERGE" ];
+    url = "https://github.com/gcc-mirror/gcc/commit/2b1a604a9b28fbf4f382060bebd04adb83acc2f9.diff";
+    hash = "sha256-WiBQG0Xbk75rHk+AMDvsbrm+dc7lDH0EONJXSdEeMGE=";
+  })
+  (fetchpatch {
+    url = "https://github.com/gcc-mirror/gcc/commit/c86b726c048eddc1be320c0bf64a897658bee13d.diff";
+    hash = "sha256-QSIlqDB6JRQhbj/c3ejlmbfWz9l9FurdSWxpwDebnlI=";
+  })
+]
+
+
+## Darwin
+
+# Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin
+++ optional (atLeast12 && stdenv.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch
+
+# Use absolute path in GNAT dylib install names on Darwin
+++ optional (atLeast12 && stdenv.isDarwin && langAda) ./gnat-darwin-dylib-install-name.patch
+
+# We only apply this patch when building a native toolchain for aarch64-darwin, as it breaks building
+# a foreign one: https://github.com/iains/gcc-12-branch/issues/18
+++ optionals (stdenv.isDarwin && stdenv.isAarch64 && buildPlatform == hostPlatform && hostPlatform == targetPlatform) ({
+  "13" = [ (fetchpatch {
+    name = "gcc-13-darwin-aarch64-support.patch";
+    url = "https://raw.githubusercontent.com/Homebrew/formula-patches/3c5cbc8e9cf444a1967786af48e430588e1eb481/gcc/gcc-13.2.0.diff";
+    sha256 = "sha256-Y5r3U3dwAFG6+b0TNCFd18PNxYu2+W/5zDbZ5cHvv+U=";
+  }) ];
+  "12" = [ (fetchurl {
+    name = "gcc-12-darwin-aarch64-support.patch";
+    url = "https://raw.githubusercontent.com/Homebrew/formula-patches/f1188b90d610e2ed170b22512ff7435ba5c891e2/gcc/gcc-12.3.0.diff";
+    sha256 = "sha256-naL5ZNiurqfDBiPSU8PTbTmLqj25B+vjjiqc4fAFgYs=";
+  }) ];
+  "11" = [ (fetchpatch {
+    # There are no upstream release tags in https://github.com/iains/gcc-11-branch.
+    # ff4bf32 is the commit from https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-11.4.0
+    url = "https://github.com/iains/gcc-11-branch/compare/ff4bf326d03e750a8d4905ea49425fe7d15a04b8..gcc-11.4-darwin-r0.diff";
+    hash = "sha256-6prPgR2eGVJs7vKd6iM1eZsEPCD1ShzLns2Z+29vlt4=";
+  }) ];
+}.${majorVersion} or [])
+
+
+## Windows
+
+# Obtain latest patch with ../update-mcfgthread-patches.sh
+++ optional (atLeast6 && !atLeast13 && !withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf")
+  (./. + "/${majorVersion}/Added-mcf-thread-model-support-from-mcfgthread.patch")
+
+
+
+
+##############################################################################
+##
+##  3. Patches relevant only to gcc<12
+##
+##  Above this point are patches which might potentially be applied
+##  to gcc version 12 or newer.  Below this point are patches which
+##  will *only* be used for gcc versions older than gcc12.
+##
+##############################################################################
+
+
+
+
+## gcc 11.0 and older ##############################################################################
+
+# libgcc’s `configure` script misdetects aarch64-darwin, resulting in an invalid deployment target.
+++ optional (is11 && stdenv.isDarwin && stdenv.isAarch64) ./11/libgcc-aarch64-darwin-detection.patch
+
+# openjdk build fails without this on -march=opteron; is upstream in gcc12
+++ optionals (is11) [ ./11/gcc-issue-103910.patch ]
+
+
+
+## gcc 10.0 and older ##############################################################################
+
+++ optional (langAda && (is9 || is10)) ./gnat-cflags.patch
+++ optional (is10 && buildPlatform.system == "aarch64-darwin" && targetPlatform != buildPlatform) (fetchpatch {
+  url = "https://raw.githubusercontent.com/richard-vd/musl-cross-make/5e9e87f06fc3220e102c29d3413fbbffa456fcd6/patches/gcc-${version}/0008-darwin-aarch64-self-host-driver.patch";
+  sha256 = "sha256-XtykrPd5h/tsnjY1wGjzSOJ+AyyNLsfnjuOZ5Ryq9vA=";
+})
+
+# Fix undefined symbol errors when building older versions with clang
+++ optional (!atLeast11 && stdenv.cc.isClang && stdenv.hostPlatform.isDarwin) ./clang-genconditions.patch
+
+
+## gcc 9.0 and older ##############################################################################
+
+++ optional (majorVersion == "9") ./9/fix-struct-redefinition-on-glibc-2.36.patch
+++ optional (atLeast7 && !atLeast10 && targetPlatform.isNetBSD) ./libstdc++-netbsd-ctypes.patch
+
+# Make Darwin bootstrap respect whether the assembler supports `--gstabs`,
+# which is not supported by the clang integrated assembler used by default on Darwin.
+++ optional (is9 && hostPlatform.isDarwin) ./9/gcc9-darwin-as-gstabs.patch
+
+
+## gcc 8.0 and older ##############################################################################
+
+# for 49 this is applied later
+++ optional (atLeast49 && !is49 && !atLeast9) ./libsanitizer-no-cyclades-9.patch
+++ optional (is7 || is8) ./9/fix-struct-redefinition-on-glibc-2.36.patch
+
+# Make Darwin bootstrap respect whether the assembler supports `--gstabs`,
+# which is not supported by the clang integrated assembler used by default on Darwin.
+++ optional (is8 && hostPlatform.isDarwin) ./8/gcc8-darwin-as-gstabs.patch
+
+# Make avr-gcc8 build on aarch64-darwin
+# avr-gcc8 is maintained for the `qmk` package
+# https://github.com/osx-cross/homebrew-avr/blob/main/Formula/avr-gcc%408.rb#L69
+++ optional (is8 && targetPlatform.isAvr && hostPlatform.isDarwin && hostPlatform.isAarch64) ./8/avr-gcc-8-darwin.patch
+
+
+## gcc 7.0 and older ##############################################################################
+
+++ optional (is7 && 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";
+})
+++ optionals (is7) [
+  # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html
+  (./. + "/${majorVersion}/riscv-pthread-reentrant.patch")
+  # https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00297.html
+  (./. + "/${majorVersion}/riscv-no-relax.patch")
+  # Fix for asan w/glibc-2.34. Although there's no upstream backport to v7,
+  # the patch from gcc 8 seems to work perfectly fine.
+  (./. + "/${majorVersion}/gcc8-asan-glibc-2.34.patch")
+  (./. + "/${majorVersion}/0001-Fix-build-for-glibc-2.31.patch")
+]
+++ optional ((is6 || is7) && targetPlatform.libc == "musl" && targetPlatform.isx86_32) (fetchpatch {
+  url = "https://git.alpinelinux.org/aports/plain/main/gcc/gcc-6.1-musl-libssp.patch?id=5e4b96e23871ee28ef593b439f8c07ca7c7eb5bb";
+  sha256 = "1jf1ciz4gr49lwyh8knfhw6l5gvfkwzjy90m7qiwkcbsf4a3fqn2";
+})
+++ optional ((is6 || is7 || is8) && !atLeast9 && targetPlatform.libc == "musl") ./libgomp-dont-force-initial-exec.patch
+
+
+
+## gcc 6.0 and older ##############################################################################
+
+++ optional (is6 && langGo) ./gogcc-workaround-glibc-2.36.patch
+++ optional (is49 || is6) ./9/fix-struct-redefinition-on-glibc-2.36.patch
+++ optional (is49 || (is6 && !stdenv.targetPlatform.isRedox)) ./use-source-date-epoch.patch
+++ optional (is6 && !stdenv.targetPlatform.isRedox) ./6/0001-Fix-build-for-glibc-2.31.patch
+++ optionals (is6 && langAda) [
+  ./gnat-cflags.patch
+  ./6/gnat-glibc234.patch
+]
+
+# The clang-based assembler used in darwin.cctools-llvm (LLVM >11) does not support piping input.
+# Fortunately, it does not exhibit the problem GCC has with the cctools assembler.
+# This patch can be dropped should darwin.cctools-llvm ever implement support.
+++ optional (!atLeast7 && hostPlatform.isDarwin && lib.versionAtLeast (lib.getVersion stdenv.cc) "12") ./4.9/darwin-clang-as.patch
+
+# Building libstdc++ with flat namespaces results in trying to link CoreFoundation, which
+# defaults to the impure, system location and causes the build to fail.
+++ optional (is6 && hostPlatform.isDarwin) ./6/libstdc++-disable-flat_namespace.patch
+
+## gcc 4.9 and older ##############################################################################
+
+++ optional (!atLeast6) ./parallel-bconfig.patch
+++ optionals (is49) [
+  (./. + "/${lib.versions.major version}.${lib.versions.minor version}/parallel-strsignal.patch")
+  (./. + "/${lib.versions.major version}.${lib.versions.minor version}/libsanitizer.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";
+  })
+  # has to be applied after "avoid-ustat-glibc-2.28.patch"
+  ./libsanitizer-no-cyclades-9.patch
+  # glibc-2.26
+  ./struct-ucontext.patch
+  ./struct-sigaltstack-4.9.patch
+]
+# Retpoline patches pulled from the branch hjl/indirect/gcc-4_9-branch (by H.J. Lu, the author of GCC upstream retpoline commits)
+++ optionals is49
+  (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"; }])
+
+++ optional (is49 && !atLeast6) [
+  # gcc-11 compatibility
+  (fetchpatch {
+    name = "gcc4-char-reload.patch";
+    url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=d57c99458933a21fdf94f508191f145ad8d5ec58";
+    includes = [ "gcc/reload.h" ];
+    sha256 = "sha256-66AMP7/ajunGKAN5WJz/yPn42URZ2KN51yPrFdsxEuM=";
+  })
+]
+
+
+## gcc 4.8 only ##############################################################################
+
+++ optional (!atLeast49 && hostPlatform.isDarwin) ./gfortran-darwin-NXConstStr.patch
+++ optionals is48 [
+  (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
+  # gcc-11 compatibility
+  (fetchpatch {
+    name = "gcc4-char-reload.patch";
+    url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=d57c99458933a21fdf94f508191f145ad8d5ec58";
+    includes = [ "gcc/reload.h" ];
+    sha256 = "sha256-66AMP7/ajunGKAN5WJz/yPn42URZ2KN51yPrFdsxEuM=";
+  })
+]
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/fix-bug-80431.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/fix-bug-80431.patch
new file mode 100644
index 000000000000..2d688b8c7997
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/fix-bug-80431.patch
@@ -0,0 +1,92 @@
+From de31f5445b12fd9ab9969dc536d821fe6f0edad0 Mon Sep 17 00:00:00 2001
+From: Patrick Palka <ppalka@redhat.com>
+Date: Mon, 21 Jun 2021 07:54:26 -0400
+Subject: [PATCH] c++: conversion to base of vbase in NSDMI [PR80431]
+
+The delayed processing of conversions to a virtual base in an NSDMI
+assumes the target base type is a (possibly indirect) virtual base of
+the current class, but the target base type could also be a base of a
+virtual base, as in the testcase below.  Since such a base isn't a part
+of CLASSTYPE_VBASECLASSES, we end up miscompiling the testcase due to
+the call to build_base_path (with binfo=NULL_TREE) silently returning
+error_mark_node.  Fix this by using convert_to_base to build the
+conversion instead.
+
+	PR c++/80431
+
+gcc/cp/ChangeLog:
+
+	* tree.c (bot_replace): Use convert_to_base to build the
+	conversion to the (morally) virtual base.
+
+gcc/testsuite/ChangeLog:
+
+	* g++.dg/cpp0x/nsdmi-virtual1a.C: New test.
+---
+ gcc/cp/tree.c                                | 14 ++++------
+ gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C | 28 ++++++++++++++++++++
+ 2 files changed, 33 insertions(+), 9 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
+
+diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
+index fec5afaa2be..297da2b1550 100644
+--- a/gcc/cp/tree.c
++++ b/gcc/cp/tree.c
+@@ -3242,15 +3242,11 @@ bot_replace (tree* t, int* /*walk_subtrees*/, void* data_)
+   else if (TREE_CODE (*t) == CONVERT_EXPR
+ 	   && CONVERT_EXPR_VBASE_PATH (*t))
+     {
+-      /* In an NSDMI build_base_path defers building conversions to virtual
+-	 bases, and we handle it here.  */
+-      tree basetype = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (*t)));
+-      vec<tree, va_gc> *vbases = CLASSTYPE_VBASECLASSES (current_class_type);
+-      int i; tree binfo;
+-      FOR_EACH_VEC_SAFE_ELT (vbases, i, binfo)
+-	if (BINFO_TYPE (binfo) == basetype)
+-	  break;
+-      *t = build_base_path (PLUS_EXPR, TREE_OPERAND (*t, 0), binfo, true,
++      /* In an NSDMI build_base_path defers building conversions to morally
++	 virtual bases, and we handle it here.  */
++      tree basetype = TREE_TYPE (*t);
++      *t = convert_to_base (TREE_OPERAND (*t, 0), basetype,
++			    /*check_access=*/false, /*nonnull=*/true,
+ 			    tf_warning_or_error);
+     }
+ 
+diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
+new file mode 100644
+index 00000000000..dc847cc16e5
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
+@@ -0,0 +1,28 @@
++// PR c++/80431
++// { dg-do run { target c++11 } }
++
++// A variant of nsdmi-virtual1.C where A is only a morally virtual base of B.
++
++struct A
++{
++  A(): i(42) { }
++  int i;
++  int f() { return i; }
++};
++
++struct D : A { int pad; };
++
++struct B : virtual D
++{
++  int j = i + f();
++  int k = A::i + A::f();
++};
++
++struct C: B { int pad; };
++
++int main()
++{
++  C c;
++  if (c.j != 84 || c.k != 84)
++    __builtin_abort();
++}
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-gfortran-driving.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-gfortran-driving.patch
new file mode 100644
index 000000000000..0ad1f256063f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-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.cc
++++ b/gcc/fortran/gfortranspec.cc
+@@ -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/patches/gcc-12-no-sys-dirs.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-no-sys-dirs.patch
new file mode 100644
index 000000000000..67a94298440f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/gcc-12-no-sys-dirs.patch
@@ -0,0 +1,26 @@
+--- a/gcc/cppdefault.cc	2013-01-10 21:38:27.000000000 +0100
++++ b/gcc/cppdefault.cc	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;
+--- a/gcc/gcc.cc	2014-03-23 12:30:57.000000000 +0100
++++ b/gcc/gcc.cc	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/patches/gfortran-darwin-NXConstStr.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gfortran-darwin-NXConstStr.patch
new file mode 100644
index 000000000000..a7e158ca364b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/gfortran-driving.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gfortran-driving.patch
new file mode 100644
index 000000000000..70708886b405
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/gnat-cflags-11.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gnat-cflags-11.patch
new file mode 100644
index 000000000000..03ef28664524
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/gnat-cflags-11.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 -gnatg -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/patches/gnat-cflags.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gnat-cflags.patch
new file mode 100644
index 000000000000..a16266bbf39c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/gnat-darwin-dylib-install-name.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/gnat-darwin-dylib-install-name.patch
new file mode 100644
index 000000000000..01e5de86a438
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/gnat-darwin-dylib-install-name.patch
@@ -0,0 +1,19 @@
+--- a/gcc/ada/gcc-interface/Makefile.in	2022-08-19 18:09:52.000000000 +1000
++++ b/gcc/ada/gcc-interface/Makefile.in	2023-01-11 01:54:06.000000000 +1100
+@@ -795,14 +795,14 @@
+ 		-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ 		$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
+ 		$(SO_OPTS) \
+-		-Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++		-Wl,-install_name,$(ADA_RTL_DSO_DIR)/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ 		$(MISCLIB)
+ 	cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
+                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
+ 		-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ 		$(GNATRTL_TASKING_OBJS) \
+ 		$(SO_OPTS) \
+-		-Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++		-Wl,-install_name,$(ADA_RTL_DSO_DIR)/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ 		$(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
+ 	cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+ 		libgnat$(soext)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/libgomp-dont-force-initial-exec.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/libgomp-dont-force-initial-exec.patch
new file mode 100644
index 000000000000..afd1f7456d32
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/libphobos.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/libphobos.patch
new file mode 100644
index 000000000000..a16ea5416ffb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/libsanitizer-no-cyclades-9.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/libsanitizer-no-cyclades-9.patch
new file mode 100644
index 000000000000..072403d1495f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/libsanitizer-no-cyclades-9.patch
@@ -0,0 +1,82 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2b40941d23b1570cdd90083b58fa0f66aa58c86e
+https://gcc.gnu.org/PR100379 
+--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -365,15 +365,6 @@ static void ioctl_table_fill() {
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+-  _(CYGETDEFTHRESH, WRITE, sizeof(int));
+-  _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+-  _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
+-  _(CYGETTHRESH, WRITE, sizeof(int));
+-  _(CYGETTIMEOUT, WRITE, sizeof(int));
+-  _(CYSETDEFTHRESH, NONE, 0);
+-  _(CYSETDEFTIMEOUT, NONE, 0);
+-  _(CYSETTHRESH, NONE, 0);
+-  _(CYSETTIMEOUT, NONE, 0);
+   _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
+   _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
+   _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+ #include <linux/lp.h>
+@@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+-  unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+   unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
+ #else
+@@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+-  unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+-  unsigned IOCTL_CYGETMON = CYGETMON;
+-  unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
+-  unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
+-  unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
+-  unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
+-  unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
+-  unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
+   unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
+   unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
+   unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -1040,7 +1040,6 @@ struct __sanitizer_cookie_io_functions_t {
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   extern unsigned struct_ax25_parms_struct_sz;
+-  extern unsigned struct_cyclades_monitor_sz;
+   extern unsigned struct_input_keymap_entry_sz;
+   extern unsigned struct_ipx_config_data_sz;
+   extern unsigned struct_kbdiacrs_sz;
+@@ -1385,15 +1384,6 @@ struct __sanitizer_cookie_io_functions_t {
+ #endif  // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  extern unsigned IOCTL_CYGETDEFTHRESH;
+-  extern unsigned IOCTL_CYGETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYGETMON;
+-  extern unsigned IOCTL_CYGETTHRESH;
+-  extern unsigned IOCTL_CYGETTIMEOUT;
+-  extern unsigned IOCTL_CYSETDEFTHRESH;
+-  extern unsigned IOCTL_CYSETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYSETTHRESH;
+-  extern unsigned IOCTL_CYSETTIMEOUT;
+   extern unsigned IOCTL_EQL_EMANCIPATE;
+   extern unsigned IOCTL_EQL_ENSLAVE;
+   extern unsigned IOCTL_EQL_GETMASTRCFG;
+-- 
+2.27.0
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/libstdc++-netbsd-ctypes.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/libstdc++-netbsd-ctypes.patch
new file mode 100644
index 000000000000..28fff80b786d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/libstdc++-target.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/libstdc++-target.patch
new file mode 100644
index 000000000000..fb622b395806
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/no-sys-dirs-riscv-gcc9.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv-gcc9.patch
new file mode 100644
index 000000000000..afe3f26360e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv-gcc9.patch
@@ -0,0 +1,17 @@
+diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
+index 701f5ea1544..8de333caf54 100644
+--- a/gcc/config/riscv/riscv.h
++++ b/gcc/config/riscv/riscv.h
+@@ -886,11 +886,7 @@ extern unsigned riscv_stack_boundary;
+   "%{mabi=lp64f:lp64f}" \
+   "%{mabi=lp64d:lp64d}" \
+ 
+-#define STARTFILE_PREFIX_SPEC 			\
+-   "/lib" XLEN_SPEC "/" ABI_SPEC "/ "		\
+-   "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ "	\
+-   "/lib/ "					\
+-   "/usr/lib/ "
++#define STARTFILE_PREFIX_SPEC ""
+ 
+ /* ISA constants needed for code generation.  */
+ #define OPCODE_LW    0x2003
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv.patch
new file mode 100644
index 000000000000..00e2838af6fd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv.patch
@@ -0,0 +1,12 @@
+--- a/gcc/config/riscv/linux.h
++++ b/gcc/config/riscv/linux.h
+@@ -69,8 +69,4 @@
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define STARTFILE_PREFIX_SPEC 			\
+-   "/lib" XLEN_SPEC "/" ABI_SPEC "/ "		\
+-   "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ "	\
+-   "/lib/ "					\
+-   "/usr/lib/ "
++#define STARTFILE_PREFIX_SPEC ""
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/no-sys-dirs.patch
new file mode 100644
index 000000000000..36df51904acf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/parallel-bconfig.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/parallel-bconfig.patch
new file mode 100644
index 000000000000..bc56ac698f5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/ppc-musl.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/ppc-musl.patch
new file mode 100644
index 000000000000..bc90888a3797
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/res_state-not-declared.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/res_state-not-declared.patch
new file mode 100644
index 000000000000..e970487786d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/sigsegv-not-declared.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/sigsegv-not-declared.patch
new file mode 100644
index 000000000000..f9cfaec82026
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/struct-sigaltstack-4.9.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/struct-sigaltstack-4.9.patch
new file mode 100644
index 000000000000..fc126b4813d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/struct-ucontext-4.8.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/struct-ucontext-4.8.patch
new file mode 100644
index 000000000000..630ef6586e45
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/struct-ucontext.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/struct-ucontext.patch
new file mode 100644
index 000000000000..c7fb6d1f71cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/patches/update-mcfgthread-patches.sh b/nixpkgs/pkgs/development/compilers/gcc/patches/update-mcfgthread-patches.sh
new file mode 100755
index 000000000000..c4fd79b26c34
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/update-mcfgthread-patches.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p curl
+
+# We use this script to download local copies instead of using
+# fetchpatch because lmhouse/MINGW-packages-dev is constantly rebased
+# against msys2/MINGW-packages-dev and won't have stable commit hashes.
+
+name=Added-mcf-thread-model-support-from-mcfgthread.patch
+source=https://raw.githubusercontent.com/lhmouse/MINGW-packages-dev/master/mingw-w64-gcc-git
+dest=$(dirname "$0")
+
+for majorVersion in 6 7 8 9 10; do
+    curl "$source/9000-gcc-$majorVersion-branch-$name" \
+         > "$dest/$majorVersion/$name"
+done
diff --git a/nixpkgs/pkgs/development/compilers/gcc/patches/use-source-date-epoch.patch b/nixpkgs/pkgs/development/compilers/gcc/patches/use-source-date-epoch.patch
new file mode 100644
index 000000000000..65a5ab028c1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/patches/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/gcc/versions.nix b/nixpkgs/pkgs/development/compilers/gcc/versions.nix
new file mode 100644
index 000000000000..261ffc634544
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/versions.nix
@@ -0,0 +1,38 @@
+let
+  majorMinorToVersionMap = {
+    "13" = "13.2.0";
+    "12" = "12.3.0";
+    "11" = "11.4.0";
+    "10" = "10.5.0";
+    "9"  =  "9.5.0";
+    "8"  =  "8.5.0";
+    "7"  =  "7.5.0";
+    "6"  =  "6.5.0";
+    "4.9"=  "4.9.4";
+    "4.8"=  "4.8.5";
+  };
+
+  fromMajorMinor = majorMinorVersion:
+    majorMinorToVersionMap."${majorMinorVersion}";
+
+  # TODO(amjoseph): convert older hashes to SRI form
+  srcHashForVersion = version: {
+    # NOTE: there is no need to remove hashes of obsolete minor
+    # versions when adding a new minor version.
+    "13.2.0" = "sha256-4nXnZEKmBnNBon8Exca4PYYTFEAEwEE1KIY9xrXHQ9o=";
+    "12.3.0" = "sha256-lJpdT5nnhkIak7Uysi/6tVeN5zITaZdbka7Jet/ajDs=";
+    "11.4.0" = "sha256-Py2yIrAH6KSiPNW6VnJu8I6LHx6yBV7nLBQCzqc6jdk=";
+    "10.5.0" = "sha256-JRCVQ/30bzl8NHtdi3osflaUpaUczkucbh6opxyjB8E=";
+    "9.5.0"  = "13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7";
+    "8.5.0"  = "0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k";
+    "7.5.0"  = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq";
+    "6.5.0"  = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby";
+    "4.9.4"  = "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc";
+    "4.8.5"  = "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2";
+  }."${version}";
+
+in {
+  inherit fromMajorMinor;
+  inherit srcHashForVersion;
+  allMajorVersions = builtins.attrNames majorMinorToVersionMap;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcl/default.nix b/nixpkgs/pkgs/development/compilers/gcl/default.nix
new file mode 100644
index 000000000000..8ef2cedbf076
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcl/default.nix
@@ -0,0 +1,36 @@
+{ lib, 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.14";
+
+  src = fetchurl {
+    url = "mirror://gnu/gcl/gcl-${version}.tar.gz";
+    hash = "sha256-CfNBfFEqoXM6Y4gJ06Y6wpDuuUSL6CeV9bZoG9MHNFo=";
+  };
+
+  buildInputs = [
+    mpfr m4 binutils emacs gmp
+    libX11 xorgproto libXi
+    libXext libXt libXaw libXmu
+    zlib which texinfo
+  ];
+
+  configureFlags = [
+    "--enable-ansi"
+  ];
+
+  meta = with lib; {
+    description = "GNU Common Lisp compiler working via GCC";
+    maintainers = lib.teams.lisp.members;
+    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..af983be968b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/build.nix
@@ -0,0 +1,127 @@
+{ pkgs, gccStdenv, lib, coreutils,
+  openssl, zlib, sqlite,
+  version, git-version, src,
+  gambit-support,
+  gambit-git-version,
+  gambit-stampYmd,
+  gambit-stampHms,
+  gambit-params }:
+
+# 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 ];
+
+  # 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 = buildInputs_libraries;
+
+  postPatch = ''
+    patchShebangs . ;
+    grep -Fl '#!/usr/bin/env' `find . -type f -executable` | while read f ; do
+      substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' ;
+    done ;
+    cat > MANIFEST <<EOF
+    gerbil_stamp_version=v${git-version}
+    gambit_stamp_version=v${gambit-git-version}
+    gambit_stamp_ymd=${gambit-stampYmd}
+    gambit_stamp_hms=${gambit-stampHms}
+    EOF
+    for f in src/bootstrap/gerbil/compiler/driver__0.scm \
+             src/build/build-libgerbil.ss \
+             src/gerbil/compiler/driver.ss ; do
+      substituteInPlace "$f" --replace '"gcc"' '"${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc"' ;
+    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!
+# EOF
+
+  configureFlags = [
+    "--prefix=$out/gerbil"
+    "--enable-zlib"
+    "--enable-sqlite"
+    "--enable-shared"
+    "--enable-march=" # Avoid non-portable invalid instructions. Use =native if local build only.
+  ];
+
+  configurePhase = ''
+    export CC=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc \
+           CXX=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}g++ \
+           CPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \
+           CXXCPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \
+           LD=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}ld \
+           XMKMF=${coreutils}/bin/false
+    unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
+    ./configure ${builtins.concatStringsSep " " configureFlags}
+  '';
+
+  extraLdOptions = [
+      "-L${zlib}/lib"
+      "-L${openssl.out}/lib"
+      "-L${sqlite.out}/lib"
+    ];
+
+  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_PREFIX=$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 )
+
+    f=build/lib/libgerbil.so.ldd ; [ -f $f ] && :
+    substituteInPlace "$f" --replace '(' \
+      '(${lib.strings.concatStrings (map (x: "\"${x}\" " ) extraLdOptions)}'
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/gerbil $out/bin
+    ./install.sh
+    (cd $out/bin ; ln -s ../gerbil/bin/* .)
+    runHook postInstall
+  '' + lib.optionalString stdenv.isDarwin ''
+    libgerbil="$(realpath "$out/gerbil/lib/libgerbil.so")"
+    install_name_tool -id "$libgerbil" "$libgerbil"
+  '';
+
+  dontStrip = true;
+
+  meta = {
+    description = "Gerbil Scheme";
+    homepage    = "https://github.com/vyzo/gerbil";
+    license     = lib.licenses.lgpl21Only; # dual, also asl20, like Gambit
+    # NB regarding platforms: regularly tested on Linux and on macOS.
+    # Please report success and/or failure to fare.
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ fare ];
+  };
+
+  outputsToInstall = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/default.nix b/nixpkgs/pkgs/development/compilers/gerbil/default.nix
new file mode 100644
index 000000000000..148bf7451675
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/default.nix
@@ -0,0 +1,18 @@
+{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support, pkgs, gccStdenv }:
+
+callPackage ./build.nix rec {
+  version = "0.18.1";
+  git-version = "0.18.1";
+  src = fetchFromGitHub {
+    owner = "mighty-gerbils";
+    repo = "gerbil";
+    rev = "23c30a6062cd7e63f9d85300ce01585bb9035d2d";
+    sha256 = "15fh0zqkmnjhan1mgymq5fgbjsh5z9d2v6zjddplqib5zd2s3z6k";
+    fetchSubmodules = true;
+  };
+  inherit gambit-support;
+  gambit-params = gambit-support.unstable-params;
+  gambit-git-version = "4.9.5-78-g8b18ab69";
+  gambit-stampYmd = "20231029";
+  gambit-stampHms = "163035";
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/ftw.nix b/nixpkgs/pkgs/development/compilers/gerbil/ftw.nix
new file mode 100644
index 000000000000..fc1ed986eb61
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/ftw.nix
@@ -0,0 +1,27 @@
+{ lib, fetchFromGitHub, gerbilPackages, ... }:
+
+{
+  pname = "ftw";
+  version = "unstable-2023-11-15";
+  git-version = "e5e2f56";
+  softwareName = "FTW: For The Web!";
+  gerbil-package = "drewc/ftw";
+
+  gerbilInputs = with gerbilPackages; [ gerbil-utils ];
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "drewc";
+    repo = "ftw";
+    rev = "e5e2f56e90bf072ddf9c2987ddfac45f048e8a04";
+    sha256 = "04164190vv1fzfk014mgqqmy5cml5amh63df31q2yc2kzvfajfc3";
+  };
+
+  meta = with lib; {
+    description = "Simple web handlers for Gerbil Scheme";
+    homepage    = "https://github.com/drewc/ftw";
+    license     = licenses.mit;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-crypto.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-crypto.nix
new file mode 100644
index 000000000000..fc55ca5b79db
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-crypto.nix
@@ -0,0 +1,29 @@
+{ pkgs, lib, fetchFromGitHub, gerbilPackages, ... }:
+
+{
+  pname = "gerbil-crypto";
+  version = "unstable-2023-11-29";
+  git-version = "0.1-1-g4197bfa";
+  gerbil-package = "clan/crypto";
+  gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-poo ];
+  nativeBuildInputs = [ pkgs.pkg-config ];
+  buildInputs = [ pkgs.secp256k1 ];
+  version-path = "version";
+  softwareName = "Gerbil-crypto";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-crypto";
+    rev = "4197bfa71dc55657f79efd5cc21fe59839e840f2";
+    sha256 = "1jdfz5x24dfvpwyfxalkhv83gf9ylyaqii1kg8rjl8dzickawrix";
+  };
+
+  meta = with lib; {
+    description = "Gerbil Crypto: Extra Cryptographic Primitives for Gerbil";
+    homepage    = "https://github.com/fare/gerbil-crypto";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-ethereum.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-ethereum.nix
new file mode 100644
index 000000000000..42891aeca4d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-ethereum.nix
@@ -0,0 +1,50 @@
+{ lib, fetchFromGitHub, gerbilPackages, gerbil-support, gerbil, ... }:
+
+rec {
+  pname = "gerbil-ethereum";
+  version = "unstable-2023-12-04";
+  git-version = "0.2-11-g124ec58";
+  softwareName = "Gerbil-ethereum";
+  gerbil-package = "clan/ethereum";
+  version-path = "version";
+
+  gerbilInputs = with gerbilPackages; [
+    gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-leveldb ];
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-ethereum";
+    rev = "124ec585157e2c505cd3c449a389c124ca6da9e9";
+    sha256 = "0xg07k421r5p0qx98id66k0k2l3vi1is875857sd8q3h6bks0z54";
+  };
+
+  postInstall = ''
+    cp scripts/{croesus.prv,genesis.json,logback.xml,yolo-evm.conf,yolo-kevm.conf,run-ethereum-test-net.ss} $out/gerbil/lib/clan/ethereum/scripts/
+    mkdir -p $out/bin
+    cat > $out/bin/run-ethereum-test-net <<EOF
+    #!/bin/sh
+    #|
+    ORIG_GERBIL_LOADPATH="\$GERBIL_LOADPATH"
+    ORIG_GERBIL_PATH="\$GERBIL_PATH"
+    ORIG_GERBIL_HOME="\$GERBIL_HOME"
+    unset GERBIL_HOME
+    GERBIL_LOADPATH="${gerbil-support.gerbilLoadPath (["$out"] ++ gerbilInputs)}"
+    GERBIL_PATH="\$HOME/.cache/gerbil-ethereum/gerbil"
+    export GERBIL_PATH GERBIL_LOADPATH GLOW_SOURCE ORIG_GERBIL_PATH ORIG_GERBIL_LOADPATH
+    exec ${gerbil}/bin/gxi "\$0" "\$@"
+    |#
+    (import :clan/ethereum/scripts/run-ethereum-test-net :std/lib/multicall)
+    (apply call-entry-point (cdr (command-line)))
+    EOF
+    chmod a+x $out/bin/run-ethereum-test-net
+    '';
+
+  meta = with lib; {
+    description = "Gerbil Ethereum: a Scheme alternative to web3.js";
+    homepage    = "https://github.com/fare/gerbil-ethereum";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-leveldb.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-leveldb.nix
new file mode 100644
index 000000000000..811e677e9218
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-leveldb.nix
@@ -0,0 +1,31 @@
+{ pkgs, lib, fetchFromGitHub, gerbilPackages, leveldb, ... }:
+
+{
+  pname = "gerbil-leveldb";
+  version = "unstable-2023-09-23";
+  git-version = "c62e47f";
+  gerbil-package = "clan";
+  gerbilInputs = [ ];
+  nativeBuildInputs = [ pkgs.pkg-config ];
+  buildInputs = [ leveldb ];
+  version-path = "";
+  softwareName = "Gerbil-LevelDB";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-leveldb";
+    rev = "c62e47f352377b6843fb3e4b27030762a510a0d8";
+    sha256 = "177zn1smv2zq97mlryf8fi7v5gbjk07v5i0dix3r2wsanphaawvl";
+  };
+
+  meta = with lib; {
+    description = "LevelDB bindings for Gerbil";
+    homepage    = "https://github.com/mighty-gerbils/gerbil-leveldb";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+
+  # "-L${leveldb}/lib"
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libp2p.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libp2p.nix
new file mode 100644
index 000000000000..17fab159c6d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libp2p.nix
@@ -0,0 +1,27 @@
+{ lib, fetchFromGitHub, ... }:
+
+{
+  pname = "gerbil-libp2p";
+  version = "unstable-2022-02-03";
+  git-version = "15b3246";
+  softwareName = "Gerbil-libp2p";
+  gerbil-package = "vyzo";
+
+  buildInputs = []; # Note: at *runtime*, this depends on go-libp2p-daemon running
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "vyzo";
+    repo = "gerbil-libp2p";
+    rev = "15b32462e683d89ffce0ff15ad373d293ea0ee5d";
+    sha256 = "059lydp7d6pjgrd4pdnqq2zffzlba62ch102f01rgzf9aps3c8lz";
+  };
+
+  meta = with lib; {
+    description = "Gerbil libp2p: use libp2p from Gerbil";
+    homepage    = "https://github.com/vyzo/gerbil-libp2p";
+    license     = licenses.mit;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libxml.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libxml.nix
new file mode 100644
index 000000000000..bbd33752670e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libxml.nix
@@ -0,0 +1,29 @@
+{ pkgs, lib, fetchFromGitHub, gerbilPackages, libxml2, ... }:
+
+{
+  pname = "gerbil-libxml";
+  version = "unstable-2023-09-23";
+  git-version = "b08e5d8";
+  gerbil-package = "clan";
+  gerbilInputs = [ ];
+  nativeBuildInputs = [ pkgs.pkg-config ];
+  buildInputs = [ libxml2 ];
+  version-path = "";
+  softwareName = "Gerbil-LibXML";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-libxml";
+    rev = "b08e5d8fe4688a162824062579ce152a10adb4cf";
+    sha256 = "1zfccqaibwy2b3srwmwwgv91dwy1xl18cfimxhcsxl6mxvgm61pd";
+  };
+
+  meta = with lib; {
+    description = "libxml bindings for Gerbil";
+    homepage    = "https://github.com/mighty-gerbils/gerbil-libxml";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libyaml.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libyaml.nix
new file mode 100644
index 000000000000..0a69537b365d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-libyaml.nix
@@ -0,0 +1,31 @@
+{ pkgs, lib, fetchFromGitHub, gerbilPackages, libyaml, ... }:
+
+{
+  pname = "gerbil-libyaml";
+  version = "unstable-2023-09-23";
+  git-version = "398a197";
+  gerbil-package = "clan";
+  gerbilInputs = [ ];
+  nativeBuildInputs = [ pkgs.pkg-config ];
+  buildInputs = [ libyaml ];
+  version-path = "";
+  softwareName = "Gerbil-LibYAML";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-libyaml";
+    rev = "398a19782b1526de94b70de165c027d4b6029dac";
+    sha256 = "0plmwx1i23c9nzzg6zxz2xi0y92la97mak9hg6h3c6d8kxvajb5c";
+  };
+
+  meta = with lib; {
+    description = "libyaml bindings for Gerbil";
+    homepage    = "https://github.com/mighty-gerbils/gerbil-libyaml";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+
+  # "-L${libyaml}/lib"
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-lmdb.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-lmdb.nix
new file mode 100644
index 000000000000..f86912aeaaa8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-lmdb.nix
@@ -0,0 +1,31 @@
+{ pkgs, lib, fetchFromGitHub, gerbilPackages, lmdb, ... }:
+
+{
+  pname = "gerbil-lmdb";
+  version = "unstable-2023-09-23";
+  git-version = "6d64813";
+  gerbil-package = "clan";
+  gerbilInputs = [ ];
+  nativeBuildInputs = [ pkgs.pkg-config ];
+  buildInputs = [ lmdb ];
+  version-path = "";
+  softwareName = "Gerbil-LMDB";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-lmdb";
+    rev = "6d64813afe5766776a0d7ef45f80c784b820742c";
+    sha256 = "12kywxx4qjxchmhcd66700r2yfqjnh12ijgqnpqaccvigi07iq9b";
+  };
+
+  meta = with lib; {
+    description = "LMDB bindings for Gerbil";
+    homepage    = "https://github.com/mighty-gerbils/gerbil-lmdb";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+
+  # "-L${lmdb.out}/lib"
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-mysql.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-mysql.nix
new file mode 100644
index 000000000000..ca1960e0ed39
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-mysql.nix
@@ -0,0 +1,31 @@
+{ pkgs, lib, fetchFromGitHub, gerbilPackages, mariadb-connector-c, ... }:
+
+{
+  pname = "gerbil-mysql";
+  version = "unstable-2023-09-23";
+  git-version = "ecec94c";
+  gerbil-package = "clan";
+  gerbilInputs = [ ];
+  nativeBuildInputs = [ pkgs.pkg-config ];
+  buildInputs = [ mariadb-connector-c ];
+  version-path = "";
+  softwareName = "Gerbil-MySQL";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-mysql";
+    rev = "ecec94c76d7aa23331b7e02ac7732a7923f100a5";
+    sha256 = "01506r0ivgp6cxvwracmg7pwr735ngb7899ga3lxy181lzkp6b2c";
+  };
+
+  meta = with lib; {
+    description = "MySQL bindings for Gerbil";
+    homepage    = "https://github.com/mighty-gerbils/gerbil-mysql";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+
+  # "-L${mariadb-connector-c}/lib/mariadb"
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-persist.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-persist.nix
new file mode 100644
index 000000000000..3aafbc7d19bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-persist.nix
@@ -0,0 +1,27 @@
+{ lib, fetchFromGitHub, gerbilPackages, ... }:
+{
+  pname = "gerbil-persist";
+  version = "unstable-2023-11-29";
+  git-version = "0.2-6-g8a5e40d";
+  softwareName = "Gerbil-persist";
+  gerbil-package = "clan/persist";
+  version-path = "version";
+
+  gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo gerbil-leveldb ];
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-persist";
+    rev = "8a5e40deb01140b9c8d03c6cc985e47a9d7123d8";
+    sha256 = "1c1h1yp7gf23r3asxppgga4j4jmy4l9rlbb7vw9jcwvl8d30yrab";
+  };
+
+  meta = with lib; {
+    description = "Gerbil Persist: Persistent data and activities";
+    homepage    = "https://github.com/fare/gerbil-persist";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-poo.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-poo.nix
new file mode 100644
index 000000000000..caedf4ee86ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-poo.nix
@@ -0,0 +1,28 @@
+{ lib, fetchFromGitHub, gerbilPackages, ... }:
+
+{
+  pname = "gerbil-poo";
+  version = "unstable-2023-11-29";
+  git-version = "0.2-5-gacf654e";
+  softwareName = "Gerbil-POO";
+  gerbil-package = "clan/poo";
+  version-path = "version";
+
+  gerbilInputs = with gerbilPackages; [ gerbil-utils ];
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-poo";
+    rev = "acf654eb040c548da260a7a5d52bafb057d23541";
+    sha256 = "1pxv1j6hwcgjj67bb7vvlnyl3123r43ifldm6alm76v2mfp2vs81";
+  };
+
+  meta = with lib; {
+    description = "Gerbil POO: Prototype Object Orientation for Gerbil Scheme";
+    homepage    = "https://github.com/fare/gerbil-poo";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
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..230126ade007
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-support.nix
@@ -0,0 +1,162 @@
+{ pkgs, lib, callPackage, ... }:
+
+with pkgs.gerbil-support; {
+
+  pppToName = ppp: lib.removeSuffix ".nix" (baseNameOf ppp); # from pre-package path to name
+  callPpp = ppp: callPackage ppp prePackage-defaults; # from pre-package path to pre-package
+  pppToKV = ppp: { name = pppToName ppp; value = callPpp ppp; }; # from pre-package path to name
+  ppplToPpa = ppps: builtins.listToAttrs (map pppToKV ppps); # from pre-package path list to name/pre-package attr
+
+  prePackages-unstable =
+    ppplToPpa
+      [ ./gerbil-leveldb.nix ./gerbil-lmdb.nix ./gerbil-mysql.nix
+        ./gerbil-libxml.nix ./gerbil-libyaml.nix
+        ./smug-gerbil.nix # ./ftw.nix
+        ./gerbil-utils.nix ./gerbil-crypto.nix ./gerbil-poo.nix
+        ./gerbil-persist.nix ./gerbil-ethereum.nix
+        # ./gerbil-libp2p.nix
+        ./glow-lang.nix
+      ];
+
+  prePackage-defaults = {
+    gerbil = pkgs.gerbil-unstable;
+    gambit-params = pkgs.gambit-support.unstable-params;
+    gerbilPackages = gerbilPackages-unstable;
+    git-version = "";
+    version-path = "";
+    gerbilInputs = [];
+    nativeBuildInputs = [];
+    buildInputs = [];
+    buildScript = "./build.ss";
+    postInstall = "";
+    softwareName = "";
+  };
+
+  ppaToPl = builtins.mapAttrs (_: gerbilPackage);
+  gerbilPackages-unstable = ppaToPl prePackages-unstable;
+
+  resolve-pre-src = pre-src: pre-src.fun (removeAttrs pre-src ["fun"]);
+
+  gerbilVersionFromGit = srcDir: version-path:
+    let version-file = "${srcDir}/${version-path}.ss"; in
+    if builtins.pathExists version-file then
+      let m =
+        builtins.match "\\(import :clan/versioning.*\\)\n\\(register-software \"([-_.A-Za-z0-9]+)\" \"([-_.A-Za-z0-9]+)\"\\) ;; ([-0-9]+)\n"
+          (builtins.readFile version-file); in
+          { version = "${builtins.elemAt m 2}-git"; git-version = builtins.elemAt m 1; }
+     else { version = "0.0-git";
+            git-version = let gitpath = "${srcDir}/.git"; in
+              if builtins.pathExists gitpath then lib.commitIdFromGitRepo gitpath else "0"; };
+
+  gerbilSkippableFiles = [".git" ".build" ".build_outputs" "run" "result" "dep" "BLAH" "tmp.nix"];
+
+  gerbilSourceFilter = path: type:
+    let baseName = baseNameOf path; in
+      ! (builtins.elem baseName gerbilSkippableFiles || lib.hasSuffix "~" baseName);
+
+  gerbilFilterSource = builtins.filterSource gerbilSourceFilter;
+
+  # 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);
+
+  path-src = path: { fun = _: path; };
+
+  view = lib.debug.traceSeqN 4;
+
+  sha256-of-pre-src = pre-src: if pre-src ? sha256 then pre-src.sha256 else "none";
+
+  overrideSrcIfShaDiff = name: new-pre-src: super:
+    let old-sha256 = sha256-of-pre-src super.${name}.pre-src;
+        new-sha256 = sha256-of-pre-src new-pre-src; in
+    if old-sha256 == new-sha256 then {} else
+    view "Overriding ${name} old-sha256: ${old-sha256} new-sha256: ${new-sha256}"
+    { ${name} = super.${name} // {
+                       pre-src = new-pre-src;
+                       version = "override";
+                       git-version = if new-pre-src ? rev
+                                     then lib.substring 0 7 new-pre-src.rev
+                                     else "unknown";};
+                     };
+
+  pkgsOverrideGerbilPackageSrc = name: pre-src: pkgs: super: {
+    gerbil-support = (super-support:
+      { prePackages-unstable =
+          (super-ppu: super-ppu // (overrideSrcIfShaDiff name pre-src super-ppu))
+          super-support.prePackages-unstable;}) super.gerbil-support;};
+
+  # Use this function to create a Gerbil library. See gerbil-utils as an example.
+  gerbilPackage = prePackage:
+    let pre-pkg = prePackage-defaults // prePackage;
+        inherit (pre-pkg) pname version pre-src git-version meta
+          softwareName gerbil-package version-path gerbil gambit-params
+          gerbilInputs nativeBuildInputs buildInputs buildScript postInstall;
+        buildInputs_ = buildInputs; in
+    pkgs.gccStdenv.mkDerivation rec { # See ../gambit/build.nix regarding why we use gccStdenv
+      inherit meta pname version nativeBuildInputs postInstall;
+      passthru = {
+        inherit pre-pkg;
+      };
+      src = resolve-pre-src pre-src;
+      buildInputs = [ gerbil ] ++ gerbilInputs ++ buildInputs_;
+
+      postPatch = ''
+        set -e ;
+        ${lib.optionalString (version-path != "")
+          ''echo -e '(import :clan/versioning${builtins.concatStringsSep ""
+                     (map (x: let px = x.passthru.pre-pkg; in
+                              lib.optionalString (px.version-path != "")
+                                " :${px.gerbil-package}/${px.version-path}")
+                          gerbilInputs)
+                     })\n(register-software "${softwareName}" "v${git-version}")\n' > "${version-path}.ss"''}
+        patchShebangs . ;
+      '';
+
+      postConfigure = ''
+        export GERBIL_BUILD_CORES=$NIX_BUILD_CORES
+        export GERBIL_PATH=$PWD/.build
+        export GERBIL_LOADPATH=${gerbilLoadPath (["$out"] ++ gerbilInputs)}
+        ${pkgs.gambit-support.export-gambopt gambit-params}
+      '';
+
+      buildPhase = ''
+        runHook preBuild
+        ${buildScript}
+        runHook postBuild
+      '';
+
+      installPhase = ''
+        runHook preInstall
+        mkdir -p $out/gerbil
+        cp -fa .build/* $out/gerbil/
+        if [[ -d $out/gerbil/bin ]] ; then
+          ( cd $out/gerbil
+            bins=$(find ../gerbil/bin -type f)
+            if [[ -n $bins ]] ; then
+              ( mkdir -p ../bin
+                cd ..
+                ln -s $bins bin
+              )
+            fi
+          )
+        fi
+        runHook postInstall
+      '';
+
+      dontFixup = true;
+
+      checkPhase = ''
+        runHook preCheck
+        if [[ -f unit-tests.ss ]] ; then
+          export GERBIL_APPLICATION_HOME=$PWD
+          ./unit-tests.ss version
+          ./unit-tests.ss
+        else
+          echo "No gerbil-utils style unit-tests.ss detected for ${pname} ${version}.";
+        fi
+        runHook postCheck
+      '';
+
+      doCheck = 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..ef6405c76304
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-utils.nix
@@ -0,0 +1,26 @@
+{ lib, fetchFromGitHub, ... }:
+
+{
+  pname = "gerbil-utils";
+  version = "unstable-2023-12-06";
+  git-version = "0.4-13-g9398865";
+  softwareName = "Gerbil-utils";
+  gerbil-package = "clan";
+  version-path = "version";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "mighty-gerbils";
+    repo = "gerbil-utils";
+    rev = "939886579508ff34b58a0d65bbb7d666125d0551";
+    sha256 = "0dga03qq7iy12bnpxr6d40qhvihsvn3y87psf2w2clnpypjb3blx";
+  };
+
+  meta = with lib; {
+    description = "Gerbil Clan: Community curated Collection of Common Utilities";
+    homepage    = "https://github.com/fare/gerbil-utils";
+    license     = licenses.lgpl21;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/glow-lang.nix b/nixpkgs/pkgs/development/compilers/gerbil/glow-lang.nix
new file mode 100644
index 000000000000..12b1fd75d3ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/glow-lang.nix
@@ -0,0 +1,56 @@
+{ lib, fetchFromGitHub, gerbil-support, gerbilPackages, gerbil, ... }:
+
+rec {
+  pname = "glow-lang";
+  version = "unstable-2023-12-04";
+  git-version = "0.3.2-237-g08d849ad";
+  softwareName = "Glow";
+  gerbil-package = "mukn/glow";
+  version-path = "version";
+
+  gerbilInputs = with gerbilPackages;
+    [ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-ethereum
+      smug-gerbil gerbil-leveldb # gerbil-libp2p ftw
+    ];
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "Glow-Lang";
+    repo = "glow";
+    rev = "08d849adef94ae9deead34e6981e77d47806c6e3";
+    sha256 = "0dq0s8y3rgx0wa5wsgcdjs0zijnbgff3y4w2mkh5a04gz4lrhl50";
+    };
+
+  postPatch = ''
+    substituteInPlace "runtime/glow-path.ss" --replace \
+      '(def glow-install-path (source-path "dapps"))' \
+      '(def glow-install-path "$out")'
+  '';
+
+  postInstall = ''
+    mkdir -p $out/bin $out/gerbil/lib/mukn/glow $out/share/glow/dapps
+    cp main.ss $out/gerbil/lib/mukn/glow/
+    cp dapps/{buy_sig,coin_flip,rps_simple}.glow $out/share/glow/dapps/
+    cat > $out/bin/glow <<EOF
+    #!/bin/sh
+    ORIG_GERBIL_LOADPATH="\$GERBIL_LOADPATH"
+    ORIG_GERBIL_PATH="\$GERBIL_PATH"
+    ORIG_GERBIL_HOME="\$GERBIL_HOME"
+    unset GERBIL_HOME
+    GERBIL_LOADPATH="${gerbil-support.gerbilLoadPath (["$out"] ++ gerbilInputs)}"
+    GLOW_SOURCE="\''${GLOW_SOURCE:-$out/share/glow}"
+    GERBIL_PATH="\$HOME/.cache/glow/gerbil"
+    export GERBIL_PATH GERBIL_LOADPATH GLOW_SOURCE ORIG_GERBIL_PATH ORIG_GERBIL_LOADPATH ORIG_GERBIL_HOME
+    exec ${gerbil}/bin/gxi $out/gerbil/lib/mukn/glow/main.ss "\$@"
+    EOF
+    chmod a+x $out/bin/glow
+    '';
+
+  meta = with lib; {
+    description = "Glow: language for safe Decentralized Applications (DApps)";
+    homepage    = "https://glow-lang.org";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/smug-gerbil.nix b/nixpkgs/pkgs/development/compilers/gerbil/smug-gerbil.nix
new file mode 100644
index 000000000000..518ec0238f6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/smug-gerbil.nix
@@ -0,0 +1,25 @@
+{ lib, fetchFromGitHub, ... }:
+
+{
+  pname = "smug-gerbil";
+  version = "unstable-2020-12-12";
+  git-version = "0.4.20";
+  softwareName = "Smug-Gerbil";
+  gerbil-package = "drewc/smug";
+
+  pre-src = {
+    fun = fetchFromGitHub;
+    owner = "drewc";
+    repo = "smug-gerbil";
+    rev = "cf23a47d0891aa9e697719309d04dd25dd1d840b";
+    sha256 = "13fdijd71m3fzp9fw9xp6ddgr38q1ly6wnr53salp725w6i4wqid";
+  };
+
+  meta = with lib; {
+    description = "Super Monadic Über Go-into : Parsers and Gerbil Scheme";
+    homepage    = "https://github.com/drewc/smug-gerbil";
+    license     = licenses.mit;
+    platforms   = platforms.unix;
+    maintainers = with 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..4b0d3289c107
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/unstable.nix
@@ -0,0 +1,19 @@
+{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support, pkgs, gccStdenv }:
+
+callPackage ./build.nix rec {
+  version = "unstable-2023-12-06";
+  git-version = "0.18.1";
+  src = fetchFromGitHub {
+    owner = "mighty-gerbils";
+    repo = "gerbil";
+    rev = "23c30a6062cd7e63f9d85300ce01585bb9035d2d";
+    sha256 = "15fh0zqkmnjhan1mgymq5fgbjsh5z9d2v6zjddplqib5zd2s3z6k";
+    fetchSubmodules = true;
+  };
+  inherit gambit-support;
+  gambit-params = gambit-support.unstable-params;
+  # These are available in pkgs.gambit-unstable.passthru.git-version, etc.
+  gambit-git-version = "4.9.5-78-g8b18ab69";
+  gambit-stampYmd = "20231029";
+  gambit-stampHms = "163035";
+}
diff --git a/nixpkgs/pkgs/development/compilers/gforth/boot-forth.nix b/nixpkgs/pkgs/development/compilers/gforth/boot-forth.nix
new file mode 100644
index 000000000000..74a267687b8f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gforth/boot-forth.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, m4 }:
+
+let
+  version = "0.7.3";
+in
+stdenv.mkDerivation {
+  pname = "gforth-boot";
+  inherit version;
+  src = fetchurl {
+    url = "https://ftp.gnu.org/gnu/gforth/gforth-${version}.tar.gz";
+    sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
+  };
+
+  buildInputs = [ m4 ];
+
+  configureFlags = lib.optionals stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
+
+  meta = {
+    description = "The Forth implementation of the GNU project (outdated version used to bootstrap)";
+    homepage = "https://www.gnu.org/software/gforth/";
+    license = lib.licenses.gpl3;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gforth/default.nix b/nixpkgs/pkgs/development/compilers/gforth/default.nix
new file mode 100644
index 000000000000..b76482ba5963
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gforth/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, callPackage
+, autoreconfHook, texinfo, libffi
+}:
+
+let
+  swig = callPackage ./swig.nix { };
+  bootForth = callPackage ./boot-forth.nix { };
+  lispDir = "${placeholder "out"}/share/emacs/site-lisp";
+in stdenv.mkDerivation rec {
+
+  pname = "gforth";
+  version = "0.7.9_20230518";
+
+  src = fetchFromGitHub {
+    owner = "forthy42";
+    repo = "gforth";
+    rev = version;
+    hash = "sha256-rXtmmENBt9RMdLPq8GDyndh4+CYnCmz6NYpe3kH5OwU=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook texinfo bootForth swig
+  ];
+  buildInputs = [
+    libffi
+  ];
+
+  passthru = { inherit bootForth; };
+
+  configureFlags = [
+    "--with-lispdir=${lispDir}"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
+    "--build=x86_64-apple-darwin"
+  ];
+
+  preConfigure = ''
+    mkdir -p ${lispDir}
+  '';
+
+  meta = {
+    description = "The Forth implementation of the GNU project";
+    homepage = "https://github.com/forthy42/gforth";
+    license = lib.licenses.gpl3;
+    broken = stdenv.isDarwin && stdenv.isAarch64; # segfault when running ./gforthmi
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gforth/swig.nix b/nixpkgs/pkgs/development/compilers/gforth/swig.nix
new file mode 100644
index 000000000000..8de29407cc46
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gforth/swig.nix
@@ -0,0 +1,16 @@
+{ swig3, fetchFromGitHub }:
+
+## for updating to swig4, see
+## https://github.com/GeraldWodni/swig/pull/6
+swig3.overrideDerivation (old: {
+  version = "3.0.9-forth";
+  src = fetchFromGitHub {
+    owner = "GeraldWodni";
+    repo = "swig";
+    rev = "a45b807e5f9d8ca1a43649c8265d2741a393862a";
+    sha256 = "sha256-6nOOPFGFNaQInEkul0ZAh+ks9n3wqCQ6/tbduvG/To0=";
+  };
+  configureFlags = old.configureFlags ++ [
+    "--enable-forth"
+  ];
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix
new file mode 100644
index 000000000000..16642e56bfd9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix
@@ -0,0 +1,454 @@
+{ lib, stdenv
+, fetchurl, perl, gcc
+, ncurses5
+, ncurses6, gmp, libiconv, numactl
+, llvmPackages
+, coreutils
+, targetPackages
+
+  # minimal = true; will remove files that aren't strictly necessary for
+  # regular builds and GHC bootstrapping.
+  # This is "useful" for staying within hydra's output limits for at least the
+  # aarch64-linux architecture.
+, minimal ? false
+}:
+
+# Prebuilt only does native
+assert stdenv.targetPlatform == stdenv.hostPlatform;
+
+let
+  downloadsUrl = "https://downloads.haskell.org/ghc";
+
+  # Copy sha256 from https://downloads.haskell.org/~ghc/8.10.7/SHA256SUMS
+  version = "8.10.7";
+
+  # Information about available bindists that we use in the build.
+  #
+  # # Bindist library checking
+  #
+  # The field `archSpecificLibraries` also provides a way for us get notified
+  # early when the upstream bindist changes its dependencies (e.g. because a
+  # newer Debian version is used that uses a new `ncurses` version).
+  #
+  # Usage:
+  #
+  # * You can find the `fileToCheckFor` of libraries by running `readelf -d`
+  #   on the compiler binary (`exePathForLibraryCheck`).
+  # * To skip library checking for an architecture,
+  #   set `exePathForLibraryCheck = null`.
+  # * To skip file checking for a specific arch specfic library,
+  #   set `fileToCheckFor = null`.
+  ghcBinDists = {
+    # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin)
+    # nixpkgs uses for the respective system.
+    defaultLibc = {
+      i686-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
+          sha256 = "fbfc1ef194f4e7a4c0da8c11cc69b17458a4b928b609b3622c97acc4acd5c5ab";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          # The i686-linux bindist provided by GHC HQ is currently built on Debian 9,
+          # which link it against `libtinfo.so.5` (ncurses 5).
+          # Other bindists are linked `libtinfo.so.6` (ncurses 6).
+          { nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; }
+        ];
+      };
+      x86_64-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz";
+          sha256 = "a13719bca87a0d3ac0c7d4157a4e60887009a7f1a8dbe95c4759ec413e086d30";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
+        ];
+      };
+      armv7l-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz";
+          sha256 = "3949c31bdf7d3b4afb765ea8246bca4ca9707c5d988d9961a244f0da100956a2";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
+        ];
+      };
+      aarch64-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz";
+          sha256 = "fad2417f9b295233bf8ade79c0e6140896359e87be46cb61cd1d35863d9d0e55";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
+          { nixPackage = numactl; fileToCheckFor = null; }
+        ];
+      };
+      x86_64-darwin = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
+          sha256 = "287db0f9c338c9f53123bfa8731b0996803ee50f6ee847fe388092e5e5132047";
+        };
+        exePathForLibraryCheck = null; # we don't have a library check for darwin yet
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = null; }
+          { nixPackage = libiconv; fileToCheckFor = null; }
+        ];
+      };
+      aarch64-darwin = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz";
+          sha256 = "dc469fc3c35fd2a33a5a575ffce87f13de7b98c2d349a41002e200a56d9bba1c";
+        };
+        exePathForLibraryCheck = null; # we don't have a library check for darwin yet
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = null; }
+          { nixPackage = libiconv; fileToCheckFor = null; }
+        ];
+      };
+    };
+    # Binary distributions for the musl libc for the respective system.
+    musl = {
+      x86_64-linux = {
+        variantSuffix = "-musl-integer-simple";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz";
+          sha256 = "16903df850ef73d5246f2ff169cbf57ecab76c2ac5acfa9928934282cfad575c";
+        };
+        exePathForLibraryCheck = "bin/ghc";
+        archSpecificLibraries = [
+          # No `gmp` here, since this is an `integer-simple` bindist.
+
+          # In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*`
+          # instead of `libtinfo.so.*.`
+          { nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; }
+        ];
+        isHadrian = true;
+      };
+    };
+  };
+
+  distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc";
+
+  binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}
+    or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')");
+
+  useLLVM = !stdenv.targetPlatform.isx86;
+
+  libPath =
+    lib.makeLibraryPath (
+      # Add arch-specific libraries.
+      map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries
+    );
+
+  libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+    + "LD_LIBRARY_PATH";
+
+  runtimeDeps = [
+    targetPackages.stdenv.cc
+    targetPackages.stdenv.cc.bintools
+    coreutils # for cat
+  ]
+  ++ lib.optionals useLLVM [
+    (lib.getBin llvmPackages.llvm)
+  ]
+  # On darwin, we need unwrapped bintools as well (for otool)
+  ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [
+    targetPackages.stdenv.cc.bintools.bintools
+  ];
+
+in
+
+stdenv.mkDerivation rec {
+  inherit version;
+  pname = "ghc-binary${binDistUsed.variantSuffix}";
+
+  src = fetchurl binDistUsed.src;
+
+  # Note that for GHC 8.10 versions >= 8.10.6, the GHC HQ musl bindist
+  # uses `integer-simple` and has no `gmp` dependency:
+  # https://gitlab.haskell.org/ghc/ghc/-/commit/8306501020cd66f683ad9c215fa8e16c2d62357d
+  # Related nixpkgs issues:
+  # * https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922452843
+  # TODO: When this file is copied to `ghc-9.*-binary.nix`, determine whether
+  #       the GHC 9 branch also switched from `gmp` to `integer-simple` via the
+  #       currently-open issue:
+  #           https://gitlab.haskell.org/ghc/ghc/-/issues/20059
+  #       and update this comment accordingly.
+
+  nativeBuildInputs = [ perl ];
+
+  # Set LD_LIBRARY_PATH or equivalent so that the programs running as part
+  # of the bindist installer can find the libraries they expect.
+  # Cannot patchelf beforehand due to relative RPATHs that anticipate
+  # the final install location.
+  ${libEnvVar} = libPath;
+
+  postUnpack =
+    # Verify our assumptions of which `libtinfo.so` (ncurses) version is used,
+    # so that we know when ghc bindists upgrade that and we need to update the
+    # version used in `libPath`.
+    lib.optionalString
+      (binDistUsed.exePathForLibraryCheck != null)
+      # Note the `*` glob because some GHCs have a suffix when unpacked, e.g.
+      # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`.
+      # As a result, don't shell-quote this glob when splicing the string.
+      (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in
+        lib.concatStringsSep "\n" [
+          (''
+            shopt -u nullglob
+            echo "Checking that ghc binary exists in bindist at ${buildExeGlob}"
+            if ! test -e ${buildExeGlob}; then
+              echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
+            fi
+          '')
+          (lib.concatMapStringsSep
+            "\n"
+            ({ fileToCheckFor, nixPackage }:
+              lib.optionalString (fileToCheckFor != null) ''
+                echo "Checking bindist for ${fileToCheckFor} to ensure that is still used"
+                if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then
+                  echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
+                fi
+
+                echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}"
+                if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then
+                  echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
+                fi
+              ''
+            )
+            binDistUsed.archSpecificLibraries
+          )
+        ])
+    # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
+    # during linking
+    + 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
+      test -d ghc-${version}/inplace/bin && \
+        patchShebangs ghc-${version}/inplace/bin
+    '' +
+    # We have to patch the GMP paths for the integer-gmp package.
+    # Note that musl bindists do not contain them,
+    # see: https://gitlab.haskell.org/ghc/ghc/-/issues/20073#note_363231
+    # However, musl bindists >= 8.10.6 use `integer-simple`, not `gmp`.
+    ''
+      find . -name integer-gmp.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
+    '' + lib.optionalString stdenv.isDarwin ''
+      find . -name base.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
+    '' +
+    # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
+    # FFI_LIB_DIR is a good indication of places it must be needed.
+    lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
+      find . -name package.conf.in \
+          -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
+    '' +
+    # Rename needed libraries and binaries, fix interpreter
+    lib.optionalString stdenv.isLinux ''
+      find . -type f -executable -exec patchelf \
+          --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
+    '' +
+    # The hadrian install Makefile uses 'xxx' as a temporary placeholder in path
+    # substitution. Which can break the build if the store path / prefix happens
+    # to contain this string. This will be fixed with 9.4 bindists.
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/21402
+    ''
+      # Detect hadrian Makefile by checking for the target that has the problem
+      if grep '^update_package_db' ghc-${version}*/Makefile > /dev/null; then
+        echo Hadrian bindist, applying workaround for xxx path substitution.
+        # based on https://gitlab.haskell.org/ghc/ghc/-/commit/dd5fecb0e2990b192d92f4dfd7519ecb33164fad.patch
+        substituteInPlace ghc-${version}*/Makefile --replace 'xxx' '\0xxx\0'
+      else
+        echo Not a hadrian bindist, not applying xxx path workaround.
+      fi
+    '';
+
+  # fix for `configure: error: Your linker is affected by binutils #16177`
+  preConfigure = lib.optionalString
+    stdenv.targetPlatform.isAarch32
+    "LD=ld.gold";
+
+  configurePlatforms = [ ];
+  configureFlags = [
+    "--with-gmp-includes=${lib.getDev gmp}/include"
+    # Note `--with-gmp-libraries` does nothing for GHC bindists:
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124
+  ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
+    # From: https://github.com/NixOS/nixpkgs/pull/43369/commits
+    ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
+
+  # No building is necessary, but calling make without flags ironically
+  # calls install-strip ...
+  dontBuild = true;
+
+  # Patch scripts to include runtime dependencies in $PATH.
+  postInstall = ''
+    for i in "$out/bin/"*; do
+      test ! -h "$i" || continue
+      isScript "$i" || continue
+      sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i"
+    done
+  '';
+
+  # Apparently necessary for the ghc Alpine (musl) bindist:
+  # When we strip, and then run the
+  #     patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
+  # below, running ghc (e.g. during `installCheckPhase)` gives some apparently
+  # corrupted rpath or whatever makes the loader work on nonsensical strings:
+  #     running install tests
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
+  # This is extremely bogus and should be investigated.
+  dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness
+
+  # On Linux, use patchelf to modify the executables so that they can
+  # find editline/gmp.
+  postFixup = lib.optionalString stdenv.isLinux
+    (if stdenv.hostPlatform.isAarch64 then
+      # Keep rpath as small as possible on aarch64 for patchelf#244.  All Elfs
+      # are 2 directories deep from $out/lib, so pooling symlinks there makes
+      # a short rpath.
+      ''
+      (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6)
+      (cd $out/lib; ln -s ${gmp.out}/lib/libgmp.so.10)
+      (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1)
+      for p in $(find "$out/lib" -type f -name "*\.so*"); do
+        (cd $out/lib; ln -s $p)
+      done
+
+      for p in $(find "$out/lib" -type f -executable); do
+        if isELF "$p"; then
+          echo "Patchelfing $p"
+          patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p
+        fi
+      done
+      ''
+    else
+      ''
+      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
+    '') + 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
+  '' +
+  lib.optionalString minimal ''
+    # Remove profiling files
+    find $out -type f -name '*.p_o' -delete
+    find $out -type f -name '*.p_hi' -delete
+    find $out -type f -name '*_p.a' -delete
+    # `-f` because e.g. musl bindist does not have this file.
+    rm -f $out/lib/ghc-*/bin/ghc-iserv-prof
+    # Hydra will redistribute this derivation, so we have to keep the docs for
+    # legal reasons (retaining the legal notices etc)
+    # As a last resort we could unpack the docs separately and symlink them in.
+    # They're in $out/share/{doc,man}.
+  '';
+
+  # In nixpkgs, musl based builds currently enable `pie` hardening by default
+  # (see `defaultHardeningFlags` in `make-derivation.nix`).
+  # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+  # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+  # See:
+  # * https://github.com/NixOS/nixpkgs/issues/129247
+  # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+  hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    # 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
+    env -i $out/bin/ghc --make main.hs || exit 1
+    echo compilation ok
+    [ $(./main) == "yes" ]
+  '';
+
+  passthru = {
+    targetPrefix = "";
+    enableShared = true;
+
+    inherit llvmPackages;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  }
+  # We duplicate binDistUsed here since we have a sensible default even if no bindist is avaible,
+  # this makes sure that getting the `meta` attribute doesn't throw even on unsupported platforms.
+  // lib.optionalAttrs (ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}.isHadrian or false) {
+    # Normal GHC derivations expose the hadrian derivation used to build them
+    # here. In the case of bindists we just make sure that the attribute exists,
+    # as it is used for checking if a GHC derivation has been built with hadrian.
+    # The isHadrian mechanism will become obsolete with GHCs that use hadrian
+    # exclusively, i.e. 9.6 (and 9.4?).
+    hadrian = null;
+  };
+
+  meta = rec {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    license = lib.licenses.bsd3;
+    # HACK: since we can't encode the libc / abi in platforms, we need
+    # to make the platform list dependent on the evaluation platform
+    # in order to avoid eval errors with musl which supports less
+    # platforms than the default libcs (i. e. glibc / libSystem).
+    # This is done for the benefit of Hydra, so `packagePlatforms`
+    # won't return any platforms that would cause an evaluation
+    # failure for `pkgsMusl.haskell.compiler.ghc8107Binary`, as
+    # long as the evaluator runs on a platform that supports
+    # `pkgsMusl`.
+    platforms = builtins.attrNames ghcBinDists.${distSetName};
+    maintainers = with lib.maintainers; [
+      prusnak
+      domenkozar
+    ] ++ lib.teams.haskell.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
new file mode 100644
index 000000000000..c49c274c67d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
@@ -0,0 +1,407 @@
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, 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 ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                          && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' + lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  ''
+  # While split sections are now enabled by default in ghc 8.8 for windows,
+  # they seem to lead to `too many sections` errors when building base for
+  # profiling.
+  + lib.optionalString targetPlatform.isWindows ''
+    SplitSections = NO
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableIntegerSimple) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableIntegerSimple "-integer-simple")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "8.10.7";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "e3eef6229ce9908dfe1ea41436befb0455fefb1932559e860ad4c606b0d03c9d";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+
+    # See upstream patch at
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4885. Since we build
+    # from source distributions, the auto-generated configure script needs to be
+    # patched as well, therefore we use an in-tree patch instead of pulling the
+    # upstream patch. Don't forget to check backport status of the upstream patch
+    # when adding new GHC releases in nixpkgs.
+    ./respect-ar-path.patch
+
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+
+    # cabal passes incorrect --host= when cross-compiling
+    # https://github.com/haskell/cabal/issues/5887
+    (fetchpatch {
+            url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/122bd81150386867da07fdc9ad5096db6719545a/overlays/patches/ghc/cabal-host.patch";
+      sha256 = "sha256:0yd0sajgi24sc1w5m55lkg2lp6kfkgpp3lgija2c8y3cmkwfpdc1";
+    })
+
+    # In order to build ghcjs packages, the Cabal of the ghc used for the ghcjs
+    # needs to be patched. Ref https://github.com/haskell/cabal/pull/7575
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/369c4a0a54ad08a9e6b0d3bd303fedd7b5e5a336.patch";
+      sha256 = "120f11hwyaqa0pq9g5l1300crqij49jg0rh83hnp9sa49zfdwx1n";
+      stripLen = 3;
+      extraPrefix = "libraries/Cabal/Cabal/";
+    })
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Make Block.h compile with c++ compilers. Remove with the next release
+    (fetchpatch {
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch";
+      sha256 = "0r4zjj0bv1x1m2dgxp3adsf2xkr94fjnyj1igsivd9ilbs5ja0b5";
+    })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // 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..d66f47b661a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix
@@ -0,0 +1,231 @@
+{ lib, stdenv
+, fetchurl, perl, gcc
+, ncurses5, ncurses6, gmp, glibc, libiconv
+, llvmPackages
+, coreutils
+, targetPackages
+}:
+
+# Prebuilt only does native
+assert stdenv.targetPlatform == stdenv.hostPlatform;
+
+let
+  useLLVM = !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc);
+
+  useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux"
+                || (with stdenv.hostPlatform; isPower64 && isLittleEndian);
+
+  ourNcurses = if useNcurses6 then ncurses6 else ncurses5;
+
+  libPath = lib.makeLibraryPath ([
+    ourNcurses gmp
+  ] ++ lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
+
+  libEnvVar = 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
+      "${lib.getLib glibc}/lib/ld-linux*";
+
+  downloadsUrl = "https://downloads.haskell.org/ghc";
+
+  runtimeDeps = [
+    targetPackages.stdenv.cc
+    targetPackages.stdenv.cc.bintools
+    coreutils # for cat
+  ]
+  ++ lib.optionals (assert useLLVM -> !(llvmPackages == null); useLLVM) [
+    (lib.getBin llvmPackages.llvm)
+  ]
+  # On darwin, we need unwrapped bintools as well (for otool)
+  ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [
+    targetPackages.stdenv.cc.bintools.bintools
+  ];
+
+in
+
+stdenv.mkDerivation rec {
+  version = "8.6.5";
+  pname = "ghc-binary";
+
+  # https://downloads.haskell.org/~ghc/8.6.5/
+  src = fetchurl ({
+    i686-linux = {
+      # Don't use the Fedora27 build (as below) because there isn't one!
+      url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
+      sha256 = "1p2h29qghql19ajk755xa0yxkn85slbds8m9n5196ris743vkp8w";
+    };
+    x86_64-linux = {
+      # This is the Fedora build because it links against ncurses6 where the
+      # deb9 one links against ncurses5, see here
+      # https://github.com/NixOS/nixpkgs/issues/85924 for a discussion
+      url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-fedora27-linux.tar.xz";
+      sha256 = "18dlqm5d028fqh6ghzn7pgjspr5smw030jjzl3kq6q1kmwzbay6g";
+    };
+    x86_64-darwin = {
+      url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
+      sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz";
+    };
+    powerpc64le-linux = {
+      url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-powerpc64le-fedora29-linux.tar.xz";
+      sha256 = "sha256-tWSsJdPVrCiqDyIKzpBt5DaXb3b6j951tCya584kWs4=";
+    };
+  }.${stdenv.hostPlatform.system}
+    or (throw "cannot bootstrap GHC on this platform"));
+
+  nativeBuildInputs = [ perl ];
+
+  # 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
+    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
+      test -d ghc-${version}/inplace/bin && \
+        patchShebangs ghc-${version}/inplace/bin
+    '' +
+
+    # 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@" {} \;
+    '' + 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
+    lib.optionalString stdenv.isLinux ''
+      find . -type f -perm -0100 \
+          -exec patchelf \
+          --replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
+          ${ # This isn't required for x86_64-linux where we use ncurses6
+             lib.optionalString (!useNcurses6) "--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:
+    lib.optionalString stdenv.hostPlatform.isMusl ''
+      find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
+    '';
+
+  configurePlatforms = [ ];
+  configureFlags = [
+    "--with-gmp-includes=${lib.getDev gmp}/include"
+    # Note `--with-gmp-libraries` does nothing for GHC bindists:
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124
+  ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
+    ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
+
+  # No building is necessary, but calling make without flags ironically
+  # calls install-strip ...
+  dontBuild = true;
+
+  # Patch scripts to include runtime dependencies in $PATH.
+  postInstall = ''
+    for i in "$out/bin/"*; do
+      test ! -h "$i" || continue
+      isScript "$i" || continue
+      sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i"
+    done
+  '';
+
+  # On Linux, use patchelf to modify the executables so that they can
+  # find editline/gmp.
+  postFixup = 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
+  '' + 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
+  '';
+
+  # In nixpkgs, musl based builds currently enable `pie` hardening by default
+  # (see `defaultHardeningFlags` in `make-derivation.nix`).
+  # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+  # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+  # See:
+  # * https://github.com/NixOS/nixpkgs/issues/129247
+  # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+  hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    # 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
+    env -i $out/bin/ghc --make main.hs || exit 1
+    echo compilation ok
+    [ $(./main) == "yes" ]
+  '';
+
+  passthru = {
+    targetPrefix = "";
+    enableShared = true;
+
+    inherit llvmPackages;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = rec {
+    license = lib.licenses.bsd3;
+    platforms = [
+      "x86_64-linux"
+      "i686-linux"
+      "x86_64-darwin"
+      "powerpc64le-linux"
+    ];
+    # build segfaults, use ghc8107Binary which has proper musl support instead
+    broken = stdenv.hostPlatform.isMusl;
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix b/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix
new file mode 100644
index 000000000000..bdfff2b795a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix
@@ -0,0 +1,393 @@
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx, xattr
+, autoSignDarwinBinariesHook
+, bash
+, fetchpatch
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.0.2";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "140e42b96346322d1a39eb17602bcdc76e292028ad4a69286b230bab188a9197";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+
+    # Add flag that fixes C++ exception handling; opt-in. Merged in 9.4 and 9.2.2.
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7423
+    (fetchpatch {
+      name = "ghc-9.0.2-fcompact-unwind.patch";
+      # Note that the test suite is not packaged.
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/c6132c782d974a7701e7f6447bdcd2bf6db4299a.patch?merge_request_iid=7423";
+      sha256 = "sha256-b4feGZIaKDj/UKjWTNY6/jH4s2iate0wAgMxG3rAbZI=";
+    })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + 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
+  '' + 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" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ] ++ lib.optionals stdenv.isDarwin [
+    # TODO(@sternenseemann): backport addition of XATTR env var like
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447
+    xattr
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.4-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.4-binary.nix
new file mode 100644
index 000000000000..77d70d295070
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.4-binary.nix
@@ -0,0 +1,439 @@
+{ lib, stdenv
+, fetchurl, perl, gcc
+, ncurses5
+, ncurses6, gmp, libiconv, numactl, libffi
+, llvmPackages
+, coreutils
+, targetPackages
+
+  # minimal = true; will remove files that aren't strictly necessary for
+  # regular builds and GHC bootstrapping.
+  # This is "useful" for staying within hydra's output limits for at least the
+  # aarch64-linux architecture.
+, minimal ? false
+}:
+
+# Prebuilt only does native
+assert stdenv.targetPlatform == stdenv.hostPlatform;
+
+let
+  downloadsUrl = "https://downloads.haskell.org/ghc";
+
+  # Copy sha256 from https://downloads.haskell.org/~ghc/9.2.4/SHA256SUMS
+  version = "9.2.4";
+
+  # Information about available bindists that we use in the build.
+  #
+  # # Bindist library checking
+  #
+  # The field `archSpecificLibraries` also provides a way for us get notified
+  # early when the upstream bindist changes its dependencies (e.g. because a
+  # newer Debian version is used that uses a new `ncurses` version).
+  #
+  # Usage:
+  #
+  # * You can find the `fileToCheckFor` of libraries by running `readelf -d`
+  #   on the compiler binary (`exePathForLibraryCheck`).
+  # * To skip library checking for an architecture,
+  #   set `exePathForLibraryCheck = null`.
+  # * To skip file checking for a specific arch specfic library,
+  #   set `fileToCheckFor = null`.
+  ghcBinDists = {
+    # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin)
+    # nixpkgs uses for the respective system.
+    defaultLibc = {
+      i686-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
+          sha256 = "5dc1eb9c65f01b1e5c5693af72af07a4e9e75c6920e620fd598daeefa804487a";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          # The i686-linux bindist provided by GHC HQ is currently built on Debian 9,
+          # which link it against `libtinfo.so.5` (ncurses 5).
+          # Other bindists are linked `libtinfo.so.6` (ncurses 6).
+          { nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; }
+        ];
+      };
+      x86_64-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz";
+          sha256 = "a77a91a39d9b0167124b7e97648b2b52973ae0978cb259e0d44f0752a75037cb";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
+        ];
+      };
+      aarch64-linux = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz";
+          sha256 = "fc7dbc6bae36ea5ac30b7e9a263b7e5be3b45b0eb3e893ad0bc2c950a61f14ec";
+        };
+        exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
+          { nixPackage = numactl; fileToCheckFor = null; }
+        ];
+      };
+      x86_64-darwin = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
+          sha256 = "f2e8366fd3754dd9388510792aba2d2abecb1c2f7f1e5555f6065c3c5e2ffec4";
+        };
+        exePathForLibraryCheck = null; # we don't have a library check for darwin yet
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = null; }
+          { nixPackage = libiconv; fileToCheckFor = null; }
+        ];
+        isHadrian = true;
+      };
+      aarch64-darwin = {
+        variantSuffix = "";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz";
+          sha256 = "8cf8408544a1a43adf1bbbb0dd6b074efadffc68bfa1a792947c52e825171224";
+        };
+        exePathForLibraryCheck = null; # we don't have a library check for darwin yet
+        archSpecificLibraries = [
+          { nixPackage = gmp; fileToCheckFor = null; }
+          { nixPackage = ncurses6; fileToCheckFor = null; }
+          { nixPackage = libiconv; fileToCheckFor = null; }
+        ];
+        isHadrian = true;
+      };
+    };
+    # Binary distributions for the musl libc for the respective system.
+    musl = {
+      x86_64-linux = {
+        variantSuffix = "-musl";
+        src = {
+          url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.12-linux-gmp.tar.xz";
+          sha256 = "026348947d30a156b84de5d6afeaa48fdcb2795b47954cd8341db00d3263a481";
+        };
+        isStatic = true;
+        isHadrian = true;
+        # We can't check the RPATH for statically linked executable
+        exePathForLibraryCheck = null;
+        archSpecificLibraries = [
+          { nixPackage = gmp.override { withStatic = true; }; fileToCheckFor = null; }
+        ];
+      };
+    };
+  };
+
+  distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc";
+
+  binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}
+    or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')");
+
+  gmpUsed = (builtins.head (
+    builtins.filter (
+      drv: lib.hasPrefix "gmp" (drv.nixPackage.name or "")
+    ) binDistUsed.archSpecificLibraries
+  )).nixPackage;
+
+  # GHC has other native backends (like PowerPC), but here only the ones
+  # we ship bindists for matter.
+  useLLVM = !(stdenv.targetPlatform.isx86
+    || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin));
+
+  libPath =
+    lib.makeLibraryPath (
+      # Add arch-specific libraries.
+      map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries
+    );
+
+  libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+    + "LD_LIBRARY_PATH";
+
+  runtimeDeps = [
+    targetPackages.stdenv.cc
+    targetPackages.stdenv.cc.bintools
+    coreutils # for cat
+  ]
+  ++ lib.optionals useLLVM [
+    (lib.getBin llvmPackages.llvm)
+  ]
+  # On darwin, we need unwrapped bintools as well (for otool)
+  ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [
+    targetPackages.stdenv.cc.bintools.bintools
+  ];
+
+in
+
+stdenv.mkDerivation rec {
+  inherit version;
+  pname = "ghc-binary${binDistUsed.variantSuffix}";
+
+  src = fetchurl binDistUsed.src;
+
+  nativeBuildInputs = [ perl ];
+
+  # Set LD_LIBRARY_PATH or equivalent so that the programs running as part
+  # of the bindist installer can find the libraries they expect.
+  # Cannot patchelf beforehand due to relative RPATHs that anticipate
+  # the final install location.
+  ${libEnvVar} = libPath;
+
+  postUnpack =
+    # Verify our assumptions of which `libtinfo.so` (ncurses) version is used,
+    # so that we know when ghc bindists upgrade that and we need to update the
+    # version used in `libPath`.
+    lib.optionalString
+      (binDistUsed.exePathForLibraryCheck != null)
+      # Note the `*` glob because some GHCs have a suffix when unpacked, e.g.
+      # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`.
+      # As a result, don't shell-quote this glob when splicing the string.
+      (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in
+        lib.concatStringsSep "\n" [
+          (''
+            shopt -u nullglob
+            echo "Checking that ghc binary exists in bindist at ${buildExeGlob}"
+            if ! test -e ${buildExeGlob}; then
+              echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
+            fi
+          '')
+          (lib.concatMapStringsSep
+            "\n"
+            ({ fileToCheckFor, nixPackage }:
+              lib.optionalString (fileToCheckFor != null) ''
+                echo "Checking bindist for ${fileToCheckFor} to ensure that is still used"
+                if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then
+                  echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
+                fi
+
+                echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}"
+                if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then
+                  echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
+                fi
+              ''
+            )
+            binDistUsed.archSpecificLibraries
+          )
+        ])
+    # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
+    # during linking
+    + 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
+      test -d ghc-${version}/inplace/bin && \
+        patchShebangs ghc-${version}/inplace/bin
+    '' +
+    # We have to patch the GMP paths for the integer-gmp package.
+    ''
+      find . -name ghc-bignum.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${lib.getLib gmpUsed}/lib@" {} \;
+
+      # we need to modify the package db directly for hadrian bindists
+      find . -name 'ghc-bignum*.conf' \
+          -exec sed -e '/^[a-z-]*library-dirs/a \    ${lib.getLib gmpUsed}/lib' -i {} \;
+    '' + lib.optionalString stdenv.isDarwin ''
+      # we need to modify the package db directly for hadrian bindists
+      # (all darwin bindists are hadrian-based for 9.2.2)
+      find . -name 'base*.conf' \
+          -exec sed -e '/^[a-z-]*library-dirs/a \    ${lib.getLib libiconv}/lib' -i {} \;
+
+      # To link RTS in the end we also need libffi now
+      find . -name 'rts*.conf' \
+          -exec sed -e '/^[a-z-]*library-dirs/a \    ${lib.getLib libffi}/lib' \
+                    -e 's@/Library/Developer/.*/usr/include/ffi@${lib.getDev libffi}/include@' \
+                    -i {} \;
+    '' +
+    # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
+    # FFI_LIB_DIR is a good indication of places it must be needed.
+    lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
+      find . -name package.conf.in \
+          -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
+    '' +
+    # Rename needed libraries and binaries, fix interpreter
+    lib.optionalString stdenv.isLinux ''
+      find . -type f -executable -exec patchelf \
+          --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
+    '';
+
+  # fix for `configure: error: Your linker is affected by binutils #16177`
+  preConfigure = lib.optionalString
+    stdenv.targetPlatform.isAarch32
+    "LD=ld.gold";
+
+  configurePlatforms = [ ];
+  configureFlags = [
+    "--with-gmp-includes=${lib.getDev gmpUsed}/include"
+    # Note `--with-gmp-libraries` does nothing for GHC bindists:
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124
+  ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
+    # From: https://github.com/NixOS/nixpkgs/pull/43369/commits
+    ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
+
+  # No building is necessary, but calling make without flags ironically
+  # calls install-strip ...
+  dontBuild = true;
+
+  # Patch scripts to include runtime dependencies in $PATH.
+  postInstall = ''
+    for i in "$out/bin/"*; do
+      test ! -h "$i" || continue
+      isScript "$i" || continue
+      sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i"
+    done
+  '';
+
+  # Apparently necessary for the ghc Alpine (musl) bindist:
+  # When we strip, and then run the
+  #     patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
+  # below, running ghc (e.g. during `installCheckPhase)` gives some apparently
+  # corrupted rpath or whatever makes the loader work on nonsensical strings:
+  #     running install tests
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found
+  #     Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
+  # This is extremely bogus and should be investigated.
+  dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness
+
+  # On Linux, use patchelf to modify the executables so that they can
+  # find editline/gmp.
+  postFixup = lib.optionalString (stdenv.isLinux && !(binDistUsed.isStatic or false))
+    (if stdenv.hostPlatform.isAarch64 then
+      # Keep rpath as small as possible on aarch64 for patchelf#244.  All Elfs
+      # are 2 directories deep from $out/lib, so pooling symlinks there makes
+      # a short rpath.
+      ''
+      (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6)
+      (cd $out/lib; ln -s ${lib.getLib gmpUsed}/lib/libgmp.so.10)
+      (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1)
+      for p in $(find "$out/lib" -type f -name "*\.so*"); do
+        (cd $out/lib; ln -s $p)
+      done
+
+      for p in $(find "$out/lib" -type f -executable); do
+        if isELF "$p"; then
+          echo "Patchelfing $p"
+          patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p
+        fi
+      done
+      ''
+    else
+      ''
+      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
+    '') + 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
+  '' +
+  lib.optionalString minimal ''
+    # Remove profiling files
+    find $out -type f -name '*.p_o' -delete
+    find $out -type f -name '*.p_hi' -delete
+    find $out -type f -name '*_p.a' -delete
+    # `-f` because e.g. musl bindist does not have this file.
+    rm -f $out/lib/ghc-*/bin/ghc-iserv-prof
+    # Hydra will redistribute this derivation, so we have to keep the docs for
+    # legal reasons (retaining the legal notices etc)
+    # As a last resort we could unpack the docs separately and symlink them in.
+    # They're in $out/share/{doc,man}.
+  ''
+  # Recache package db which needs to happen for Hadrian bindists
+  # where we modify the package db before installing
+  + ''
+    shopt -s nullglob
+    package_db=("$out"/lib/ghc-*/lib/package.conf.d "$out"/lib/ghc-*/package.conf.d)
+    "$out/bin/ghc-pkg" --package-db="$package_db" recache
+  '';
+
+  # In nixpkgs, musl based builds currently enable `pie` hardening by default
+  # (see `defaultHardeningFlags` in `make-derivation.nix`).
+  # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+  # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+  # See:
+  # * https://github.com/NixOS/nixpkgs/issues/129247
+  # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+  hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    # 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
+    env -i $out/bin/ghc --make main.hs || exit 1
+    echo compilation ok
+    [ $(./main) == "yes" ]
+  '';
+
+  passthru = {
+    targetPrefix = "";
+    enableShared = true;
+
+    inherit llvmPackages;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  }
+  # We duplicate binDistUsed here since we have a sensible default even if no bindist is avaible,
+  # this makes sure that getting the `meta` attribute doesn't throw even on unsupported platforms.
+  // lib.optionalAttrs (ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}.isHadrian or false) {
+    # Normal GHC derivations expose the hadrian derivation used to build them
+    # here. In the case of bindists we just make sure that the attribute exists,
+    # as it is used for checking if a GHC derivation has been built with hadrian.
+    # The isHadrian mechanism will become obsolete with GHCs that use hadrian
+    # exclusively, i.e. 9.6 (and 9.4?).
+    hadrian = null;
+  };
+
+  meta = rec {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    license = lib.licenses.bsd3;
+    # HACK: since we can't encode the libc / abi in platforms, we need
+    # to make the platform list dependent on the evaluation platform
+    # in order to avoid eval errors with musl which supports less
+    # platforms than the default libcs (i. e. glibc / libSystem).
+    # This is done for the benefit of Hydra, so `packagePlatforms`
+    # won't return any platforms that would cause an evaluation
+    # failure for `pkgsMusl.haskell.compiler.ghc922Binary`, as
+    # long as the evaluator runs on a platform that supports
+    # `pkgsMusl`.
+    platforms = builtins.attrNames ghcBinDists.${distSetName};
+    maintainers = lib.teams.haskell.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix
new file mode 100644
index 000000000000..034a09511b2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix
@@ -0,0 +1,389 @@
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.2.5";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "0606797d1b38e2d88ee2243f38ec6b9a1aa93e9b578e95f0de9a9c0a4144021c";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+    echo -n "${buildMK}" > mk/build.mk
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix
new file mode 100644
index 000000000000..83cd1e051c6a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix
@@ -0,0 +1,389 @@
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.2.6";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "7a54cf0398ad488b4ed219e15d1d1e64c0b6876c43a0564550dd11f0540d7305";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+    echo -n "${buildMK}" > mk/build.mk
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix
new file mode 100644
index 000000000000..4bf7252643de
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix
@@ -0,0 +1,389 @@
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.2.7";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "a253567a17b734a4c0dd0ffa296d33c2a5b5a54a77df988806a2a1e1ca7e88b8";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+    echo -n "${buildMK}" > mk/build.mk
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix
new file mode 100644
index 000000000000..0d469f733525
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix
@@ -0,0 +1,389 @@
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.2.8";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "sha256-XxPReGv0/RL0tF+qN6vttbs/NtXlj32lMH6L/oilZ6E=";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+    echo -n "${buildMK}" > mk/build.mk
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix
new file mode 100644
index 000000000000..9670d4a4fd57
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix
@@ -0,0 +1,396 @@
+# DO NOT port this expression to hadrian. It is not possible to build a GHC
+# cross compiler with 9.4.* and hadrian.
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.4.5";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "6256cf9caf6d6dc7b611dcfbb247df2d528e85aa39d22a698e870e5a590e8601";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+
+    echo -n "${buildMK}" > mk/build.mk
+
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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
+  ''
+  # HACK: allow bootstrapping with GHC 8.10 which works fine, as we don't have
+  # binary 9.0 packaged. Bootstrapping with 9.2 is broken without hadrian.
+  + ''
+    substituteInPlace configure --replace \
+      'MinBootGhcVersion="9.0"' \
+      'MinBootGhcVersion="8.10"'
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.6-bytestring-posix-source.patch b/nixpkgs/pkgs/development/compilers/ghc/9.4.6-bytestring-posix-source.patch
new file mode 100644
index 000000000000..644ab295191f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.6-bytestring-posix-source.patch
@@ -0,0 +1,15 @@
+Make sure that the appropriate feature flags are set when
+Rts.h is included, so that clockid_t is defined.
+
+diff --git a/cbits/is-valid-utf8.c b/cbits/is-valid-utf8.c
+index 01b3b41..c69596a 100644
+--- a/libraries/bytestring/cbits/is-valid-utf8.c
++++ b/libraries/bytestring/cbits/is-valid-utf8.c
+@@ -29,6 +29,7 @@ SUCH DAMAGE.
+ */
+ #pragma GCC push_options
+ #pragma GCC optimize("-O2")
++#include "rts/PosixSource.h"
+ #include <stdbool.h>
+ #include <stddef.h>
+ #include <stdint.h>
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix
new file mode 100644
index 000000000000..f971f4e5a309
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix
@@ -0,0 +1,392 @@
+# DO NOT port this expression to hadrian. It is not possible to build a GHC
+# cross compiler with 9.4.* and hadrian.
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.4.6";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "1b705cf52692f9d4d6707cdf8e761590f5f56ec8ea6a65e36610db392d3d24b9";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+
+    # Work around a type not being defined when including Rts.h in bytestring's cbits
+    # due to missing feature macros. See https://gitlab.haskell.org/ghc/ghc/-/issues/23810.
+    ./9.4.6-bytestring-posix-source.patch
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+
+    echo -n "${buildMK}" > mk/build.mk
+
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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
+  ''
+  # HACK: allow bootstrapping with GHC 8.10 which works fine, as we don't have
+  # binary 9.0 packaged. Bootstrapping with 9.2 is broken without hadrian.
+  + ''
+    substituteInPlace configure --replace \
+      'MinBootGhcVersion="9.0"' \
+      'MinBootGhcVersion="8.10"'
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix
new file mode 100644
index 000000000000..ac060dce91d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix
@@ -0,0 +1,388 @@
+# DO NOT port this expression to hadrian. It is not possible to build a GHC
+# cross compiler with 9.4.* and hadrian.
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.4.7";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "06775a52b4d13ac09edc6dabc299fd11e59d8886bbcae450af367baee2684c8f";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+
+    echo -n "${buildMK}" > mk/build.mk
+
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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
+  ''
+  # HACK: allow bootstrapping with GHC 8.10 which works fine, as we don't have
+  # binary 9.0 packaged. Bootstrapping with 9.2 is broken without hadrian.
+  + ''
+    substituteInPlace configure --replace \
+      'MinBootGhcVersion="9.0"' \
+      'MinBootGhcVersion="8.10"'
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix
new file mode 100644
index 000000000000..db79b72830d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix
@@ -0,0 +1,388 @@
+# DO NOT port this expression to hadrian. It is not possible to build a GHC
+# cross compiler with 9.4.* and hadrian.
+{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
+, xattr, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic
+
+, # 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 ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, #  Whether to build sphinx documentation.
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, enableHaddockProgram ?
+    # Disabled for cross; see note [HADDOCK_DOCS].
+    (stdenv.targetPlatform == stdenv.hostPlatform)
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+# Cross cannot currently build the `haddock` program for silly reasons,
+# see note [HADDOCK_DOCS].
+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
+    BUILD_SPHINX_PDF = NO
+  '' +
+  # Note [HADDOCK_DOCS]:
+  # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
+  # program is built (which we generally always want to have a complete GHC install)
+  # and whether it is run on the GHC sources to generate hyperlinked source code
+  # (which is impossible for cross-compilation); see:
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
+  # This implies that currently a cross-compiled GHC will never have a `haddock`
+  # program, so it can never generate haddocks for any packages.
+  # If this is solved in the future, we'd like to unconditionally
+  # build the haddock program (removing the `enableHaddockProgram` option).
+  ''
+    HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
+    # Build haddocks for boot packages with hyperlinking
+    EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump
+
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
+  '' + lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+  '' + lib.optionalString (!enableProfiledLibs) ''
+    GhcLibWays = "v dyn"
+  '' +
+  # -fexternal-dynamic-refs apparently (because it's not clear from the documentation)
+  # makes the GHC RTS able to load static libraries, which may be needed for TemplateHaskell.
+  # This solution was described in https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+  lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC -fexternal-dynamic-refs
+    GhcRtsHcOpts += -fPIC -fexternal-dynamic-refs
+  '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation (rec {
+  version = "9.4.8";
+  pname = "${targetPrefix}ghc${variantSuffix}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "0bf407eb67fe3e3c24b0f4c8dea8cb63e07f63ca0f76cf2058565143507ab85e";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    ./docs-sphinx-7.patch
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' + ''
+
+    echo -n "${buildMK}" > mk/build.mk
+
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  '' + 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
+  '' + 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
+  ''
+  # HACK: allow bootstrapping with GHC 8.10 which works fine, as we don't have
+  # binary 9.0 packaged. Bootstrapping with 9.2 is broken without hadrian.
+  + ''
+    substituteInPlace configure --replace \
+      'MinBootGhcVersion="9.0"' \
+      'MinBootGhcVersion="8.10"'
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ 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
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (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" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # This is used by the haskell builder to query
+    # the presence of the haddock program.
+    hasHaddock = enableHaddockProgram;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.6.3.nix b/nixpkgs/pkgs/development/compilers/ghc/9.6.3.nix
new file mode 100644
index 000000000000..35bbf020acbf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.6.3.nix
@@ -0,0 +1,4 @@
+import ./common-hadrian.nix rec {
+  version = "9.6.3";
+  sha256 = "1xbpxchmvm9gswrwwz1rsvx9kjaxhc2q3fx9l6wa0l5599xydkfz";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.6.4.nix b/nixpkgs/pkgs/development/compilers/ghc/9.6.4.nix
new file mode 100644
index 000000000000..40a2261180e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.6.4.nix
@@ -0,0 +1,4 @@
+import ./common-hadrian.nix {
+  version = "9.6.4";
+  sha256 = "10bf25b8b07174fdd9868b5c0c56c17c0ef1edcb6247b4b864be933651bfd4c0";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.8.1.nix b/nixpkgs/pkgs/development/compilers/ghc/9.8.1.nix
new file mode 100644
index 000000000000..7c8c476c5b1a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.8.1.nix
@@ -0,0 +1,4 @@
+import ./common-hadrian.nix rec {
+  version = "9.8.1";
+  sha256 = "b2f8ed6b7f733797a92436f4ff6e088a520913149c9a9be90465b40ad1f20751";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch b/nixpkgs/pkgs/development/compilers/ghc/Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch
new file mode 100644
index 000000000000..19adcf5388bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch
@@ -0,0 +1,99 @@
+diff --git a/Cabal/Distribution/Simple/Build/PathsModule.hs b/Cabal/Distribution/Simple/Build/PathsModule.hs
+index 5e660e8d6..1ae603c94 100644
+--- a/libraries/Cabal/Cabal/Distribution/Simple/Build/PathsModule.hs
++++ b/libraries/Cabal/Cabal/Distribution/Simple/Build/PathsModule.hs
+@@ -37,6 +37,9 @@ import System.FilePath ( pathSeparator )
+ -- * Building Paths_<pkg>.hs
+ -- ------------------------------------------------------------
+ 
++splitPath :: FilePath -> [ String ]
++splitPath = unintersperse pathSeparator
++
+ generatePathsModule :: PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> String
+ generatePathsModule pkg_descr lbi clbi =
+    let pragmas =
+@@ -78,12 +81,44 @@ generatePathsModule pkg_descr lbi clbi =
+           "import System.Environment (getExecutablePath)\n"
+         | otherwise = ""
+ 
++       dirs = [ (flat_libdir, "LibDir")
++              , (flat_dynlibdir, "DynLibDir")
++              , (flat_datadir, "DataDir")
++              , (flat_libexecdir, "LibexecDir")
++              , (flat_sysconfdir, "SysconfDir") ];
++
++       shouldEmitPath p
++         | (splitPath flat_prefix) `isPrefixOf` (splitPath flat_bindir) = True
++         | (splitPath flat_prefix) `isPrefixOf` (splitPath p) = False
++         | otherwise = True
++
++       shouldEmitDataDir = shouldEmitPath flat_datadir
++
++       nixEmitPathFn (path, name) = let
++         varName = toLower <$> name
++         fnName = "get"++name
++         in if shouldEmitPath path then
++              varName ++ " :: FilePath\n"++
++              varName ++ " = " ++ show path ++
++              "\n" ++ fnName ++ " :: IO FilePath" ++
++              "\n" ++ fnName ++ " = " ++ mkGetEnvOr varName ("return " ++ varName)++"\n"
++            else ""
++
++       absBody = intercalate "\n" $ nixEmitPathFn <$> dirs
++
++       warnPragma = case filter (not . shouldEmitPath . fst) dirs of
++         [] -> ""
++         omittedDirs -> "{-# WARNING \"The functions: "++omittedFns++" Have been omitted by the Nix build system.\" #-}"
++           where omittedFns = intercalate ", " $ map snd omittedDirs
++
++       importList = intercalate ", " $ ("get" ++) . snd <$> filter (shouldEmitPath . fst) dirs
++
+        header =
+         pragmas++
+-        "module " ++ prettyShow paths_modulename ++ " (\n"++
+-        "    version,\n"++
+-        "    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,\n"++
+-        "    getDataFileName, getSysconfDir\n"++
++        "module " ++ prettyShow paths_modulename ++ " " ++ warnPragma ++ " (\n"++
++        "    version, getBinDir,\n"++
++        (if shouldEmitDataDir then "    getDataFileName, \n" else "\n")++
++        "    " ++ importList ++"\n"++
+         "  ) where\n"++
+         "\n"++
+         foreign_imports++
+@@ -136,26 +171,18 @@ generatePathsModule pkg_descr lbi clbi =
+           "\n"++
+           filename_stuff
+         | absolute =
+-          "\nbindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath\n"++
++          "\nbindir :: FilePath\n"++
+           "\nbindir     = " ++ show flat_bindir ++
+-          "\nlibdir     = " ++ show flat_libdir ++
+-          "\ndynlibdir  = " ++ show flat_dynlibdir ++
+-          "\ndatadir    = " ++ show flat_datadir ++
+-          "\nlibexecdir = " ++ show flat_libexecdir ++
+-          "\nsysconfdir = " ++ show flat_sysconfdir ++
+           "\n"++
+-          "\ngetBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath\n"++
++          "\ngetBinDir :: IO FilePath\n"++
+           "getBinDir = "++mkGetEnvOr "bindir" "return bindir"++"\n"++
+-          "getLibDir = "++mkGetEnvOr "libdir" "return libdir"++"\n"++
+-          "getDynLibDir = "++mkGetEnvOr "dynlibdir" "return dynlibdir"++"\n"++
+-          "getDataDir = "++mkGetEnvOr "datadir" "return datadir"++"\n"++
+-          "getLibexecDir = "++mkGetEnvOr "libexecdir" "return libexecdir"++"\n"++
+-          "getSysconfDir = "++mkGetEnvOr "sysconfdir" "return sysconfdir"++"\n"++
+-          "\n"++
+-          "getDataFileName :: FilePath -> IO FilePath\n"++
+-          "getDataFileName name = do\n"++
+-          "  dir <- getDataDir\n"++
+-          "  return (dir ++ "++path_sep++" ++ name)\n"
++          absBody ++ "\n"++
++          (if shouldEmitDataDir then
++             "getDataFileName :: FilePath -> IO FilePath\n"++
++             "getDataFileName name = do\n"++
++             "  dir <- getDataDir\n"++
++             "  return (dir ++ "++path_sep++" ++ name)\n"
++           else "\n")
+         | otherwise =
+           "\nprefix, bindirrel :: FilePath" ++
+           "\nprefix        = " ++ show flat_prefix ++
diff --git a/nixpkgs/pkgs/development/compilers/ghc/Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch b/nixpkgs/pkgs/development/compilers/ghc/Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
new file mode 100644
index 000000000000..1f7a79cc6885
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
@@ -0,0 +1,602 @@
+This patch is based on https://github.com/sternenseemann/cabal/compare/982646d67b95b32813b89ab5d2d2f4d4dc03fb2b..7c49047f253e1f128e2df356400ec5da6f11066b
+and has been postprocessed with `filterdiff --strip=1 --addoldprefix=a/libraries/Cabal/ --addnewprefix=b/libraries/Cabal/`.
+Note that the base for the diff is not the Cabal 3.6.3.0 release tag, but
+982646d67b95b32813b89ab5d2d2f4d4dc03fb2b which is obtained by applying
+https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98
+on top of said release tag. That patch is applied to all our GHCs in the 9.2 series.
+
+Reasoning and explanation of the patch can be found in the comment in the diff for PathsModule.hs below.
+
+diffCabal/src/Distribution/Simple/Build/PathsModule.hs b/Cabal/src/Distribution/Simple/Build/PathsModule.hs
+index b2be7e1a8..9b63e9850 100644
+--- a/libraries/Cabal/Cabal/src/Distribution/Simple/Build/PathsModule.hs
++++ b/libraries/Cabal/Cabal/src/Distribution/Simple/Build/PathsModule.hs
+@@ -46,6 +46,7 @@ generatePathsModule pkg_descr lbi clbi = Z.render Z.Z
+     , Z.zIsWindows                  = isWindows
+     , Z.zIsI386                     = buildArch == I386
+     , Z.zIsX8664                    = buildArch == X86_64
++    , Z.zOr                         = (||)
+     , Z.zNot                        = not
+     , Z.zManglePkgName              = showPkgName
+ 
+@@ -56,8 +57,112 @@ generatePathsModule pkg_descr lbi clbi = Z.render Z.Z
+     , Z.zDatadir    = zDatadir
+     , Z.zLibexecdir = zLibexecdir
+     , Z.zSysconfdir = zSysconfdir
++
++    -- Sadly we can't be cleverer about this – we can't have literals in the template
++    , Z.zShouldEmitDataDir    = shouldEmit "DataDir"
++    , Z.zShouldEmitLibDir     = shouldEmit "LibDir"
++    , Z.zShouldEmitDynLibDir  = shouldEmit "DynLibDir"
++    , Z.zShouldEmitLibexecDir = shouldEmit "LibexecDir"
++    , Z.zShouldEmitSysconfDir = shouldEmit "SysconfDir"
++
++    , Z.zWarning           = zWarning
++    , Z.zShouldEmitWarning = zShouldEmitWarning
+     }
+   where
++    -- GHC's NCG backend for aarch64-darwin does not support link-time dead code
++    -- elimination to the extent that NCG does for other targets. Consequently,
++    -- we struggle with unnecessarily retained store path references due to the
++    -- use of `Paths_*` modules – even if `getLibDir` is not used, it'll end up
++    -- in the final library or executables we build.
++    --
++    -- When using a different output for the executables and library, this
++    -- becomes more sinister: The library will contain a reference to the bin
++    -- output and itself due to `getLibDir` and `getBinDir`, but the executables
++    -- will do so, too. Either due to linking dynamically or because the library
++    -- is linked statically into the executable and retains those references.
++    -- Since Nix disallows cyclical references between two outputs, it becomes
++    -- impossible to use the `Paths_*` module and a separate `bin` output for
++    -- aarch64-darwin.
++    --
++    -- The solution we have resorted to for now, is to trim the `Paths_*` module
++    -- dynamically depending on what references *could* be used without causing
++    -- a cyclical reference. That has the effect that any code that would not
++    -- cause a cyclical reference with dead code elimination will compile and
++    -- work for aarch64-darwin. If the code would use a `get*Dir` function that
++    -- has been omitted, this would indicate that the code would have caused a
++    -- cyclical reference anyways.
++    --
++    -- The logic for this makes some pretty big assumptions about installation
++    -- prefixes that probably only hold fully in nixpkgs with
++    -- `haskellPackages.mkDerivation`. Simple uses outside nixpkgs that have
++    -- everything below the same prefix should continue to work as expected,
++    -- though.
++    --
++    -- We assume the following:
++    --
++    -- - flat_prefix is `$out`.
++    -- - flat_libdir etc. are always below `$out`.
++    --
++    -- Since in the normal case due to static linking `$bin` and `$out` will
++    -- have the same references in libraries/executables, we need to either
++    -- prevent usage of `getBinDir` or `getLibDir` to break the cycle in case
++    -- `flat_bindir` is not below `$out`. We have decided to always allow usage
++    -- of `getBinDir`, so `getLibDir` gets dropped if a separate `bin` output is
++    -- used. This has the simple reason that `$out` which contains `flat_libdir`
++    -- tends to be quite big – we would like to have a `bin` output that doesn't
++    -- require keeping that around.
++    pathEmittable :: FilePath -> Bool
++    pathEmittable p
++      -- If the executable installation target is below `$out` the reference
++      -- cycle is within a single output (since libs are installed to `$out`)
++      -- and thus unproblematic. We can use any and all `get*Dir` functions.
++      | flat_prefix `isPrefixOf` flat_bindir = True
++      -- Otherwise, we need to disallow all `get*Dir` functions that would cause
++      -- a reference to `$out` which contains the libraries that would in turn
++      -- reference `$bin`. This always include `flat_libdir` and friends, but
++      -- can also include `flat_datadir` if no separate output for data files is
++      -- used.
++      | otherwise = not (flat_prefix `isPrefixOf` p)
++
++    -- This list maps the "name" of the directory to whether we want to include
++    -- it in the `Paths_*` module or not. `shouldEmit` performs a lookup in this.
++    dirs :: [(String, Bool)]
++    dirs =
++      map
++       (\(name, path) -> (name, pathEmittable path))
++       [ ("LibDir", flat_libdir)
++       , ("DynLibDir", flat_dynlibdir)
++       , ("DataDir", flat_datadir)
++       , ("LibexecDir", flat_libexecdir)
++       , ("SysconfDir", flat_sysconfdir)
++       ]
++
++    shouldEmit :: String -> Bool
++    shouldEmit name =
++      case lookup name dirs of
++        Just b -> b
++        Nothing -> error "panic! BUG in Cabal Paths_ patch for aarch64-darwin, report this at https://github.com/nixos/nixpkgs/issues"
++
++    -- This is a comma separated list of all functions that have been omitted.
++    -- This is included in a GHC warning which will be attached to the `Paths_*`
++    -- module in case we are dropping any `get*Dir` functions that would
++    -- normally exist.
++    --
++    -- TODO: getDataFileName is not accounted for at the moment.
++    omittedFunctions :: String
++    omittedFunctions =
++      intercalate ", "
++      $ map (("get" ++) . fst)
++      $ filter (not . snd) dirs
++
++    zWarning :: String
++    zWarning =
++      show $
++        "The following functions have been omitted by a nixpkgs-specific patch to Cabal: "
++        ++ omittedFunctions
++    zShouldEmitWarning :: Bool
++    zShouldEmitWarning = any (not . snd) dirs
++
+     supports_cpp                 = supports_language_pragma
+     supports_rebindable_syntax   = ghc_newer_than (mkVersion [7,0,1])
+     supports_language_pragma     = ghc_newer_than (mkVersion [6,6,1])
+diffCabal/src/Distribution/Simple/Build/PathsModule/Z.hs b/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
+index 6488ea061..a6cdc8e31 100644
+--- a/libraries/Cabal/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
++++ b/libraries/Cabal/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
+@@ -18,6 +18,14 @@ data Z
+          zDatadir :: FilePath,
+          zLibexecdir :: FilePath,
+          zSysconfdir :: FilePath,
++         zShouldEmitLibDir :: Bool,
++         zShouldEmitDynLibDir :: Bool,
++         zShouldEmitLibexecDir :: Bool,
++         zShouldEmitDataDir :: Bool,
++         zShouldEmitSysconfDir :: Bool,
++         zShouldEmitWarning :: Bool,
++         zWarning :: String,
++         zOr :: (Bool -> Bool -> Bool),
+          zNot :: (Bool -> Bool),
+          zManglePkgName :: (PackageName -> String)}
+     deriving Generic
+@@ -45,10 +53,51 @@ render z_root = execWriter $ do
+   tell "{-# OPTIONS_GHC -w #-}\n"
+   tell "module Paths_"
+   tell (zManglePkgName z_root (zPackageName z_root))
+-  tell " (\n"
++  tell "\n"
++  tell "  "
++  if (zShouldEmitWarning z_root)
++  then do
++    tell "{-# WARNING "
++    tell (zWarning z_root)
++    tell " #-}"
++    return ()
++  else do
++    return ()
++  tell "\n"
++  tell "  (\n"
+   tell "    version,\n"
+-  tell "    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,\n"
+-  tell "    getDataFileName, getSysconfDir\n"
++  tell "    getBinDir,\n"
++  if (zOr z_root (zNot z_root (zAbsolute z_root)) (zShouldEmitLibDir z_root))
++  then do
++    tell "    getLibDir,\n"
++    return ()
++  else do
++    return ()
++  if (zOr z_root (zNot z_root (zAbsolute z_root)) (zShouldEmitDynLibDir z_root))
++  then do
++    tell "    getDynLibDir,\n"
++    return ()
++  else do
++    return ()
++  if (zOr z_root (zNot z_root (zAbsolute z_root)) (zShouldEmitLibexecDir z_root))
++  then do
++    tell "    getLibexecDir,\n"
++    return ()
++  else do
++    return ()
++  if (zOr z_root (zNot z_root (zAbsolute z_root)) (zShouldEmitDataDir z_root))
++  then do
++    tell "    getDataFileName,\n"
++    tell "    getDataDir,\n"
++    return ()
++  else do
++    return ()
++  if (zOr z_root (zNot z_root (zAbsolute z_root)) (zShouldEmitSysconfDir z_root))
++  then do
++    tell "    getSysconfDir\n"
++    return ()
++  else do
++    return ()
+   tell "  ) where\n"
+   tell "\n"
+   if (zNot z_root (zAbsolute z_root))
+@@ -97,12 +146,15 @@ render z_root = execWriter $ do
+   tell (zVersionDigits z_root)
+   tell " []\n"
+   tell "\n"
+-  tell "getDataFileName :: FilePath -> IO FilePath\n"
+-  tell "getDataFileName name = do\n"
+-  tell "  dir <- getDataDir\n"
+-  tell "  return (dir `joinFileName` name)\n"
+-  tell "\n"
+-  tell "getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath\n"
++  if (zOr z_root (zNot z_root (zAbsolute z_root)) (zShouldEmitDataDir z_root))
++  then do
++    tell "getDataFileName :: FilePath -> IO FilePath\n"
++    tell "getDataFileName name = do\n"
++    tell "  dir <- getDataDir\n"
++    tell "  return (dir `joinFileName` name)\n"
++    return ()
++  else do
++    return ()
+   tell "\n"
+   let
+     z_var0_function_defs = do
+@@ -130,6 +182,7 @@ render z_root = execWriter $ do
+   tell "\n"
+   if (zRelocatable z_root)
+   then do
++    tell "\n"
+     tell "\n"
+     tell "getPrefixDirReloc :: FilePath -> IO FilePath\n"
+     tell "getPrefixDirReloc dirRel = do\n"
+@@ -139,31 +192,37 @@ render z_root = execWriter $ do
+     tell (zBindir z_root)
+     tell ") `joinFileName` dirRel)\n"
+     tell "\n"
++    tell "getBinDir     :: IO FilePath\n"
+     tell "getBinDir     = catchIO (getEnv \""
+     tell (zManglePkgName z_root (zPackageName z_root))
+     tell "_bindir\")     (\\_ -> getPrefixDirReloc $ "
+     tell (zBindir z_root)
+     tell ")\n"
++    tell "getLibDir     :: IO FilePath\n"
+     tell "getLibDir     = catchIO (getEnv \""
+     tell (zManglePkgName z_root (zPackageName z_root))
+     tell "_libdir\")     (\\_ -> getPrefixDirReloc $ "
+     tell (zLibdir z_root)
+     tell ")\n"
++    tell "getDynLibDir  :: IO FilePath\n"
+     tell "getDynLibDir  = catchIO (getEnv \""
+     tell (zManglePkgName z_root (zPackageName z_root))
+     tell "_dynlibdir\")  (\\_ -> getPrefixDirReloc $ "
+     tell (zDynlibdir z_root)
+     tell ")\n"
++    tell "getDataDir    :: IO FilePath\n"
+     tell "getDataDir    = catchIO (getEnv \""
+     tell (zManglePkgName z_root (zPackageName z_root))
+     tell "_datadir\")    (\\_ -> getPrefixDirReloc $ "
+     tell (zDatadir z_root)
+     tell ")\n"
++    tell "getLibexecDir :: IO FilePath\n"
+     tell "getLibexecDir = catchIO (getEnv \""
+     tell (zManglePkgName z_root (zPackageName z_root))
+     tell "_libexecdir\") (\\_ -> getPrefixDirReloc $ "
+     tell (zLibexecdir z_root)
+     tell ")\n"
++    tell "getSysconfDir :: IO FilePath\n"
+     tell "getSysconfDir = catchIO (getEnv \""
+     tell (zManglePkgName z_root (zPackageName z_root))
+     tell "_sysconfdir\") (\\_ -> getPrefixDirReloc $ "
+@@ -177,72 +236,119 @@ render z_root = execWriter $ do
+     if (zAbsolute z_root)
+     then do
+       tell "\n"
+-      tell "bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath\n"
++      tell "bindir     :: FilePath\n"
+       tell "bindir     = "
+       tell (zBindir z_root)
+       tell "\n"
+-      tell "libdir     = "
+-      tell (zLibdir z_root)
+-      tell "\n"
+-      tell "dynlibdir  = "
+-      tell (zDynlibdir z_root)
++      tell "getBinDir     :: IO FilePath\n"
++      tell "getBinDir     = catchIO (getEnv \""
++      tell (zManglePkgName z_root (zPackageName z_root))
++      tell "_bindir\")     (\\_ -> return bindir)\n"
+       tell "\n"
+-      tell "datadir    = "
+-      tell (zDatadir z_root)
++      if (zShouldEmitLibDir z_root)
++      then do
++        tell "libdir     :: FilePath\n"
++        tell "libdir     = "
++        tell (zLibdir z_root)
++        tell "\n"
++        tell "getLibDir     :: IO FilePath\n"
++        tell "getLibDir     = catchIO (getEnv \""
++        tell (zManglePkgName z_root (zPackageName z_root))
++        tell "_libdir\")     (\\_ -> return libdir)\n"
++        return ()
++      else do
++        return ()
+       tell "\n"
+-      tell "libexecdir = "
+-      tell (zLibexecdir z_root)
++      if (zShouldEmitDynLibDir z_root)
++      then do
++        tell "dynlibdir  :: FilePath\n"
++        tell "dynlibdir  = "
++        tell (zDynlibdir z_root)
++        tell "\n"
++        tell "getDynLibDir  :: IO FilePath\n"
++        tell "getDynLibDir  = catchIO (getEnv \""
++        tell (zManglePkgName z_root (zPackageName z_root))
++        tell "_dynlibdir\")  (\\_ -> return dynlibdir)\n"
++        return ()
++      else do
++        return ()
+       tell "\n"
+-      tell "sysconfdir = "
+-      tell (zSysconfdir z_root)
++      if (zShouldEmitDataDir z_root)
++      then do
++        tell "datadir    :: FilePath\n"
++        tell "datadir    = "
++        tell (zDatadir z_root)
++        tell "\n"
++        tell "getDataDir    :: IO FilePath\n"
++        tell "getDataDir    = catchIO (getEnv \""
++        tell (zManglePkgName z_root (zPackageName z_root))
++        tell "_datadir\")    (\\_ -> return datadir)\n"
++        return ()
++      else do
++        return ()
+       tell "\n"
++      if (zShouldEmitLibexecDir z_root)
++      then do
++        tell "libexecdir :: FilePath\n"
++        tell "libexecdir = "
++        tell (zLibexecdir z_root)
++        tell "\n"
++        tell "getLibexecDir :: IO FilePath\n"
++        tell "getLibexecDir = catchIO (getEnv \""
++        tell (zManglePkgName z_root (zPackageName z_root))
++        tell "_libexecdir\") (\\_ -> return libexecdir)\n"
++        return ()
++      else do
++        return ()
+       tell "\n"
+-      tell "getBinDir     = catchIO (getEnv \""
+-      tell (zManglePkgName z_root (zPackageName z_root))
+-      tell "_bindir\")     (\\_ -> return bindir)\n"
+-      tell "getLibDir     = catchIO (getEnv \""
+-      tell (zManglePkgName z_root (zPackageName z_root))
+-      tell "_libdir\")     (\\_ -> return libdir)\n"
+-      tell "getDynLibDir  = catchIO (getEnv \""
+-      tell (zManglePkgName z_root (zPackageName z_root))
+-      tell "_dynlibdir\")  (\\_ -> return dynlibdir)\n"
+-      tell "getDataDir    = catchIO (getEnv \""
+-      tell (zManglePkgName z_root (zPackageName z_root))
+-      tell "_datadir\")    (\\_ -> return datadir)\n"
+-      tell "getLibexecDir = catchIO (getEnv \""
+-      tell (zManglePkgName z_root (zPackageName z_root))
+-      tell "_libexecdir\") (\\_ -> return libexecdir)\n"
+-      tell "getSysconfDir = catchIO (getEnv \""
+-      tell (zManglePkgName z_root (zPackageName z_root))
+-      tell "_sysconfdir\") (\\_ -> return sysconfdir)\n"
++      if (zShouldEmitSysconfDir z_root)
++      then do
++        tell "sysconfdir :: FilePath\n"
++        tell "sysconfdir = "
++        tell (zSysconfdir z_root)
++        tell "\n"
++        tell "getSysconfDir :: IO FilePath\n"
++        tell "getSysconfDir = catchIO (getEnv \""
++        tell (zManglePkgName z_root (zPackageName z_root))
++        tell "_sysconfdir\") (\\_ -> return sysconfdir)\n"
++        return ()
++      else do
++        return ()
+       tell "\n"
+       return ()
+     else do
+       if (zIsWindows z_root)
+       then do
++        tell "\n"
+         tell "\n"
+         tell "prefix :: FilePath\n"
+         tell "prefix = "
+         tell (zPrefix z_root)
+         tell "\n"
+         tell "\n"
++        tell "getBinDir     :: IO FilePath\n"
+         tell "getBinDir     = getPrefixDirRel $ "
+         tell (zBindir z_root)
+         tell "\n"
++        tell "getLibDir     :: IO FilePath\n"
+         tell "getLibDir     = "
+         tell (zLibdir z_root)
+         tell "\n"
++        tell "getDynLibDir  :: IO FilePath\n"
+         tell "getDynLibDir  = "
+         tell (zDynlibdir z_root)
+         tell "\n"
++        tell "getDataDir    :: IO FilePath\n"
+         tell "getDataDir    = catchIO (getEnv \""
+         tell (zManglePkgName z_root (zPackageName z_root))
+         tell "_datadir\")    (\\_ -> "
+         tell (zDatadir z_root)
+         tell ")\n"
++        tell "getLibexecDir :: IO FilePath\n"
+         tell "getLibexecDir = "
+         tell (zLibexecdir z_root)
+         tell "\n"
++        tell "getSysconfDir :: IO FilePath\n"
+         tell "getSysconfDir = "
+         tell (zSysconfdir z_root)
+         tell "\n"
+diffcabal-dev-scripts/src/GenPathsModule.hs b/cabal-dev-scripts/src/GenPathsModule.hs
+index e4b930635..9b978f284 100644
+--- a/libraries/Cabal/cabal-dev-scripts/src/GenPathsModule.hs
++++ b/libraries/Cabal/cabal-dev-scripts/src/GenPathsModule.hs
+@@ -41,6 +41,16 @@ $(capture "decls" [d|
+         , zLibexecdir :: FilePath
+         , zSysconfdir :: FilePath
+ 
++        , zShouldEmitLibDir     :: Bool
++        , zShouldEmitDynLibDir  :: Bool
++        , zShouldEmitLibexecDir :: Bool
++        , zShouldEmitDataDir    :: Bool
++        , zShouldEmitSysconfDir :: Bool
++
++        , zShouldEmitWarning :: Bool
++        , zWarning           :: String
++
++        , zOr                         :: Bool -> Bool -> Bool
+         , zNot                        :: Bool -> Bool
+         , zManglePkgName              :: PackageName -> String
+         }
+difftemplates/Paths_pkg.template.hs b/templates/Paths_pkg.template.hs
+index 6bc6b7875..aa90a9382 100644
+--- a/libraries/Cabal/templates/Paths_pkg.template.hs
++++ b/libraries/Cabal/templates/Paths_pkg.template.hs
+@@ -9,10 +9,31 @@
+ {% endif %}
+ {-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
+ {-# OPTIONS_GHC -w #-}
+-module Paths_{{ manglePkgName packageName }} (
++module Paths_{{ manglePkgName packageName }}
++  {% if shouldEmitWarning %}{-# WARNING {{ warning }} #-}{% endif %}
++  (
+     version,
+-    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
+-    getDataFileName, getSysconfDir
++    getBinDir,
++{# We only care about the absolute case for our emit logic, since only in this
++   case references are incurred. We are not going to hit isWindows and relocatable
++   has no absolute references to begin with.
++#}
++{% if or (not absolute) shouldEmitLibDir %}
++    getLibDir,
++{% endif %}
++{% if or (not absolute) shouldEmitDynLibDir %}
++    getDynLibDir,
++{% endif %}
++{% if or (not absolute) shouldEmitLibexecDir %}
++    getLibexecDir,
++{% endif %}
++{% if or (not absolute) shouldEmitDataDir %}
++    getDataFileName,
++    getDataDir,
++{% endif %}
++{% if or (not absolute) shouldEmitSysconfDir %}
++    getSysconfDir
++{% endif %}
+   ) where
+ 
+ {% if not absolute %}
+@@ -51,12 +72,12 @@ catchIO = Exception.catch
+ version :: Version
+ version = Version {{ versionDigits }} []
+ 
++{% if or (not absolute) shouldEmitDataDir %}
+ getDataFileName :: FilePath -> IO FilePath
+ getDataFileName name = do
+   dir <- getDataDir
+   return (dir `joinFileName` name)
+-
+-getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
++{% endif %}
+ 
+ {% defblock function_defs %}
+ minusFileName :: FilePath -> String -> FilePath
+@@ -85,48 +106,93 @@ splitFileName p = (reverse (path2++drive), reverse fname)
+ 
+ {% if relocatable %}
+ 
++{# Relocatable can not incur any absolute references, so we can ignore it.
++   Additionally, --enable-relocatable is virtually useless in Nix builds
++#}
++
+ getPrefixDirReloc :: FilePath -> IO FilePath
+ getPrefixDirReloc dirRel = do
+   exePath <- getExecutablePath
+   let (dir,_) = splitFileName exePath
+   return ((dir `minusFileName` {{ bindir }}) `joinFileName` dirRel)
+ 
++getBinDir     :: IO FilePath
+ getBinDir     = catchIO (getEnv "{{ manglePkgName packageName }}_bindir")     (\_ -> getPrefixDirReloc $ {{ bindir }})
++getLibDir     :: IO FilePath
+ getLibDir     = catchIO (getEnv "{{ manglePkgName packageName }}_libdir")     (\_ -> getPrefixDirReloc $ {{ libdir }})
++getDynLibDir  :: IO FilePath
+ getDynLibDir  = catchIO (getEnv "{{ manglePkgName packageName }}_dynlibdir")  (\_ -> getPrefixDirReloc $ {{ dynlibdir }})
++getDataDir    :: IO FilePath
+ getDataDir    = catchIO (getEnv "{{ manglePkgName packageName }}_datadir")    (\_ -> getPrefixDirReloc $ {{ datadir }})
++getLibexecDir :: IO FilePath
+ getLibexecDir = catchIO (getEnv "{{ manglePkgName packageName }}_libexecdir") (\_ -> getPrefixDirReloc $ {{ libexecdir }})
++getSysconfDir :: IO FilePath
+ getSysconfDir = catchIO (getEnv "{{ manglePkgName packageName }}_sysconfdir") (\_ -> getPrefixDirReloc $ {{ sysconfdir }})
+ 
+ {% useblock function_defs %}
+ 
+ {% elif absolute %}
+ 
+-bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
++bindir     :: FilePath
+ bindir     = {{ bindir }}
+-libdir     = {{ libdir }}
+-dynlibdir  = {{ dynlibdir }}
+-datadir    = {{ datadir }}
+-libexecdir = {{ libexecdir }}
+-sysconfdir = {{ sysconfdir }}
+-
++getBinDir     :: IO FilePath
+ getBinDir     = catchIO (getEnv "{{ manglePkgName packageName }}_bindir")     (\_ -> return bindir)
++
++{% if shouldEmitLibDir %}
++libdir     :: FilePath
++libdir     = {{ libdir }}
++getLibDir     :: IO FilePath
+ getLibDir     = catchIO (getEnv "{{ manglePkgName packageName }}_libdir")     (\_ -> return libdir)
++{% endif %}
++
++{% if shouldEmitDynLibDir %}
++dynlibdir  :: FilePath
++dynlibdir  = {{ dynlibdir }}
++getDynLibDir  :: IO FilePath
+ getDynLibDir  = catchIO (getEnv "{{ manglePkgName packageName }}_dynlibdir")  (\_ -> return dynlibdir)
++{% endif %}
++
++{% if shouldEmitDataDir %}
++datadir    :: FilePath
++datadir    = {{ datadir }}
++getDataDir    :: IO FilePath
+ getDataDir    = catchIO (getEnv "{{ manglePkgName packageName }}_datadir")    (\_ -> return datadir)
++{% endif %}
++
++{% if shouldEmitLibexecDir %}
++libexecdir :: FilePath
++libexecdir = {{ libexecdir }}
++getLibexecDir :: IO FilePath
+ getLibexecDir = catchIO (getEnv "{{ manglePkgName packageName }}_libexecdir") (\_ -> return libexecdir)
++{% endif %}
++
++{% if shouldEmitSysconfDir %}
++sysconfdir :: FilePath
++sysconfdir = {{ sysconfdir }}
++getSysconfDir :: IO FilePath
+ getSysconfDir = catchIO (getEnv "{{ manglePkgName packageName }}_sysconfdir") (\_ -> return sysconfdir)
++{% endif %}
+ 
+ {% elif isWindows %}
+ 
++{# We are only trying to fix the problem for aarch64-darwin with this patch,
++   so let's ignore Windows which we can reach via pkgsCross, for example.
++#}
++
+ prefix :: FilePath
+ prefix = {{ prefix }}
+ 
++getBinDir     :: IO FilePath
+ getBinDir     = getPrefixDirRel $ {{ bindir }}
++getLibDir     :: IO FilePath
+ getLibDir     = {{ libdir }}
++getDynLibDir  :: IO FilePath
+ getDynLibDir  = {{ dynlibdir }}
++getDataDir    :: IO FilePath
+ getDataDir    = catchIO (getEnv "{{ manglePkgName packageName }}_datadir")    (\_ -> {{ datadir }})
++getLibexecDir :: IO FilePath
+ getLibexecDir = {{ libexecdir }}
++getSysconfDir :: IO FilePath
+ getSysconfDir = {{ sysconfdir }}
+ 
+ getPrefixDirRel :: FilePath -> IO FilePath
diff --git a/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix b/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix
new file mode 100644
index 000000000000..f4d2a279a678
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix
@@ -0,0 +1,537 @@
+{ version
+, rev ? null
+, sha256
+, url ?
+    if rev != null
+    then "https://gitlab.haskell.org/ghc/ghc.git"
+    else "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"
+
+}:
+
+{ lib
+, stdenv
+, pkgsBuildTarget
+, pkgsHostTarget
+, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf
+, automake
+, coreutils
+, fetchpatch
+, fetchurl
+, fetchgit
+, perl
+, python3
+, m4
+, sphinx
+, xattr
+, autoSignDarwinBinariesHook
+, bash
+
+, libiconv ? null, ncurses
+, glibcLocales ? null
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !(stdenv.targetPlatform.isx86
+              || stdenv.targetPlatform.isPower
+              || stdenv.targetPlatform.isSparc
+              || stdenv.targetPlatform.isAarch64
+              || stdenv.targetPlatform.isGhcjs)
+, # LLVM is conceptually a run-time-only dependency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildTargetLlvmPackages
+, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slightly slower native
+  # bignum backend instead of the faster but GPLed gmp backend.
+  enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp
+                         && lib.meta.availableOn stdenv.targetPlatform gmp)
+                       || stdenv.targetPlatform.isGhcjs
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, enableProfiledLibs ? true
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? with stdenv.targetPlatform; !isWindows && !useiOSPrebuilt && !isStatic && !isGhcjs
+
+, # Whether to build terminfo.
+  enableTerminfo ? !(stdenv.targetPlatform.isWindows
+                     || stdenv.targetPlatform.isGhcjs)
+
+, # Libdw.c only supports x86_64, i686 and s390x as of 2022-08-04
+  enableDwarf ? (stdenv.targetPlatform.isx86 ||
+                 (stdenv.targetPlatform.isS390 && stdenv.targetPlatform.is64bit)) &&
+                lib.meta.availableOn stdenv.hostPlatform elfutils &&
+                lib.meta.availableOn stdenv.targetPlatform elfutils &&
+                # HACK: elfutils is marked as broken on static platforms
+                # which availableOn can't tell.
+                !stdenv.targetPlatform.isStatic &&
+                !stdenv.hostPlatform.isStatic
+, elfutils
+
+, # What flavour to build. Flavour string may contain a flavour and flavour
+  # transformers as accepted by hadrian.
+  ghcFlavour ?
+    let
+      # TODO(@sternenseemann): does using the static flavour make sense?
+      baseFlavour = "release";
+      # Note: in case hadrian's flavour transformers cease being expressive
+      # enough for us, we'll need to resort to defining a "nixpkgs" flavour
+      # in hadrianUserSettings and using that instead.
+      transformers =
+        lib.optionals useLLVM [ "llvm" ]
+        ++ lib.optionals (!enableShared) [
+          "no_dynamic_libs"
+          "no_dynamic_ghc"
+        ]
+        ++ lib.optionals (!enableProfiledLibs) [ "no_profiled_libs" ]
+        # While split sections are now enabled by default in ghc 8.8 for windows,
+        # they seem to lead to `too many sections` errors when building base for
+        # profiling.
+        ++ lib.optionals (!stdenv.targetPlatform.isWindows) [ "split_sections" ]
+      ;
+    in
+      baseFlavour + lib.concatMapStrings (t: "+${t}") transformers
+
+, # Contents of the UserSettings.hs file to use when compiling hadrian.
+  hadrianUserSettings ? ''
+    module UserSettings (
+        userFlavours, userPackages, userDefaultFlavour,
+        verboseCommand, buildProgressColour, successColour, finalStage
+        ) where
+
+    import Flavour.Type
+    import Expression
+    import {-# SOURCE #-} Settings.Default
+
+    -- no way to set this via the command line
+    finalStage :: Stage
+    finalStage = ${
+      if stdenv.hostPlatform == stdenv.targetPlatform
+      then "Stage2" # native compiler
+      else "Stage1" # cross compiler
+    }
+
+    userDefaultFlavour :: String
+    userDefaultFlavour = "release"
+
+    userFlavours :: [Flavour]
+    userFlavours = []
+
+    -- Disable Colours
+    buildProgressColour :: BuildProgressColour
+    buildProgressColour = mkBuildProgressColour (Dull Reset)
+    successColour :: SuccessColour
+    successColour = mkSuccessColour (Dull Reset)
+
+    -- taken from src/UserSettings.hs unchanged, need to be there
+    userPackages :: [Package]
+    userPackages = []
+    verboseCommand :: Predicate
+    verboseCommand = do
+        verbosity <- expr getVerbosity
+        return $ verbosity >= Verbose
+  ''
+
+, ghcSrc ? (if rev != null then fetchgit else fetchurl) ({
+    inherit url sha256;
+  } // lib.optionalAttrs (rev != null) {
+    inherit rev;
+  })
+
+  # GHC's build system hadrian built from the GHC-to-build's source tree
+  # using our bootstrap GHC.
+, hadrian ? import ../../tools/haskell/hadrian/make-hadrian.nix { inherit bootPkgs lib; } {
+    ghcSrc = ghcSrc;
+    ghcVersion = version;
+    userSettings = hadrianUserSettings;
+    # Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
+    enableHyperlinkedSource =
+      # TODO(@sternenseemann): Disabling currently doesn't work with GHC >= 9.8
+      lib.versionAtLeast version "9.8" ||
+      !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
+  }
+
+, #  Whether to build sphinx documentation.
+  # TODO(@sternenseemann): Hadrian ignores the --docs flag if finalStage = Stage1
+  enableDocs ? (
+    # Docs disabled if we are building on musl because it's a large task to keep
+    # all `sphinx` dependencies building in this environment.
+    !stdenv.buildPlatform.isMusl
+  )
+
+, # 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.isiOS
+}:
+
+assert !enableNativeBignum -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  hadrianSettings =
+    # -fexternal-dynamic-refs apparently (because it's not clear from the
+    # documentation) makes the GHC RTS able to load static libraries, which may
+    # be needed for TemplateHaskell. This solution was described in
+    # https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
+    lib.optionals enableRelocatedStaticLibs [
+      "*.*.ghc.*.opts += -fPIC -fexternal-dynamic-refs"
+    ]
+    ++ lib.optionals targetPlatform.useAndroidPrebuilt [
+      "*.*.ghc.c.opts += -optc-std=gnu99"
+    ];
+
+  # Splicer will pull out correct variations
+  libDeps = platform: lib.optional enableTerminfo ncurses
+    ++ lib.optionals (!targetPlatform.isGhcjs) [libffi]
+    # Bindist configure script fails w/o elfutils in linker search path
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22081
+    ++ lib.optional enableDwarf elfutils
+    ++ lib.optional (!enableNativeBignum) gmp
+    ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows && !targetPlatform.isGhcjs) libiconv;
+
+  # TODO(@sternenseemann): is buildTarget LLVM unnecessary?
+  # GHC doesn't seem to have {LLC,OPT}_HOST
+  toolsForTarget = [
+    (if targetPlatform.isGhcjs
+     then pkgsBuildTarget.emscripten
+     else pkgsBuildTarget.targetPackages.stdenv.cc)
+  ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
+  # derivation for certain tools depending on the platform.
+  bintoolsFor = {
+    # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
+    # part of the bintools wrapper (due to codesigning requirements), but not on
+    # x86_64-darwin.
+    install_name_tool =
+      if stdenv.targetPlatform.isAarch64
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+    # Same goes for strip.
+    strip =
+      # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
+      if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
+      then targetCC.bintools
+      else targetCC.bintools.bintools;
+  };
+
+  # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues.
+  # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.linker == "gold" ||
+    (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl);
+
+  # Makes debugging easier to see which variant is at play in `nix-store -q --tree`.
+  variantSuffix = lib.concatStrings [
+    (lib.optionalString stdenv.hostPlatform.isMusl "-musl")
+    (lib.optionalString enableNativeBignum "-native-bignum")
+  ];
+
+in
+
+# C compiler, bintools and LLVM are used at build time, but will also leak into
+# the resulting GHC's settings file and used at runtime. This means that we are
+# currently only able to build GHC if hostPlatform == buildPlatform.
+assert !targetPlatform.isGhcjs -> targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
+assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
+assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
+
+stdenv.mkDerivation ({
+  pname = "${targetPrefix}ghc${variantSuffix}";
+  inherit version;
+
+  src = ghcSrc;
+
+  enableParallelBuilding = true;
+
+  patches = [
+    # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+    (if lib.versionAtLeast version "9.8"
+      then ./docs-sphinx-7-ghc98.patch
+      else ./docs-sphinx-7.patch )
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+  ];
+
+  postPatch = ''
+    patchShebangs --build .
+  '';
+
+  # GHC needs the locale configured during the Haddock phase.
+  LANG = "en_US.UTF-8";
+
+  # GHC is a bit confused on its cross terminology.
+  # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
+  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}c++"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${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="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip"
+  '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool"
+    export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool"
+  '' + lib.optionalString useLLVM ''
+    export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc"
+    export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt"
+  '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) ''
+    # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
+    export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang"
+  '' +
+  lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+    export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+
+    # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
+    export XATTR=${lib.getBin xattr}/bin/xattr
+  ''
+  # If we are not using release tarballs, some files need to be generated using
+  # the boot script.
+  + lib.optionalString (rev != null) ''
+    echo ${version} > VERSION
+    echo ${rev} > GIT_COMMIT_ID
+    ./boot
+  ''
+  + 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
+  '' + 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
+  ''
+  # Need to make writable EM_CACHE for emscripten
+  # https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend#configure-fails-with-sub-word-sized-atomic-operations-not-available
+  + lib.optionalString targetPlatform.isGhcjs ''
+    export EM_CACHE="$(mktemp -d emcache.XXXXXXXXXX)"
+    cp -Lr ${targetCC /* == emscripten */}/share/emscripten/cache/* "$EM_CACHE/"
+    chmod u+rwX -R "$EM_CACHE"
+  ''
+  # Create bash array hadrianFlagsArray for use in buildPhase. Do it in
+  # preConfigure, so overrideAttrs can be used to modify it effectively.
+  # hadrianSettings are passed via the command line so they are more visible
+  # in the build log.
+  + ''
+    hadrianFlagsArray=(
+      "-j$NIX_BUILD_CORES"
+      ${lib.escapeShellArgs hadrianSettings}
+    )
+  '';
+
+  ${if targetPlatform.isGhcjs then "configureScript" else null} = "emconfigure ./configure";
+  # GHC currently ships an edited config.sub so ghcjs is accepted which we can not rollback
+  ${if targetPlatform.isGhcjs then "dontUpdateAutotoolsGnuConfigScripts" else null} = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ 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"
+  ] ++ lib.optionals (libffi != null && !targetPlatform.isGhcjs) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ lib.optionals (disableLargeAddressSpace) [
+    "--disable-large-address-space"
+  ] ++ lib.optionals enableDwarf [
+    "--enable-dwarf-unwind"
+    "--with-libdw-includes=${lib.getDev elfutils}/include"
+    "--with-libdw-libraries=${lib.getLib elfutils}/lib"
+  ] ++ lib.optionals targetPlatform.isDarwin [
+    # Darwin uses llvm-ar. GHC will try to use `-L` with `ar` when it is `llvm-ar`
+    # but it doesn’t currently work because Cabal never uses `-L` on Darwin. See:
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/23188
+    # https://github.com/haskell/cabal/issues/8882
+    "fp_cv_prog_ar_supports_dash_l=no"
+  ];
+
+  # 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 ghc hadrian bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+    # autoconf and friends are necessary for hadrian to create the bindist
+    autoconf automake m4
+    # Python is used in a few scripts invoked by hadrian to generate e.g. rts headers.
+    python3
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals enableDocs [
+    sphinx
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  depsTargetTarget = map lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
+
+  hadrianFlags = [
+    "--flavour=${ghcFlavour}"
+    "--bignum=${if enableNativeBignum then "native" else "gmp"}"
+    "--docs=${if enableDocs then "no-sphinx-pdfs" else "no-sphinx"}"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    # hadrianFlagsArray is created in preConfigure
+    echo "hadrianFlags: $hadrianFlags ''${hadrianFlagsArray[@]}"
+
+    # We need to go via the bindist for installing
+    hadrian $hadrianFlags "''${hadrianFlagsArray[@]}" binary-dist-dir
+
+    runHook postBuild
+  '';
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable =
+    [ "format" ]
+    # In nixpkgs, musl based builds currently enable `pie` hardening by default
+    # (see `defaultHardeningFlags` in `make-derivation.nix`).
+    # But GHC cannot currently produce outputs that are ready for `-pie` linking.
+    # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
+    # See:
+    # * https://github.com/NixOS/nixpkgs/issues/129247
+    # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
+    ++ lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  # big-parallel allows us to build with more than 2 cores on
+  # Hydra which already warrants a significant speedup
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  outputs = [ "out" "doc" ];
+
+  # We need to configure the bindist *again* before installing
+  # https://gitlab.haskell.org/ghc/ghc/-/issues/22058
+  # TODO(@sternenseemann): it would be nice if the bindist could be an intermediate
+  # derivation, but since it is > 2GB even on x86_64-linux, not a good idea?
+  preInstall = ''
+    pushd _build/bindist/*
+
+  ''
+  # the bindist configure script uses different env variables than the GHC configure script
+  # see https://github.com/NixOS/nixpkgs/issues/267250 and https://gitlab.haskell.org/ghc/ghc/-/issues/24211
+  + lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
+    export InstallNameToolCmd=$INSTALL_NAME_TOOL
+    export OtoolCmd=$OTOOL
+  ''
+  + ''
+    $configureScript $configureFlags "''${configureFlagsArray[@]}"
+  '';
+
+  postInstall = ''
+    # leave bindist directory
+    popd
+
+    # Install the bash completion file.
+    install -Dm 644 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+
+    # Expose hadrian used for bootstrapping, for debugging purposes
+    inherit hadrian;
+
+    # TODO(@sternenseemann): there's no stage0:exe:haddock target by default,
+    # so haddock isn't available for GHC cross-compilers. Can we fix that?
+    hasHaddock = stdenv.hostPlatform == stdenv.targetPlatform;
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with lib.maintainers; [
+      guibou
+    ] ++ lib.teams.haskell.members;
+    timeout = 24 * 3600;
+    inherit (ghc.meta) license platforms;
+  };
+
+  dontStrip = targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm;
+} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch b/nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch
new file mode 100644
index 000000000000..3fc1a0f21561
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch
@@ -0,0 +1,8 @@
+Fix build of docs after sphinx update.
+https://github.com/sphinx-doc/sphinx/pull/11381
+https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+--- a/docs/users_guide/rtd-theme/layout.html
++++ b/docs/users_guide/rtd-theme/layout.html
+@@ -28 +28 @@
+-    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
++    <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" />
diff --git a/nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7.patch b/nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7.patch
new file mode 100644
index 000000000000..49fa45d1b9a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/docs-sphinx-7.patch
@@ -0,0 +1,8 @@
+Fix build of docs after sphinx update.
+https://github.com/sphinx-doc/sphinx/pull/11381
+https://gitlab.haskell.org/ghc/ghc/-/issues/24129
+--- a/docs/users_guide/rtd-theme/layout.html
++++ b/docs/users_guide/rtd-theme/layout.html
+@@ -67 +67 @@
+-  <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
++  <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" />
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..a6fff5feb6b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/head.nix
@@ -0,0 +1,5 @@
+import ./common-hadrian.nix {
+  version = "9.9.20231121";
+  rev = "955520c6c4f07187b6d5e4770ecf681cc78374f2";
+  sha256 = "0pv77khciv513aw64pfac5p60xn5z90rxl84dcalj6knmbhm8dqy";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/respect-ar-path.patch b/nixpkgs/pkgs/development/compilers/ghc/respect-ar-path.patch
new file mode 100644
index 000000000000..a08a802c18a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/respect-ar-path.patch
@@ -0,0 +1,25 @@
+diff -urd a/aclocal.m4 b/aclocal.m4
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1199,7 +1199,8 @@
+ # thinks that target == host so it never checks the unqualified
+ # tools for Windows. See #14274.
+ AC_DEFUN([FP_PROG_AR],
+-[if test -z "$fp_prog_ar"; then
++[AC_SUBST(fp_prog_ar,$AR)
++if test -z "$fp_prog_ar"; then
+   if test "$HostOS" = "mingw32"
+   then
+     AC_PATH_PROG([fp_prog_ar], [ar])
+diff -urd a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -10744,6 +10744,8 @@
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+ 
+ 
++fp_prog_ar=$AR
++
+ if test -z "$fp_prog_ar"; then
+   if test "$HostOS" = "mingw32"
+   then
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/8.10/common-overrides.nix b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/common-overrides.nix
new file mode 100644
index 000000000000..8b54ee2e3531
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/common-overrides.nix
@@ -0,0 +1,19 @@
+{ haskellLib, fetchpatch, buildPackages }:
+
+let inherit (haskellLib) addBuildTools appendConfigureFlag dontHaddock doJailbreak markUnbroken overrideCabal;
+in self: super: {
+  ghcjs = overrideCabal (drv: {
+    # Jailbreak and patch can be dropped after https://github.com/ghcjs/ghcjs/pull/833
+    jailbreak = true;
+    patches = drv.patches or [] ++ [
+      (fetchpatch {
+        name = "ghcjs-aeson-2.0.patch";
+        url = "https://github.com/ghcjs/ghcjs/commit/9ef1f92d740e8503d15d91699f57db147f0474cc.patch";
+        sha256 = "0cgxcy6b5870bv4kj54n3bzcqinh4gl4w4r78dg43h2mblhkzbnj";
+      })
+    ];
+  }) (super.ghcjs.overrideScope (self: super: {
+    # Allow transformers-compat >= 0.7
+    optparse-applicative = doJailbreak self.optparse-applicative_0_15_1_0;
+  }));
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/8.10/configured-ghcjs-src.nix b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/configured-ghcjs-src.nix
new file mode 100644
index 000000000000..c9e6d2f09cf7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/configured-ghcjs-src.nix
@@ -0,0 +1,67 @@
+{ perl
+, autoconf
+, automake
+, python3
+, gcc
+, cabal-install
+, runCommand
+, fetchpatch
+
+, ghc
+, happy
+, alex
+
+, ghcjsSrc
+, version
+}:
+
+runCommand "configured-ghcjs-src" {
+  nativeBuildInputs = [
+    perl
+    autoconf
+    automake
+    python3
+    ghc
+    happy
+    alex
+    cabal-install
+    gcc
+  ];
+
+  inherit ghcjsSrc;
+
+  ctimePatch = fetchpatch {
+    name = "ghcjs-base-ctime-64-bit.patch";
+    url = "https://github.com/ghcjs/ghcjs/commit/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c.patch";
+    hash = "sha256-zZ3l8/5gbIGtvu0s2Xl92fEDhkhJ2c2w+5Ql5qkvr3s=";
+  };
+} ''
+  export HOME=$(pwd)
+  mkdir $HOME/.cabal
+  touch $HOME/.cabal/config
+  cp -r "$ghcjsSrc" "$out"
+  chmod -R +w "$out"
+  cd "$out"
+
+  patch -p1 -i "$ctimePatch"
+
+  # TODO: Find a better way to avoid impure version numbers
+  sed -i 's/RELEASE=NO/RELEASE=YES/' ghc/configure.ac
+
+  # These files are needed by ghc-boot package, and these are generated by the
+  # make/hadrian build system when compiling ghc. Since we dont have access to
+  # the generated code of the ghc while it got built, here is a little hack to
+  # generate these again.
+  runhaskell ${./generate_host_version.hs}
+  mkdir -p utils/pkg-cache/ghc/libraries/ghc-boot/dist-install/build/GHC/Platform
+  mv Host.hs utils/pkg-cache/ghc/libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs
+  mv Version.hs utils/pkg-cache/ghc/libraries/ghc-boot/dist-install/build/GHC/Version.hs
+
+  # The ghcjs has the following hardcoded paths of lib dir in its code. Patching
+  # these to match the path expected by the nixpkgs's generic-builder, etc.
+  sed -i 's/libSubDir = "lib"/libSubDir = "lib\/ghcjs-${version}"/' src-bin/Boot.hs
+  sed -i 's@let libDir = takeDirectory haddockPath </> ".." </> "lib"@let libDir = takeDirectory haddockPath </> ".." </> "lib/ghcjs-${version}"@' src-bin/HaddockDriver.hs
+
+  patchShebangs .
+  ./utils/makePackages.sh copy
+''
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/8.10/default.nix b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/default.nix
new file mode 100644
index 000000000000..4363dc32c21e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/default.nix
@@ -0,0 +1,128 @@
+{ stdenv
+, pkgsHostHost
+, callPackage
+, fetchgit
+, fetchpatch
+, ghcjsSrcJson ? null
+, ghcjsSrc ? fetchgit (lib.importJSON ghcjsSrcJson)
+, bootPkgs
+, stage0
+, haskellLib
+, cabal-install
+, nodejs
+, makeWrapper
+, xorg
+, gmp
+, pkg-config
+, gcc
+, lib
+, ghcjsDepOverrides ? (_:_:{})
+, haskell
+, linkFarm
+, buildPackages
+}:
+
+let
+  passthru = {
+    configuredSrc = callPackage ./configured-ghcjs-src.nix {
+      inherit ghcjsSrc;
+      inherit (bootPkgs) ghc alex;
+      inherit (bootGhcjs) version;
+      happy = bootPkgs.happy_1_19_12;
+    };
+    bootPkgs = bootPkgs.extend (lib.foldr lib.composeExtensions (_:_:{}) [
+      (self: _: import stage0 {
+        inherit (passthru) configuredSrc;
+        inherit (self) callPackage;
+      })
+
+      (callPackage ./common-overrides.nix {
+        inherit haskellLib fetchpatch buildPackages;
+      })
+      ghcjsDepOverrides
+    ]);
+
+    targetPrefix = "";
+    inherit bootGhcjs;
+    inherit (bootGhcjs) version;
+    isGhcjs = true;
+
+    llvmPackages = null;
+    enableShared = true;
+
+    socket-io = pkgsHostHost.nodePackages."socket.io";
+
+    haskellCompilerName = "ghcjs-${bootGhcjs.version}";
+  };
+
+  bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
+
+  # This provides the stuff we need from the emsdk
+  emsdk = linkFarm "emsdk" [
+    { name = "upstream/bin"; path = buildPackages.clang + "/bin";}
+    { name = "upstream/emscripten"; path = buildPackages.emscripten + "/bin"; }
+  ];
+
+in stdenv.mkDerivation {
+    name = bootGhcjs.name;
+    src = passthru.configuredSrc;
+    nativeBuildInputs = [
+      bootGhcjs
+      passthru.bootPkgs.ghc
+      cabal-install
+      nodejs
+      makeWrapper
+      xorg.lndir
+      gmp
+      pkg-config
+    ] ++ lib.optionals stdenv.isDarwin [
+      gcc # https://github.com/ghcjs/ghcjs/issues/663
+    ];
+    dontConfigure = true;
+    dontInstall = true;
+
+    # Newer versions of `config.sub` reject the `js-ghcjs` host string, but the
+    # older `config.sub` filed vendored within `ghc` still works
+    dontUpdateAutotoolsGnuConfigScripts = 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 ${bootGhcjs}/bin $out/bin
+      chmod -R +w $out/bin
+      rm $out/bin/ghcjs-boot
+      cp ${bootGhcjs}/bin/ghcjs-boot $out/bin
+      rm $out/bin/haddock
+      cp ${bootGhcjs}/bin/haddock $out/bin
+      cp ${bootGhcjs}/bin/private-ghcjs-hsc2hs $out/bin/ghcjs-hsc2hs
+
+      wrapProgram $out/bin/ghcjs-boot --set ghcjs_libexecdir $out/bin
+
+      wrapProgram $out/bin/ghcjs --add-flags "-B$out/lib/${bootGhcjs.name}"
+      wrapProgram $out/bin/haddock --add-flags "-B$out/lib/${bootGhcjs.name}"
+      wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/lib/${bootGhcjs.name}/package.conf.d"
+      wrapProgram $out/bin/ghcjs-hsc2hs --add-flags "-I$out/lib/${bootGhcjs.name}/include --template=$out/lib/${bootGhcjs.name}/include/template-hsc.h"
+
+      env PATH=$out/bin:$PATH $out/bin/ghcjs-boot --with-emsdk=${emsdk} --no-haddock
+    '';
+
+    enableParallelBuilding = true;
+
+    inherit passthru;
+
+    meta = {
+      platforms = with lib.platforms; linux ++ darwin;
+
+      # Hydra limits jobs to only outputting 1 gigabyte worth of files.
+      # GHCJS outputs over 3 gigabytes.
+      # https://github.com/NixOS/nixpkgs/pull/137066#issuecomment-922335563
+      hydraPlatforms = lib.platforms.none;
+
+      maintainers = with lib.maintainers; [ obsidian-systems-maintenance ];
+    };
+  }
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/8.10/generate_host_version.hs b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/generate_host_version.hs
new file mode 100644
index 000000000000..8bf2583d238c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/generate_host_version.hs
@@ -0,0 +1,54 @@
+-- Generate the Host.hs and Version.hs as done by hadrian/src/Rules/Generate.hs
+
+import GHC.Platform.Host
+import GHC.Version
+
+main = do
+  writeFile "Version.hs" versionHs
+  writeFile "Host.hs" platformHostHs
+
+-- | Generate @Version.hs@ files.
+versionHs :: String
+versionHs = unlines
+        [ "module GHC.Version where"
+        , ""
+        , "import Prelude -- See Note [Why do we import Prelude here?]"
+        , ""
+        , "cProjectGitCommitId   :: String"
+        , "cProjectGitCommitId   = " ++ show cProjectGitCommitId
+        , ""
+        , "cProjectVersion       :: String"
+        , "cProjectVersion       = " ++ show cProjectVersion
+        , ""
+        , "cProjectVersionInt    :: String"
+        , "cProjectVersionInt    = " ++ show cProjectVersionInt
+        , ""
+        , "cProjectPatchLevel    :: String"
+        , "cProjectPatchLevel    = " ++ show cProjectPatchLevel
+        , ""
+        , "cProjectPatchLevel1   :: String"
+        , "cProjectPatchLevel1   = " ++ show cProjectPatchLevel1
+        , ""
+        , "cProjectPatchLevel2   :: String"
+        , "cProjectPatchLevel2   = " ++ show cProjectPatchLevel2
+        ]
+
+-- | Generate @Platform/Host.hs@ files.
+platformHostHs :: String
+platformHostHs = unlines
+        [ "module GHC.Platform.Host where"
+        , ""
+        , "import GHC.Platform"
+        , ""
+        , "cHostPlatformArch :: Arch"
+        , "cHostPlatformArch = " ++ show cHostPlatformArch
+        , ""
+        , "cHostPlatformOS   :: OS"
+        , "cHostPlatformOS   = " ++ show cHostPlatformOS
+        , ""
+        , "cHostPlatformMini :: PlatformMini"
+        , "cHostPlatformMini = PlatformMini"
+        , "  { platformMini_arch = cHostPlatformArch"
+        , "  , platformMini_os = cHostPlatformOS"
+        , "  }"
+        ]
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/8.10/git.json b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/git.json
new file mode 100644
index 000000000000..18804d84acb1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/git.json
@@ -0,0 +1,6 @@
+{
+  "url": "https://github.com/obsidiansystems/ghcjs",
+  "rev": "9fc935f2c3ba6c33ec62eb83afc9f52a893eb68c",
+  "sha256": "sha256:063dmir39c4i1z8ypnmq86g1x2vhqndmdpzc4hyzsy5jjqcbx6i3",
+  "fetchSubmodules": true
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/8.10/stage0.nix b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/stage0.nix
new file mode 100644
index 000000000000..d173d5a2e557
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/8.10/stage0.nix
@@ -0,0 +1,77 @@
+{ callPackage, configuredSrc }:
+
+{
+
+  ghcjs = callPackage
+    ({ mkDerivation, aeson, alex, array, attoparsec, base, base16-bytestring
+     , base64-bytestring, binary, bytestring, Cabal, containers
+     , cryptohash, data-default, deepseq, directory, executable-path
+     , filepath, ghc-boot, ghc-boot-th, ghc-compact, ghc-heap, ghc-paths
+     , ghci, happy, hashable, hpc, http-types, HUnit, lens, lib
+     , lifted-base, mtl, network, optparse-applicative, parallel, parsec
+     , process, random, safe, shelly, split, stringsearch, syb, tar
+     , template-haskell, terminfo, test-framework, test-framework-hunit
+     , text, time, transformers, unix, unix-compat, unordered-containers
+     , vector, wai, wai-app-static, wai-extra, wai-websockets, warp
+     , webdriver, websockets, wl-pprint-text, xhtml, yaml
+     }:
+     mkDerivation {
+       pname = "ghcjs";
+       version = "8.10.7";
+       src = configuredSrc + /.;
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         aeson array attoparsec base base16-bytestring base64-bytestring
+         binary bytestring Cabal containers cryptohash data-default deepseq
+         directory filepath ghc-boot ghc-boot-th ghc-compact ghc-heap
+         ghc-paths ghci hashable hpc lens mtl optparse-applicative parallel
+         parsec process safe split stringsearch syb template-haskell
+         terminfo text time transformers unix unordered-containers vector
+         wl-pprint-text yaml
+       ];
+       libraryToolDepends = [ alex happy ];
+       executableHaskellDepends = [
+         aeson array base binary bytestring Cabal containers deepseq
+         directory executable-path filepath ghc-boot lens mtl
+         optparse-applicative parsec process tar terminfo text time
+         transformers unix unix-compat unordered-containers vector xhtml
+         yaml
+       ];
+       testHaskellDepends = [
+         aeson base bytestring data-default deepseq directory filepath
+         http-types HUnit lens lifted-base network optparse-applicative
+         process random shelly 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 = lib.licenses.mit;
+     }) {};
+
+  ghcjs-th = callPackage
+    ({ mkDerivation, base, binary, bytestring, containers, ghc-prim
+    , ghci, lib, template-haskell
+    }:
+    mkDerivation {
+      pname = "ghcjs-th";
+      version = "0.1.0.0";
+      src = configuredSrc + /lib/ghcjs-th;
+      libraryHaskellDepends = [
+        base binary bytestring containers ghc-prim ghci template-haskell
+      ];
+      homepage = "https://github.com/ghcjs";
+      license = lib.licenses.mit;
+    }) {};
+
+  ghcjs-prim = callPackage
+    ({ mkDerivation, base, ghc-prim, lib }:
+    mkDerivation {
+      pname = "ghcjs-prim";
+      version = "0.1.1.0";
+      src = ./.;
+      libraryHaskellDepends = [ base ghc-prim ];
+      homepage = "https://github.com/ghcjs";
+      license = lib.licenses.mit;
+    }) {};
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs/ghcjs-base.nix b/nixpkgs/pkgs/development/compilers/ghcjs/ghcjs-base.nix
new file mode 100644
index 000000000000..9c09412b027e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs/ghcjs-base.nix
@@ -0,0 +1,33 @@
+{ mkDerivation, aeson, array, attoparsec, base, binary, bytestring
+, containers, deepseq, directory, dlist, fetchFromGitHub, ghc-prim
+, ghcjs-prim, hashable, HUnit, integer-gmp, primitive, QuickCheck
+, quickcheck-unicode, random, scientific, test-framework
+, test-framework-hunit, test-framework-quickcheck2, text, time
+, transformers, unordered-containers, vector
+, lib
+}:
+mkDerivation {
+  pname = "ghcjs-base";
+  version = "0.2.1.0";
+  # This is the release 0.2.1.0, but the hackage release misses test source files,
+  # so lets use github https://github.com/ghcjs/ghcjs-base/issues/132
+  src = fetchFromGitHub {
+    owner = "ghcjs";
+    repo = "ghcjs-base";
+    rev = "fbaae59b05b020e91783df122249095e168df53f";
+    sha256 = "sha256-x6eCAK1Hne0QkV3Loi9YpxbleNHU593E4AO8cbk2vUc=";
+  };
+  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 = lib.licenses.mit;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/default.nix b/nixpkgs/pkgs/development/compilers/ghdl/default.nix
new file mode 100644
index 000000000000..e00294cf1845
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghdl/default.nix
@@ -0,0 +1,72 @@
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, callPackage
+, gnat
+, zlib
+, llvm
+, lib
+, backend ? "mcode"
+}:
+
+assert backend == "mcode" || backend == "llvm";
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "ghdl-${backend}";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner  = "ghdl";
+    repo   = "ghdl";
+    rev    = "v${finalAttrs.version}";
+    hash   = "sha256-94RNtHbOpbC2q/Z+PsQplrLxXmpS3LXOCXyTBB+n9c4=";
+  };
+
+  LIBRARY_PATH = "${stdenv.cc.libc}/lib";
+
+  nativeBuildInputs = [
+    gnat
+  ];
+  buildInputs = [
+    zlib
+  ] ++ lib.optionals (backend == "llvm") [
+    llvm
+  ];
+  propagatedBuildInputs = [
+  ] ++ lib.optionals (backend == "llvm") [
+    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 = [
+    # See https://github.com/ghdl/ghdl/pull/2058
+    "--disable-werror"
+    "--enable-synth"
+  ] ++ lib.optionals (backend == "llvm") [
+    "--with-llvm-config=${llvm.dev}/bin/llvm-config"
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    # run with either of
+    # nix-build -A ghdl-mcode.passthru.tests
+    # nix-build -A ghdl-llvm.passthru.tests
+    tests = {
+      simple = callPackage ./test-simple.nix { inherit backend; };
+    };
+  };
+
+  meta = {
+    homepage = "https://github.com/ghdl/ghdl";
+    description = "VHDL 2008/93/87 simulator";
+    license = lib.licenses.gpl2Plus;
+    mainProgram = "ghdl";
+    maintainers = with lib.maintainers; [ eclairevoyant lucus16 thoughtpolice ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/expected-output.txt b/nixpkgs/pkgs/development/compilers/ghdl/expected-output.txt
new file mode 100644
index 000000000000..0396b0c2787b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghdl/expected-output.txt
@@ -0,0 +1,8 @@
+simple-tb.vhd:71:5:@700ms:(report note): 32
+simple-tb.vhd:71:5:@900ms:(report note): 78
+simple-tb.vhd:71:5:@1100ms:(report note): 105
+simple-tb.vhd:71:5:@1300ms:(report note): 120
+simple-tb.vhd:71:5:@1500ms:(report note): 79
+simple-tb.vhd:71:5:@1700ms:(report note): 83
+simple-tb.vhd:71:5:@1900ms:(report note): 32
+simple-tb.vhd:75:1:@2100ms:(report note): All tests passed.
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/simple-tb.vhd b/nixpkgs/pkgs/development/compilers/ghdl/simple-tb.vhd
new file mode 100644
index 000000000000..65e4d0967c52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghdl/simple-tb.vhd
@@ -0,0 +1,78 @@
+library ieee;
+use IEEE.STD_LOGIC_1164.all;
+use ieee.numeric_std.all;
+
+library STD;
+use STD.textio.all;
+
+entity tb is
+end tb;
+
+architecture beh of tb is
+
+component simple
+port (
+    CLK, RESET : in std_ulogic;
+    DATA_OUT : out std_ulogic_vector(7 downto 0);
+    DONE_OUT : out std_ulogic
+);
+end component;
+
+signal data : std_ulogic_vector(7 downto 0) := "00100000";
+signal clk : std_ulogic;
+signal RESET : std_ulogic := '0';
+signal done : std_ulogic := '0';
+signal cyclecount : integer := 0;
+
+constant cycle_time_c : time := 200 ms;
+constant maxcycles : integer := 100;
+
+begin
+
+simple1 : simple
+port map (
+    CLK => clk,
+    RESET => RESET,
+    DATA_OUT => data,
+    DONE_OUT => done
+);
+
+clk_process : process
+begin
+    clk <= '0';
+    wait for cycle_time_c/2;
+    clk <= '1';
+    wait for cycle_time_c/2;
+end process;
+
+count_process : process(CLK)
+begin
+    if (CLK'event and CLK ='1') then
+    if (RESET = '1') then
+        cyclecount <= 0;
+    else
+        cyclecount <= cyclecount + 1;
+    end if;
+    end if;
+end process;
+
+test : process
+
+begin
+
+RESET <= '1';
+wait until (clk'event and clk='1');
+wait until (clk'event and clk='1');
+RESET <= '0';
+wait until (clk'event and clk='1');
+for cyclecnt in 1 to maxcycles loop
+    exit when done = '1';
+    wait until (clk'event and clk='1');
+    report integer'image(to_integer(unsigned(data)));
+end loop;
+wait until (clk'event and clk='1');
+
+report "All tests passed." severity NOTE;
+wait;
+end process;
+end beh;
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/simple.vhd b/nixpkgs/pkgs/development/compilers/ghdl/simple.vhd
new file mode 100644
index 000000000000..f10cf73d067c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghdl/simple.vhd
@@ -0,0 +1,45 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.all;
+use IEEE.NUMERIC_STD.ALL;
+use IEEE.STD_LOGIC_MISC.or_reduce;
+
+entity simple is
+
+port (
+    CLK, RESET : in std_ulogic;
+    DATA_OUT : out std_ulogic_vector(7 downto 0);
+    DONE_OUT : out std_ulogic
+);
+end simple;
+
+architecture beh of simple is
+
+signal data : std_ulogic_vector(7 downto 0);
+signal done: std_ulogic;
+
+begin
+
+proc_ctr : process(CLK)
+begin
+if (CLK = '1' and CLK'event) then
+    if (RESET = '1') then
+        data <= "01011111";
+        done <= '0';
+    else
+    case data is
+        when "00100000" =>  data <= "01001110";
+        when "01001110" =>  data <= "01101001";
+        when "01101001" =>  data <= "01111000";
+        when "01111000" =>  data <= "01001111";
+        when "01001111" =>  data <= "01010011";
+        when others =>  data <= "00100000";
+    end case;
+    done <= not or_reduce(data xor "01010011");
+    end if;
+end if;
+end process;
+
+DATA_OUT <= data;
+DONE_OUT <= done;
+
+end beh;
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/test-simple.nix b/nixpkgs/pkgs/development/compilers/ghdl/test-simple.nix
new file mode 100644
index 000000000000..8d3c3d3095f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghdl/test-simple.nix
@@ -0,0 +1,23 @@
+{ stdenv, ghdl-llvm, ghdl-mcode, backend }:
+
+let
+  ghdl = if backend == "llvm" then ghdl-llvm else ghdl-mcode;
+in
+stdenv.mkDerivation {
+  name = "ghdl-test-simple";
+  meta.timeout = 300;
+  nativeBuildInputs = [ ghdl ];
+  buildCommand = ''
+    cp ${./simple.vhd} simple.vhd
+    cp ${./simple-tb.vhd} simple-tb.vhd
+    mkdir -p ghdlwork
+    ghdl -a --workdir=ghdlwork --ieee=synopsys simple.vhd simple-tb.vhd
+    ghdl -e --workdir=ghdlwork --ieee=synopsys -o sim-simple tb
+  '' + (if backend == "llvm" then ''
+    ./sim-simple --assert-level=warning > output.txt
+  '' else ''
+    ghdl -r --workdir=ghdlwork --ieee=synopsys tb > output.txt
+  '') + ''
+    diff output.txt ${./expected-output.txt} && touch $out
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/gleam/default.nix b/nixpkgs/pkgs/development/compilers/gleam/default.nix
new file mode 100644
index 000000000000..8571950fef3a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gleam/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitHub
+, git
+, pkg-config
+, openssl
+, Security
+, nix-update-script
+, SystemConfiguration
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "gleam";
+  version = "0.34.0";
+
+  src = fetchFromGitHub {
+    owner = "gleam-lang";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-cqJNNSN3x2tr6/i7kXAlvIaU9SfyPWBE4c6twc/p1lY=";
+  };
+
+  nativeBuildInputs = [ git pkg-config ];
+
+  buildInputs = [ openssl ] ++
+    lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
+
+  cargoHash = "sha256-mCMfVYbpUik8oc7TLLAXPBmBUchy+quAZLmd9pqCZ7Y=";
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "A statically typed language for the Erlang VM";
+    homepage = "https://gleam.run/";
+    license = licenses.asl20;
+    maintainers = teams.beam.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/glslang/default.nix b/nixpkgs/pkgs/development/compilers/glslang/default.nix
new file mode 100644
index 000000000000..5387eb15b713
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/glslang/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv
+, fetchFromGitHub
+, bison
+, cmake
+, jq
+, python3
+, spirv-headers
+, spirv-tools
+}:
+stdenv.mkDerivation rec {
+  pname = "glslang";
+  version = "14.0.0";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "glslang";
+    rev = version;
+    hash = "sha256-7kIIU45pe+IF7lGltpIKSvQBmcXR+TWFvmx7ztMNrpc=";
+  };
+
+  # These get set at all-packages, keep onto them for child drvs
+  passthru = {
+    spirv-tools = spirv-tools;
+    spirv-headers = spirv-headers;
+  };
+
+  nativeBuildInputs = [ cmake python3 bison jq ];
+
+  postPatch = ''
+    cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
+    ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
+  '';
+
+  # This is a dirty fix for lib/cmake/SPIRVTargets.cmake:51 which includes this directory
+  postInstall = ''
+    mkdir $out/include/External
+  '';
+
+  # Fix the paths in .pc, even though it's unclear if these .pc are really useful.
+  postFixup = ''
+    substituteInPlace $out/lib/pkgconfig/*.pc \
+      --replace '=''${prefix}//' '=/'
+
+    # add a symlink for backwards compatibility
+    ln -s $out/bin/glslang $out/bin/glslangValidator
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Khronos reference front-end for GLSL and ESSL";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.ralith ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gmqcc/default.nix b/nixpkgs/pkgs/development/compilers/gmqcc/default.nix
new file mode 100644
index 000000000000..f3b25e2dbd4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gmqcc/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, pkgs
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gmqcc";
+  version = "unstable-2021-07-09";
+
+  src = fetchFromGitHub {
+    owner = "graphitemaster";
+    repo = "gmqcc";
+    rev = "297eab9e5e2c9cc4f41201b68821593a5cf9a725";
+    sha256 = "1hl2qn7402ia03kjkblj4q4wfypxkil99sivsyk2vrnwwpdp4nzx";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    install -m755 gmqcc $out/bin
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://graphitemaster.github.io/gmqcc/";
+    description = "A modern QuakeC compiler";
+    longDescription = ''
+      For an enduring period of time the options for a decent compiler for
+      the Quake C programming language were confined to a specific compiler
+      known as QCC. Attempts were made to extend and improve upon the design
+      of QCC, but many foreseen the consequences of building on a broken
+      foundation. The solution was obvious, a new compiler; one born from
+      the NIH realm of sarcastic wit.
+      We welcome you. You won't find a better Quake C compiler.
+    '';
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ necrophcodr ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gnat-bootstrap/default.nix b/nixpkgs/pkgs/development/compilers/gnat-bootstrap/default.nix
new file mode 100644
index 000000000000..162518adb56b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnat-bootstrap/default.nix
@@ -0,0 +1,149 @@
+{ stdenv, lib, autoPatchelfHook, fetchzip, xz, ncurses5, readline, gmp, mpfr
+, expat, libipt, zlib, dejagnu, sourceHighlight, python3, elfutils, guile, glibc
+, majorVersion
+}:
+
+let
+  throwUnsupportedSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
+in
+stdenv.mkDerivation(finalAttrs:
+  let versionMap =
+    let url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-${finalAttrs.version}/gnat-${stdenv.hostPlatform.system}-${finalAttrs.version}.tar.gz";
+    in {
+    "11" = {
+      gccVersion = "11.2.0";
+      alireRevision = "4";
+    } // {
+      x86_64-darwin = {
+        inherit url;
+        hash = "sha256-FmBgD20PPQlX/ddhJliCTb/PRmKxe9z7TFPa2/SK4GY=";
+        upstreamTriplet = "x86_64-apple-darwin19.6.0";
+      };
+      x86_64-linux = {
+        inherit url;
+        hash = "sha256-8fMBJp6igH+Md5jE4LMubDmC4GLt4A+bZG/Xcz2LAJQ=";
+        upstreamTriplet = "x86_64-pc-linux-gnu";
+      };
+    }.${stdenv.hostPlatform.system} or throwUnsupportedSystem;
+    "12" = {
+      gccVersion = "12.1.0";
+      alireRevision = "2";
+    } // {
+      x86_64-darwin = {
+        inherit url;
+        hash = "sha256-zrcVFvFZMlGUtkG0p1wST6kGInRI64Icdsvkcf25yVs=";
+        upstreamTriplet = "x86_64-apple-darwin19.6.0";
+      };
+      x86_64-linux = {
+        inherit url;
+        hash = "sha256-EPDPOOjWJnJsUM7GGxj20/PXumjfLoMIEFX1EDtvWVY=";
+        upstreamTriplet = "x86_64-pc-linux-gnu";
+      };
+    }.${stdenv.hostPlatform.system} or throwUnsupportedSystem;
+  };
+  inherit (versionMap.${majorVersion}) gccVersion alireRevision upstreamTriplet;
+in {
+  pname = "gnat-bootstrap";
+  inherit (versionMap.${majorVersion}) gccVersion alireRevision;
+
+  version = "${gccVersion}${lib.optionalString (alireRevision!="") "-"}${alireRevision}";
+
+  src = fetchzip {
+    inherit (versionMap.${majorVersion}) url hash;
+  };
+
+  nativeBuildInputs = [
+    dejagnu
+    expat
+    gmp
+    guile
+    libipt
+    mpfr
+    ncurses5
+    python3
+    readline
+    sourceHighlight
+    xz
+    zlib
+  ] ++ lib.optionals stdenv.buildPlatform.isLinux [
+    autoPatchelfHook
+    elfutils
+    glibc
+  ];
+
+  postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
+    substituteInPlace lib/gcc/${upstreamTriplet}/${gccVersion}/install-tools/mkheaders.conf \
+      --replace "SYSTEM_HEADER_DIR=\"/usr/include\"" "SYSTEM_HEADER_DIR=\"/include\""
+  ''
+  # The included fixincl binary that is called during header fixup has a
+  # hardcoded execvp("/usr/bin/sed", ...) call, but /usr/bin/sed isn't
+  # available in the Nix Darwin stdenv.  Fortunately, execvp() will search the
+  # PATH environment variable for the executable if its first argument does not
+  # contain a slash, so we can just change the string to "sed" and zero the
+  # other bytes.
+  + ''
+     sed -i "s,/usr/bin/sed,sed\x00\x00\x00\x00\x00\x00\x00\x00\x00," libexec/gcc/${upstreamTriplet}/${gccVersion}/install-tools/fixincl
+  '';
+
+  installPhase = ''
+    mkdir -p $out
+    cp -ar * $out/
+  ''
+
+  # So far with the Darwin gnat-bootstrap binary packages, there have been two
+  # types of dylib path references to other dylibs that need fixups:
+  #
+  # 1.  Dylibs in $out/lib with paths starting with
+  #     /Users/runner/.../gcc/install that refer to other dylibs in $out/lib
+  # 2.  Dylibs in $out/lib/gcc/*/*/adalib with paths starting with
+  #     @rpath that refer to other dylibs in $out/lib/gcc/*/*/adalib
+  #
+  # Additionally, per Section 14.4 Fixed Headers in the GCC 12.2.0 manual [2],
+  # we have to update the fixed header files in current Alire GCC package, since it
+  # was built against macOS 10.15 (Darwin 19.6.0), but Nix currently
+  # builds against macOS 10.12, and the two header file structures differ.
+  # For example, the current Alire GCC package has a fixed <stdio.h>
+  # from macOS 10.15 that contains a #include <_stdio.h>, but neither the Alire
+  # GCC package nor macOS 10.12 have such a header (<xlocale/_stdio.h> and
+  # <secure/_stdio.h> in 10.12 are not equivalent; indeed, 10.15 <_stdio.h>
+  # says it contains code shared by <stdio.h> and <xlocale/_stdio.h>).
+  #
+  # [2]: https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Fixed-Headers.html
+
+  + lib.optionalString (stdenv.hostPlatform.isDarwin) ''
+    upstreamBuildPrefix="/Users/runner/work/GNAT-FSF-builds/GNAT-FSF-builds/sbx/x86_64-darwin/gcc/install"
+    for i in "$out"/lib/*.dylib "$out"/lib/gcc/*/*/adalib/*.dylib; do
+      if [[ -f "$i" && ! -h "$i" ]]; then
+        install_name_tool -id "$i" "$i" || true
+        for old_path in $(otool -L "$i" | grep "$upstreamBuildPrefix" | awk '{print $1}'); do
+          new_path=`echo "$old_path" | sed "s,$upstreamBuildPrefix,$out,"`
+          install_name_tool -change "$old_path" "$new_path" "$i" || true
+        done
+        for old_path in $(otool -L "$i" | grep "@rpath" | awk '{print $1}'); do
+          new_path=$(echo "$old_path" | sed "s,@rpath,$(dirname "$i"),")
+          install_name_tool -change "$old_path" "$new_path" "$i" || true
+        done
+      fi
+    done
+
+    "$out"/libexec/gcc/${upstreamTriplet}/${gccVersion}/install-tools/mkheaders -v -v \
+      "$out" "${stdenv.cc.libc}"
+  '';
+
+  passthru = {
+    langC = true; # TRICK for gcc-wrapper to wrap it
+    langCC = false;
+    langFortran = false;
+    langAda = true;
+    isGNU = true;
+  };
+
+  meta = with lib; {
+    description = "GNAT, the GNU Ada Translator";
+    homepage = "https://www.gnu.org/software/gnat";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ethindp ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/gnostic/default.nix b/nixpkgs/pkgs/development/compilers/gnostic/default.nix
new file mode 100644
index 000000000000..082cf4da2af9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnostic/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "gnostic";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-Wpe+rK4XMfMZYhR1xTEr0nsEjRGkSDA7aiLeBbGcRpA=";
+  };
+
+  vendorHash = "sha256-Wyv5czvD3IwE236vlAdq8I/DnhPXxdbwZtUhun+97x4=";
+
+  # some tests are broken and others require network access
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://github.com/google/gnostic";
+    description = "A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks";
+    changelog = "https://github.com/google/gnostic/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ urandom ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix b/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix
new file mode 100644
index 000000000000..b1cb9f08597e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnu-cim";
+  version = "5.1";
+
+  outputs = ["out" "lib" "man" "info"];
+
+  src = fetchurl {
+    url = "mirror://gnu/cim/cim-${version}.tar.gz";
+    hash = "sha256-uQcXtm7EAFA73WnlN+i38+ip0QbDupoIoErlc2mgaak=";
+  };
+
+  postPatch = ''
+    for fname in lib/{simulation,simset}.c; do
+      substituteInPlace "$fname" \
+        --replace \
+          '#include "../../lib/cim.h"' \
+          '#include "../lib/cim.h"'
+    done
+  '';
+
+  CFLAGS = lib.optionalString stdenv.cc.isClang "-Wno-return-type";
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A GNU compiler for the programming language Simula";
+    longDescription = ''
+      GNU Cim is a compiler for the programming language Simula.
+      It offers a class concept, separate compilation with full type checking,
+      interface to external C routines, an application package for process
+      simulation and a coroutine concept. Commonly used with the Demos for
+      discrete event modelling.
+    '';
+    homepage = "https://www.gnu.org/software/cim/";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    badPlatforms = [ "aarch64-darwin" ];
+    maintainers = with maintainers; [ pbsds ];
+  };
+}
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..e3233b059dd2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnu-cobol/default.nix
@@ -0,0 +1,102 @@
+{ lib
+, stdenv
+, fetchurl
+, autoconf269
+, automake
+, libtool
+# libs
+, cjson
+, db
+, gmp
+, libxml2
+, ncurses
+# docs
+, help2man
+, texinfo
+, texliveBasic
+# test
+, writeText
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnu-cobol";
+  version = "3.1.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gnucobol/${lib.versions.majorMinor version}/gnucobol-${version}.tar.xz";
+    sha256 = "0x15ybfm63g7c9340fc6712h9v59spnbyaz4rf85pmnp3zbhaw2r";
+  };
+
+  nativeBuildInputs = [
+    autoconf269
+    automake
+    libtool
+    help2man
+    texinfo
+    texliveBasic
+  ];
+
+  buildInputs = [
+    cjson
+    db
+    gmp
+    libxml2
+    ncurses
+  ];
+
+  outputs = [ "bin" "dev" "lib" "out" ];
+  # XXX: Without this, we get a cycle between bin and dev
+  propagatedBuildOutputs = [];
+
+  # Skips a broken test
+  postPatch = ''
+    sed -i '/^AT_CHECK.*crud\.cob/i AT_SKIP_IF([true])' tests/testsuite.src/listings.at
+  '';
+
+  preConfigure = ''
+    autoconf
+    aclocal
+    automake
+  '';
+
+  enableParallelBuilding = true;
+
+  installFlags = [ "install-pdf" "install-html" "localedir=$out/share/locale" ];
+
+  # Tests must run after install.
+  doCheck = false;
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    # Run tests
+    make -j$NIX_BUILD_CORES check
+
+    # Sanity check
+    message="Hello, COBOL!"
+    # XXX: Don't for a second think you can just get rid of these spaces, they
+    # are load bearing.
+    tee hello.cbl <<EOF
+           IDENTIFICATION DIVISION.
+           PROGRAM-ID. HELLO.
+
+           PROCEDURE DIVISION.
+           DISPLAY "$message".
+           STOP RUN.
+    EOF
+    $bin/bin/cobc -x -o hello-cobol "hello.cbl"
+    hello="$(./hello-cobol | tee >(cat >&2))"
+    [[ "$hello" == "$message" ]] || exit 1
+
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    description = "An open-source COBOL compiler";
+    homepage = "https://sourceforge.net/projects/gnucobol/";
+    license = with licenses; [ gpl3Only lgpl3Only ];
+    maintainers = with maintainers; [ ericsagnes lovesegfault ];
+    platforms = platforms.all;
+  };
+}
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..1caf96c715cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnu-smalltalk/default.nix
@@ -0,0 +1,60 @@
+{ config, lib, stdenv, fetchurl, pkg-config, libtool
+, zip, libffi, libsigsegv, readline, gmp
+, gnutls, gtk2, 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 = 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 = [ pkg-config ];
+  buildInputs = [
+    libtool zip libffi libsigsegv-shared readline gmp gnutls gtk2
+    cairo SDL sqlite
+  ]
+  ++ lib.optional emacsSupport emacs;
+
+  configureFlags = lib.optional (!emacsSupport) "--without-emacs";
+
+  hardeningDisable = [ "format" ];
+
+  installFlags = 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 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; [ AndersonTorres ];
+  };
+}
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..909e15c9e555
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go-jsonnet/default.nix
@@ -0,0 +1,30 @@
+{ lib, buildGoModule, fetchFromGitHub, testers, go-jsonnet }:
+
+buildGoModule rec {
+  pname = "go-jsonnet";
+  version = "0.20.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-P69tguBrFF/CSCOfHjCfBT5710oJdhZDh3kMCbc32eE=";
+  };
+
+  vendorHash = "sha256-j1fTOUpLx34TgzW94A/BctLrg9XoTtb3cBizhVJoEEI=";
+
+  subPackages = [ "cmd/jsonnet*" ];
+
+  passthru.tests.version = testers.testVersion {
+    package = go-jsonnet;
+    version = "v${version}";
+  };
+
+  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 aaronjheng ];
+    mainProgram = "jsonnet";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/1.20.nix b/nixpkgs/pkgs/development/compilers/go/1.20.nix
new file mode 100644
index 000000000000..5b3cbdd4cc81
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/1.20.nix
@@ -0,0 +1,189 @@
+{ lib
+, stdenv
+, fetchurl
+, tzdata
+, substituteAll
+, iana-etc
+, Security
+, Foundation
+, xcbuild
+, mailcap
+, buildPackages
+, pkgsBuildTarget
+, threadsCross
+, testers
+, skopeo
+, buildGo120Module
+}:
+
+let
+  useGccGoBootstrap = stdenv.buildPlatform.isMusl || stdenv.buildPlatform.isRiscV;
+  goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap117.nix { };
+
+  skopeoTest = skopeo.override { buildGoModule = buildGo120Module; };
+
+  goarch = platform: {
+    "aarch64" = "arm64";
+    "arm" = "arm";
+    "armv5tel" = "arm";
+    "armv6l" = "arm";
+    "armv7l" = "arm";
+    "i686" = "386";
+    "mips" = "mips";
+    "mips64el" = "mips64le";
+    "mipsel" = "mipsle";
+    "powerpc64le" = "ppc64le";
+    "riscv64" = "riscv64";
+    "s390x" = "s390x";
+    "x86_64" = "amd64";
+  }.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
+
+  # We need a target compiler which is still runnable at build time,
+  # to handle the cross-building case where build != host == target
+  targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
+
+  isCross = stdenv.buildPlatform != stdenv.targetPlatform;
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "go";
+  version = "1.20.14";
+
+  src = fetchurl {
+    url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
+    hash = "sha256-Gu8yGg4+OLfpHS1+tkBAZmyr3Md9OD3jyVItDWm2f04=";
+  };
+
+  strictDeps = true;
+  buildInputs = [ ]
+    ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
+    ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
+
+  depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ];
+
+  depsBuildTarget = lib.optional isCross targetCC;
+
+  depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross.package;
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  patches = [
+    (substituteAll {
+      src = ./iana-etc-1.17.patch;
+      iana = iana-etc;
+    })
+    # Patch the mimetype database location which is missing on NixOS.
+    # but also allow static binaries built with NixOS to run outside nix
+    (substituteAll {
+      src = ./mailcap-1.17.patch;
+      inherit mailcap;
+    })
+    # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+    # that run outside a nix server
+    (substituteAll {
+      src = ./tzdata-1.19.patch;
+      inherit tzdata;
+    })
+    ./remove-tools-1.11.patch
+    ./go_no_vendor_checks-1.16.patch
+  ];
+
+  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 isCross then
+      "${targetCC}/bin/${targetCC.targetPrefix}cc"
+    else
+      null;
+  CXX_FOR_TARGET =
+    if isCross then
+      "${targetCC}/bin/${targetCC.targetPrefix}c++"
+    else
+      null;
+
+  GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
+  GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 1;
+
+  GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
+
+  buildPhase = ''
+    runHook preBuild
+    export GOCACHE=$TMPDIR/go-cache
+    # this is compiled into the binary
+    export GOROOT_FINAL=$out/share/go
+
+    export PATH=$(pwd)/bin:$PATH
+
+    ${lib.optionalString isCross ''
+    # Independent from host/target, CC should produce code for the building system.
+    # We only set it when cross-compiling.
+    export CC=${buildPackages.stdenv.cc}/bin/cc
+    ''}
+    ulimit -a
+
+    pushd src
+    ./make.bash
+    popd
+    runHook postBuild
+  '';
+
+  preInstall = ''
+    # 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.system != stdenv.hostPlatform.system) then ''
+    mv bin/*_*/* bin
+    rmdir bin/*_*
+    ${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
+      rm -rf pkg/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH} pkg/tool/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH}
+    ''}
+  '' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) ''
+    rm -rf bin/*_*
+    ${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
+      rm -rf pkg/${finalAttrs.GOOS}_${finalAttrs.GOARCH} pkg/tool/${finalAttrs.GOOS}_${finalAttrs.GOARCH}
+    ''}
+  '');
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $GOROOT_FINAL
+    cp -a bin pkg src lib misc api doc $GOROOT_FINAL
+    mkdir -p $out/bin
+    ln -s $GOROOT_FINAL/bin/* $out/bin
+    runHook postInstall
+  '';
+
+  disallowedReferences = [ goBootstrap ];
+
+  passthru = {
+    inherit goBootstrap skopeoTest;
+    tests = {
+      skopeo = testers.testVersion { package = skopeoTest; };
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+        command = "go version";
+        version = "go${finalAttrs.version}";
+      };
+    };
+  };
+
+  meta = with lib; {
+    changelog = "https://go.dev/doc/devel/release#go${lib.versions.majorMinor finalAttrs.version}";
+    description = "The Go Programming language";
+    homepage = "https://go.dev/";
+    license = licenses.bsd3;
+    maintainers = teams.golang.members;
+    platforms = platforms.darwin ++ platforms.linux;
+    mainProgram = "go";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/go/1.21.nix b/nixpkgs/pkgs/development/compilers/go/1.21.nix
new file mode 100644
index 000000000000..06391b1740a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/1.21.nix
@@ -0,0 +1,189 @@
+{ lib
+, stdenv
+, fetchurl
+, tzdata
+, substituteAll
+, iana-etc
+, Security
+, Foundation
+, xcbuild
+, mailcap
+, buildPackages
+, pkgsBuildTarget
+, threadsCross
+, testers
+, skopeo
+, buildGo121Module
+}:
+
+let
+  useGccGoBootstrap = stdenv.buildPlatform.isMusl;
+  goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap121.nix { };
+
+  skopeoTest = skopeo.override { buildGoModule = buildGo121Module; };
+
+  goarch = platform: {
+    "aarch64" = "arm64";
+    "arm" = "arm";
+    "armv5tel" = "arm";
+    "armv6l" = "arm";
+    "armv7l" = "arm";
+    "i686" = "386";
+    "mips" = "mips";
+    "mips64el" = "mips64le";
+    "mipsel" = "mipsle";
+    "powerpc64le" = "ppc64le";
+    "riscv64" = "riscv64";
+    "s390x" = "s390x";
+    "x86_64" = "amd64";
+  }.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
+
+  # We need a target compiler which is still runnable at build time,
+  # to handle the cross-building case where build != host == target
+  targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
+
+  isCross = stdenv.buildPlatform != stdenv.targetPlatform;
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "go";
+  version = "1.21.6";
+
+  src = fetchurl {
+    url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
+    hash = "sha256-Ekkmpi5F942qu67bnAEdl2MxhqM8I4/8HiUyDAIEYkg=";
+  };
+
+  strictDeps = true;
+  buildInputs = [ ]
+    ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
+    ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
+
+  depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ];
+
+  depsBuildTarget = lib.optional isCross targetCC;
+
+  depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross.package;
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  patches = [
+    (substituteAll {
+      src = ./iana-etc-1.17.patch;
+      iana = iana-etc;
+    })
+    # Patch the mimetype database location which is missing on NixOS.
+    # but also allow static binaries built with NixOS to run outside nix
+    (substituteAll {
+      src = ./mailcap-1.17.patch;
+      inherit mailcap;
+    })
+    # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+    # that run outside a nix server
+    (substituteAll {
+      src = ./tzdata-1.19.patch;
+      inherit tzdata;
+    })
+    ./remove-tools-1.11.patch
+    ./go_no_vendor_checks-1.21.patch
+  ];
+
+  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 isCross then
+      "${targetCC}/bin/${targetCC.targetPrefix}cc"
+    else
+      null;
+  CXX_FOR_TARGET =
+    if isCross then
+      "${targetCC}/bin/${targetCC.targetPrefix}c++"
+    else
+      null;
+
+  GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
+  GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 1;
+
+  GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
+
+  buildPhase = ''
+    runHook preBuild
+    export GOCACHE=$TMPDIR/go-cache
+    # this is compiled into the binary
+    export GOROOT_FINAL=$out/share/go
+
+    export PATH=$(pwd)/bin:$PATH
+
+    ${lib.optionalString isCross ''
+    # Independent from host/target, CC should produce code for the building system.
+    # We only set it when cross-compiling.
+    export CC=${buildPackages.stdenv.cc}/bin/cc
+    ''}
+    ulimit -a
+
+    pushd src
+    ./make.bash
+    popd
+    runHook postBuild
+  '';
+
+  preInstall = ''
+    # 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.system != stdenv.hostPlatform.system) then ''
+    mv bin/*_*/* bin
+    rmdir bin/*_*
+    ${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
+      rm -rf pkg/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH} pkg/tool/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH}
+    ''}
+  '' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) ''
+    rm -rf bin/*_*
+    ${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
+      rm -rf pkg/${finalAttrs.GOOS}_${finalAttrs.GOARCH} pkg/tool/${finalAttrs.GOOS}_${finalAttrs.GOARCH}
+    ''}
+  '');
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $GOROOT_FINAL
+    cp -a bin pkg src lib misc api doc go.env $GOROOT_FINAL
+    mkdir -p $out/bin
+    ln -s $GOROOT_FINAL/bin/* $out/bin
+    runHook postInstall
+  '';
+
+  disallowedReferences = [ goBootstrap ];
+
+  passthru = {
+    inherit goBootstrap skopeoTest;
+    tests = {
+      skopeo = testers.testVersion { package = skopeoTest; };
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+        command = "go version";
+        version = "go${finalAttrs.version}";
+      };
+    };
+  };
+
+  meta = with lib; {
+    changelog = "https://go.dev/doc/devel/release#go${lib.versions.majorMinor finalAttrs.version}";
+    description = "The Go Programming language";
+    homepage = "https://go.dev/";
+    license = licenses.bsd3;
+    maintainers = teams.golang.members;
+    platforms = platforms.darwin ++ platforms.linux;
+    mainProgram = "go";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/go/1.22.nix b/nixpkgs/pkgs/development/compilers/go/1.22.nix
new file mode 100644
index 000000000000..d5fc4ae0bdd7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/1.22.nix
@@ -0,0 +1,189 @@
+{ lib
+, stdenv
+, fetchurl
+, tzdata
+, substituteAll
+, iana-etc
+, Security
+, Foundation
+, xcbuild
+, mailcap
+, buildPackages
+, pkgsBuildTarget
+, threadsCross
+, testers
+, skopeo
+, buildGo122Module
+}:
+
+let
+  useGccGoBootstrap = stdenv.buildPlatform.isMusl;
+  goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap121.nix { };
+
+  skopeoTest = skopeo.override { buildGoModule = buildGo122Module; };
+
+  goarch = platform: {
+    "aarch64" = "arm64";
+    "arm" = "arm";
+    "armv5tel" = "arm";
+    "armv6l" = "arm";
+    "armv7l" = "arm";
+    "i686" = "386";
+    "mips" = "mips";
+    "mips64el" = "mips64le";
+    "mipsel" = "mipsle";
+    "powerpc64le" = "ppc64le";
+    "riscv64" = "riscv64";
+    "s390x" = "s390x";
+    "x86_64" = "amd64";
+  }.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
+
+  # We need a target compiler which is still runnable at build time,
+  # to handle the cross-building case where build != host == target
+  targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
+
+  isCross = stdenv.buildPlatform != stdenv.targetPlatform;
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "go";
+  version = "1.22.0";
+
+  src = fetchurl {
+    url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
+    hash = "sha256-TRlsPUGg1sHfxk0E48wfYIsMQ2vYe3Bgzj4jI04fTVw=";
+  };
+
+  strictDeps = true;
+  buildInputs = [ ]
+    ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
+    ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
+
+  depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ];
+
+  depsBuildTarget = lib.optional isCross targetCC;
+
+  depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross.package;
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  patches = [
+    (substituteAll {
+      src = ./iana-etc-1.17.patch;
+      iana = iana-etc;
+    })
+    # Patch the mimetype database location which is missing on NixOS.
+    # but also allow static binaries built with NixOS to run outside nix
+    (substituteAll {
+      src = ./mailcap-1.17.patch;
+      inherit mailcap;
+    })
+    # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+    # that run outside a nix server
+    (substituteAll {
+      src = ./tzdata-1.19.patch;
+      inherit tzdata;
+    })
+    ./remove-tools-1.11.patch
+    ./go_no_vendor_checks-1.22.patch
+  ];
+
+  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 isCross then
+      "${targetCC}/bin/${targetCC.targetPrefix}cc"
+    else
+      null;
+  CXX_FOR_TARGET =
+    if isCross then
+      "${targetCC}/bin/${targetCC.targetPrefix}c++"
+    else
+      null;
+
+  GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
+  GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 1;
+
+  GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
+
+  buildPhase = ''
+    runHook preBuild
+    export GOCACHE=$TMPDIR/go-cache
+    # this is compiled into the binary
+    export GOROOT_FINAL=$out/share/go
+
+    export PATH=$(pwd)/bin:$PATH
+
+    ${lib.optionalString isCross ''
+    # Independent from host/target, CC should produce code for the building system.
+    # We only set it when cross-compiling.
+    export CC=${buildPackages.stdenv.cc}/bin/cc
+    ''}
+    ulimit -a
+
+    pushd src
+    ./make.bash
+    popd
+    runHook postBuild
+  '';
+
+  preInstall = ''
+    # 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.system != stdenv.hostPlatform.system) then ''
+    mv bin/*_*/* bin
+    rmdir bin/*_*
+    ${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
+      rm -rf pkg/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH} pkg/tool/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH}
+    ''}
+  '' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) ''
+    rm -rf bin/*_*
+    ${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
+      rm -rf pkg/${finalAttrs.GOOS}_${finalAttrs.GOARCH} pkg/tool/${finalAttrs.GOOS}_${finalAttrs.GOARCH}
+    ''}
+  '');
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $GOROOT_FINAL
+    cp -a bin pkg src lib misc api doc go.env $GOROOT_FINAL
+    mkdir -p $out/bin
+    ln -s $GOROOT_FINAL/bin/* $out/bin
+    runHook postInstall
+  '';
+
+  disallowedReferences = [ goBootstrap ];
+
+  passthru = {
+    inherit goBootstrap skopeoTest;
+    tests = {
+      skopeo = testers.testVersion { package = skopeoTest; };
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+        command = "go version";
+        version = "go${finalAttrs.version}";
+      };
+    };
+  };
+
+  meta = with lib; {
+    changelog = "https://go.dev/doc/devel/release#go${lib.versions.majorMinor finalAttrs.version}";
+    description = "The Go Programming language";
+    homepage = "https://go.dev/";
+    license = licenses.bsd3;
+    maintainers = teams.golang.members;
+    platforms = platforms.darwin ++ platforms.linux;
+    mainProgram = "go";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/go/binary.nix b/nixpkgs/pkgs/development/compilers/go/binary.nix
new file mode 100644
index 000000000000..3b4e8010d27e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/binary.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, version, hashes, autoPatchelfHook }:
+let
+  toGoKernel = platform:
+    if platform.isDarwin then "darwin"
+    else platform.parsed.kernel.name;
+
+  toGoCPU = platform: {
+    "i686" = "386";
+    "x86_64" = "amd64";
+    "aarch64" = "arm64";
+    "armv6l" = "armv6l";
+    "armv7l" = "armv6l";
+    "powerpc64le" = "ppc64le";
+    "riscv64" = "riscv64";
+  }.${platform.parsed.cpu.name} or (throw "Unsupported CPU ${platform.parsed.cpu.name}");
+
+  toGoPlatform = platform: "${toGoKernel platform}-${toGoCPU platform}";
+
+  platform = toGoPlatform stdenv.hostPlatform;
+in
+stdenv.mkDerivation rec {
+  name = "go-${version}-${platform}-bootstrap";
+
+  src = fetchurl {
+    url = "https://go.dev/dl/go${version}.${platform}.tar.gz";
+    sha256 = hashes.${platform} or (throw "Missing Go bootstrap hash for platform ${platform}");
+  };
+
+  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+  # We must preserve the signature on Darwin
+  dontStrip = stdenv.hostPlatform.isDarwin;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/go $out/bin
+    cp -r . $out/share/go
+    ln -s $out/share/go/bin/go $out/bin/go
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/bootstrap116.nix b/nixpkgs/pkgs/development/compilers/go/bootstrap116.nix
new file mode 100644
index 000000000000..71573b0bdd22
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/bootstrap116.nix
@@ -0,0 +1,15 @@
+{ callPackage }:
+callPackage ./binary.nix {
+  version = "1.16";
+  hashes = {
+    # Use `print-hashes.sh ${version}` to generate the list below
+    darwin-amd64 = "6000a9522975d116bf76044967d7e69e04e982e9625330d9a539a8b45395f9a8";
+    darwin-arm64 = "4dac57c00168d30bbd02d95131d5de9ca88e04f2c5a29a404576f30ae9b54810";
+    linux-386 = "ea435a1ac6d497b03e367fdfb74b33e961d813883468080f6e239b3b03bea6aa";
+    linux-amd64 = "013a489ebb3e24ef3d915abe5b94c3286c070dfe0818d5bca8108f1d6e8440d2";
+    linux-arm64 = "3770f7eb22d05e25fbee8fb53c2a4e897da043eb83c69b9a14f8d98562cd8098";
+    linux-armv6l = "d1d9404b1dbd77afa2bdc70934e10fbfcf7d785c372efc29462bb7d83d0a32fd";
+    linux-ppc64le = "27a1aaa988e930b7932ce459c8a63ad5b3333b3a06b016d87ff289f2a11aacd6";
+    linux-s390x = "be4c9e4e2cf058efc4e3eb013a760cb989ddc4362f111950c990d1c63b27ccbe";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/bootstrap117.nix b/nixpkgs/pkgs/development/compilers/go/bootstrap117.nix
new file mode 100644
index 000000000000..3afa2ba9a10f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/bootstrap117.nix
@@ -0,0 +1,15 @@
+{ callPackage }:
+callPackage ./binary.nix {
+  version = "1.17.13";
+  hashes = {
+    # Use `print-hashes.sh ${version}` to generate the list below
+    darwin-amd64 = "c101beaa232e0f448fab692dc036cd6b4677091ff89c4889cc8754b1b29c6608";
+    darwin-arm64 = "e4ccc9c082d91eaa0b866078b591fc97d24b91495f12deb3dd2d8eda4e55a6ea";
+    linux-386 = "5e02f35aecc6b89679f631e0edf12c49922dd31c8140cf8dd725c5797a9f2425";
+    linux-amd64 = "4cdd2bc664724dc7db94ad51b503512c5ae7220951cac568120f64f8e94399fc";
+    linux-arm64 = "914daad3f011cc2014dea799bb7490442677e4ad6de0b2ac3ded6cee7e3f493d";
+    linux-armv6l = "260431d7deeb8893c21e71fcbbb1fde3258616d8eba584c8d72060228ab42c86";
+    linux-ppc64le = "bd0763fb130f8412672ffe1e4a8e65888ebe2419e5caa9a67ac21e8c298aa254";
+    linux-s390x = "08f6074e1e106cbe5d78622357db71a93648c7a4c4e4b02e3b5f2a1828914c76";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/bootstrap121.nix b/nixpkgs/pkgs/development/compilers/go/bootstrap121.nix
new file mode 100644
index 000000000000..f243ca30abf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/bootstrap121.nix
@@ -0,0 +1,22 @@
+{ callPackage }:
+callPackage ./binary.nix {
+  version = "1.21.0";
+  hashes = {
+    # Use `print-hashes.sh ${version}` to generate the list below
+    darwin-amd64 = "b314de9f704ab122c077d2ec8e67e3670affe8865479d1f01991e7ac55d65e70";
+    darwin-arm64 = "3aca44de55c5e098de2f406e98aba328898b05d509a2e2a356416faacf2c4566";
+    linux-386 = "0e6f378d9b072fab0a3d9ff4d5e990d98487d47252dba8160015a61e6bd0bcba";
+    linux-amd64 = "d0398903a16ba2232b389fb31032ddf57cac34efda306a0eebac34f0965a0742";
+    linux-arm64 = "f3d4548edf9b22f26bbd49720350bbfe59d75b7090a1a2bff1afad8214febaf3";
+    linux-armv6l = "e377a0004957c8c560a3ff99601bce612330a3d95ba3b0a2ae144165fc87deb1";
+    linux-loong64 = "e484cdc55221f7e7853666ed4f0ef462eef46b52253f84df60a7b908416060cb";
+    linux-mips = "6311d8ccd6ff9ce3cc8ecc72017d651d23e7325943fa72f4b65cd750be8aacd8";
+    linux-mips64 = "6d9cb425dc61f60bff41e2dec873abbcc5b8dbd1d32997f994d707b662f3c363";
+    linux-mips64le = "92f7933d997c589b4f506c6b3cc5b27ff43b294c3a2d40bf4d7eeaf375f92afb";
+    linux-mipsle = "9bb9f938457411042074a57284d40a086e63f7778f86e1632e018bbc38948c92";
+    linux-ppc64 = "e34dcc1df804bf8bac035ace3304f23696a9138a79a398dce981d89072d3ae23";
+    linux-ppc64le = "e938ffc81d8ebe5efc179240960ba22da6a841ff05d5cab7ce2547112b14a47f";
+    linux-riscv64 = "87b21c06573617842ca9e00b954bc9f534066736a0778eae594ac54b45a9e8b7";
+    linux-s390x = "be7338df8e5d5472dfa307b0df2b446d85d001b0a2a3cdb1a14048d751b70481";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.16.patch b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.16.patch
new file mode 100644
index 000000000000..9edf6efa8517
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.16.patch
@@ -0,0 +1,23 @@
+Starting from go1.14, go verifes that vendor/modules.txt matches the requirements
+and replacements listed in the main module go.mod file, and it is a hard failure if
+vendor/modules.txt is missing.
+
+Relax module consistency checks and switch back to pre go1.14 behaviour if
+vendor/modules.txt is missing regardless of go version requirement in go.mod.
+
+This has been ported from FreeBSD: https://reviews.freebsd.org/D24122
+See https://github.com/golang/go/issues/37948 for discussion.
+
+diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
+index d8fd91f1fe..8bc08e6fed 100644
+--- a/src/cmd/go/internal/modload/vendor.go
++++ b/src/cmd/go/internal/modload/vendor.go
+@@ -133,7 +133,7 @@ func checkVendorConsistency() {
+ 	readVendorList()
+
+ 	pre114 := false
+-	if semver.Compare(index.goVersionV, "v1.14") < 0 {
++	if semver.Compare(index.goVersionV, "v1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) {
+ 		// Go versions before 1.14 did not include enough information in
+ 		// vendor/modules.txt to check for consistency.
+ 		// If we know that we're on an earlier version, relax the consistency check.
diff --git a/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.21.patch b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.21.patch
new file mode 100644
index 000000000000..1adbf46398c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.21.patch
@@ -0,0 +1,23 @@
+Starting from go1.14, go verifes that vendor/modules.txt matches the requirements
+and replacements listed in the main module go.mod file, and it is a hard failure if
+vendor/modules.txt is missing.
+
+Relax module consistency checks and switch back to pre go1.14 behaviour if
+vendor/modules.txt is missing regardless of go version requirement in go.mod.
+
+This has been ported from FreeBSD: https://reviews.freebsd.org/D24122
+See https://github.com/golang/go/issues/37948 for discussion.
+
+diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
+index ffc79bb93f..2d0311975d 100644
+--- a/src/cmd/go/internal/modload/vendor.go
++++ b/src/cmd/go/internal/modload/vendor.go
+@@ -144,7 +144,7 @@ func checkVendorConsistency(index *modFileIndex, modFile *modfile.File) {
+ 	readVendorList(MainModules.mustGetSingleMainModule())
+
+ 	pre114 := false
+-	if gover.Compare(index.goVersion, "1.14") < 0 {
++	if gover.Compare(index.goVersion, "1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) {
+ 		// Go versions before 1.14 did not include enough information in
+ 		// vendor/modules.txt to check for consistency.
+ 		// If we know that we're on an earlier version, relax the consistency check.
diff --git a/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.22.patch b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.22.patch
new file mode 100644
index 000000000000..bd545d50948f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1.22.patch
@@ -0,0 +1,23 @@
+Starting from go1.14, go verifes that vendor/modules.txt matches the requirements
+and replacements listed in the main module go.mod file, and it is a hard failure if
+vendor/modules.txt is missing.
+
+Relax module consistency checks and switch back to pre go1.14 behaviour if
+vendor/modules.txt is missing regardless of go version requirement in go.mod.
+
+This has been ported from FreeBSD: https://reviews.freebsd.org/D24122
+See https://github.com/golang/go/issues/37948 for discussion.
+
+diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
+index b2cb44100e..05bf3829d5 100644
+--- a/src/cmd/go/internal/modload/vendor.go
++++ b/src/cmd/go/internal/modload/vendor.go
+@@ -159,7 +159,7 @@ func checkVendorConsistency(indexes []*modFileIndex, modFiles []*modfile.File, m
+ 			panic(fmt.Errorf("not in workspace mode but number of indexes is %v, not 1", len(indexes)))
+ 		}
+ 		index := indexes[0]
+-		if gover.Compare(index.goVersion, "1.14") < 0 {
++		if gover.Compare(index.goVersion, "1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) {
+ 			// Go versions before 1.14 did not include enough information in
+ 			// vendor/modules.txt to check for consistency.
+ 			// If we know that we're on an earlier version, relax the consistency check.
diff --git a/nixpkgs/pkgs/development/compilers/go/iana-etc-1.17.patch b/nixpkgs/pkgs/development/compilers/go/iana-etc-1.17.patch
new file mode 100644
index 000000000000..6f1382758989
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/iana-etc-1.17.patch
@@ -0,0 +1,26 @@
+diff --git a/src/net/lookup_unix.go b/src/net/lookup_unix.go
+index 8030e3d99e..5a7472d933 100644
+--- a/src/net/lookup_unix.go
++++ b/src/net/lookup_unix.go
+@@ -21,7 +21,7 @@ var onceReadProtocols sync.Once
+ // readProtocols loads contents of /etc/protocols into protocols map
+ // for quick access.
+ func readProtocols() {
+-	file, err := open("/etc/protocols")
++	file, err := open("@iana@/etc/protocols")
+ 	if err != nil {
+ 		return
+ 	}
+diff --git a/src/net/port_unix.go b/src/net/port_unix.go
+index a9a96a2323..0df6efe9e5 100644
+--- a/src/net/port_unix.go
++++ b/src/net/port_unix.go
+@@ -17,7 +17,7 @@ import (
+ var onceReadServices sync.Once
+
+ func readServices() {
+-	file, err := open("/etc/services")
++	file, err := open("@iana@/etc/services")
+ 	if err != nil {
+ 		return
+ 	}
diff --git a/nixpkgs/pkgs/development/compilers/go/mailcap-1.17.patch b/nixpkgs/pkgs/development/compilers/go/mailcap-1.17.patch
new file mode 100644
index 000000000000..6e4302acc097
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/mailcap-1.17.patch
@@ -0,0 +1,12 @@
+diff --git a/src/mime/type_unix.go b/src/mime/type_unix.go
+index f954bc8a1f..06d897bfbf 100644
+--- a/src/mime/type_unix.go
++++ b/src/mime/type_unix.go
+@@ -26,6 +26,7 @@ var mimeGlobs = []string{
+ 
+ // Common locations for mime.types files on unix.
+ var typeFiles = []string{
++	"@mailcap@/etc/mime.types",
+ 	"/etc/mime.types",
+ 	"/etc/apache2/mime.types",
+ 	"/etc/apache/mime.types",
diff --git a/nixpkgs/pkgs/development/compilers/go/print-hashes.sh b/nixpkgs/pkgs/development/compilers/go/print-hashes.sh
new file mode 100755
index 000000000000..ed3e62b941b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/print-hashes.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p curl jq
+# shellcheck shell=bash
+set -euo pipefail
+
+BASEURL=https://go.dev/dl/
+VERSION=${1:-}
+
+if [[ -z ${VERSION} ]]; then
+  echo "No version supplied"
+  exit 1
+fi
+
+curl -s "${BASEURL}?mode=json&include=all" |
+  jq '.[] | select(.version == "go'"${VERSION}"'")' |
+  jq -r '.files[] | select(.kind == "archive" and (.os == "linux" or .os == "darwin")) | (.os + "-" + .arch + " = \"" + .sha256 + "\";")'
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/tzdata-1.19.patch b/nixpkgs/pkgs/development/compilers/go/tzdata-1.19.patch
new file mode 100644
index 000000000000..f5b55d5d7e5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/tzdata-1.19.patch
@@ -0,0 +1,12 @@
+diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go
+index 67b8beb47b..5cd1fb1759 100644
+--- a/src/time/zoneinfo_unix.go
++++ b/src/time/zoneinfo_unix.go
+@@ -18,6 +18,7 @@ import (
+ // Many systems use /usr/share/zoneinfo, Solaris 2 has
+ // /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ.
+ var platformZoneSources = []string{
++	"@tzdata@/share/zoneinfo/",
+ 	"/usr/share/zoneinfo/",
+ 	"/usr/share/lib/zoneinfo/",
+ 	"/usr/lib/locale/TZ/",
diff --git a/nixpkgs/pkgs/development/compilers/gprolog/default.nix b/nixpkgs/pkgs/development/compilers/gprolog/default.nix
new file mode 100644
index 000000000000..6868ca9f8d8f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gprolog/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "gprolog";
+  version = "1.5.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://gnu/gprolog/gprolog-${version}.tar.gz"
+      "http://www.gprolog.org/gprolog-${version}.tar.gz"
+    ];
+    sha256 = "sha256-ZwZCtDwPqifr1olh77F+vnB2iPkbaAlWbd1gYTlRLAE=";
+  };
+
+  hardeningDisable = 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/gprolog-${version}/examples"
+      "--with-doc-dir=$out/share/gprolog-${version}/doc"
+    )
+  '';
+
+  postInstall = ''
+    mv -v $out/[A-Z]* $out/gprolog.ico $out/share/gprolog-${version}/
+  '';
+
+  doCheck = true;
+
+  meta = {
+    homepage = "https://www.gnu.org/software/gprolog/";
+    description = "GNU Prolog, a free Prolog compiler with constraint solving over finite domains";
+    license = 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.
+    '';
+
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix
new file mode 100644
index 000000000000..858d7443ff62
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix
@@ -0,0 +1,216 @@
+{ lib
+, stdenv
+, alsa-lib
+, autoPatchelfHook
+, cairo
+, cups
+, darwin
+, fontconfig
+, glib
+, glibc
+, gtk3
+, makeWrapper
+, musl
+, runCommandCC
+, setJavaClassPath
+, unzip
+, xorg
+, zlib
+  # extra params
+, extraCLibs ? [ ]
+, gtkSupport ? stdenv.isLinux
+, useMusl ? false
+, ...
+} @ args:
+
+assert useMusl -> stdenv.isLinux;
+let
+  extraArgs = builtins.removeAttrs args [
+    "lib"
+    "stdenv"
+    "alsa-lib"
+    "autoPatchelfHook"
+    "cairo"
+    "cups"
+    "darwin"
+    "fontconfig"
+    "glib"
+    "glibc"
+    "gtk3"
+    "makeWrapper"
+    "musl"
+    "runCommandCC"
+    "setJavaClassPath"
+    "unzip"
+    "xorg"
+    "zlib"
+    "extraCLibs"
+    "gtkSupport"
+    "useMusl"
+    "passthru"
+    "meta"
+  ];
+
+  cLibs = lib.optionals stdenv.isLinux (
+    [ glibc zlib.static ]
+    ++ lib.optionals (!useMusl) [ glibc.static ]
+    ++ lib.optionals useMusl [ musl ]
+    ++ extraCLibs
+  );
+
+  # GraalVM 21.3.0+ expects musl-gcc as <system>-musl-gcc
+  musl-gcc = (runCommandCC "musl-gcc" { } ''
+    mkdir -p $out/bin
+    ln -s ${lib.getDev musl}/bin/musl-gcc $out/bin/${stdenv.hostPlatform.system}-musl-gcc
+  '');
+  binPath = lib.makeBinPath (lib.optionals useMusl [ musl-gcc ] ++ [ stdenv.cc ]);
+
+  runtimeLibraryPath = lib.makeLibraryPath
+    ([ cups ] ++ lib.optionals gtkSupport [ cairo glib gtk3 ]);
+
+  graalvm-ce = stdenv.mkDerivation ({
+    pname = "graalvm-ce";
+
+    unpackPhase = ''
+      runHook preUnpack
+
+      mkdir -p "$out"
+
+      # The tarball on Linux has the following directory structure:
+      #
+      #   graalvm-ce-java11-20.3.0/*
+      #
+      # while on Darwin it looks like this:
+      #
+      #   graalvm-ce-java11-20.3.0/Contents/Home/*
+      #
+      # We therefor use --strip-components=1 vs 3 depending on the platform.
+      tar xf "$src" -C "$out" --strip-components=${
+        if stdenv.isLinux then "1" else "3"
+      }
+
+      # Sanity check
+      if [ ! -d "$out/bin" ]; then
+        echo "The `bin` is directory missing after extracting the graalvm"
+        echo "tarball, please compare the directory structure of the"
+        echo "tarball with what happens in the unpackPhase (in particular"
+        echo "with regards to the `--strip-components` flag)."
+        exit 1
+      fi
+
+      runHook postUnpack
+    '';
+
+    dontStrip = true;
+
+    nativeBuildInputs = [ unzip makeWrapper ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
+
+    propagatedBuildInputs = [ setJavaClassPath zlib ]
+      ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Foundation;
+
+    buildInputs = lib.optionals stdenv.isLinux [
+      alsa-lib # libasound.so wanted by lib/libjsound.so
+      fontconfig
+      stdenv.cc.cc.lib # libstdc++.so.6
+      xorg.libX11
+      xorg.libXext
+      xorg.libXi
+      xorg.libXrender
+      xorg.libXtst
+    ];
+
+    postInstall = ''
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -sf $out/include/linux/*_md.h $out/include/
+
+      # copy-paste openjdk's preFixup
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat > $out/nix-support/setup-hook << EOF
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+      EOF
+
+      wrapProgram $out/bin/native-image \
+        --prefix PATH : ${binPath} \
+        ${toString (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs)}
+    '';
+
+    preFixup = lib.optionalString (stdenv.isLinux) ''
+      for bin in $(find "$out/bin" -executable -type f); do
+        wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
+      done
+    '';
+
+    doInstallCheck = true;
+    installCheckPhase = ''
+      runHook preInstallCheck
+
+      ${# broken in darwin
+      lib.optionalString stdenv.isLinux ''
+        echo "Testing Jshell"
+        echo '1 + 1' | $out/bin/jshell
+      ''}
+
+      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
+      echo "Testing GraalVM"
+      $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
+
+      # Workaround GraalVM issue where the builder does not have access to the
+      # environment variables since 21.0.0
+      # Only needed for native-image tests
+      # https://github.com/oracle/graal/pull/6095
+      # https://github.com/oracle/graal/pull/6095
+      # https://github.com/oracle/graal/issues/7502
+      export NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION="true";
+
+      echo "Ahead-Of-Time compilation"
+      $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld
+      ./helloworld | fgrep 'Hello World'
+
+      ${# --static is only available in Linux
+      lib.optionalString (stdenv.isLinux && !useMusl) ''
+        echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC"
+        $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC HelloWorld
+        ./helloworld | fgrep 'Hello World'
+
+        echo "Ahead-Of-Time compilation with --static"
+        $out/bin/native-image --static HelloWorld
+        ./helloworld | fgrep 'Hello World'
+      ''}
+
+      ${# --static is only available in Linux
+      lib.optionalString (stdenv.isLinux && useMusl) ''
+        echo "Ahead-Of-Time compilation with --static and --libc=musl"
+        $out/bin/native-image --static HelloWorld --libc=musl
+        ./helloworld | fgrep 'Hello World'
+      ''}
+
+      runHook postInstallCheck
+    '';
+
+    passthru = {
+      home = graalvm-ce;
+      updateScript = [ ./update.sh "graalvm-ce" ];
+    } // (args.passhtru or { });
+
+    meta = with lib; ({
+      homepage = "https://www.graalvm.org/";
+      description = "High-Performance Polyglot VM";
+      license = with licenses; [ upl gpl2Classpath bsd3 ];
+      sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+      mainProgram = "java";
+      maintainers = with maintainers; teams.graalvm-ce.members ++ [ ];
+    } // (args.meta or { }));
+  } // extraArgs);
+in
+graalvm-ce
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix
new file mode 100644
index 000000000000..579e40580802
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/buildGraalvmProduct.nix
@@ -0,0 +1,76 @@
+{ lib
+, stdenv
+, autoPatchelfHook
+, darwin
+, graalvm-ce
+, makeWrapper
+, zlib
+, libxcrypt-legacy
+  # extra params
+, product
+, extraBuildInputs ? [ ]
+, extraNativeBuildInputs ? [ ]
+, ...
+} @ args:
+
+let
+  extraArgs = builtins.removeAttrs args [
+    "lib"
+    "stdenv"
+    "autoPatchelfHook"
+    "darwin"
+    "graalvm-ce"
+    "libxcrypt-legacy"
+    "makeWrapper"
+    "zlib"
+    "product"
+    "extraBuildInputs"
+    "extraNativeBuildInputs"
+    "meta"
+  ];
+in
+stdenv.mkDerivation ({
+  pname = product;
+
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optional stdenv.isLinux autoPatchelfHook
+    ++ extraNativeBuildInputs;
+
+  buildInputs = [
+    stdenv.cc.cc.lib # libstdc++.so.6
+    zlib
+    libxcrypt-legacy # libcrypt.so.1 (default is .2 now)
+  ]
+  ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Foundation
+  ++ extraBuildInputs;
+
+  unpackPhase = ''
+    runHook preUnpack
+
+    mkdir -p "$out"
+
+    tar xf "$src" -C "$out" --strip-components=1
+
+    # Sanity check
+    if [ ! -d "$out/bin" ]; then
+      echo "The `bin` is directory missing after extracting the graalvm"
+      echo "tarball, please compare the directory structure of the"
+      echo "tarball with what happens in the unpackPhase (in particular"
+      echo "with regards to the `--strip-components` flag)."
+      exit 1
+    fi
+
+    runHook postUnpack
+  '';
+
+  dontStrip = true;
+
+  passthru = {
+    updateScript = [ ./update.sh product ];
+  } // (args.passhtru or { });
+
+  meta = ({
+    inherit (graalvm-ce.meta) homepage license sourceProvenance maintainers platforms;
+    description = "High-Performance Polyglot VM (Product: ${product})";
+  } // (args.meta or { }));
+} // extraArgs)
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix
new file mode 100644
index 000000000000..a29a81783c9c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix
@@ -0,0 +1,23 @@
+{ lib
+, stdenv
+, callPackage
+, fetchurl
+}:
+
+{
+  buildGraalvm = callPackage ./buildGraalvm.nix;
+
+  buildGraalvmProduct = callPackage ./buildGraalvmProduct.nix;
+
+  graalvm-ce = callPackage ./graalvm-ce { };
+
+  graalvm-ce-musl = callPackage ./graalvm-ce { useMusl = true; };
+
+  graaljs = callPackage ./graaljs { };
+
+  graalnodejs = callPackage ./graalnodejs { };
+
+  graalpy = callPackage ./graalpy { };
+
+  truffleruby = callPackage ./truffleruby { };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix
new file mode 100644
index 000000000000..0a7f04052bb6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix
@@ -0,0 +1,17 @@
+{ stdenv
+, fetchurl
+, graalvmCEPackages
+}:
+
+graalvmCEPackages.buildGraalvmProduct {
+  src = fetchurl (import ./hashes.nix).hashes.${stdenv.system};
+  version = (import ./hashes.nix).version;
+
+  product = "js-installable-svm";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    echo "Testing GraalJS"
+    echo '1 + 1' | $out/bin/js
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/hashes.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/hashes.nix
new file mode 100644
index 000000000000..268a9743a025
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graaljs/hashes.nix
@@ -0,0 +1,22 @@
+# Generated by update.sh script
+{
+  "version" = "23.1.0";
+  "hashes" = {
+    "aarch64-linux" = {
+      sha256 = "09q88nsbz0lrl866x3hqxm3hb5wpn4x5rp6pk69x1v6xzl58wzq2";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graaljs-community-23.1.0-linux-aarch64.tar.gz";
+    };
+    "x86_64-linux" = {
+      sha256 = "0zlk0gpxwjkh4wxsc310kl80ipgk5si1lmyx0q2hqsw9lm98n41g";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graaljs-community-23.1.0-linux-amd64.tar.gz";
+    };
+    "x86_64-darwin" = {
+      sha256 = "1y5mc92yync85ywcahvq8x9jlla0rzjd4g7cm6q7p21wvfwp4d5q";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graaljs-community-23.1.0-macos-amd64.tar.gz";
+    };
+    "aarch64-darwin" = {
+      sha256 = "0ph3c6jgbvm3cliyqlccd2l292a7p0051l3sv7yf3318r6zrrk7m";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graaljs-community-23.1.0-macos-aarch64.tar.gz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix
new file mode 100644
index 000000000000..fb6d1595bbf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix
@@ -0,0 +1,17 @@
+{ stdenv
+, fetchurl
+, graalvmCEPackages
+}:
+
+graalvmCEPackages.buildGraalvmProduct {
+  src = fetchurl (import ./hashes.nix).hashes.${stdenv.system};
+  version = (import ./hashes.nix).version;
+
+  product = "nodejs-installable-svm";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    echo "Testing NodeJS"
+    $out/bin/npx --help
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/hashes.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/hashes.nix
new file mode 100644
index 000000000000..3546a11c2fc8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalnodejs/hashes.nix
@@ -0,0 +1,22 @@
+# Generated by update.sh script
+{
+  "version" = "23.1.0";
+  "hashes" = {
+    "aarch64-linux" = {
+      sha256 = "056x616pp0b25wsryzrfrfnjaxr3444fc3hmv8jspl4pjxjrais2";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graalnodejs-community-23.1.0-linux-aarch64.tar.gz";
+    };
+    "x86_64-linux" = {
+      sha256 = "1si2ifwihszv06sqd25mswibiqbxhxgj6yw829f8zrdhs0sra2nz";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graalnodejs-community-23.1.0-linux-amd64.tar.gz";
+    };
+    "x86_64-darwin" = {
+      sha256 = "1ffkdavrs92h3f5yil15v3i7r9aggkpfqd13gl5ipqlrk6pykhr7";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graalnodejs-community-23.1.0-macos-amd64.tar.gz";
+    };
+    "aarch64-darwin" = {
+      sha256 = "1g6pql0pdxhxwpjqyfkaq07dar8sx2wipsyrjc7hmz3z7pjxcf5i";
+      url = "https://github.com/oracle/graaljs/releases/download/graal-23.1.0/graalnodejs-community-23.1.0-macos-aarch64.tar.gz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix
new file mode 100644
index 000000000000..e2b28500f7fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix
@@ -0,0 +1,18 @@
+{ stdenv
+, fetchurl
+, graalvmCEPackages
+}:
+
+graalvmCEPackages.buildGraalvmProduct {
+  src = fetchurl (import ./hashes.nix).hashes.${stdenv.system};
+  version = (import ./hashes.nix).version;
+
+  product = "graalpy";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    echo "Testing GraalPy"
+    $out/bin/graalpy -c 'print(1 + 1)'
+    echo '1 + 1' | $out/bin/graalpy
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/hashes.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/hashes.nix
new file mode 100644
index 000000000000..84bb1660f7b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalpy/hashes.nix
@@ -0,0 +1,22 @@
+# Generated by update.sh script
+{
+  "version" = "23.1.2";
+  "hashes" = {
+    "aarch64-linux" = {
+      sha256 = "0ypzhi22q2d1dfl3qf3yfsaqdsrj8sksc2spa79rdqdr690li4y9";
+      url = "https://github.com/oracle/graalpython/releases/download/graal-23.1.2/graalpy-community-23.1.2-linux-aarch64.tar.gz";
+    };
+    "x86_64-linux" = {
+      sha256 = "1n99hzf1sidacv4qr5j2b3dpwrc6qb71alwfkdxjqx6xv7g7nmr7";
+      url = "https://github.com/oracle/graalpython/releases/download/graal-23.1.2/graalpy-community-23.1.2-linux-amd64.tar.gz";
+    };
+    "x86_64-darwin" = {
+      sha256 = "0g2xj5hiq8idacdm0jlg5lvvv98f38p6fjb839gfacsb25pmhkg7";
+      url = "https://github.com/oracle/graalpython/releases/download/graal-23.1.2/graalpy-community-23.1.2-macos-amd64.tar.gz";
+    };
+    "aarch64-darwin" = {
+      sha256 = "0qinxqkkm9bfnzr43p3yhs3alfnl4pppca6yahsk5bp8ngyzasfj";
+      url = "https://github.com/oracle/graalpython/releases/download/graal-23.1.2/graalpy-community-23.1.2-macos-aarch64.tar.gz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix
new file mode 100644
index 000000000000..b7f7db61097f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix
@@ -0,0 +1,12 @@
+{ stdenv
+, fetchurl
+, graalvmCEPackages
+, useMusl ? false
+}:
+
+graalvmCEPackages.buildGraalvm {
+  inherit useMusl;
+  src = fetchurl (import ./hashes.nix).hashes.${stdenv.system};
+  version = (import ./hashes.nix).version;
+  meta.platforms = builtins.attrNames (import ./hashes.nix).hashes;
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/hashes.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/hashes.nix
new file mode 100644
index 000000000000..45028f3d544b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/hashes.nix
@@ -0,0 +1,22 @@
+# Generated by update.sh script
+{
+  "version" = "21.0.2";
+  "hashes" = {
+    "aarch64-linux" = {
+      sha256 = "0yndazvc4kyr9widfn8ql5vd57m4m5inqz2wcpsarw38rs8ycjx3";
+      url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-aarch64_bin.tar.gz";
+    };
+    "x86_64-linux" = {
+      sha256 = "0j5ffszcaqv3fq159hyb611jm8w1q4n1cywmbd7vi69smad0cj5h";
+      url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz";
+    };
+    "x86_64-darwin" = {
+      sha256 = "1qfrn1068idnkzd6mdpw1x17sqrj59rz9avphj8225sxlhzsk2ks";
+      url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_macos-x64_bin.tar.gz";
+    };
+    "aarch64-darwin" = {
+      sha256 = "1dssa3nhix7bqygdkkfp0b9myjg5f91dlgm8mf6r7qf7mj9klpji";
+      url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_macos-aarch64_bin.tar.gz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix
new file mode 100644
index 000000000000..95e9c56fc23c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchurl
+, graalvmCEPackages
+, libyaml
+, openssl
+}:
+
+graalvmCEPackages.buildGraalvmProduct {
+  src = fetchurl (import ./hashes.nix).hashes.${stdenv.system};
+  version = (import ./hashes.nix).version;
+
+  product = "truffleruby";
+
+  extraBuildInputs = [
+    libyaml
+    openssl
+  ];
+
+  preFixup = lib.optionalString stdenv.isLinux ''
+    patchelf $out/lib/mri/openssl.so \
+      --replace-needed libssl.so.10 libssl.so \
+      --replace-needed libcrypto.so.10 libcrypto.so
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    echo "Testing TruffleRuby"
+    # Fixup/silence warnings about wrong locale
+    export LANG=C
+    export LC_ALL=C
+    $out/bin/ruby -e 'puts(1 + 1)'
+    ${# broken in darwin with sandbox enabled
+      lib.optionalString stdenv.isLinux ''
+      echo '1 + 1' | $out/bin/irb
+    ''}
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/hashes.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/hashes.nix
new file mode 100644
index 000000000000..331db1caf9b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/truffleruby/hashes.nix
@@ -0,0 +1,22 @@
+# Generated by update.sh script
+{
+  "version" = "23.1.2";
+  "hashes" = {
+    "aarch64-linux" = {
+      sha256 = "0bmrpp88zny0hbq4hqhs4xajqr96qxj6p5nj12m7kcr8hzh2vkf3";
+      url = "https://github.com/oracle/truffleruby/releases/download/graal-23.1.2/truffleruby-community-23.1.2-linux-aarch64.tar.gz";
+    };
+    "x86_64-linux" = {
+      sha256 = "0hrab1jrs59swpx33zg111wa4nv2215ygyckv47x6mmjibf30c86";
+      url = "https://github.com/oracle/truffleruby/releases/download/graal-23.1.2/truffleruby-community-23.1.2-linux-amd64.tar.gz";
+    };
+    "x86_64-darwin" = {
+      sha256 = "1y68wz6rv2vksbnhmf57zlk8smgv9954np07d8ywdls99a92217z";
+      url = "https://github.com/oracle/truffleruby/releases/download/graal-23.1.2/truffleruby-community-23.1.2-macos-amd64.tar.gz";
+    };
+    "aarch64-darwin" = {
+      sha256 = "0za4ff3wlj2fgl2z3vzp2p4jf9x0fkvd98qwk1dm7lmffghfb14n";
+      url = "https://github.com/oracle/truffleruby/releases/download/graal-23.1.2/truffleruby-community-23.1.2-macos-aarch64.tar.gz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/update.sh b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/update.sh
new file mode 100755
index 000000000000..65d36514bcd0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/update.sh
@@ -0,0 +1,130 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -p coreutils curl.out nix jq gnused -i bash
+
+# Usage:
+# ./update.sh [PRODUCT]
+#
+# Examples:
+#   $ ./update.sh graalvm-ce # will generate ./graalvm-ce/hashes.nix
+#   $ ./update.sh # same as above
+#   $ ./update.sh graalpy # will generate ./graalpy/hashes.nix
+#
+# Environment variables:
+# FORCE=1        to force the update of a product (e.g.: skip up-to-date checks)
+# VERSION=xx.xx  will assume that xx.xx is the new version
+
+set -eou pipefail
+
+cd "$(dirname "${BASH_SOURCE[0]}")"
+tmpfile="$(mktemp --suffix=.nix)"
+readonly tmpfile
+
+trap 'rm -rf "$tmpfile"' EXIT
+
+info() { echo "[INFO] $*"; }
+
+echo_file() { echo "$@" >> "$tmpfile"; }
+
+verlte() {
+    [  "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
+}
+
+readonly product="${1:-graalvm-ce}"
+readonly hashes_nix="$product/hashes.nix"
+readonly nixpkgs=../../../../..
+
+mkdir -p "$product"
+
+declare -r -A update_urls=(
+  [graalvm-ce]="https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest"
+  [graaljs]="https://api.github.com/repos/oracle/graaljs/releases/latest"
+  [graalnodejs]="https://api.github.com/repos/oracle/graaljs/releases/latest"
+  [graalpy]="https://api.github.com/repos/oracle/graalpython/releases/latest"
+  [truffleruby]="https://api.github.com/repos/oracle/truffleruby/releases/latest"
+)
+
+current_version="$(nix-instantiate "$nixpkgs" --eval --strict -A "graalvmCEPackages.${product}.version" --json | jq -r)"
+readonly current_version
+
+if [[ -z "${VERSION:-}" ]]; then
+  gh_version="$(curl \
+      ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
+      -s "${update_urls[$product]}" | \
+      jq --raw-output .tag_name)"
+  new_version="${gh_version//jdk-/}"
+  new_version="${new_version//graal-/}"
+else
+  new_version="$VERSION"
+fi
+readonly new_version
+
+info "Current version: $current_version"
+info "New version: $new_version"
+if verlte "$new_version" "$current_version"; then
+  info "$product $current_version is up-to-date."
+  [[ -z "${FORCE:-}" ]]  && exit 0
+else
+  info "$product $current_version is out-of-date. Updating..."
+fi
+
+# Make sure to get the `-community` versions!
+declare -r -A products_urls=(
+  [graalvm-ce]="https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${new_version}/graalvm-community-jdk-${new_version}_@platform@_bin.tar.gz"
+  [graaljs]="https://github.com/oracle/graaljs/releases/download/graal-${new_version}/graaljs-community-${new_version}-@platform@.tar.gz"
+  [graalnodejs]="https://github.com/oracle/graaljs/releases/download/graal-${new_version}/graalnodejs-community-${new_version}-@platform@.tar.gz"
+  [graalpy]="https://github.com/oracle/graalpython/releases/download/graal-${new_version}/graalpy-community-${new_version}-@platform@.tar.gz"
+  [truffleruby]="https://github.com/oracle/truffleruby/releases/download/graal-${new_version}/truffleruby-community-${new_version}-@platform@.tar.gz"
+)
+
+# Argh, this is really inconsistent...
+if [[ "$product" == "graalvm-ce" ]]; then
+  declare -r -A platforms=(
+    [aarch64-linux]="linux-aarch64"
+    [x86_64-linux]="linux-x64"
+    [aarch64-darwin]="macos-aarch64"
+    [x86_64-darwin]="macos-x64"
+  )
+else
+  declare -r -A platforms=(
+    [aarch64-linux]="linux-aarch64"
+    [x86_64-linux]="linux-amd64"
+    [aarch64-darwin]="macos-aarch64"
+    [x86_64-darwin]="macos-amd64"
+  )
+fi
+
+info "Generating '$hashes_nix' file for '$product' $new_version. This will take a while..."
+
+# Indentation of `echo_file` function is on purpose to make it easier to visualize the output
+echo_file "# Generated by $(basename $0) script"
+echo_file "{"
+echo_file "  \"version\" = \"$new_version\";"
+url="${products_urls["${product}"]}"
+echo_file "  \"hashes\" = {"
+for nix_platform in "${!platforms[@]}"; do
+  product_platform="${platforms[$nix_platform]}"
+  args=("${url//@platform@/$product_platform}")
+  # Get current hashes to skip derivations already in /nix/store to reuse cache when the version is the same
+  # e.g.: when adding a new product and running this script with FORCE=1
+  if [[ "$current_version" == "$new_version" ]] && \
+      previous_hash="$(nix-instantiate --eval "$hashes_nix" -A "hashes.$nix_platform.sha256" --json | jq -r)"; then
+      args+=("$previous_hash" "--type" "sha256")
+  else
+      info "Hash in '$product' for '$nix_platform' not found. Re-downloading it..."
+  fi
+  if hash="$(nix-prefetch-url "${args[@]}")"; then
+echo_file "    \"$nix_platform\" = {"
+echo_file "      sha256 = \"$hash\";"
+echo_file "      url = \"${url//@platform@/${product_platform}}\";"
+echo_file "    };"
+  else
+      info "Error while downloading '$product' for '$nix_platform'. Skipping it..."
+  fi
+done
+echo_file "  };"
+echo_file "}"
+
+info "Moving the temporary file to '$hashes_nix'"
+mv "$tmpfile" "$hashes_nix"
+
+info "Done!"
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..b998266487cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gwt/2.4.0.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "gwt-java";
+  version = "2.4.0";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-web-toolkit/gwt-${version}.zip";
+    sha256 = "1gvyg00vx7fdqgfl2w7nhql78clg3abs6fxxy7m03pprdm5qmm17";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  installPhase = ''
+    mkdir -p $out
+    unzip $src
+    mv gwt-2.4.0 $out/bin
+  '';
+
+  meta = {
+    homepage = "https://www.gwtproject.org/";
+    description = "A development toolkit for building and optimizing complex browser-based applications";
+    license = lib.licenses.asl20;
+    platforms = 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..738ecc81a156
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/halide/default.nix
@@ -0,0 +1,101 @@
+{ stdenv
+, llvmPackages
+, lib
+, fetchFromGitHub
+, cmake
+, libffi
+, libpng
+, libjpeg
+, mesa
+, libGL
+, eigen
+, openblas
+, blas
+, lapack
+}:
+
+assert blas.implementation == "openblas" && lapack.implementation == "openblas";
+
+stdenv.mkDerivation rec {
+  pname = "halide";
+  version = "16.0.0";
+
+  src = fetchFromGitHub {
+    owner = "halide";
+    repo = "Halide";
+    rev = "v${version}";
+    sha256 = "sha256-lJQrXkJgBmGb/QMSxwuPkkHOSgEDowLWzIolp1km2Y8=";
+  };
+
+  postPatch = ''
+    # See https://github.com/halide/Halide/issues/7785
+    substituteInPlace 'src/runtime/HalideRuntime.h' \
+      --replace '#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
+    #define HALIDE_CPP_COMPILER_HAS_FLOAT16' \
+                '#if defined(__x86_64__) || defined(__i386__)
+    #define HALIDE_CPP_COMPILER_HAS_FLOAT16'
+  ''
+  # Note: on x86_64-darwin, clang fails to find AvailabilityVersions.h, so we remove it.
+  # Halide uses AvailabilityVersions.h and TargetConditionals.h to determine whether
+  # ::aligned_alloc is available. For us, it isn't.
+  + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+    substituteInPlace 'src/runtime/HalideBuffer.h' \
+      --replace '#ifdef __APPLE__
+    #include <AvailabilityVersions.h>
+    #include <TargetConditionals.h>
+    #endif' \
+                ' ' \
+      --replace 'TARGET_OS_OSX && (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_15)' \
+                '1' \
+      --replace 'TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_14_0)' \
+                '0'
+  '';
+
+  cmakeFlags = [
+    "-DWARNINGS_AS_ERRORS=OFF"
+    "-DWITH_PYTHON_BINDINGS=OFF"
+    "-DTARGET_WEBASSEMBLY=OFF"
+    # Disable performance tests since they may fail on busy machines
+    "-DWITH_TEST_PERFORMANCE=OFF"
+    # Disable fuzzing tests -- this has become the default upstream after the
+    # v16 release (See https://github.com/halide/Halide/commit/09c5d1d19ec8e6280ccbc01a8a12decfb27226ba)
+    # These tests also fail to compile on Darwin because of some missing command line options...
+    "-DWITH_TEST_FUZZ=OFF"
+  ];
+
+  doCheck = true;
+
+  # Note: disable mullapudi2016_fibonacci because it requires too much
+  # parallelism for remote builders
+  preCheck = ''
+    checkFlagsArray+=("ARGS=-E 'mullapudi2016_fibonacci'")
+  '';
+
+  # 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
+    llvmPackages.lld
+    llvmPackages.openmp
+    llvmPackages.libclang
+    libffi
+    libpng
+    libjpeg
+    eigen
+    openblas
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    mesa
+    libGL
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "C++ based language for image processing and computational photography";
+    homepage = "https://halide-lang.org";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ck3d atila twesterhout ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/haxe/default.nix b/nixpkgs/pkgs/development/compilers/haxe/default.nix
new file mode 100644
index 000000000000..99fde9c66a59
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/haxe/default.nix
@@ -0,0 +1,132 @@
+{ lib, stdenv, fetchFromGitHub, coreutils, ocaml-ng, zlib, pcre, pcre2, neko, mbedtls_2, Security }:
+
+let
+  ocamlDependencies = version:
+    if lib.versionAtLeast version "4.2"
+    then with ocaml-ng.ocamlPackages_4_12; [
+      ocaml
+      findlib
+      sedlex
+      xml-light
+      ptmap
+      camlp5
+      sha
+      dune_3
+      luv
+      extlib
+    ] else with ocaml-ng.ocamlPackages_4_10; [
+      ocaml
+      findlib
+      sedlex
+      xml-light
+      ptmap
+      camlp5
+      sha
+      dune_3
+      luv
+      extlib-1-7-7
+    ];
+
+  defaultPatch = ''
+    substituteInPlace extra/haxelib_src/src/haxelib/client/Main.hx \
+      --replace '"neko"' '"${neko}/bin/neko"'
+  '';
+
+  generic = { sha256, version, prePatch ? defaultPatch }:
+    stdenv.mkDerivation {
+      pname = "haxe";
+      inherit version;
+
+      buildInputs = [ zlib neko ]
+        ++ (if lib.versionAtLeast version "4.3" then [pcre2] else [pcre])
+        ++ lib.optional (lib.versionAtLeast version "4.1") mbedtls_2
+        ++ lib.optional (lib.versionAtLeast version "4.1" && stdenv.isDarwin) Security
+        ++ ocamlDependencies version;
+
+      src = fetchFromGitHub {
+        owner = "HaxeFoundation";
+        repo = "haxe";
+        rev = version;
+        fetchSubmodules = true;
+        inherit sha256;
+      };
+
+      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 lib; {
+        description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
+        homepage = "https://haxe.org";
+        license = with licenses; [ gpl2Plus mit ]; # based on upstream opam file
+        maintainers = [ maintainers.marcweber maintainers.locallycompact maintainers.logo ];
+        platforms = platforms.linux ++ platforms.darwin;
+      };
+    };
+in {
+  haxe_4_0 = generic {
+    version = "4.0.5";
+    sha256 = "0f534pchdx0m057ixnk07ab4s518ica958pvpd0vfjsrxg5yjkqa";
+  };
+  haxe_4_1 = generic {
+    version = "4.1.5";
+    sha256 = "0rns6d28qzkbai6yyws08yzbyvxfn848nj0fsji7chdi0y7pzzj0";
+  };
+  haxe_4_3 = generic {
+    version = "4.3.3";
+    sha256 = "sha256-sMklqQkVbWCYCKpOU23AjkuxzcVV7Aa8ljlFpruam9Y=";
+  };
+}
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/heptagon/default.nix b/nixpkgs/pkgs/development/compilers/heptagon/default.nix
new file mode 100644
index 000000000000..7f9c1c849f4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/heptagon/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, makeWrapper
+, ocamlPackages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "heptagon";
+  version = "1.05.00";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "synchrone";
+    repo = "heptagon";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-b4O48MQT3Neh8a1Z5wRgS701w6XrwpsbSMprlqTT+CE=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = with ocamlPackages; [
+    camlp4
+    findlib
+    makeWrapper
+    menhir
+    ocaml
+    ocamlbuild
+  ];
+
+  buildInputs = with ocamlPackages; [
+    camlp4
+    lablgtk
+    menhirLib
+    ocamlgraph
+  ];
+
+  # the heptagon library in lib/heptagon is not executable
+  postInstall = ''
+    find $out/lib/heptagon -type f -exec chmod -x {} \;
+  '';
+
+  postFixup = with ocamlPackages; ''
+    wrapProgram $out/bin/hepts \
+      --prefix CAML_LD_LIBRARY_PATH : "${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2"
+  '';
+
+  meta = with lib; {
+    description = "Compiler for the Heptagon/BZR synchronous programming language";
+    homepage = "https://gitlab.inria.fr/synchrone/heptagon";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ wegank ];
+    mainProgram = "heptc";
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/hop/default.nix b/nixpkgs/pkgs/development/compilers/hop/default.nix
new file mode 100644
index 000000000000..00900b6fffe4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/hop/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, bigloo }:
+
+# Compute the “release” version of bigloo (before the first dash, if any)
+let bigloo-release =
+  let inherit (lib) head splitString; in
+  head (splitString "-" (builtins.parseDrvName bigloo.name).version)
+; in
+
+stdenv.mkDerivation rec {
+  pname = "hop";
+  version = "3.4.4";
+  src = fetchurl {
+    url = "ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-${version}.tar.gz";
+    sha256 = "sha256-GzXh4HC+SFFoUi7SMqu36iYRPAJ6tMnOHd+he6n9k1I=";
+  };
+
+  postPatch = ''
+    substituteInPlace configure --replace "(os-tmp)" '(getenv "TMPDIR")'
+  '';
+
+  buildInputs = [ bigloo ];
+
+  configureFlags = [
+    "--bigloo=${bigloo}/bin/bigloo"
+    "--bigloolibdir=${bigloo}/lib/bigloo/${bigloo-release}/"
+  ];
+
+  meta = with 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/hvm/default.nix b/nixpkgs/pkgs/development/compilers/hvm/default.nix
new file mode 100644
index 000000000000..03dcdcae6724
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/hvm/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, rustPlatform
+, fetchCrate
+, stdenv
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "hvm";
+  version = "1.0.9";
+
+  src = fetchCrate {
+    inherit pname version;
+    hash = "sha256-dO0GzbMopX84AKOtJYYW6vojcs4kYcZ8LQ4tXEgUN7I=";
+  };
+
+  cargoHash = "sha256-RQnyVRHWrqnKcI3Jy593jDTydG1nGyrScsqSNyJTDJk=";
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk_11_0.frameworks.IOKit
+  ];
+
+  # tests are broken
+  doCheck = false;
+
+  # enable nightly features
+  RUSTC_BOOTSTRAP = true;
+
+  meta = with lib; {
+    description = "A pure functional compile target that is lazy, non-garbage-collected, and parallel";
+    homepage = "https://github.com/higherorderco/hvm";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/idris2/build-idris.nix b/nixpkgs/pkgs/development/compilers/idris2/build-idris.nix
new file mode 100644
index 000000000000..3ad0956e3a08
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/idris2/build-idris.nix
@@ -0,0 +1,86 @@
+{ stdenv, lib, idris2, makeWrapper
+}:
+# Usage: let
+#          pkg = idris2Packages.buildIdris {
+#            src = ...;
+#            ipkgName = "my-pkg";
+#            idrisLibraries = [ ];
+#          };
+#        in {
+#          lib = pkg.library { withSource = true; };
+#          bin = pkg.executable;
+#        }
+#
+{ src
+, ipkgName
+, version ? "unversioned"
+, idrisLibraries # Other libraries built with buildIdris
+, ... }@attrs:
+
+let
+  ipkgFileName = ipkgName + ".ipkg";
+  idrName = "idris2-${idris2.version}";
+  libSuffix = "lib/${idrName}";
+  libDirs =
+    (lib.makeSearchPath libSuffix idrisLibraries) +
+    ":${idris2}/${idrName}";
+  supportDir = "${idris2}/${idrName}/lib";
+  drvAttrs = builtins.removeAttrs attrs [
+    "ipkgName"
+    "idrisLibraries"
+  ];
+
+  sharedAttrs = drvAttrs // {
+    pname = ipkgName;
+    inherit version;
+    src = src;
+    nativeBuildInputs = [ idris2 makeWrapper ] ++ attrs.nativeBuildInputs or [];
+    buildInputs = idrisLibraries ++ attrs.buildInputs or [];
+
+    IDRIS2_PACKAGE_PATH = libDirs;
+
+    buildPhase = ''
+      runHook preBuild
+      idris2 --build ${ipkgFileName}
+      runHook postBuild
+    '';
+  };
+
+in {
+  executable = stdenv.mkDerivation (sharedAttrs // {
+    installPhase = ''
+      runHook preInstall
+      mkdir -p $out/bin
+      scheme_app="$(find ./build/exec -name '*_app')"
+      if [ "$scheme_app" = ''' ]; then
+        mv -- build/exec/* $out/bin/
+        chmod +x $out/bin/*
+        # ^ remove after Idris2 0.8.0 is released. will be superfluous:
+        # https://github.com/idris-lang/Idris2/pull/3189
+      else
+        cd build/exec/*_app
+        rm -f ./libidris2_support.so
+        for file in *.so; do
+          bin_name="''${file%.so}"
+          mv -- "$file" "$out/bin/$bin_name"
+          wrapProgram "$out/bin/$bin_name" \
+            --prefix LD_LIBRARY_PATH : ${supportDir} \
+            --prefix DYLD_LIBRARY_PATH : ${supportDir}
+        done
+      fi
+      runHook postInstall
+    '';
+  });
+
+  library = { withSource ? false }:
+    let installCmd = if withSource then "--install-with-src" else "--install";
+    in stdenv.mkDerivation (sharedAttrs // {
+      installPhase = ''
+        runHook preInstall
+        mkdir -p $out/${libSuffix}
+        export IDRIS2_PREFIX=$out/lib
+        idris2 ${installCmd} ${ipkgFileName}
+        runHook postInstall
+      '';
+    });
+}
diff --git a/nixpkgs/pkgs/development/compilers/idris2/default.nix b/nixpkgs/pkgs/development/compilers/idris2/default.nix
new file mode 100644
index 000000000000..79a90cbee0f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/idris2/default.nix
@@ -0,0 +1,21 @@
+{ callPackage
+, idris2Packages
+}:
+
+let
+in {
+  idris2 = callPackage ./idris2.nix { };
+  idris2Lsp = callPackage ./idris2-lsp.nix { };
+
+  buildIdris = callPackage ./build-idris.nix { };
+
+  idris2Api = (idris2Packages.buildIdris {
+    inherit (idris2Packages.idris2) src version;
+    ipkgName = "idris2api";
+    idrisLibraries = [ ];
+    preBuild = ''
+      export IDRIS2_PREFIX=$out/lib
+      make src/IdrisPaths.idr
+    '';
+  }).library;
+}
diff --git a/nixpkgs/pkgs/development/compilers/idris2/idris2-lsp.nix b/nixpkgs/pkgs/development/compilers/idris2/idris2-lsp.nix
new file mode 100644
index 000000000000..d73f2d70d6d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/idris2/idris2-lsp.nix
@@ -0,0 +1,44 @@
+{ fetchFromGitHub, idris2Packages, makeWrapper }:
+
+let
+  globalLibraries = let
+    idrName = "idris2-${idris2Packages.idris2.version}";
+    libSuffix = "lib/${idrName}";
+  in [
+    "\\$HOME/.nix-profile/lib/${idrName}"
+    "/run/current-system/sw/lib/${idrName}"
+    "${idris2Packages.idris2}/${idrName}"
+  ];
+  globalLibrariesPath = builtins.concatStringsSep ":" globalLibraries;
+
+  idris2Api = idris2Packages.idris2Api { };
+  lspLib = (idris2Packages.buildIdris {
+    ipkgName = "lsp-lib";
+    version = "2024-01-21";
+    src = fetchFromGitHub {
+     owner = "idris-community";
+     repo = "LSP-lib";
+     rev = "03851daae0c0274a02d94663d8f53143a94640da";
+     hash = "sha256-ICW9oOOP70hXneJFYInuPY68SZTDw10dSxSPTW4WwWM=";
+    };
+    idrisLibraries = [ ];
+  }).library { };
+
+  lspPkg = idris2Packages.buildIdris {
+    ipkgName = "idris2-lsp";
+    version = "2024-01-21";
+    src = fetchFromGitHub {
+       owner = "idris-community";
+       repo = "idris2-lsp";
+       rev = "a77ef2d563418925aa274fa29f06880dde43f4ec";
+       hash = "sha256-zjfVfkpiQS9AdmTfq0hYRSelJq5Caa9VGTuFLtSvl5o=";
+    };
+    idrisLibraries = [idris2Api lspLib];
+
+    buildInputs = [makeWrapper];
+    postInstall = ''
+      wrapProgram $out/bin/idris2-lsp \
+        --suffix IDRIS2_PACKAGE_PATH ':' "${globalLibrariesPath}"
+    '';
+  };
+in lspPkg.executable
diff --git a/nixpkgs/pkgs/development/compilers/idris2/idris2.nix b/nixpkgs/pkgs/development/compilers/idris2/idris2.nix
new file mode 100644
index 000000000000..88c4d05703cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/idris2/idris2.nix
@@ -0,0 +1,97 @@
+# Almost 1:1 copy of idris2's nix/package.nix. Some work done in their flake.nix
+# we do here instead.
+{ stdenv
+, lib
+, chez
+, chez-racket
+, clang
+, gmp
+, fetchFromGitHub
+, makeWrapper
+, gambit
+, nodejs
+, zsh
+, callPackage
+}:
+
+# NOTICE: An `idris2WithPackages` is available at: https://github.com/claymager/idris2-pkgs
+
+let
+  # Taken from Idris2/idris2/flake.nix. Check if the idris2 project does it this
+  # way, still, every now and then.
+  platformChez = if stdenv.system == "x86_64-linux" then chez else chez-racket;
+# Uses scheme to bootstrap the build of idris2
+in stdenv.mkDerivation rec {
+  pname = "idris2";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "idris-lang";
+    repo = "Idris2";
+    rev = "v${version}";
+    sha256 = "sha256-VwveX3fZfrxEsytpbOc5Tm6rySpLFhTt5132J6rmrmM=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ makeWrapper clang platformChez ]
+    ++ lib.optionals stdenv.isDarwin [ zsh ];
+  buildInputs = [ platformChez gmp ];
+
+  prePatch = ''
+    patchShebangs --build tests
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" ]
+    ++ lib.optional stdenv.isDarwin "OS=";
+
+  # The name of the main executable of pkgs.chez is `scheme`
+  buildFlags = [ "bootstrap" "SCHEME=scheme" ];
+
+  checkTarget = "test";
+  nativeCheckInputs = [ gambit nodejs ]; # racket ];
+  checkFlags = [ "INTERACTIVE=" ];
+
+  # TODO: Move this into its own derivation, such that this can be changed
+  #       without having to recompile idris2 every time.
+  postInstall = let
+    name = "${pname}-${version}";
+    globalLibraries = [
+      "\\$HOME/.nix-profile/lib/${name}"
+      "/run/current-system/sw/lib/${name}"
+      "$out/${name}"
+    ];
+    globalLibrariesPath = builtins.concatStringsSep ":" globalLibraries;
+  in ''
+    # Remove existing idris2 wrapper that sets incorrect LD_LIBRARY_PATH
+    rm $out/bin/idris2
+    # The only thing we need from idris2_app is the actual binary
+    mv $out/bin/idris2_app/idris2.so $out/bin/idris2
+    rm $out/bin/idris2_app/*
+    rmdir $out/bin/idris2_app
+    # idris2 needs to find scheme at runtime to compile
+    # idris2 installs packages with --install into the path given by
+    #   IDRIS2_PREFIX. We set that to a default of ~/.idris2, to mirror the
+    #   behaviour of the standard Makefile install.
+    # TODO: Make support libraries their own derivation such that
+    #       overriding LD_LIBRARY_PATH is unnecessary
+    wrapProgram "$out/bin/idris2" \
+      --set-default CHEZ "${platformChez}/bin/scheme" \
+      --run 'export IDRIS2_PREFIX=''${IDRIS2_PREFIX-"$HOME/.idris2"}' \
+      --suffix IDRIS2_LIBS ':' "$out/${name}/lib" \
+      --suffix IDRIS2_DATA ':' "$out/${name}/support" \
+      --suffix IDRIS2_PACKAGE_PATH ':' "${globalLibrariesPath}" \
+      --suffix DYLD_LIBRARY_PATH ':' "$out/${name}/lib" \
+      --suffix LD_LIBRARY_PATH ':' "$out/${name}/lib"
+  '';
+
+  # Run package tests
+  passthru.tests = callPackage ./tests.nix { inherit pname; };
+
+  meta = {
+    description = "A purely functional programming language with first class types";
+    homepage = "https://github.com/idris-lang/Idris2";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ fabianhjr wchresta mattpolzin ];
+    inherit (chez.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/idris2/tests.nix b/nixpkgs/pkgs/development/compilers/idris2/tests.nix
new file mode 100644
index 000000000000..54bb6d29eeef
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/idris2/tests.nix
@@ -0,0 +1,68 @@
+{ stdenv, lib, pname, idris2, zsh }:
+
+let
+  testCompileAndRun = {testName, code, want, packages ? []}: let
+      packageString = builtins.concatStringsSep " " (map (p: "--package " + p) packages);
+    in stdenv.mkDerivation {
+      name = "${pname}-${testName}";
+      meta.timeout = 60;
+
+      # with idris2 compiled binaries assume zsh is available on darwin, but that
+      # is not the case with pure nix environments. Thus, we need to include zsh
+      # when we build for darwin in tests. While this is impure, this is also what
+      # we find in real darwin hosts.
+      nativeBuildInputs = lib.optionals stdenv.isDarwin [ zsh ];
+
+      buildCommand = ''
+        set -eo pipefail
+
+        cat > packageTest.idr <<HERE
+        ${code}
+        HERE
+
+        ${idris2}/bin/idris2 ${packageString} -o packageTest packageTest.idr
+
+        GOT=$(./build/exec/packageTest)
+
+        if [ "$GOT" = "${want}" ]; then
+          echo "${testName} SUCCESS: '$GOT' = '${want}'"
+        else
+          >&2 echo "Got '$GOT', want: '${want}'"
+          exit 1
+        fi
+
+        touch $out
+      '';
+    };
+in {
+  # Simple hello world compiles, runs and outputs as expected
+  hello-world = testCompileAndRun {
+    testName = "hello-world";
+    code = ''
+      module Main
+
+      main : IO ()
+      main = putStrLn "Hello World!"
+    '';
+    want = "Hello World!";
+  };
+
+  # Data.Vect.Sort is available via --package contrib
+  use-contrib = testCompileAndRun {
+    testName = "use-contrib";
+    packages = [ "contrib" ];
+    code = ''
+      module Main
+
+      import Data.Vect
+      import Data.Vect.Sort  -- from contrib
+
+      vect : Vect 3 Int
+      vect = 3 :: 1 :: 5 :: Nil
+
+      main : IO ()
+      main = putStrLn $ show (sort vect)
+    '';
+    want = "[1, 3, 5]";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/inform6/default.nix b/nixpkgs/pkgs/development/compilers/inform6/default.nix
new file mode 100644
index 000000000000..49af7e6676e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/inform6/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "inform6";
+  version = "6.41-r11";
+
+  src = fetchurl  {
+    url = "https://ifarchive.org/if-archive/infocom/compilers/inform6/source/inform-${version}.tar.gz";
+    sha256 = "sha256-kfFfjJL03f3af1h/JdvkItuDFu8aGlM3BRa2eBB+ddY=";
+  };
+
+  buildInputs = [ perl ];
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    description = "Interactive fiction compiler and libraries";
+    longDescription = ''
+      Inform 6 is a C-like programming language for writing interactive fiction
+      (text adventure) games.
+    '';
+    homepage = "https://gitlab.com/DavidGriffith/inform6unix";
+    changelog = "https://gitlab.com/DavidGriffith/inform6unix/-/raw/${version}/NEWS";
+    license = licenses.artistic2;
+    maintainers = with lib.maintainers; [ ddelabru ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/inform7/default.nix b/nixpkgs/pkgs/development/compilers/inform7/default.nix
new file mode 100644
index 000000000000..24bc14c0b3a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/inform7/default.nix
@@ -0,0 +1,33 @@
+{ lib, 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 lib; {
+    description = "A design system for interactive fiction";
+    homepage = "http://inform7.com/";
+    license = licenses.artistic2;
+    maintainers = with maintainers; [ mbbx6spp ];
+    platforms = platforms.unix;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/inklecate/default.nix b/nixpkgs/pkgs/development/compilers/inklecate/default.nix
new file mode 100644
index 000000000000..ac32e2954937
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/inklecate/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, autoPatchelfHook
+, buildDotnetModule
+, dotnetCorePackages
+, fetchFromGitHub
+}:
+
+buildDotnetModule rec {
+  pname = "inklecate";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "inkle";
+    repo = "ink";
+    rev = "v${version}";
+    hash = "sha512-aUjjT5Qf64wrKRn1vkwJadMOBWMkvsXUjtZ7S3/ZWAh1CCDkQNO84mSbtbVc9ny0fKeJEqaDX2tJNwq7pYqAbA==";
+  };
+
+  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+  buildInputs = [ stdenv.cc.cc.lib ];
+
+  projectFile = "inklecate/inklecate.csproj";
+  nugetDeps = ./deps.nix;
+  executables = [ "inklecate" ];
+
+  dotnet-sdk = dotnetCorePackages.sdk_6_0;
+  dotnet-runtime = dotnetCorePackages.runtime_6_0;
+
+  meta = with lib; {
+    description = "Compiler for ink, inkle's scripting language";
+    longDescription = ''
+      Inklecate is a command-line compiler for ink, inkle's open source
+      scripting language for writing interactive narrative
+    '';
+    homepage = "https://www.inklestudios.com/ink/";
+    downloadPage = "https://github.com/inkle/ink/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    badPlatforms = platforms.aarch64;
+    maintainers = with maintainers; [ shreerammodi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/inklecate/deps.nix b/nixpkgs/pkgs/development/compilers/inklecate/deps.nix
new file mode 100644
index 000000000000..f3a17967e25c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/inklecate/deps.nix
@@ -0,0 +1,5 @@
+# This file was automatically generated by passthru.fetch-deps.
+# Please dont edit it manually, your changes might get overwritten!
+
+{ fetchNuGet }: [
+]
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..54a8e82e27ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix
@@ -0,0 +1,88 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, runCommandLocal
+, bison
+, flex
+, intel-compute-runtime
+, llvmPackages_14
+, opencl-clang
+, python3
+, spirv-tools
+, spirv-headers
+, spirv-llvm-translator
+
+, buildWithPatches ? true
+}:
+
+let
+  vc_intrinsics_src = fetchFromGitHub {
+    owner = "intel";
+    repo = "vc-intrinsics";
+    rev = "v0.14.0";
+    hash = "sha256-t7m2y+DiZf0xum1vneXvoCyH767SKMOq4YzMIuZngR8=";
+  };
+
+  inherit (llvmPackages_14) lld llvm;
+  inherit (if buildWithPatches then opencl-clang else llvmPackages_14) clang libclang;
+  spirv-llvm-translator' = spirv-llvm-translator.override { inherit llvm; };
+in
+
+stdenv.mkDerivation rec {
+  pname = "intel-graphics-compiler";
+  version = "1.0.15610.11";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "intel-graphics-compiler";
+    rev = "igc-${version}";
+    hash = "sha256-Fu1g5M2lpcnLw6aSHI5gx47VOfx+rIdIhBlwe/Dv8bk=";
+  };
+
+  nativeBuildInputs = [ bison cmake flex (python3.withPackages (ps : with ps; [ mako ])) ];
+
+  buildInputs = [ lld llvm spirv-headers spirv-llvm-translator' spirv-tools ];
+
+  strictDeps = true;
+
+  # testing is done via intel-compute-runtime
+  doCheck = false;
+
+  postPatch = ''
+    substituteInPlace IGC/AdaptorOCL/igc-opencl.pc.in \
+      --replace '/@CMAKE_INSTALL_INCLUDEDIR@' "/include" \
+      --replace '/@CMAKE_INSTALL_LIBDIR@' "/lib"
+  '';
+
+  # Handholding the braindead build script
+  # cmake requires an absolute path
+  prebuilds = runCommandLocal "igc-cclang-prebuilds" { } ''
+    mkdir $out
+    ln -s ${clang}/bin/clang $out/
+    ln -s ${opencl-clang}/lib/* $out/
+    ln -s ${lib.getLib libclang}/lib/clang/${lib.getVersion clang}/include/opencl-c.h $out/
+    ln -s ${lib.getLib libclang}/lib/clang/${lib.getVersion clang}/include/opencl-c-base.h $out/
+  '';
+
+  cmakeFlags = [
+    "-DVC_INTRINSICS_SRC=${vc_intrinsics_src}"
+    "-DCCLANG_BUILD_PREBUILDS=ON"
+    "-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
+    "-DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds"
+    "-DIGC_OPTION__VC_INTRINSICS_MODE=Source"
+    "-Wno-dev"
+  ];
+
+  passthru.tests = {
+    inherit intel-compute-runtime;
+  };
+
+  meta = with 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.linux;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/intercal/default.nix b/nixpkgs/pkgs/development/compilers/intercal/default.nix
new file mode 100644
index 000000000000..1fde0f320c40
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/intercal/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, pkg-config
+, bison, flex
+, makeWrapper }:
+
+stdenv.mkDerivation rec {
+
+  pname = "intercal";
+  version = "0.31";
+
+  src = fetchurl {
+    url = "http://catb.org/esr/intercal/${pname}-${version}.tar.gz";
+    sha256 = "1z2gpa5rbqb7jscqlf258k0b0jc7d2zkyipb5csjpj6d3sw45n4k";
+  };
+
+  patches = [
+    # Pull patch pending upstream inclusion for -fno-common toolchains:
+    #   https://gitlab.com/esr/intercal/-/issues/4
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-lang/c-intercal/files/c-intercal-31.0-no-common.patch?id=a110a98b4de6f280d770ba3cc92a4612326205a3";
+      sha256 = "03523fc40042r2ryq5val27prlim8pld4950qqpawpism4w3y1p2";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config bison flex makeWrapper ];
+
+  # Intercal invokes gcc, so we need an explicit PATH
+  postInstall = ''
+    wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin
+  '';
+
+  meta = with lib; {
+    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..320cbdc41b0f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2.nix
@@ -0,0 +1,66 @@
+{ lib, git, clang,
+  fetchFromGitHub, requireFile,
+  openssl, xz, gnutar,
+  automake, autoconf, libtool, clangStdenv } :
+
+clangStdenv.mkDerivation rec {
+  pname = "ios-cross-compile";
+  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.
+   '';
+  };
+  nativeBuildInputs = [ autoconf automake ];
+  buildInputs = [ git xz gnutar openssl 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 = lib.platforms.linux;
+    hydraPlatforms = [];
+    maintainers = with lib.maintainers; [ fxfactorial ];
+    license = 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..4eef8acb0693
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
@@ -0,0 +1,154 @@
+# -*- shell-script -*-
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+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..d8b8c141042b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ispc/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, cmake, which, m4, python3, bison, flex, llvmPackages, ncurses, xcode, tbb
+  # the default test target is sse4, but that is not supported by all Hydra agents
+, testedTargets ? if stdenv.isAarch64 || stdenv.isAarch32 then [ "neon-i32x4" ] else [ "sse2-i32x4" ]
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "ispc";
+  version = "1.22.0";
+
+  src = fetchFromGitHub {
+    owner  = pname;
+    repo   = pname;
+    rev    = "v${version}";
+    sha256 = "sha256-NiBwQ7BzNgRdWLvjOi1fQni+vnYwn0nLHxqAVucmb2k=";
+  };
+
+  nativeBuildInputs = [ cmake which m4 bison flex python3 llvmPackages.libllvm.dev tbb ] ++ lib.lists.optionals stdenv.isDarwin [ xcode ];
+
+  buildInputs = with llvmPackages; [
+    libllvm libclang openmp ncurses
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace CURSES_CURSES_LIBRARY CURSES_NCURSES_LIBRARY
+    substituteInPlace cmake/GenerateBuiltins.cmake \
+      --replace 'bit 32 64' 'bit 64'
+  '';
+
+  inherit testedTargets;
+
+  doCheck = true;
+
+  # 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 = [
+    "-DFILE_CHECK_EXECUTABLE=${llvmPackages.llvm}/bin/FileCheck"
+    "-DLLVM_AS_EXECUTABLE=${llvmPackages.llvm}/bin/llvm-as"
+    "-DLLVM_CONFIG_EXECUTABLE=${llvmPackages.llvm.dev}/bin/llvm-config"
+    "-DLLVM_DIS_EXECUTABLE=${llvmPackages.llvm}/bin/llvm-dis"
+    "-DCLANG_EXECUTABLE=${llvmPackages.clang}/bin/clang"
+    "-DCLANGPP_EXECUTABLE=${llvmPackages.clang}/bin/clang++"
+    "-DISPC_INCLUDE_EXAMPLES=OFF"
+    "-DISPC_INCLUDE_UTILS=OFF"
+    ("-DARM_ENABLED=" + (if stdenv.isAarch64 || stdenv.isAarch32 then "TRUE" else "FALSE"))
+    ("-DX86_ENABLED=" + (if stdenv.isx86_64 || stdenv.isx86_32 then "TRUE" else "FALSE"))
+  ] ++ lib.lists.optionals stdenv.isDarwin [
+    "-DISPC_MACOS_SDK_PATH=${xcode}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
+  ];
+
+  meta = with 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" "aarch64-linux" "aarch64-darwin" ]; # TODO: buildable on more platforms?
+    maintainers = with maintainers; [ aristid thoughtpolice athas alexfmpe ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jasmin-compiler/default.nix b/nixpkgs/pkgs/development/compilers/jasmin-compiler/default.nix
new file mode 100644
index 000000000000..dcb2bf87692f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jasmin-compiler/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }:
+
+stdenv.mkDerivation rec {
+  pname = "jasmin-compiler";
+  version = "2023.06.2";
+
+  src = fetchurl {
+    url = "https://github.com/jasmin-lang/jasmin/releases/download/v${version}/jasmin-compiler-v${version}.tar.bz2";
+    hash = "sha256-I3+MP2Q7ENOdQdvvCqcyD+I8ImF6c+9HQDpY6QUWuY8=";
+  };
+
+  sourceRoot = "jasmin-compiler-v${version}/compiler";
+
+  nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_3 menhir camlidl cmdliner ];
+
+  buildInputs = [
+    mpfr
+    ppl
+  ] ++ (with ocamlPackages; [
+    apron
+    yojson
+  ]);
+
+  propagatedBuildInputs = with ocamlPackages; [
+    batteries
+    menhirLib
+    zarith
+  ];
+
+  outputs = [ "bin" "lib" "out" ];
+
+  installPhase = ''
+    runHook preInstall
+    dune build @install
+    dune install --prefix=$bin --libdir=$out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib
+    mkdir -p $lib/lib/jasmin/easycrypt
+    cp ../eclib/*.ec $lib/lib/jasmin/easycrypt
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "A workbench for high-assurance and high-speed cryptography";
+    homepage = "https://github.com/jasmin-lang/jasmin/";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.vbgl ];
+    mainProgram = "jasminc";
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jasmin/default.nix b/nixpkgs/pkgs/development/compilers/jasmin/default.nix
new file mode 100644
index 000000000000..db58f48b97bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jasmin/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchurl
+, unzip
+, ant
+, jdk8
+, makeWrapper
+, canonicalize-jars-hook
+, callPackage
+}:
+
+let
+  jdk = jdk8;
+  jre = jdk8.jre;
+
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "jasmin";
+  version = "2.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/jasmin/jasmin-${finalAttrs.version}.zip";
+    hash = "sha256-6qEMaM7Gggb9EC6exxE3OezNeQEIoblabow+k/IORJ0=";
+  };
+
+  nativeBuildInputs = [
+    unzip
+    ant
+    jdk
+    makeWrapper
+    canonicalize-jars-hook
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    ant all
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 jasmin.jar $out/share/java/jasmin.jar
+    makeWrapper ${jre}/bin/java $out/bin/jasmin \
+      --add-flags "-jar $out/share/java/jasmin.jar"
+
+    runHook postInstall
+  '';
+
+  passthru.tests = {
+    minimal-module = callPackage ./test-assemble-hello-world {};
+  };
+
+  meta = with lib; {
+    description = "An assembler for the Java Virtual Machine";
+    downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
+    homepage = "https://jasmin.sourceforge.net/";
+    license = licenses.bsd3;
+    mainProgram = "jasmin";
+    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..c9e9b34e6ee0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/javacard-devkit/default.nix
@@ -0,0 +1,70 @@
+{ lib, 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";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license = lib.licenses.unfree;
+    maintainers = [ 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..1e6b86b17b8e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix
@@ -0,0 +1,156 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, jetbrains
+, openjdk17
+, openjdk17-bootstrap
+, git
+, autoconf
+, unzip
+, rsync
+, debugBuild ? false
+, withJcef ? true
+
+, libXdamage
+, libXxf86vm
+, libXrandr
+, libXi
+, libXcursor
+, libXrender
+, libX11
+, libXext
+, libxcb
+, nss
+, nspr
+, libdrm
+, mesa
+, wayland
+, udev
+}:
+
+assert debugBuild -> withJcef;
+
+let
+  arch = {
+    "aarch64-linux" = "aarch64";
+    "x86_64-linux" = "x64";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  cpu = stdenv.hostPlatform.parsed.cpu.name;
+in
+openjdk17.overrideAttrs (oldAttrs: rec {
+  pname = "jetbrains-jdk" + lib.optionalString withJcef "-jcef";
+  javaVersion = "17.0.8";
+  build = "1000.8";
+  # To get the new tag:
+  # git clone https://github.com/jetbrains/jetbrainsruntime
+  # cd jetbrainsruntime
+  # git reset --hard [revision]
+  # git log --simplify-by-decoration --decorate=short --pretty=short | grep "jbr-" --color=never | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1 | tr -d ","
+  openjdkTag = "jbr-17.0.7+7";
+  version = "${javaVersion}-b${build}";
+
+  src = fetchFromGitHub {
+    owner = "JetBrains";
+    repo = "JetBrainsRuntime";
+    rev = "jb${version}";
+    hash = "sha256-PXS8wRF37D9vzeC4CvmB3szFMbt+NRqhQqtPZcbeAO8=";
+  };
+
+  BOOT_JDK = openjdk17-bootstrap.home;
+  # run `git log -1 --pretty=%ct` in jdk repo for new value on update
+  SOURCE_DATE_EPOCH = 1691119859;
+
+  patches = [ ];
+
+  dontConfigure = true;
+
+  buildPhase = ''
+    runHook preBuild
+
+    ${lib.optionalString withJcef "cp -r ${jetbrains.jcef} jcef_linux_${arch}"}
+
+    sed \
+        -e "s/OPENJDK_TAG=.*/OPENJDK_TAG=${openjdkTag}/" \
+        -e "s/SOURCE_DATE_EPOCH=.*//" \
+        -e "s/export SOURCE_DATE_EPOCH//" \
+        -i jb/project/tools/common/scripts/common.sh
+    sed -i "s/STATIC_CONF_ARGS/STATIC_CONF_ARGS \$configureFlags/" jb/project/tools/linux/scripts/mkimages_${arch}.sh
+    sed \
+        -e "s/create_image_bundle \"jb/#/" \
+        -e "s/echo Creating /exit 0 #/" \
+        -i jb/project/tools/linux/scripts/mkimages_${arch}.sh
+
+    patchShebangs .
+    ./jb/project/tools/linux/scripts/mkimages_${arch}.sh ${build} ${if debugBuild then "fd" else (if withJcef then "jcef" else "nomod")}
+
+    runHook postBuild
+  '';
+
+  installPhase =
+    let
+      buildType = if debugBuild then "fastdebug" else "release";
+      debugSuffix = if debugBuild then "-fastdebug" else "";
+      jcefSuffix = if debugBuild || !withJcef then "" else "_jcef";
+      jbrsdkDir = "jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build}";
+    in
+    ''
+      runHook preInstall
+
+      mv build/linux-${cpu}-server-${buildType}/images/jdk/man build/linux-${cpu}-server-${buildType}/images/${jbrsdkDir}
+      rm -rf build/linux-${cpu}-server-${buildType}/images/jdk
+      mv build/linux-${cpu}-server-${buildType}/images/${jbrsdkDir} build/linux-${cpu}-server-${buildType}/images/jdk
+    '' + oldAttrs.installPhase + "runHook postInstall";
+
+  postInstall = lib.optionalString withJcef ''
+    chmod +x $out/lib/openjdk/lib/chrome-sandbox
+  '';
+
+  dontStrip = debugBuild;
+
+  postFixup = ''
+    # Build the set of output library directories to rpath against
+    LIBDIRS="${lib.makeLibraryPath [
+      libXdamage libXxf86vm libXrandr libXi libXcursor libXrender libX11 libXext libxcb
+      nss nspr libdrm mesa wayland udev
+    ]}"
+    for output in $outputs; do
+      if [ "$output" = debug ]; then continue; fi
+      LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | 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
+  '';
+
+  nativeBuildInputs = [ git autoconf unzip rsync ] ++ oldAttrs.nativeBuildInputs;
+
+  meta = with 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://confluence.jetbrains.com/display/JBR/JetBrains+Runtime";
+    inherit (openjdk17.meta) license platforms mainProgram;
+    maintainers = with maintainers; [ edwtjo ];
+
+    broken = stdenv.isDarwin;
+  };
+
+  passthru = oldAttrs.passthru // {
+    home = "${jetbrains.jdk}/lib/openjdk";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/jetbrains-jdk/jcef.nix b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/jcef.nix
new file mode 100644
index 000000000000..6b688e32ba50
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/jcef.nix
@@ -0,0 +1,259 @@
+{ fetchFromGitHub
+, fetchurl
+, fetchzip
+, stdenv
+, cmake
+, python3
+, jdk17
+, git
+, libcef
+, rsync
+, lib
+, ant
+, ninja
+
+, debugBuild ? false
+
+, glib
+, nss
+, nspr
+, atk
+, at-spi2-atk
+, libdrm
+, expat
+, libxcb
+, libxkbcommon
+, libX11
+, libXcomposite
+, libXdamage
+, libXext
+, libXfixes
+, libXrandr
+, mesa
+, gtk3
+, pango
+, cairo
+, alsa-lib
+, dbus
+, at-spi2-core
+, cups
+, libxshmfence
+, udev
+}:
+
+assert !stdenv.isDarwin;
+# I can't test darwin
+
+let
+  rpath = lib.makeLibraryPath [
+    glib
+    nss
+    nspr
+    atk
+    at-spi2-atk
+    libdrm
+    expat
+    libxcb
+    libxkbcommon
+    libX11
+    libXcomposite
+    libXdamage
+    libXext
+    libXfixes
+    libXrandr
+    mesa
+    gtk3
+    pango
+    cairo
+    alsa-lib
+    dbus
+    at-spi2-core
+    cups
+    libxshmfence
+    udev
+  ];
+
+  buildType = if debugBuild then "Debug" else "Release";
+  platform = {
+    "aarch64-linux" = "linuxarm64";
+    "x86_64-linux" = "linux64";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  arches = {
+    "linuxarm64" = {
+      depsArch = "arm64";
+      projectArch = "arm64";
+      targetArch = "arm64";
+    };
+    "linux64" = {
+      depsArch = "amd64";
+      projectArch = "x86_64";
+      targetArch = "x86_64";
+    };
+  }.${platform};
+  inherit (arches) depsArch projectArch targetArch;
+
+in
+stdenv.mkDerivation rec {
+  pname = "jcef-jetbrains";
+  rev = "9f8d4fb20b4658db6b2b6bc08e5dd0d8c7340290";
+  # This is the commit number
+  # Currently from the branch: https://github.com/JetBrains/jcef/tree/232
+  # Run `git rev-list --count HEAD`
+  version = "675";
+
+  nativeBuildInputs = [ cmake python3 jdk17 git rsync ant ninja ];
+  buildInputs = [ libX11 libXdamage nss nspr ];
+
+  src = fetchFromGitHub {
+    owner = "jetbrains";
+    repo = "jcef";
+    inherit rev;
+    hash = "sha256-8zsgcWl0lZtC1oud5IlkUdeXxJUlHoRfw8t0FrZUQec=";
+  };
+  cef-bin =
+    let
+      # `cef_binary_${CEF_VERSION}_linux64_minimal`, where CEF_VERSION is from $src/CMakeLists.txt
+      name = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_${platform}_minimal";
+      hash = {
+        "linuxarm64" = "sha256-gCDIfWsysXE8lHn7H+YM3Jag+mdbWwTQpJf0GKdXEVs=";
+        "linux64" = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw=";
+      }.${platform};
+      urlName = builtins.replaceStrings [ "+" ] [ "%2B" ] name;
+    in
+    fetchzip {
+      url = "https://cef-builds.spotifycdn.com/${urlName}.tar.bz2";
+      inherit name hash;
+    };
+  clang-fmt = fetchurl {
+    url = "https://storage.googleapis.com/chromium-clang-format/dd736afb28430c9782750fc0fd5f0ed497399263";
+    hash = "sha256-4H6FVO9jdZtxH40CSfS+4VESAHgYgYxfCBFSMHdT0hE=";
+  };
+
+  configurePhase = ''
+    runHook preConfigure
+
+    patchShebangs .
+
+    cp -r ${cef-bin} third_party/cef/${cef-bin.name}
+    chmod +w -R third_party/cef/${cef-bin.name}
+    patchelf third_party/cef/${cef-bin.name}/${buildType}/libcef.so --set-rpath "${rpath}" --add-needed libudev.so
+    patchelf third_party/cef/${cef-bin.name}/${buildType}/chrome-sandbox --set-interpreter $(cat $NIX_BINTOOLS/nix-support/dynamic-linker)
+    sed 's/-O0/-O2/' -i third_party/cef/${cef-bin.name}/cmake/cef_variables.cmake
+
+    sed \
+      -e 's|os.path.isdir(os.path.join(path, \x27.git\x27))|True|' \
+      -e 's|"%s rev-parse %s" % (git_exe, branch)|"echo '${rev}'"|' \
+      -e 's|"%s config --get remote.origin.url" % git_exe|"echo 'https://github.com/jetbrains/jcef'"|' \
+      -e 's|"%s rev-list --count %s" % (git_exe, branch)|"echo '${version}'"|' \
+      -i tools/git_util.py
+
+    cp ${clang-fmt} tools/buildtools/linux64/clang-format
+    chmod +w tools/buildtools/linux64/clang-format
+
+    mkdir jcef_build
+    cd jcef_build
+
+    cmake -G "Ninja" -DPROJECT_ARCH="${projectArch}" -DCMAKE_BUILD_TYPE=${buildType} ..
+
+    runHook postConfigure
+  '';
+
+  outputs = [ "out" "unpacked" ];
+
+  postBuild = ''
+    export JCEF_ROOT_DIR=$(realpath ..)
+    ../tools/compile.sh ${platform} Release
+  '';
+
+  # Mostly taken from jb/tools/common/create_modules.sh
+  installPhase = ''
+    runHook preInstall
+
+    export JCEF_ROOT_DIR=$(realpath ..)
+    export OUT_NATIVE_DIR=$JCEF_ROOT_DIR/jcef_build/native/${buildType}
+    export JB_TOOLS_DIR=$(realpath ../jb/tools)
+    export JB_TOOLS_OS_DIR=$JB_TOOLS_DIR/linux
+    export OUT_CLS_DIR=$(realpath ../out/${platform})
+    export TARGET_ARCH=${targetArch} DEPS_ARCH=${depsArch}
+    export OS=linux
+    export JOGAMP_DIR="$JCEF_ROOT_DIR"/third_party/jogamp/jar
+
+    mkdir -p $unpacked/{jogl,gluegen,jcef}
+
+    function extract_jar {
+      __jar=$1
+      __dst_dir=$2
+      __content_dir="''${3:-.}"
+      __tmp=.tmp_extract_jar
+      rm -rf "$__tmp" && mkdir "$__tmp"
+      (
+        cd "$__tmp" || exit 1
+        jar -xf "$__jar"
+      )
+      rm -rf "$__tmp/META-INF"
+      rm -rf "$__dst_dir" && mkdir "$__dst_dir"
+      if [ -z "$__content_dir" ]
+      then
+          cp -R "$__tmp"/* "$__dst_dir"
+      else
+          cp -R "$__tmp"/"$__content_dir"/* "$__dst_dir"
+      fi
+      rm -rf $__tmp
+    }
+
+    cd $unpacked/gluegen
+    cp "$JOGAMP_DIR"/gluegen-rt.jar .
+    cp "$JB_TOOLS_DIR"/common/gluegen-module-info.java module-info.java
+    javac --patch-module gluegen.rt=gluegen-rt.jar module-info.java
+    jar uf gluegen-rt.jar module-info.class
+    rm module-info.class module-info.java
+    mkdir lib
+  ''
+  # see https://github.com/JetBrains/jcef/commit/f3b787e3326c1915d663abded7f055c0866f32ec
+  + lib.optionalString (platform != "linuxarm64") ''
+    extract_jar "$JOGAMP_DIR"/gluegen-rt-natives-"$OS"-"$DEPS_ARCH".jar lib natives/"$OS"-"$DEPS_ARCH"
+  '' + ''
+
+    cd ../jogl
+    cp "$JOGAMP_DIR"/gluegen-rt.jar .
+    cp "$JOGAMP_DIR"/jogl-all.jar .
+    cp "$JB_TOOLS_OS_DIR"/jogl-module-info.java module-info.java
+    javac --module-path . --patch-module jogl.all=jogl-all.jar module-info.java
+    jar uf jogl-all.jar module-info.class
+    rm module-info.class module-info.java
+    mkdir lib
+  ''
+  # see https://github.com/JetBrains/jcef/commit/f3b787e3326c1915d663abded7f055c0866f32ec
+  + lib.optionalString (platform != "linuxarm64") ''
+    extract_jar "$JOGAMP_DIR"/jogl-all-natives-"$OS"-"$DEPS_ARCH".jar lib natives/"$OS"-"$DEPS_ARCH"
+  '' + ''
+
+    cd ../jcef
+    cp "$OUT_CLS_DIR"/jcef.jar .
+    mkdir lib
+    cp -R "$OUT_NATIVE_DIR"/* lib
+
+    mkdir -p $out/jmods
+
+    bash "$JB_TOOLS_DIR"/common/create_version_file.sh $out
+
+    runHook postInstall
+  '';
+
+  dontStrip = debugBuild;
+
+  postFixup = ''
+    cd $unpacked/gluegen
+    jmod create --class-path gluegen-rt.jar --libs lib $out/jmods/gluegen.rt.jmod
+    cd ../jogl
+    jmod create --module-path . --class-path jogl-all.jar --libs lib $out/jmods/jogl.all.jmod
+    cd ../jcef
+    jmod create --module-path . --class-path jcef.jar --libs lib $out/jmods/jcef.jmod
+  '';
+
+  meta = {
+    description = "Jetbrains' fork of JCEF";
+    license = lib.licenses.bsd3;
+    homepage = "https://github.com/JetBrains/JCEF";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jrsonnet/Cargo.lock b/nixpkgs/pkgs/development/compilers/jrsonnet/Cargo.lock
new file mode 100644
index 000000000000..941503289d9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jrsonnet/Cargo.lock
@@ -0,0 +1,551 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "annotate-snippets"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c96c3d1062ea7101741480185a6a1275eab01cbe8b20e378d1311bc056d2e08"
+dependencies = [
+ "unicode-width",
+ "yansi-term",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
+
+[[package]]
+name = "base64"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
+
+[[package]]
+name = "bincode"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+
+[[package]]
+name = "cc"
+version = "1.0.67"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
+
+[[package]]
+name = "clap"
+version = "3.0.0-beta.2"
+source = "git+https://github.com/clap-rs/clap?rev=f0c5ea5e1503de5c8e74d8c047a799cf51498e83#f0c5ea5e1503de5c8e74d8c047a799cf51498e83"
+dependencies = [
+ "atty",
+ "bitflags",
+ "clap_derive",
+ "indexmap",
+ "lazy_static",
+ "os_str_bytes",
+ "strsim",
+ "termcolor",
+ "textwrap",
+ "vec_map",
+]
+
+[[package]]
+name = "clap_derive"
+version = "3.0.0-beta.2"
+source = "git+https://github.com/clap-rs/clap?rev=f0c5ea5e1503de5c8e74d8c047a799cf51498e83#f0c5ea5e1503de5c8e74d8c047a799cf51498e83"
+dependencies = [
+ "heck",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_generate"
+version = "3.0.0-beta.2"
+source = "git+https://github.com/clap-rs/clap?rev=f0c5ea5e1503de5c8e74d8c047a799cf51498e83#f0c5ea5e1503de5c8e74d8c047a799cf51498e83"
+dependencies = [
+ "clap",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
+
+[[package]]
+name = "heck"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
+
+[[package]]
+name = "jrsonnet"
+version = "0.4.2"
+dependencies = [
+ "clap",
+ "clap_generate",
+ "jrsonnet-cli",
+ "jrsonnet-evaluator",
+ "jrsonnet-parser",
+ "mimallocator",
+ "thiserror",
+]
+
+[[package]]
+name = "jrsonnet-cli"
+version = "0.4.2"
+dependencies = [
+ "clap",
+ "jrsonnet-evaluator",
+ "jrsonnet-gc",
+ "jrsonnet-parser",
+]
+
+[[package]]
+name = "jrsonnet-evaluator"
+version = "0.4.2"
+dependencies = [
+ "annotate-snippets",
+ "anyhow",
+ "base64",
+ "bincode",
+ "jrsonnet-gc",
+ "jrsonnet-interner",
+ "jrsonnet-parser",
+ "jrsonnet-stdlib",
+ "jrsonnet-types",
+ "md5",
+ "pathdiff",
+ "rustc-hash",
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
+[[package]]
+name = "jrsonnet-gc"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68da8bc2f00117b1373bb8877af03b1d391e4c4800e6585d7279e5b99c919dde"
+dependencies = [
+ "jrsonnet-gc-derive",
+]
+
+[[package]]
+name = "jrsonnet-gc-derive"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adcba9c387b64b054f06cc4d724905296e21edeeb7506847f3299117a2d92d12"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[package]]
+name = "jrsonnet-interner"
+version = "0.4.2"
+dependencies = [
+ "jrsonnet-gc",
+ "rustc-hash",
+ "serde",
+]
+
+[[package]]
+name = "jrsonnet-parser"
+version = "0.4.2"
+dependencies = [
+ "jrsonnet-gc",
+ "jrsonnet-interner",
+ "jrsonnet-stdlib",
+ "peg",
+ "serde",
+ "unescape",
+]
+
+[[package]]
+name = "jrsonnet-stdlib"
+version = "0.4.2"
+
+[[package]]
+name = "jrsonnet-types"
+version = "0.4.2"
+dependencies = [
+ "jrsonnet-gc",
+ "peg",
+]
+
+[[package]]
+name = "jsonnet"
+version = "0.4.2"
+dependencies = [
+ "jrsonnet-evaluator",
+ "jrsonnet-gc",
+ "jrsonnet-parser",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
+
+[[package]]
+name = "md5"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
+
+[[package]]
+name = "mimalloc-sys"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4aa3cefb626f6ae3d0b2f71c5378c89d2b1d4d7bc246b0ca9a7ee61a4daad291"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "mimallocator"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d44fe4ebf6b538fcf39d9975c2b90bb3232d1ba8e8bffeacd004f27b20c577a"
+dependencies = [
+ "mimalloc-sys",
+]
+
+[[package]]
+name = "os_str_bytes"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e293568965aea261bdf010db17df7030e3c9a275c415d51d6112f7cf9b7af012"
+
+[[package]]
+name = "pathdiff"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34"
+
+[[package]]
+name = "peg"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a"
+dependencies = [
+ "peg-macros",
+ "peg-runtime",
+]
+
+[[package]]
+name = "peg-macros"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c"
+dependencies = [
+ "peg-runtime",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "peg-runtime"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088"
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
+dependencies = [
+ "unicode-xid",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "ryu"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
+
+[[package]]
+name = "serde"
+version = "1.0.125"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.125"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "syn"
+version = "1.0.71"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "unicode-xid",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "unescape"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e"
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
+
+[[package]]
+name = "vec_map"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+
+[[package]]
+name = "version_check"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "yansi-term"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1"
+dependencies = [
+ "winapi",
+]
diff --git a/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix b/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix
new file mode 100644
index 000000000000..3c4c5d71c0ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix
@@ -0,0 +1,45 @@
+{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "jrsonnet";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "CertainLach";
+    repo = "jrsonnet";
+    sha256 = "sha256-OX+iJJ3vdCsWWr8x31psV9Vne6xWDZnJc83NbJqMK1A=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "clap-3.0.0-beta.2" = "sha256-BaLzm2JZEicktfsCIXQipHtEKlEv2lBktfvHP58rjeM=";
+    };
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  # skip flaky tests
+  checkFlags = [
+    "--skip=tests::native_ext"
+  ];
+
+  postInstall = ''
+    ln -s $out/bin/jrsonnet $out/bin/jsonnet
+
+    for shell in bash zsh fish; do
+      installShellCompletion --cmd jrsonnet \
+        --$shell <($out/bin/jrsonnet --generate $shell /dev/null)
+      installShellCompletion --cmd jsonnet \
+        --$shell <($out/bin/jrsonnet --generate $shell /dev/null | sed s/jrsonnet/jsonnet/g)
+    done
+  '';
+
+  meta = with lib; {
+    description = "Purely-functional configuration language that helps you define JSON data";
+    homepage = "https://github.com/CertainLach/jrsonnet";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda lach ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jsonnet/default.nix b/nixpkgs/pkgs/development/compilers/jsonnet/default.nix
new file mode 100644
index 000000000000..8e723cdb8211
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jsonnet/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, jekyll, cmake, fetchFromGitHub, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "jsonnet";
+  version = "0.20.0";
+  outputs = [ "out" "doc" ];
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "google";
+    repo = "jsonnet";
+    sha256 = "sha256-FtVJE9alEl56Uik+nCpJMV5DMVVmRCnE1xMAiWdK39Y=";
+  };
+
+  nativeBuildInputs = [ jekyll cmake ];
+  buildInputs = [ gtest ];
+
+  cmakeFlags = [
+    "-DUSE_SYSTEM_GTEST=ON"
+    "-DBUILD_STATIC_LIBS=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "-DBUILD_SHARED_BINARIES=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  # https://github.com/google/jsonnet/issues/778
+  patches = [
+    ./fix-cpp-unresolved-symbols.patch
+  ];
+
+  enableParallelBuilding = true;
+
+  # Upstream writes documentation in html, not in markdown/rst, so no
+  # other output formats, sorry.
+  postBuild = ''
+    jekyll build --source ../doc --destination ./html
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/doc/jsonnet
+    cp -r ./html $out/share/doc/jsonnet
+  '';
+
+  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/jsonnet/fix-cpp-unresolved-symbols.patch b/nixpkgs/pkgs/development/compilers/jsonnet/fix-cpp-unresolved-symbols.patch
new file mode 100644
index 000000000000..dc4cdcf2ea1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jsonnet/fix-cpp-unresolved-symbols.patch
@@ -0,0 +1,12 @@
+diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
+index 3a52458..872e6c6 100644
+--- a/cpp/CMakeLists.txt
++++ b/cpp/CMakeLists.txt
+@@ -10,6 +10,7 @@ set(LIBJSONNETPP_SOURCE
+
+ add_library(libjsonnet++ SHARED ${LIBJSONNETPP_HEADERS} ${LIBJSONNETPP_SOURCE})
+ add_dependencies(libjsonnet++ jsonnet)
++target_link_libraries(libjsonnet++ libjsonnet)
+ # target_link_libraries(libjsonnet libjsonnet)
+
+ # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without
diff --git a/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix b/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix
new file mode 100644
index 000000000000..dea8a140ee5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix
@@ -0,0 +1,72 @@
+{ autoPatchelfHook, fetchurl, lib, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "julia-bin";
+  version = "1.6.7";
+
+  src = {
+    x86_64-linux = fetchurl {
+      url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
+      sha256 = "sha256-bEUi1ZXky80AFXrEWKcviuwBdXBT0gc/mdqjnkQrKjY=";
+    };
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  # Julia’s source files are in different locations for source and binary
+  # releases. Thus we temporarily create a symlink to allow us to share patches
+  # with source releases.
+  prePatch = ''
+    ln -s share/julia/test
+  '';
+  patches = [
+    # Source release Nix patch(es) relevant for binary releases as well.
+    ./patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
+  ];
+  postPatch = ''
+    # Revert symlink hack.
+    rm test
+
+    # Julia fails to pick up our Certification Authority root certificates, but
+    # it provides its own so we can simply disable the test. Patching in the
+    # dynamic path to ours require us to rebuild the Julia system image.
+    substituteInPlace share/julia/stdlib/v${lib.versions.majorMinor version}/NetworkOptions/test/runtests.jl \
+      --replace '@test ca_roots_path() != bundled_ca_roots()' \
+        '@test_skip ca_roots_path() != bundled_ca_roots()'
+  '';
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  installPhase = ''
+    runHook preInstall
+    cp -r . $out
+    runHook postInstall
+  '';
+
+  # Breaks backtraces, etc.
+  dontStrip = true;
+
+  doInstallCheck = true;
+  preInstallCheck = ''
+    # Some tests require read/write access to $HOME.
+    export HOME="$TMPDIR"
+  '';
+  installCheckPhase = ''
+    runHook preInstallCheck
+    # Command lifted from `test/Makefile`.
+    $out/bin/julia \
+      --check-bounds=yes \
+      --startup-file=no \
+      --depwarn=error \
+      $out/share/julia/test/runtests.jl
+    runHook postInstallCheck
+  '';
+
+  meta = {
+    description = "High-level, high-performance, dynamic language for technical computing";
+    homepage = "https://julialang.org";
+    # Bundled and linked with various GPL code, although Julia itself is MIT.
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ raskin thomasjm ];
+    platforms = [ "x86_64-linux" ];
+    mainProgram = "julia";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/README.md b/nixpkgs/pkgs/development/compilers/julia/README.md
new file mode 100644
index 000000000000..e9843fa3c9e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/README.md
@@ -0,0 +1,24 @@
+Julia
+=====
+
+[Julia][julia], as a full-fledged programming language with an extensive
+standard library that covers numerical computing, can be somewhat challenging to
+package. This file aims to provide pointers which could not easily be included
+as comments in the expressions themselves.
+
+[julia]: https://julialang.org
+
+For Nixpkgs, the manual is as always your primary reference, and for the Julia
+side of things you probably want to familiarise yourself with the [README
+][readme], [build instructions][build], and [release process][release_process].
+Remember that these can change between Julia releases, especially if the LTS and
+release branches have deviated greatly. A lot of the build process is
+underdocumented and thus there is no substitute for digging into the code that
+controls the build process. You are very likely to need to use the test suite to
+locate and address issues and in the end passing it, while only disabling a
+minimal set of broken or incompatible tests you think you have a good reason to
+disable, is your best bet at arriving at a solid derivation.
+
+[readme]: https://github.com/JuliaLang/julia/blob/master/README.md
+[build]: https://github.com/JuliaLang/julia/tree/master/doc/src/devdocs/build
+[release_process]: https://julialang.org/blog/2019/08/release-process
diff --git a/nixpkgs/pkgs/development/compilers/julia/default.nix b/nixpkgs/pkgs/development/compilers/julia/default.nix
new file mode 100644
index 000000000000..b094759387fd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/default.nix
@@ -0,0 +1,61 @@
+{ callPackage }:
+
+let
+  juliaWithPackages = callPackage ../../julia-modules { };
+
+  wrapJulia = julia: julia.overrideAttrs (oldAttrs: {
+    passthru = (oldAttrs.passthru or { }) // {
+      withPackages = juliaWithPackages.override { inherit julia; };
+    };
+  });
+
+in
+
+{
+  julia_16-bin = wrapJulia (callPackage ./1.6-bin.nix { });
+  julia_19-bin = wrapJulia (callPackage
+    (import ./generic-bin.nix {
+      version = "1.9.4";
+      sha256 = {
+        x86_64-linux = "07d20c4c2518833e2265ca0acee15b355463361aa4efdab858dad826cf94325c";
+        aarch64-linux = "541d0c5a9378f8d2fc384bb8595fc6ffe20d61054629a6e314fb2f8dfe2f2ade";
+        x86_64-darwin = "67eec264f6afc9e9bf72c0f62c84d91c2ebdfaed6a0aa11606e3c983d278b441";
+        aarch64-darwin = "67542975e86102eec95bc4bb7c30c5d8c7ea9f9a0b388f0e10f546945363b01a";
+      };
+      patches = [
+        # https://github.com/JuliaLang/julia/commit/f5eeba35d9bf20de251bb9160cc935c71e8b19ba
+        ./patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch
+      ];
+    })
+    { });
+  julia_110-bin = wrapJulia (callPackage
+    (import ./generic-bin.nix {
+      version = "1.10.0";
+      sha256 = {
+        x86_64-linux = "a7298207f72f2b27b2ab1ce392a6ea37afbd1fbee0f1f8d190b054dcaba878fe";
+        aarch64-linux = "048d96b4398efd524e94be3f49e8829cf6b30c8f3f4b46c75751a4679635e45b";
+        x86_64-darwin = "eb1cdf2d373ee40412e8f5ee6b4681916f1ead6d794883903619c7bf147d4f46";
+        aarch64-darwin = "dc4ca01b1294c02d47b33ef26d489dc288ac68655a03774870c6872b82a9a7d6";
+      };
+    })
+    { });
+  julia_19 = wrapJulia (callPackage
+    (import ./generic.nix {
+      version = "1.9.4";
+      hash = "sha256-YYQ7lkf9BtOymU8yd6ZN4ctaWlKX2TC4yOO8DpN0ACQ=";
+      patches = [
+        ./patches/1.9/0002-skip-failing-and-flaky-tests.patch
+      ];
+    })
+    { });
+  julia_110 = wrapJulia (callPackage
+    (import ./generic.nix {
+      version = "1.10.0";
+      hash = "sha256-pfjAzgjPEyvdkZygtbOytmyJ4OX35/sqgf+n8iXj20w=";
+      patches = [
+        ./patches/1.10/0001-skip-building-docs-as-it-requires-network-access.patch
+        ./patches/1.10/0002-skip-failing-and-flaky-tests.patch
+      ];
+    })
+    { });
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/generic-bin.nix b/nixpkgs/pkgs/development/compilers/julia/generic-bin.nix
new file mode 100644
index 000000000000..09a8c2bce3bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/generic-bin.nix
@@ -0,0 +1,119 @@
+{ version
+, sha256
+, patches ? [ ]
+}:
+
+{ autoPatchelfHook
+, fetchurl
+, lib
+, stdenv
+}:
+
+let
+  skip_tests = [
+    # Test flaky on ofborg
+    "channels"
+    # Test flaky because of our RPATH patching
+    # https://github.com/NixOS/nixpkgs/pull/230965#issuecomment-1545336489
+    "compiler/codegen"
+    # Test flaky
+    "read"
+  ] ++ lib.optionals (lib.versionAtLeast version "1.10") [
+    # Test flaky
+    # https://github.com/JuliaLang/julia/issues/52739
+    "REPL"
+    # Test flaky
+    "ccall"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Test flaky on ofborg
+    "FileWatching"
+    # Test requires pbcopy
+    "InteractiveUtils"
+    # Test requires network access
+    "Sockets"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
+    # Test Failed at $out/share/julia/stdlib/v1.8/LinearAlgebra/test/blas.jl:702
+    "LinearAlgebra/blas"
+    # Test Failed at $out/share/julia/test/misc.jl:724
+    "misc"
+  ];
+in
+stdenv.mkDerivation {
+  pname = "julia-bin";
+
+  inherit version patches;
+
+  src = {
+    x86_64-linux = fetchurl {
+      url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
+      sha256 = sha256.x86_64-linux;
+    };
+    aarch64-linux = fetchurl {
+      url = "https://julialang-s3.julialang.org/bin/linux/aarch64/${lib.versions.majorMinor version}/julia-${version}-linux-aarch64.tar.gz";
+      sha256 = sha256.aarch64-linux;
+    };
+    x86_64-darwin = fetchurl {
+      url = "https://julialang-s3.julialang.org/bin/mac/x64/${lib.versions.majorMinor version}/julia-${version}-mac64.tar.gz";
+      sha256 = sha256.x86_64-darwin;
+    };
+    aarch64-darwin = fetchurl {
+      url = "https://julialang-s3.julialang.org/bin/mac/aarch64/${lib.versions.majorMinor version}/julia-${version}-macaarch64.tar.gz";
+      sha256 = sha256.aarch64-darwin;
+    };
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  postPatch = ''
+    # Julia fails to pick up our Certification Authority root certificates, but
+    # it provides its own so we can simply disable the test. Patching in the
+    # dynamic path to ours require us to rebuild the Julia system image.
+    substituteInPlace share/julia/stdlib/v${lib.versions.majorMinor version}/NetworkOptions/test/runtests.jl \
+      --replace '@test ca_roots_path() != bundled_ca_roots()' \
+        '@test_skip ca_roots_path() != bundled_ca_roots()'
+  '';
+
+  nativeBuildInputs = lib.optionals stdenv.isLinux [
+    autoPatchelfHook
+    # https://github.com/JuliaLang/julia/blob/v1.9.0/NEWS.md#external-dependencies
+    stdenv.cc.cc
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    cp -r . $out
+    runHook postInstall
+  '';
+
+  # Breaks backtraces, etc.
+  dontStrip = true;
+
+  doInstallCheck = true;
+
+  preInstallCheck = ''
+    export JULIA_TEST_USE_MULTIPLE_WORKERS=true
+    # Some tests require read/write access to $HOME.
+    # And $HOME cannot be equal to $TMPDIR as it causes test failures
+    export HOME=$(mktemp -d)
+  '';
+
+  installCheckPhase = ''
+    runHook preInstallCheck
+    # Command lifted from `test/Makefile`.
+    $out/bin/julia \
+      --check-bounds=yes \
+      --startup-file=no \
+      --depwarn=error \
+      $out/share/julia/test/runtests.jl \
+      --skip internet_required ${toString skip_tests}
+    runHook postInstallCheck
+  '';
+
+  meta = {
+    description = "High-level, high-performance, dynamic language for technical computing";
+    homepage = "https://julialang.org";
+    # Bundled and linked with various GPL code, although Julia itself is MIT.
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ raskin nickcao wegank thomasjm ];
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    mainProgram = "julia";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/generic.nix b/nixpkgs/pkgs/development/compilers/julia/generic.nix
new file mode 100644
index 000000000000..4ab317618a41
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/generic.nix
@@ -0,0 +1,91 @@
+{ version
+, hash
+, patches
+}:
+
+{ lib
+, stdenv
+, fetchurl
+, which
+, python3
+, gfortran
+, cmake
+, perl
+, gnum4
+, openssl
+, libxml2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "julia";
+
+  inherit version patches;
+
+  src = fetchurl {
+    url = "https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz";
+    inherit hash;
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    which
+    python3
+    gfortran
+    cmake
+    perl
+    gnum4
+    openssl
+  ];
+
+  buildInputs = [
+    libxml2
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  makeFlags = [
+    "prefix=$(out)"
+    "USE_BINARYBUILDER=0"
+  ] ++ lib.optionals stdenv.isx86_64 [
+    # https://github.com/JuliaCI/julia-buildbot/blob/master/master/inventory.py
+    "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"
+  ] ++ lib.optionals stdenv.isAarch64 [
+    "JULIA_CPU_TARGET=generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm"
+  ];
+
+  # remove forbidden reference to $TMPDIR
+  preFixup = ''
+    for file in libcurl.so libgmpxx.so libmpfr.so; do
+      patchelf --shrink-rpath --allowed-rpath-prefixes ${builtins.storeDir} "$out/lib/julia/$file"
+    done
+  '';
+
+  # tests are flaky for aarch64-linux on hydra
+  doInstallCheck = if (lib.versionOlder version "1.10") then !stdenv.hostPlatform.isAarch64 else true;
+
+  installCheckTarget = "testall";
+
+  preInstallCheck = ''
+    export JULIA_TEST_USE_MULTIPLE_WORKERS="true"
+    # Some tests require read/write access to $HOME.
+    # And $HOME cannot be equal to $TMPDIR as it causes test failures
+    export HOME=$(mktemp -d)
+  '';
+
+  dontStrip = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "High-level performance-oriented dynamical language for technical computing";
+    homepage = "https://julialang.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ nickcao joshniemela thomasjm ];
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.10/0001-skip-building-docs-as-it-requires-network-access.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.10/0001-skip-building-docs-as-it-requires-network-access.patch
new file mode 100644
index 000000000000..6ff33b342cfd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/patches/1.10/0001-skip-building-docs-as-it-requires-network-access.patch
@@ -0,0 +1,34 @@
+From da7e7b2c622bcfdc3e6484a64ade50d22d52c4dd Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Wed, 10 Jan 2024 19:48:19 -0500
+Subject: [PATCH 1/2] skip building docs as it requires network access
+
+---
+ Makefile | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1565014a0f..edd5c65244 100644
+--- a/Makefile
++++ b/Makefile
+@@ -265,7 +265,7 @@ define stringreplace
+ endef
+ 
+ 
+-install: $(build_depsbindir)/stringreplace docs
++install: $(build_depsbindir)/stringreplace
+ 	@$(MAKE) $(QUIET_MAKE) $(JULIA_BUILD_MODE)
+ 	@for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(private_libexecdir); do \
+ 		mkdir -p $(DESTDIR)$$subdir; \
+@@ -368,8 +368,6 @@ endif
+ 	cp -R -L $(JULIAHOME)/base/* $(DESTDIR)$(datarootdir)/julia/base
+ 	cp -R -L $(JULIAHOME)/test/* $(DESTDIR)$(datarootdir)/julia/test
+ 	cp -R -L $(build_datarootdir)/julia/* $(DESTDIR)$(datarootdir)/julia
+-	# Copy documentation
+-	cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/
+ 	# Remove various files which should not be installed
+ 	-rm -f $(DESTDIR)$(datarootdir)/julia/base/version_git.sh
+ 	-rm -f $(DESTDIR)$(datarootdir)/julia/test/Makefile
+-- 
+2.43.0
+
diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch
new file mode 100644
index 000000000000..474653bf342c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch
@@ -0,0 +1,25 @@
+From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Wed, 10 Jan 2024 20:58:20 -0500
+Subject: [PATCH 2/2] skip failing and flaky tests
+
+---
+ test/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index 88dbe5b2b4..a2a7a55e20 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -28,7 +28,7 @@ default:
+ 
+ $(TESTS):
+ 	@cd $(SRCDIR) && \
+-	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@)
++	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall $@)
+ 
+ $(addprefix revise-, $(TESTS)): revise-% :
+ 	@cd $(SRCDIR) && \
+-- 
+2.43.0
+
diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
new file mode 100644
index 000000000000..243a9cfd76ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
@@ -0,0 +1,30 @@
+From 44c2c979c4f2222567ce65f506cf47fb87482348 Mon Sep 17 00:00:00 2001
+From: Pontus Stenetorp <pontus@stenetorp.se>
+Date: Thu, 8 Apr 2021 04:37:44 +0000
+Subject: [PATCH 5/6] nix: Enable parallel unit tests for sandbox
+
+Disabled by default due to lack of networking in the Nix sandbox. This
+greatly speeds up the build process on a multi-core system.
+---
+ test/runtests.jl | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/test/runtests.jl b/test/runtests.jl
+index 2f9cd058bb..2f8c19fa32 100644
+--- a/test/runtests.jl
++++ b/test/runtests.jl
+@@ -83,8 +83,9 @@ prepend!(tests, linalg_tests)
+ import LinearAlgebra
+ cd(@__DIR__) do
+     n = 1
+-    if net_on
+-        n = min(Sys.CPU_THREADS, length(tests))
++    if net_on || haskey(ENV, "NIX_BUILD_CORES")
++        x = haskey(ENV, "NIX_BUILD_CORES") ? parse(Int, ENV["NIX_BUILD_CORES"]) : Sys.CPU_THREADS
++        n = min(x, Sys.CPU_THREADS, length(tests))
+         n > 1 && addprocs_with_testenv(n)
+         LinearAlgebra.BLAS.set_num_threads(1)
+     end
+-- 
+2.29.3
+
diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch
new file mode 100644
index 000000000000..fc7d40a54d49
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch
@@ -0,0 +1,50 @@
+diff --git a/share/julia/test/choosetests.jl b/share/julia/test/choosetests.jl
+index 334ef05..db5f795 100644
+--- a/share/julia/test/choosetests.jl
++++ b/share/julia/test/choosetests.jl
+@@ -31,6 +31,19 @@ const TESTNAMES = [
+         "smallarrayshrink", "opaque_closure", "filesystem", "download",
+ ]
+ 
++const INTERNET_REQUIRED_LIST = [
++    "Artifacts",
++    "Downloads",
++    "LazyArtifacts",
++    "LibCURL",
++    "LibGit2",
++    "Pkg",
++    "download",
++    "TOML",
++]
++
++const NETWORK_REQUIRED_LIST = vcat(INTERNET_REQUIRED_LIST, ["Sockets"])
++
+ """
+ `(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be
+ run. `choices` should be a vector of test names; if empty or set to
+@@ -149,6 +162,7 @@ function choosetests(choices = [])
+     filtertests!(tests, "compiler/EscapeAnalysis", [
+         "compiler/EscapeAnalysis/local", "compiler/EscapeAnalysis/interprocedural"])
+     filtertests!(tests, "stdlib", STDLIBS)
++    filtertests!(tests, "internet_required", INTERNET_REQUIRED_LIST)
+     # do ambiguous first to avoid failing if ambiguities are introduced by other tests
+     filtertests!(tests, "ambiguous")
+ 
+@@ -164,16 +178,7 @@ function choosetests(choices = [])
+         filter!(x -> x != "rounding", tests)
+     end
+ 
+-    net_required_for = filter!(in(tests), [
+-        "Artifacts",
+-        "Downloads",
+-        "LazyArtifacts",
+-        "LibCURL",
+-        "LibGit2",
+-        "Sockets",
+-        "download",
+-        "TOML",
+-    ])
++    net_required_for = filter!(in(tests), NETWORK_REQUIRED_LIST)
+     net_on = true
+     JULIA_TEST_NETWORKING_AVAILABLE = get(ENV, "JULIA_TEST_NETWORKING_AVAILABLE", "") |>
+                                       strip |>
diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.9/0001-skip-building-doc.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.9/0001-skip-building-doc.patch
new file mode 100644
index 000000000000..3b507bf26d77
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/patches/1.9/0001-skip-building-doc.patch
@@ -0,0 +1,25 @@
+From ce73c82ebadeb2e358e1a8e244eef723ffa96c76 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 20 Sep 2022 18:42:31 +0800
+Subject: [PATCH 1/2] skip building doc
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 94df626014..418f6ff268 100644
+--- a/Makefile
++++ b/Makefile
+@@ -229,7 +229,7 @@ define stringreplace
+ endef
+ 
+ 
+-install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html
++install: $(build_depsbindir)/stringreplace
+ ifeq ($(BUNDLE_DEBUG_LIBS),1)
+ 	@$(MAKE) $(QUIET_MAKE) all
+ else
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch
new file mode 100644
index 000000000000..966c805ad7ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch
@@ -0,0 +1,25 @@
+From 0e1fe51ce93847ac3c4de49a003d9762b2f3d7c6 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 20 Sep 2022 18:42:59 +0800
+Subject: [PATCH 2/2] skip failing and flaky tests
+
+---
+ test/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index 24e137a5b1..e78f12da04 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -23,7 +23,7 @@ default:
+ 
+ $(TESTS):
+ 	@cd $(SRCDIR) && \
+-	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@)
++	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip MozillaCACerts_jll --skip NetworkOptions --skip channels $@)
+ 
+ $(addprefix revise-, $(TESTS)): revise-% :
+ 	@cd $(SRCDIR) && \
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/compilers/juniper/default.nix b/nixpkgs/pkgs/development/compilers/juniper/default.nix
new file mode 100644
index 000000000000..ff6751104ac0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/juniper/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchzip, makeWrapper, mono }:
+
+stdenv.mkDerivation rec {
+  pname = "juniper";
+  version = "2.3.0";
+
+  src = fetchzip {
+    url = "http://www.juniper-lang.org/installers/Juniper-${version}.zip";
+    sha256 = "10am6fribyl7742yk6ag0da4rld924jphxja30gynzqysly8j0vg";
+    stripRoot = false;
+  };
+
+  doCheck = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [ mono ];
+
+  installPhase = ''
+    runHook preInstall
+    rm juniper # original script with regular Linux assumptions
+    mkdir -p $out/bin
+    cp -r ./* $out
+    makeWrapper ${mono}/bin/mono $out/bin/juniper \
+      --add-flags "$out/Juniper.exe \$@"
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Functional reactive programming language for programming Arduino";
+    longDescription = ''
+      Juniper targets Arduino and supports many features typical of functional programming languages, including algebraic data types, tuples, records,
+      pattern matching, immutable data structures, parametric polymorphic functions, and anonymous functions (lambdas).
+      Some imperative programming concepts are also present in Juniper, such as for, while and do while loops, the ability to mark variables as mutable, and mutable references.
+    '';
+    homepage = "https://www.juniper-lang.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jwasm/default.nix b/nixpkgs/pkgs/development/compilers/jwasm/default.nix
new file mode 100644
index 000000000000..fa004bca3117
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jwasm/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "jwasm";
+  version = "2.17";
+
+  src = fetchFromGitHub {
+    owner = "Baron-von-Riedesel";
+    repo  = "JWasm";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-22eNtHXF+RQT4UbXIVjn1JP/s6igp5O1oQT7sVl7c1U=";
+  };
+
+  outputs = [ "out" "doc" ];
+
+  dontConfigure = true;
+
+  preBuild = ''
+    cp ${if stdenv.cc.isClang then "CLUnix.mak" else "GccUnix.mak"} Makefile
+    substituteInPlace Makefile \
+      --replace "/usr/local/bin" "${placeholder "out"}/bin"
+  '';
+
+  postInstall = ''
+    install -Dpm644 $src/Html/License.html \
+                    $src/Html/Manual.html \
+                    $src/Html/Readme.html \
+                    -t $doc/share/doc/jwasm/
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Baron-von-Riedesel/JWasm/";
+    description = "A MASM-compatible x86 assembler";
+    changelog = "https://github.com/Baron-von-Riedesel/JWasm/releases/tag/v${finalAttrs.version}";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin;
+  };
+})
+# TODO: generalize for Windows builds
diff --git a/nixpkgs/pkgs/development/compilers/kaitai-struct-compiler/default.nix b/nixpkgs/pkgs/development/compilers/kaitai-struct-compiler/default.nix
new file mode 100644
index 000000000000..7d34bb312cf4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/kaitai-struct-compiler/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchzip
+, openjdk8
+, makeWrapper
+}:
+
+
+stdenv.mkDerivation rec {
+  pname = "kaitai-struct-compiler";
+  version = "0.10";
+
+  src = fetchzip {
+    url = "https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/${version}/kaitai-struct-compiler-${version}.zip";
+    sha256 = "sha256-oY1OiEq619kLmQPMRQ4sjuBnTXgJ2WfvsEj1JrxUGPA=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -D $src/bin/kaitai-struct-compiler $out/bin/kaitai-struct-compiler
+    ln -s $out/bin/kaitai-struct-compiler $out/bin/ksc
+    cp -R $src/lib $out/lib
+    wrapProgram $out/bin/kaitai-struct-compiler --prefix PATH : ${lib.makeBinPath [ openjdk8 ] }
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/kaitai-io/kaitai_struct_compiler";
+    description =
+      "Compiler to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Perl / PHP / Python / Ruby ";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ luis ];
+    platforms = platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/kind2/default.nix b/nixpkgs/pkgs/development/compilers/kind2/default.nix
new file mode 100644
index 000000000000..182e4cb1a0e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/kind2/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, rustPlatform
+, fetchCrate
+, stdenv
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "kind2";
+  version = "0.3.10";
+
+  src = fetchCrate {
+    inherit pname version;
+    hash = "sha256-X2sjfYrSSym289jDJV3hNmcwyQCMnrabmGCUKD5wfdY=";
+  };
+
+  cargoHash = "sha256-KzoEh/kMKsHx9K3t1/uQZ7fdsZEM+v8UOft8JjEB1Zw=";
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk_11_0.frameworks.Security
+  ];
+
+  # requires nightly features
+  RUSTC_BOOTSTRAP = true;
+
+  meta = with lib; {
+    description = "A functional programming language and proof assistant";
+    homepage = "https://github.com/higherorderco/kind";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/koka/default.nix b/nixpkgs/pkgs/development/compilers/koka/default.nix
new file mode 100644
index 000000000000..e3462c826c76
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/koka/default.nix
@@ -0,0 +1,107 @@
+{ stdenv
+, pkgsHostTarget
+, cmake
+, makeWrapper
+, mkDerivation
+, fetchFromGitHub
+, alex
+, lib
+, hpack
+, aeson
+, array
+, async
+, base
+, bytestring
+, co-log-core
+, cond
+, containers
+, directory
+, FloatingHex
+, isocline
+, lens
+, lsp
+, mtl
+, network
+, network-simple
+, parsec
+, process
+, text
+, text-rope
+, time
+}:
+
+let
+  version = "3.0.4";
+  src = fetchFromGitHub {
+    owner = "koka-lang";
+    repo = "koka";
+    rev = "v${version}";
+    sha256 = "sha256-U8BW1Aq9t3je0YDV8NkE0MzdnjwXBJQbmekh5ufOs3k=";
+    fetchSubmodules = true;
+  };
+  kklib = stdenv.mkDerivation {
+    pname = "kklib";
+    inherit version;
+    src = "${src}/kklib";
+    nativeBuildInputs = [ cmake ];
+    outputs = [ "out" "dev" ];
+    postInstall = ''
+      mkdir -p ''${!outputDev}/share/koka/v${version}
+      cp -a ../../kklib ''${!outputDev}/share/koka/v${version}
+    '';
+  };
+  inherit (pkgsHostTarget.targetPackages.stdenv) cc;
+  runtimeDeps = [
+    cc
+    cc.bintools.bintools
+    pkgsHostTarget.gnumake
+    pkgsHostTarget.cmake
+  ];
+in
+mkDerivation rec {
+  pname = "koka";
+  inherit version src;
+  isLibrary = false;
+  isExecutable = true;
+  libraryToolDepends = [ hpack ];
+  executableHaskellDepends = [
+    aeson
+    array
+    async
+    base
+    bytestring
+    co-log-core
+    cond
+    containers
+    directory
+    FloatingHex
+    isocline
+    lens
+    lsp
+    mtl
+    network
+    network-simple
+    parsec
+    process
+    text
+    text-rope
+    time
+    kklib
+  ];
+  executableToolDepends = [ alex makeWrapper ];
+  postInstall = ''
+    mkdir -p $out/share/koka/v${version}
+    cp -a lib $out/share/koka/v${version}
+    ln -s ${kklib.dev}/share/koka/v${version}/kklib $out/share/koka/v${version}
+    wrapProgram "$out/bin/koka" \
+      --set CC "${lib.getBin cc}/bin/${cc.targetPrefix}cc" \
+      --prefix PATH : "${lib.makeSearchPath "bin" runtimeDeps}"
+  '';
+  doCheck = false;
+  prePatch = "hpack";
+  description = "Koka language compiler and interpreter";
+  homepage = "https://github.com/koka-lang/koka";
+  changelog = "${homepage}/blob/master/doc/spec/news.mdk";
+  license = lib.licenses.asl20;
+  maintainers = with lib.maintainers; [ siraben sternenseemann ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/kotlin/default.nix b/nixpkgs/pkgs/development/compilers/kotlin/default.nix
new file mode 100644
index 000000000000..fee4889e1add
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/kotlin/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, makeWrapper, jre, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "kotlin";
+  version = "1.9.22";
+
+  src = fetchurl {
+    url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
+    sha256 = "1rn3rabwyqqhs6xgyfwl326hrzpfpc3qqd2nzwbchck5a09r5cw8";
+  };
+
+  propagatedBuildInputs = [ jre ] ;
+  nativeBuildInputs = [ 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 = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ SubhrajyotiSen ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/kotlin/native.nix b/nixpkgs/pkgs/development/compilers/kotlin/native.nix
new file mode 100644
index 000000000000..bc2018665ca7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/kotlin/native.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchurl
+, jre
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kotlin-native";
+  version = "1.9.22";
+
+  src = let
+    getArch = {
+      "aarch64-darwin" = "macos-aarch64";
+      "x86_64-darwin" = "macos-x86_64";
+      "x86_64-linux" = "linux-x86_64";
+    }.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");
+
+    getUrl = version: arch:
+      "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-native-${arch}-${version}.tar.gz";
+
+    getHash = arch: {
+      "macos-aarch64" = "1pf81rplikbp194pjrm2la101iz8vz3jv55109nipd26xghc15ca";
+      "macos-x86_64" = "1r7dmk8cc7f3iwaxamlnlcjl4mbvx443nwvsp8141a21ibrvrmx9";
+      "linux-x86_64" = "1m77qld44gbarjxm99gsdscncx4v0cf6ca3h9bdh2m7d3i4adc62";
+    }.${arch};
+  in
+    fetchurl {
+      url = getUrl version getArch;
+      sha256 = getHash getArch;
+    };
+
+  nativeBuildInputs = [
+    jre
+    makeWrapper
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    mv * $out
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/run_konan --prefix PATH ":" ${lib.makeBinPath [ jre ]}
+  '';
+
+  meta = {
+    homepage = "https://kotlinlang.org/";
+    description = "A modern programming language that makes developers happier";
+    longDescription = ''
+      Kotlin/Native is a technology for compiling Kotlin code to native
+      binaries, which can run without a virtual machine. It is an LLVM based
+      backend for the Kotlin compiler and native implementation of the Kotlin
+      standard library.
+    '';
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ fabianhjr ];
+    platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/binary.nix b/nixpkgs/pkgs/development/compilers/ldc/binary.nix
new file mode 100644
index 000000000000..dd4d51c81e3a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/binary.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2
+, version, hashes }:
+
+let
+  inherit (stdenv) hostPlatform;
+  OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
+  ARCH = if hostPlatform.isDarwin && hostPlatform.isAarch64 then "arm64" else hostPlatform.parsed.cpu.name;
+in stdenv.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 = lib.optionals hostPlatform.isLinux [
+    autoPatchelfHook
+  ] ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
+
+  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; {
+    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" "aarch64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix b/nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix
new file mode 100644
index 000000000000..aa25fb77fc52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix
@@ -0,0 +1,11 @@
+{ callPackage }:
+callPackage ./binary.nix {
+  version = "1.30.0";
+  hashes = {
+    # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.19.0/ldc2-1.19.0-osx-x86_64.tar.xz` etc..
+    osx-x86_64 = "sha256-AAWZvxuZC82xvrW6fpYm783TY+H8k3DvqE94ZF1yjmk=";
+    linux-x86_64 = "sha256-V4TUzEfQhFrwiX07dHOgjdAoGkzausCkhnQIQNAU/eE=";
+    linux-aarch64  = "sha256-kTeglub75iv/jWWNPCn15aCGAbmck0RQl6L7bFOUu7Y=";
+    osx-arm64  = "sha256-Nb/owBdIeroB9jLMDvwjo8bvsTC9vFyJPLMTOMsSAd4=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/default.nix b/nixpkgs/pkgs/development/compilers/ldc/default.nix
new file mode 100644
index 000000000000..6b0761217703
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/default.nix
@@ -0,0 +1,4 @@
+import ./generic.nix {
+  version = "1.36.0";
+  sha256 = "sha256-oAx5BzEjqIfBf0Rsd4KklVajUSo9Natna31Trhu41u8=";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/generic.nix b/nixpkgs/pkgs/development/compilers/ldc/generic.nix
new file mode 100644
index 000000000000..16598714410f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/generic.nix
@@ -0,0 +1,136 @@
+{ version, sha256 }:
+{ lib, stdenv, fetchurl, cmake, ninja, llvm_17, 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;
+
+  src = fetchurl {
+    url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz";
+    inherit sha256;
+  };
+
+  # https://issues.dlang.org/show_bug.cgi?id=19553
+  hardeningDisable = [ "fortify" ];
+
+  postUnpack = ''
+    patchShebangs .
+  ''
+  + ''
+      rm ldc-${version}-src/tests/dmd/fail_compilation/mixin_gc.d
+      rm ldc-${version}-src/tests/dmd/runnable/xtest46_gc.d
+      rm ldc-${version}-src/tests/dmd/runnable/testptrref_gc.d
+
+      # test depends on current year
+      rm ldc-${version}-src/tests/dmd/compilable/ddocYear.d
+  ''
+  + 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/dmd/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
+  ''
+  + lib.optionalString stdenv.hostPlatform.isLinux ''
+      substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
+  ''
+  + lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace runtime/phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
+  '';
+
+  nativeBuildInputs = [
+    cmake ldcBootstrap lit lit.python llvm_17.dev makeWrapper ninja unzip
+  ]
+  ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    darwin.apple_sdk.frameworks.Foundation
+  ]
+  ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
+    # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
+    gdb
+  ];
+
+  buildInputs = [ curl tzdata ];
+
+  cmakeFlags = [
+    "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}"
+  ];
+
+  postConfigure = ''
+    export DMD=$PWD/bin/ldmd2
+  '';
+
+  makeFlags = [ "DMD=$DMD" ];
+
+  fixNames = 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 = 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 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 jtbx ];
+    platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/lesscpy/default.nix b/nixpkgs/pkgs/development/compilers/lesscpy/default.nix
new file mode 100644
index 000000000000..d85b36da8918
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/lesscpy/default.nix
@@ -0,0 +1,24 @@
+{ lib, python3Packages, fetchPypi }:
+
+python3Packages.buildPythonApplication rec {
+  pname   = "lesscpy";
+  version = "0.15.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-EEXRepj2iGRsp1jf8lTm6cA3RWSOBRoIGwOVw7d8gkw=";
+  };
+
+  checkInputs = with python3Packages; [ pytestCheckHook ];
+  pythonImportsCheck = [ "lesscpy" ];
+  propagatedBuildInputs = with python3Packages; [ ply six ];
+
+  doCheck = false; # Really weird test failures (`nix-build-python2.css not found`)
+
+  meta = with lib; {
+    description = "Python LESS Compiler";
+    homepage    = "https://github.com/lesscpy/lesscpy";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ s1341 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ligo/default.nix b/nixpkgs/pkgs/development/compilers/ligo/default.nix
new file mode 100644
index 000000000000..ccba9ca3a1b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ligo/default.nix
@@ -0,0 +1,149 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, git
+, coq
+, ocamlPackages
+, cacert
+, ocaml-crunch
+, jq
+, mustache-go
+, yaml2json
+, tezos-rust-libs
+, darwin
+}:
+
+ocamlPackages.buildDunePackage rec {
+  pname = "ligo";
+  version = "1.0.0";
+  src = fetchFromGitLab {
+    owner = "ligolang";
+    repo = "ligo";
+    rev = version;
+    sha256 = "sha256-tHIIA1JE7mzDIf2v9IEZt1pjVQEA89zjTsmqhzTn3Wc=";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    substituteInPlace "vendors/tezos-ligo/dune-project" \
+      --replace \
+        "(using ctypes 0.1)" \
+        "(using ctypes 0.3)" \
+      --replace \
+        "(lang dune 3.0)" \
+        "(lang dune 3.7)"
+
+    substituteInPlace "src/coq/dune" \
+      --replace \
+        "(name ligo_coq)" \
+        "(name ligo_coq)(mode vo)"
+  '';
+
+  # The build picks this up for ligo --version
+  LIGO_VERSION = version;
+
+  # This is a hack to work around the hack used in the dune files
+  OPAM_SWITCH_PREFIX = "${tezos-rust-libs}";
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    ocaml-crunch
+    git
+    coq
+    ocamlPackages.crunch
+    ocamlPackages.menhir
+    ocamlPackages.ocaml-recovery-parser
+    # deps for changelog
+    jq
+    mustache-go
+    yaml2json
+  ];
+
+  buildInputs = with ocamlPackages; [
+    coq
+    menhir
+    menhirLib
+    qcheck
+    ocamlgraph
+    bisect_ppx
+    decompress
+    ppx_deriving
+    ppx_deriving_yojson
+    ppx_yojson_conv
+    ppx_expect
+    ppx_import
+    terminal_size
+    ocaml-recovery-parser
+    yojson
+    getopt
+    core
+    core_unix
+    pprint
+    linenoise
+    crunch
+    semver
+    lambda-term
+    tar-unix
+    parse-argv
+    hacl-star
+    prometheus
+    lwt_ppx
+    msgpck
+    # lsp
+    linol
+    linol-lwt
+    ocaml-lsp
+    # Test helpers deps
+    qcheck
+    qcheck-alcotest
+    alcotest-lwt
+    # vendored tezos' deps
+    aches
+    aches-lwt
+    ctypes
+    ctypes_stubs_js
+    class_group_vdf
+    dune-configurator
+    hacl-star
+    hacl-star-raw
+    lwt-canceler
+    ipaddr
+    bls12-381
+    bls12-381-signature
+    ptime
+    mtime_1
+    lwt_log
+    secp256k1-internal
+    resto
+    resto-directory
+    resto-cohttp-self-serving-client
+    irmin-pack
+    ezjsonm
+    data-encoding
+    pure-splitmix
+    zarith_stubs_js
+    simple-diff
+    seqes
+    stdint
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Security
+  ];
+
+  nativeCheckInputs = [
+    cacert
+    ocamlPackages.ca-certs
+  ];
+
+  doCheck = false; # Tests fail, but could not determine the reason
+
+  meta = with lib; {
+    homepage = "https://ligolang.org/";
+    downloadPage = "https://ligolang.org/docs/intro/installation";
+    description = "A friendly Smart Contract Language for Tezos";
+    license = licenses.mit;
+    platforms = ocamlPackages.ocaml.meta.platforms;
+    broken = stdenv.isLinux && stdenv.isAarch64;
+    maintainers = with maintainers; [ ulrikstrid ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/lingua-franca/default.nix b/nixpkgs/pkgs/development/compilers/lingua-franca/default.nix
new file mode 100644
index 000000000000..fccfa1eb691b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/lingua-franca/default.nix
@@ -0,0 +1,40 @@
+{ lib, pkgs, stdenv, fetchzip, jdk17_headless }:
+
+stdenv.mkDerivation rec {
+  pname = "lfc";
+  version = "0.4.0";
+
+  src = fetchzip {
+    url = "https://github.com/lf-lang/lingua-franca/releases/download/v${version}/lf-cli-${version}.zip";
+    sha256 = "sha256-LrAm77iPUlqVfRdYy2bZ4mim7DHIr5JxPdbrgxokGvc=";
+  };
+
+  buildInputs = [ jdk17_headless ];
+
+  _JAVA_HOME = "${jdk17_headless}/";
+
+  postPatch = ''
+    substituteInPlace bin/lfc \
+      --replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \
+      --replace "run_lfc_with_args" "${jdk17_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-${version}-all.jar"
+  '';
+
+  installPhase = ''
+    cp -r ./ $out/
+    chmod +x $out/bin/lfc
+  '';
+
+  meta = with lib; {
+    description = "Polyglot coordination language";
+    longDescription = ''
+      Lingua Franca (LF) is a polyglot coordination language for concurrent
+      and possibly time-sensitive applications ranging from low-level
+      embedded code to distributed cloud and edge applications.
+    '';
+    homepage = "https://github.com/lf-lang/lingua-franca";
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ revol-xut ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix
new file mode 100644
index 000000000000..5ddecd1f47e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix
@@ -0,0 +1,138 @@
+{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+, enablePolly ? false
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "clang" "12sm91qx2m79cvj75a9aazf2x8xybjbd593dv6v7rxficpq8i0ha";
+    inherit clang-tools-extra_src;
+
+    unpackPhase = ''
+      unpackFile $src
+      mv clang-* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+    ] ++ lib.optionals enablePolly [
+      "-DWITH_POLLY=ON"
+      "-DLINK_POLLY_INTO_TOOLS=ON"
+    ];
+
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      (substituteAll {
+        src = ../../clang-11-15-LLVMgold-path.patch;
+        libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace tools/extra/clangd/CMakeLists.txt \
+        --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      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,scan-view}
+      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
+      mv $out/share/scan-view/*.py $python/share/scan-view
+      rm $out/bin/c-index-test
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/clang-tblgen $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // 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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..98ea97e05808
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/clang/gnu-install-dirs.patch
@@ -0,0 +1,235 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bb4b801f01c8..77a8b43b22c8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,6 +9,8 @@ endif()
+ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+   project(Clang)
+ 
++  include(GNUInstallDirs)
++
+   set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+   set(CMAKE_CXX_STANDARD_REQUIRED YES)
+   set(CMAKE_CXX_EXTENSIONS NO)
+@@ -447,7 +449,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/clang include/clang-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -457,7 +459,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "CMakeFiles" EXCLUDE
+@@ -477,7 +479,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
+   install(PROGRAMS utils/bash-autocomplete.sh
+-          DESTINATION share/clang
++          DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+           COMPONENT bash-autocomplete)
+   if(NOT LLVM_ENABLE_IDE)
+     add_llvm_install_targets(install-bash-autocomplete
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 704278a0e93b..d25c8d325c71 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -123,9 +123,9 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          RUNTIME DESTINATION bin)
++          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+         if (NOT LLVM_ENABLE_IDE)
+           add_llvm_install_targets(install-${lib}
+@@ -170,7 +170,7 @@ macro(add_clang_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_clangtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT LLVM_ENABLE_IDE)
+@@ -185,7 +185,7 @@ endmacro()
+ macro(add_clang_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+ 
+ function(clang_target_link_libraries target type)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index 0692fe75a441..6f201e7207d0 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -208,7 +208,7 @@ set_target_properties(clang-resource-headers PROPERTIES
+   FOLDER "Misc"
+   RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
+ 
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+ 
+ install(
+   FILES ${files} ${generated_files}
+diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
+index ceef4b08637c..8efad5520ca4 100644
+--- a/tools/c-index-test/CMakeLists.txt
++++ b/tools/c-index-test/CMakeLists.txt
+@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
+        "@executable_path/../../lib")
+   else()
+-    set(INSTALL_DESTINATION bin)
++    set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
+   endif()
+ 
+   install(TARGETS c-index-test
+diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt
+index 35ecdb11253c..d77d75de0094 100644
+--- a/tools/clang-format/CMakeLists.txt
++++ b/tools/clang-format/CMakeLists.txt
+@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
+ endif()
+ 
+ install(PROGRAMS clang-format-bbedit.applescript
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-diff.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-sublime.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS git-clang-format
+-  DESTINATION bin
++  DESTINATION ${CMAKE_INSTALL_BINDIR}
+   COMPONENT clang-format)
+diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt
+index cda8e29ec5b1..0134d8ccd70b 100644
+--- a/tools/clang-rename/CMakeLists.txt
++++ b/tools/clang-rename/CMakeLists.txt
+@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename
+   )
+ 
+ install(PROGRAMS clang-rename.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+ install(PROGRAMS clang-rename.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 5cd9ac5cddc1..a197676fedbd 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -165,7 +165,7 @@ endif()
+ if(INTERNAL_INSTALL_PREFIX)
+   set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
+ else()
+-  set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
++  set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ endif()
+ 
+ install(DIRECTORY ../../include/clang-c
+@@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
+index ec0702d76f18..d25d982f51da 100644
+--- a/tools/scan-build/CMakeLists.txt
++++ b/tools/scan-build/CMakeLists.txt
+@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+     install(PROGRAMS bin/${BinFile}
+-            DESTINATION bin
++            DESTINATION ${CMAKE_INSTALL_BINDIR}
+             COMPONENT scan-build)
+   endforeach()
+ 
+@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
+     install(PROGRAMS libexec/${LibexecFile}
+-            DESTINATION libexec
++            DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
+             COMPONENT scan-build)
+   endforeach()
+ 
+@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
+     install(FILES share/scan-build/${ShareFile}
+-            DESTINATION share/scan-build
++            DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build
+             COMPONENT scan-build)
+   endforeach()
+ 
+diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
+index 22edb974bac7..9f140a9a4538 100644
+--- a/tools/scan-view/CMakeLists.txt
++++ b/tools/scan-view/CMakeLists.txt
+@@ -22,7 +22,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+     install(PROGRAMS bin/${BinFile}
+-            DESTINATION bin
++            DESTINATION ${CMAKE_INSTALL_BINDIR}
+             COMPONENT scan-view)
+   endforeach()
+ 
+@@ -36,7 +36,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
+     install(FILES share/${ShareFile}
+-            DESTINATION share/scan-view
++            DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view
+             COMPONENT scan-view)
+   endforeach()
+ 
+diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt
+index 62f2de0cb15c..6aa66825b6ec 100644
+--- a/utils/hmaptool/CMakeLists.txt
++++ b/utils/hmaptool/CMakeLists.txt
+@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
+ 
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
+ install(PROGRAMS ${CLANG_HMAPTOOL}
+-        DESTINATION bin
++        DESTINATION ${CMAKE_INSTALL_BINDIR}
+         COMPONENT hmaptool)
+ 
+ add_custom_target(hmaptool ALL DEPENDS ${Depends})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/11/clang/purity.patch
new file mode 100644
index 000000000000..deb230a36c5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/clang/purity.patch
@@ -0,0 +1,28 @@
+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
+@@ -487,12 +487,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) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..f6f9336ad5ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,23 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -301,6 +301,10 @@ if (NOT MSVC)
+     i386/umoddi3.S
+   )
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -608,6 +612,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/armv7l.patch
new file mode 100644
index 000000000000..120cfe6feb2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/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/11/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
new file mode 100644
index 000000000000..7fddc6e924b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix
@@ -0,0 +1,140 @@
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  isNewDarwinBootstrap = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+  src = fetch "compiler-rt" "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy";
+
+  nativeBuildInputs = [ cmake python3 libllvm.dev ]
+     ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-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}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals (!haveLibc || 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)}"
+  ] ++ lib.optionals (useLLVM || isNewDarwinBootstrap) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ../../common/compiler-rt/7-12-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    ../../common/compiler-rt/libsanitizer-no-cyclades-11.patch
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    ./armv7l.patch
+    # Fix build on armv6l
+    ../../common/compiler-rt/armv6-mcr-dmb.patch
+    ../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
+    ../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
+  ];
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    cmakeFlagsArray+=("-DCMAKE_LIPO=$(command -v ${stdenv.cc.targetPrefix}lipo)")
+  '' + lib.optionalString (!haveLibc) ''
+    cmakeFlagsArray+=("-DCMAKE_C_FLAGS=-nodefaultlibs -ffreestanding")
+  '';
+
+  # 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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + 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 = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + 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-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.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
+  ''
+  # See https://reviews.llvm.org/D37278 for why android exception
+  + lib.optionalString (stdenv.hostPlatform.isx86_32 && !stdenv.hostPlatform.isAndroid) ''
+    for f in $out/lib/*/*builtins-i?86*; do
+      ln -s "$f" $(echo "$f" | sed -e 's/builtins-i.86/builtins-i386/')
+    done
+  '' + lib.optionalString doFakeLibgcc ''
+    ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..91e208829295
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,129 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fa62814b635d..6328614d829e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,6 +12,7 @@ endif()
+ # Check if compiler-rt is built as a standalone project.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
+   project(CompilerRT C CXX ASM)
++  include(GNUInstallDirs)
+   set(COMPILER_RT_STANDALONE_BUILD TRUE)
+   set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ endif()
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index 7c127a93dfa7..6a95a65b70a7 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -524,7 +524,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
+   add_custom_target(${target_name} DEPENDS ${dst_file})
+   # Install in Clang resource directory.
+   install(FILES ${file_name}
+-    DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
+     COMPONENT ${component})
+   add_dependencies(${component} ${target_name})
+ 
+@@ -541,7 +541,7 @@ macro(add_compiler_rt_script name)
+   add_custom_target(${name} DEPENDS ${dst})
+   install(FILES ${dst}
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+-    DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin)
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR})
+ endmacro(add_compiler_rt_script src name)
+ 
+ # Builds custom version of libc++ and installs it in <prefix>.
+diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
+index be8d7e733c7a..ab256bdff26c 100644
+--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
++++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
+@@ -498,7 +498,7 @@ macro(darwin_add_embedded_builtin_libraries)
+     set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
+       ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+     set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
+-      ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
++      ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded)
+       
+     set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
+     set(CFLAGS_i386 "-march=pentium")
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index 99b9f0e4af44..c5183ffa746e 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -375,7 +375,7 @@ endfunction()
+ function(get_compiler_rt_install_dir arch install_dir)
+   if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+     get_compiler_rt_target(${arch} target)
+-    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
++    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE)
+   else()
+     set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
+   endif()
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index 964dd598f102..2acaab87d349 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -66,11 +66,11 @@ if (LLVM_TREE_AVAILABLE)
+ else()
+     # Take output dir and install path from the user.
+   set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
+-    "Path where built compiler-rt libraries should be stored.")
++    "Path where built compiler-rt build artifacts should be stored.")
+   set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
+     "Path where built compiler-rt executables should be stored.")
+-  set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH
+-    "Path where built compiler-rt libraries should be installed.")
++  set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
++    "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.")
+   option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
+   option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF)
+   # Use a host compiler to compile/link tests.
+@@ -98,7 +98,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+   set(COMPILER_RT_LIBRARY_OUTPUT_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+   set(COMPILER_RT_LIBRARY_INSTALL_DIR
+-    ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
++    ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR})
+ endif()
+ 
+ if(APPLE)
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index d47d7baeb118..507c8e5c713e 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -62,22 +62,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
+ install(FILES ${SANITIZER_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer)
+ # Install fuzzer headers.
+ install(FILES ${FUZZER_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer)
+ # Install xray headers.
+ install(FILES ${XRAY_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray)
+ # Install profile headers.
+ install(FILES ${PROFILE_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile)
+ 
+ if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
+   add_custom_target(install-compiler-rt-headers
+diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt
+index 051215edbeb7..ecce1f52efb0 100644
+--- a/lib/dfsan/CMakeLists.txt
++++ b/lib/dfsan/CMakeLists.txt
+@@ -56,4 +56,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
+                    DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
+ add_dependencies(dfsan dfsan_abilist)
+ install(FILES ${dfsan_abilist_filename}
+-        DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
++        DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..b9986910e516
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index c5183ffa746e..e4e4a007335d 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -299,8 +299,9 @@ macro(load_llvm_config)
+     # Get some LLVM variables from LLVMConfig.
+     include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+ 
+-    set(LLVM_LIBRARY_OUTPUT_INTDIR
+-      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++    get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++      REALPATH)
+   endif()
+ endmacro()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/default.nix
new file mode 100644
index 000000000000..3044199e2811
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/default.nix
@@ -0,0 +1,285 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, preLibcCrossHeaders
+, 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
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM version's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+}:
+
+let
+  release_version = "11.1.0";
+  candidate = ""; # empty or "rcN"
+  dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
+  version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
+
+  fetch = name: sha256: fetchurl {
+    url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}-${release_version}${candidate}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "18n1w1hkv931xzq02b34wglbv6zd6sd0r5kb8piwvag7klj7qw3n";
+
+  inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
+
+    llvm-polly = tools.libllvm-polly.lib // { outputSpecified = false; };
+
+    libclang = callPackage ./clang {
+      inherit clang-tools-extra_src llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    clang-polly-unwrapped = callPackage ./clang {
+      inherit llvm_meta;
+      inherit clang-tools-extra_src;
+      libllvm = tools.libllvm-polly;
+      enablePolly = true;
+    };
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    # disabled until recommonmark supports sphinx 3
+    # lldb-manpages = lowPrio (tools.lldb.override {
+    #   enableManpages = true;
+    #   python3 = pkgs.python3;  # don't use python-boot
+    # });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
+      else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      src = fetch "lldb" "1vlyg015dyng43xqb8cg2l6r9ix8klibxsajazbfnckdnh54hwxj";
+      patches = [
+        ./lldb/procfs.patch
+        ./lldb/gnu-install-dirs.patch
+      ];
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        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
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+        echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        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;
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands0 cc;
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isRiscV && stdenv.hostPlatform.is32bit)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.libc == "newlib")
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/libcxx/default.nix
new file mode 100644
index 000000000000..3e77e03b124b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/libcxx/default.nix
@@ -0,0 +1,104 @@
+{ lib, stdenv, llvm_meta, fetch, fetchpatch, cmake, python3, llvm, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+assert stdenv.isDarwin -> cxxabi.pname == "libcxxabi";
+
+stdenv.mkDerivation {
+  pname = "libcxx";
+  inherit version;
+
+  src = fetch "libcxx" "1rgqsqpgi0vkga5d7hy0iyfsqgzfz7q1xy7afdfa1snp1qjks8xv";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    mv libcxxabi-* libcxxabi
+    unpackFile ${llvm.src}
+    mv llvm-* llvm
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    (fetchpatch {
+      # Backported from LLVM 12, avoids clashes with commonly used "block.h" header.
+      url = "https://github.com/llvm/llvm-project/commit/19bc9ea480b60b607a3e303f20c7a3a2ea553369.patch";
+      sha256 = "sha256-aWa66ogmPkG0xHzSfcpD0qZyZQcNKwLV44js4eiun78=";
+      stripLen = 1;
+    })
+    ./gnu-install-dirs.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  # Prevent errors like "error: 'foo' is unavailable: introduced in macOS yy.zz"
+  postPatch = ''
+    substituteInPlace include/__config \
+      --replace "#    define _LIBCPP_USE_AVAILABILITY_APPLE" ""
+  '';
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ cxxabi ];
+
+  cmakeFlags = [
+    "-DLIBCXX_CXX_ABI=${cxxabi.pname}"
+  ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
+
+    # TODO: this is a bit of a hack to cross compile to Apple Silicon.  libcxx
+    # starting with 11 enables CMAKE_BUILD_WITH_INSTALL_NAME_DIR which requires
+    # platform setup for rpaths. In cmake, this is enabled when macos is newer
+    # than 10.5. However CMAKE_SYSTEM_VERSION is set to empty (TODO: why?)
+    # which prevents the conditional configuration, and configure fails.  The
+    # value here corresponds to `uname -r`. If stdenv.hostPlatform.release is
+    # not null, then this property will be set via mkDerivation (TODO: how can
+    # we set this?).
+    ++ lib.optional (
+      stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 &&
+      stdenv.hostPlatform != stdenv.buildPlatform
+    ) "-DCMAKE_SYSTEM_VERSION=20.1.0";
+
+  preInstall = lib.optionalString (stdenv.isDarwin) ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      baseName=$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))
+      installName="$out/lib/$baseName"
+      abiName=$(echo "$baseName" | sed -e 's/libc++/libc++abi/')
+
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other ${cxxabi}/lib/$abiName $file
+      done
+    done
+  '';
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..2b95d6a85d8f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,100 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 910d04b54b6d..80ef692d83eb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,6 +31,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+   project(libcxx CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxx)
+   set(PACKAGE_VERSION 11.1.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -418,7 +420,7 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+     string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+@@ -426,11 +428,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+   set(LIBCXX_HEADER_DIR  ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+   set(LIBCXX_HEADER_DIR  ${CMAKE_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ endif()
+ 
+ file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index c5aa26739e36..8841c4a5252d 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
+ 
+         if (LIBCXX_INSTALL_HEADERS)
+           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
+-            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
++            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}
+             COMPONENT cxx-headers
+             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+             )
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index be8141c98166..93847e5758cc 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -257,7 +257,7 @@ if (LIBCXX_INSTALL_HEADERS)
+   foreach(file ${files})
+     get_filename_component(dir ${file} DIRECTORY)
+     install(FILES ${file}
+-      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
++      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dir}
+       COMPONENT ${CXX_HEADER_TARGET}
+       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     )
+@@ -265,7 +265,7 @@ if (LIBCXX_INSTALL_HEADERS)
+ 
+   # Install the generated header as __config.
+   install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
+-    DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
++    DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1
+     PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     RENAME __config
+     COMPONENT ${CXX_HEADER_TARGET})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 2001c09761d9..5bd11ea6b400 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -344,21 +344,21 @@ if (LIBCXX_INSTALL_LIBRARY)
+     install(TARGETS cxx_shared
+       ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+       LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+   endif()
+ 
+   if (LIBCXX_INSTALL_STATIC_LIBRARY)
+     install(TARGETS cxx_static
+       ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+       LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+   endif()
+ 
+   if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
+     install(TARGETS cxx_experimental
+       LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+       ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+   endif()
+ 
+   # NOTE: This install command must go after the cxx install command otherwise
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/default.nix
new file mode 100644
index 000000000000..8a0a18f67822
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+, standalone ? stdenv.hostPlatform.useLLVM or false
+, withLibunwind ? !stdenv.isDarwin && !stdenv.hostPlatform.isWasm
+}:
+
+stdenv.mkDerivation {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1azcf31mxw59hb1x17xncnm3dyw90ylh8rqx462lvypqh3nr6c8l";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    mv libcxx-* libcxx
+    unpackFile ${llvm.src}
+    mv llvm-* llvm
+  '' + lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d libcxx -i ${../../libcxx-0001-musl-hacks.patch}
+  '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
+  '';
+
+  patches = [
+    ../../common/libcxxabi/no-threads.patch
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optional withLibunwind libunwind;
+
+  cmakeFlags = lib.optionals standalone [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+  ] ++ lib.optionals (standalone && withLibunwind) [
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      # Fix up the install name. Preserve the basename, just replace the path.
+      installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
+
+      # 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
+      ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+      # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+      # libcxxabi to sometimes link against a different version of itself.
+      # Here we simply make that second reference point to ourselves.
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+      done
+    done
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..10651c1255ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 36c6b2249e2b..a93c13ccaed9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,6 +24,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+   project(libcxxabi CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxxabi)
+   set(PACKAGE_VERSION 11.1.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -160,17 +162,17 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+     string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/libunwind/default.nix
new file mode 100644
index 000000000000..4cd39e379601
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/libunwind/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, llvm_meta, version, fetch, cmake, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  src = fetch pname "1vpqs2c358v8fbr1r8jmzkfqk12jllimjcfmgxga127ksq9b37nj";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..b5b9c209278e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e44a103648f9..aaf1f9555d7f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,6 +18,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
+   project(libunwind LANGUAGES C CXX ASM)
+ 
++  include(GNUInstallDirs)
++
+   # Rely on llvm-config.
+   set(CONFIG_OUTPUT)
+   if(NOT LLVM_CONFIG_PATH)
+@@ -192,17 +194,17 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+     string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
+ else()
+   set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/lld/default.nix
new file mode 100644
index 000000000000..dbcd96a3edce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/lld/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, fetch
+, cmake
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  src = fetch pname "1kk61i7z5bi9i11rzsd2b388d42if1c7a45zkaa4mk0yps67hyh1";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..19cf5526aa50
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/lld/gnu-install-dirs.patch
@@ -0,0 +1,68 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 040bb2c8f6d7..f765f0096d97 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+   set(CMAKE_INCLUDE_CURRENT_DIR ON)
+   set(LLD_BUILT_STANDALONE TRUE)
+ 
++  include(GNUInstallDirs)
++
+   find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
+   if(NOT LLVM_CONFIG_PATH)
+     message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
+@@ -205,7 +207,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index 23df41312403..d62372c88de7 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -20,9 +20,9 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      RUNTIME DESTINATION bin)
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+       add_llvm_install_targets(install-${name}
+@@ -54,7 +54,7 @@ macro(add_lld_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_lldtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT CMAKE_CONFIGURATION_TYPES)
+@@ -69,5 +69,5 @@ endmacro()
+ macro(add_lld_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt
+index e6f72fcd3488..d903609e6e4f 100644
+--- a/tools/lld/CMakeLists.txt
++++ b/tools/lld/CMakeLists.txt
+@@ -21,7 +21,7 @@ target_link_libraries(lld
+   )
+ 
+ install(TARGETS lld
+-  RUNTIME DESTINATION bin)
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ if(NOT LLD_SYMLINKS_TO_CREATE)
+   set(LLD_SYMLINKS_TO_CREATE lld-link ld.lld ld64.lld wasm-ld)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/lldb/gnu-install-dirs.patch
new file mode 100644
index 000000000000..fd49be395a3a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/lldb/gnu-install-dirs.patch
@@ -0,0 +1,91 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bf748020ea40..34103d2b5e1a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,6 +17,8 @@ set(CMAKE_MODULE_PATH
+ # If we are not building as part of LLVM, build LLDB as a standalone project,
+ # using LLVM as an external library.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
++  include(GNUInstallDirs)
++
+   project(lldb)
+   include(LLDBStandalone)
+ 
+diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
+index 4ed5c647c5d2..89f96e710d55 100644
+--- a/cmake/modules/AddLLDB.cmake
++++ b/cmake/modules/AddLLDB.cmake
+@@ -107,13 +107,13 @@ function(add_lldb_library name)
+   endif()
+ 
+   if(PARAM_SHARED)
+-    set(install_dest lib${LLVM_LIBDIR_SUFFIX})
++    set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+     if(PARAM_INSTALL_PREFIX)
+       set(install_dest ${PARAM_INSTALL_PREFIX})
+     endif()
+     # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
+     install(TARGETS ${name} COMPONENT ${name}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       LIBRARY DESTINATION ${install_dest}
+       ARCHIVE DESTINATION ${install_dest}
+       FRAMEWORK DESTINATION ${install_dest})
+diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
+index 8465cfe3b7b7..01b7eae136e2 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -245,7 +245,7 @@ include_directories(BEFORE
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+@@ -254,7 +254,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
+index efba2f74904f..e08413b1dbb1 100644
+--- a/tools/intel-features/CMakeLists.txt
++++ b/tools/intel-features/CMakeLists.txt
+@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+ endif()
+ 
+ install(TARGETS lldbIntelFeatures
+-  LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
+index 752113b..010f187 100644
+--- a/cmake/modules/LLDBStandalone.cmake
++++ b/cmake/modules/LLDBStandalone.cmake
+@@ -62,7 +62,7 @@ endif()
+
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+ if(WIN32 OR CYGWIN)
+   # DLL platform -- put DLLs into bin.
+   set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bf74802..1c98cae 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -222,7 +222,7 @@ if (LLDB_ENABLE_PYTHON)
+   if(LLDB_BUILD_FRAMEWORK)
+     set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python)
+   else()
+-    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
++    set(LLDB_PYTHON_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH})
+   endif()
+   if (NOT CMAKE_CFG_INTDIR STREQUAL  ".")
+     string(REPLACE ${CMAKE_CFG_INTDIR} "\$\{CMAKE_INSTALL_CONFIG_NAME\}" LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_INSTALL_PATH})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/lldb/procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/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/11/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix
new file mode 100644
index 000000000000..423b08396666
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix
@@ -0,0 +1,363 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, fetch
+, fetchpatch
+, cmake
+, python3
+, libffi
+, enableGoldPlugin ? libbfd.hasPluginAPI
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isRiscV)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+# broken for the armv7l builder
+, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
+, enablePolly ? false # TODO should be on by default
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in python3.withPackages checkDeps
+  else python3;
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = fetch pname "199yq3a214avcbi4kk2q0ajriifkvsr0l2dkx3a666m033ihi1ff";
+  polly_src = fetch "polly" "031r23ijhx7v93a5n33m2nc0x9xyqmx0d8xg80z7q971p6qd63sq";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${release_version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake python ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  patches = [
+    # When cross-compiling we configure llvm-config-native with an approximation
+    # of the flags used for the normal LLVM build. To avoid the need for building
+    # a native libLLVM.so (which would fail) we force llvm-config to be linked
+    # statically against the necessary LLVM components always.
+    ../../llvm-config-link-static.patch
+
+    ./gnu-install-dirs.patch
+    # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.
+    (fetchpatch {
+      name = "uops-CMOV16rm-noreg.diff";
+      url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff";
+      sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
+      stripLen = 1;
+    })
+    # gcc-11 compat upstream patch
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1.patch";
+      sha256 = "sha256:0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk";
+      stripLen = 1;
+    })
+
+    # Fix invalid std::string(nullptr) for GCC 12
+    (fetchpatch {
+      name = "nvptx-gcc-12.patch";
+      url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
+      sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      name = "dfaemitter-gcc-12.patch";
+      url = "https://github.com/llvm/llvm-project/commit/0841916e87a39e3c223c986e8da31e4a9a1432e3.patch";
+      sha256 = "1kckghvsngs51mqm82asy0s9vr19h8aqbw43a0w44mccqw6bzrwf";
+      stripLen = 1;
+    })
+
+    # Fix musl build.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
+      relative = "llvm";
+      hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
+    })
+
+    # Backport gcc-13 fixes with missing includes.
+    (fetchpatch {
+      name = "signals-gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch";
+      hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs=";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      name = "base64-gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch";
+      hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U=";
+      stripLen = 1;
+    })
+  ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+  '' + ''
+    # 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-readobj/ELF/dependent-libraries.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
+  '' + ''
+    # Tweak tests to ignore namespace part of type to support
+    # gcc-12: https://gcc.gnu.org/PR103598.
+    # The change below mangles strings like:
+    #    CHECK-NEXT: Starting llvm::Function pass manager run.
+    # to:
+    #    CHECK-NEXT: Starting {{.*}}Function pass manager run.
+    for f in \
+      test/Other/new-pass-manager.ll \
+      test/Other/new-pm-defaults.ll \
+      test/Other/new-pm-lto-defaults.ll \
+      test/Other/new-pm-thinlto-defaults.ll \
+      test/Other/pass-pipeline-parsing.ll \
+      test/Transforms/Inline/cgscc-incremental-invalidate.ll \
+      test/Transforms/Inline/clear-analyses.ll \
+      test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \
+      test/Transforms/SCCP/ipsccp-preserve-analysis.ll \
+      test/Transforms/SCCP/preserve-analysis.ll \
+      test/Transforms/SROA/dead-inst.ll \
+      test/tools/gold/X86/new-pm.ll \
+      ; do
+      echo "PATCH: $f"
+      substituteInPlace $f \
+        --replace 'Starting llvm::' 'Starting {{.*}}' \
+        --replace 'Finished llvm::' 'Finished {{.*}}'
+    done
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar'
+    )
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+    # This is a Shared Library not tied to LLVM_ENABLE_PIC
+    "-DLLVM_TOOL_REMARKS_SHLIB_BUILD=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (enableGoldPlugin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  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
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // 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 = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..fff2d4953e94
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,106 @@
+diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
+index 9939097f743e..8cc538da912a 100644
+--- a/tools/polly/CMakeLists.txt
++++ b/tools/polly/CMakeLists.txt
+@@ -2,7 +2,11 @@
+ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   project(Polly)
+   cmake_minimum_required(VERSION 3.4.3)
++endif()
++
++include(GNUInstallDirs)
+ 
++if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   # Where is LLVM installed?
+   find_package(LLVM CONFIG REQUIRED)
+   set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
+@@ -145,14 +149,14 @@ include_directories(
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+     )
+ 
+   install(DIRECTORY ${POLLY_BINARY_DIR}/include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN "CMakeFiles" EXCLUDE
+diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
+index 211f95512717..f9e04a4844b6 100644
+--- a/tools/polly/cmake/CMakeLists.txt
++++ b/tools/polly/cmake/CMakeLists.txt
+@@ -79,18 +79,18 @@ file(GENERATE
+ 
+ # Generate PollyConfig.cmake for the install tree.
+ unset(POLLY_EXPORTS)
+-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
++set(POLLY_INSTALL_PREFIX "")
+ set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
++set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
++set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ if (POLLY_BUNDLED_ISL)
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
+-    "${POLLY_INSTALL_PREFIX}/include/polly"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
+     )
+ else()
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+     ${ISL_INCLUDE_DIRS}
+     )
+ endif()
+@@ -100,12 +100,12 @@ endif()
+ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
+   get_target_property(tgt_type ${tgt} TYPE)
+   if (tgt_type STREQUAL "EXECUTABLE")
+-    set(tgt_prefix "bin/")
++    set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
+   else()
+-    set(tgt_prefix "lib/")
++    set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
+   endif()
+ 
+-  set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
++  set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
+   file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
+ 
+   if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 86de6f10686e..91f30891ccbe 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
+diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
+index 1039079cb49c..28b499ae1e9e 100644
+--- a/tools/polly/lib/External/CMakeLists.txt
++++ b/tools/polly/lib/External/CMakeLists.txt
+@@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL)
+     install(DIRECTORY
+       ${ISL_SOURCE_DIR}/include/
+       ${ISL_BINARY_DIR}/include/
+-      DESTINATION include/polly
++      DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
+       FILES_MATCHING
+       PATTERN "*.h"
+       PATTERN "CMakeFiles" EXCLUDE
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..29df98a693f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/gnu-install-dirs.patch
@@ -0,0 +1,417 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 247ad36d3845..815e2c4ba955 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -269,15 +269,21 @@ if (CMAKE_BUILD_TYPE AND
+   message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ endif()
+ 
++include(GNUInstallDirs)
++
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ 
+-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
++set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
++    "Path for binary subdirectory (defaults to 'bin')")
+ mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+ 
+ set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
+     "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
+ mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
+ 
++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
++	"Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
++
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+@@ -559,9 +565,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
+ option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
+ option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
+ 
+-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
++set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
+     CACHE STRING "Doxygen-generated HTML documentation install directory")
+-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
++set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
+     CACHE STRING "OCamldoc-generated HTML documentation install directory")
+ 
+ option (LLVM_BUILD_EXTERNAL_COMPILER_RT
+@@ -1107,7 +1113,7 @@ endif()
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/llvm include/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1119,7 +1125,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1134,13 +1140,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   if (LLVM_INSTALL_MODULEMAPS)
+     install(DIRECTORY include/llvm include/llvm-c
+-            DESTINATION include
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+             COMPONENT llvm-headers
+             FILES_MATCHING
+             PATTERN "module.modulemap"
+             )
+     install(FILES include/llvm/module.install.modulemap
+-            DESTINATION include/llvm
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
+             COMPONENT llvm-headers
+             RENAME "module.extern.modulemap"
+             )
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index b74adc11ade9..a5aa258cde30 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -766,9 +766,9 @@ macro(add_llvm_library name)
+ 
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              RUNTIME DESTINATION bin COMPONENT ${name})
++              LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+         add_llvm_install_targets(install-${name}
+@@ -981,7 +981,7 @@ function(process_llvm_pass_plugins)
+           "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
+       install(FILES
+           ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
+-          DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
++          DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
+           COMPONENT cmake-exports)
+ 
+       set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+@@ -1201,7 +1201,7 @@ macro(add_llvm_example name)
+   endif()
+   add_llvm_executable(${name} ${ARGN})
+   if( LLVM_BUILD_EXAMPLES )
+-    install(TARGETS ${name} RUNTIME DESTINATION examples)
++    install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   endif()
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endmacro(add_llvm_example name)
+@@ -1819,7 +1819,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir bin)
+   endif()
+@@ -1836,7 +1836,7 @@ function(llvm_install_library_symlink name dest type)
+   endif()
+ endfunction()
+ 
+-function(llvm_install_symlink name dest)
++function(llvm_install_symlink name dest output_dir)
+   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
+   foreach(path ${CMAKE_MODULE_PATH})
+     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
+@@ -1859,7 +1859,7 @@ function(llvm_install_symlink name dest)
+   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
+ 
+   install(SCRIPT ${INSTALL_SYMLINK}
+-          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
++          CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
+           COMPONENT ${component})
+ 
+   if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
+@@ -1942,7 +1942,8 @@ function(add_llvm_tool_symlink link_name target)
+     endif()
+ 
+     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
+-      llvm_install_symlink(${link_name} ${target})
++      GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
++      llvm_install_symlink(${link_name} ${target} ${output_dir})
+     endif()
+   endif()
+ endfunction()
+@@ -2064,9 +2065,9 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 554046b20edf..4d1ad980641e 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -144,9 +144,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
+index b5babb30abcf..190b1222a9f9 100644
+--- a/cmake/modules/AddSphinxTarget.cmake
++++ b/cmake/modules/AddSphinxTarget.cmake
+@@ -84,7 +84,7 @@ function (add_sphinx_target builder project)
+         endif()
+       elseif (builder STREQUAL html)
+         string(TOUPPER "${project}" project_upper)
+-        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
++        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
+             CACHE STRING "HTML documentation install directory for ${project}")
+ 
+         # '/.' indicates: copy the contents of the directory directly into
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index 4b8879f65fe4..f01920bcc60f 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
++set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+ 
+ # First for users who use an installed LLVM, create the LLVMExports.cmake file.
+@@ -108,13 +108,13 @@ foreach(p ${_count})
+   set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+ get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+ endforeach(p)
+-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
++set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+ set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
++set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
+ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
+-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
++set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ 
+ # Generate a default location for lit
+ if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
+diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
+index 09fed8085c23..aa79f192abf0 100644
+--- a/cmake/modules/LLVMInstallSymlink.cmake
++++ b/cmake/modules/LLVMInstallSymlink.cmake
+@@ -10,7 +10,7 @@ function(install_symlink name target outdir)
+     set(LINK_OR_COPY copy)
+   endif()
+ 
+-  set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
++  set(bindir "${DESTDIR}${outdir}/")
+ 
+   message(STATUS "Creating ${name}")
+ 
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index 1f908d3e95b1..1315e0aa40e1 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -196,7 +196,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ **CMAKE_C_FLAGS**:STRING
+   Extra flags to use when compiling C source files.
+@@ -516,8 +516,8 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
+   The path to install Doxygen-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/doxygen-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
+ 
+ **LLVM_ENABLE_SPHINX**:BOOL
+   If specified, CMake will search for the ``sphinx-build`` executable and will make
+@@ -548,13 +548,33 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_SPHINX_HTML_DIR**:STRING
+   The path to install Sphinx-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/html`.
+ 
+ **LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING
+   The path to install OCamldoc-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/ocaml-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html`.
++
++**CMAKE_INSTALL_BINDIR**:STRING
++  The path to install binary tools, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `bin`.
++
++**CMAKE_INSTALL_LIBDIR**:STRING
++  The path to install libraries, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `lib`.
++
++**CMAKE_INSTALL_INCLUDEDIR**:STRING
++  The path to install header files, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `include`.
++
++**CMAKE_INSTALL_DOCDIR**:STRING
++  The path to install documentation, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `share/doc`.
++
++**CMAKE_INSTALL_MANDIR**:STRING
++  The path to install manpage files, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `share/man`.
+ 
+ **LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL
+   macOS Only: If enabled CMake will generate a target named
+@@ -752,9 +772,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
+ 
+ This file is available in two different locations.
+ 
+-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
+-  ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
+-  On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
++* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
++  ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
++  installed as part of an installed version of LLVM. This is typically
++  ``cmake/llvm/`` within the lib directory. On Linux, this is typically
++  ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+ 
+ * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
+   ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
+diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt
+index bb96edb4b4bf..678c22fb43c8 100644
+--- a/examples/Bye/CMakeLists.txt
++++ b/examples/Bye/CMakeLists.txt
+@@ -14,6 +14,6 @@ if (NOT WIN32)
+     BUILDTREE_ONLY
+    )
+ 
+-  install(TARGETS ${name} RUNTIME DESTINATION examples)
++  install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endif()
+diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
+index b46319f24fc8..2feabd1954e4 100644
+--- a/include/llvm/CMakeLists.txt
++++ b/include/llvm/CMakeLists.txt
+@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
+ # If we're doing an out-of-tree build, copy a module map for generated
+ # header files into the build area.
+ if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+-  configure_file(module.modulemap.build module.modulemap COPYONLY)
++  configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
+ endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index 63cef75368b7..6295478b1f3d 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,10 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
++#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+ #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 7e74b7c90816..f185e9283f83 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -358,12 +358,26 @@ int main(int argc, char **argv) {
+         ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
+   } else {
+     ActivePrefix = CurrentExecPrefix;
+-    ActiveIncludeDir = ActivePrefix + "/include";
+-    SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
+-    sys::fs::make_absolute(ActivePrefix, path);
+-    ActiveBinDir = std::string(path.str());
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+-    ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveIncludeDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveBinDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveLibDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveCMakeDir = std::string(path.str());
++    }
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
+diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
+index 2963f97cad88..69d66c9c9ca1 100644
+--- a/tools/lto/CMakeLists.txt
++++ b/tools/lto/CMakeLists.txt
+@@ -25,7 +25,7 @@ add_llvm_library(LTO SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS
+     intrinsics_gen)
+ 
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
+-  DESTINATION include/llvm-c
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+   COMPONENT LTO)
+ 
+ if (APPLE)
+diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
+index ead73ec13a8f..250362021f17 100644
+--- a/tools/opt-viewer/CMakeLists.txt
++++ b/tools/opt-viewer/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (files
+ 
+ foreach (file ${files})
+   install(PROGRAMS ${file}
+-    DESTINATION share/opt-viewer
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
+     COMPONENT opt-viewer)
+ endforeach (file)
+ 
+diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
+index e948496c603a..1f4df8a98b10 100644
+--- a/tools/remarks-shlib/CMakeLists.txt
++++ b/tools/remarks-shlib/CMakeLists.txt
+@@ -11,7 +11,7 @@ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports)
+ add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES})
+ 
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
+-  DESTINATION include/llvm-c
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+   COMPONENT Remarks)
+ 
+ if (APPLE)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/openmp/default.nix
new file mode 100644
index 000000000000..6c2dd9ac9577
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/11/openmp/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, fetchpatch
+, cmake
+, llvm
+, targetLlvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
+
+  patches = [
+    # Fix compilation on aarch64-darwin, remove after the next release.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
+      sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
+      stripLen = 1;
+    })
+  ];
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/clang/default.nix
new file mode 100644
index 000000000000..28f976a26bdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/clang/default.nix
@@ -0,0 +1,132 @@
+{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "clang" "0px4gl27az6cdz6adds89qzdwb1cqpjsfvrldbz9qvpmphrj34bf";
+    inherit clang-tools-extra_src;
+
+    unpackPhase = ''
+      unpackFile $src
+      mv clang-* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+      substituteInPlace $sourceRoot/tools/extra/clangd/quality/CompletionModel.cmake \
+        --replace ' ''${CMAKE_SOURCE_DIR}/../clang-tools-extra' ' ''${CMAKE_SOURCE_DIR}/tools/extra'
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      (substituteAll {
+        src = ../../clang-11-15-LLVMgold-path.patch;
+        libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      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,scan-view}
+      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
+      mv $out/share/scan-view/*.py $python/share/scan-view
+      rm $out/bin/c-index-test
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/clang-tblgen $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // 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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..b834d386b4eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/clang/gnu-install-dirs.patch
@@ -0,0 +1,235 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9e74014134a0..976e6a1757fd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4)
+ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+   project(Clang)
+ 
++  include(GNUInstallDirs)
++
+   set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+   set(CMAKE_CXX_STANDARD_REQUIRED YES)
+   set(CMAKE_CXX_EXTENSIONS NO)
+@@ -416,7 +418,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/clang include/clang-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -425,7 +427,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "CMakeFiles" EXCLUDE
+@@ -445,7 +447,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
+   install(PROGRAMS utils/bash-autocomplete.sh
+-          DESTINATION share/clang
++          DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+           COMPONENT bash-autocomplete)
+   if(NOT LLVM_ENABLE_IDE)
+     add_llvm_install_targets(install-bash-autocomplete
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 704278a0e93b..d25c8d325c71 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -123,9 +123,9 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          RUNTIME DESTINATION bin)
++          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+         if (NOT LLVM_ENABLE_IDE)
+           add_llvm_install_targets(install-${lib}
+@@ -170,7 +170,7 @@ macro(add_clang_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_clangtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT LLVM_ENABLE_IDE)
+@@ -185,7 +185,7 @@ endmacro()
+ macro(add_clang_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+ 
+ function(clang_target_link_libraries target type)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index b2c0ce8dd4a0..19e5443d8c25 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -215,7 +215,7 @@ set_target_properties(clang-resource-headers PROPERTIES
+   FOLDER "Misc"
+   RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
+ 
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+ 
+ install(
+   FILES ${files} ${generated_files}
+diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
+index ceef4b08637c..8efad5520ca4 100644
+--- a/tools/c-index-test/CMakeLists.txt
++++ b/tools/c-index-test/CMakeLists.txt
+@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
+        "@executable_path/../../lib")
+   else()
+-    set(INSTALL_DESTINATION bin)
++    set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
+   endif()
+ 
+   install(TARGETS c-index-test
+diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt
+index 35ecdb11253c..d77d75de0094 100644
+--- a/tools/clang-format/CMakeLists.txt
++++ b/tools/clang-format/CMakeLists.txt
+@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
+ endif()
+ 
+ install(PROGRAMS clang-format-bbedit.applescript
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-diff.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-sublime.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS git-clang-format
+-  DESTINATION bin
++  DESTINATION ${CMAKE_INSTALL_BINDIR}
+   COMPONENT clang-format)
+diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt
+index cda8e29ec5b1..0134d8ccd70b 100644
+--- a/tools/clang-rename/CMakeLists.txt
++++ b/tools/clang-rename/CMakeLists.txt
+@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename
+   )
+ 
+ install(PROGRAMS clang-rename.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+ install(PROGRAMS clang-rename.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 51ff2e7e1565..1ed5f8a079a1 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -166,7 +166,7 @@ endif()
+ if(INTERNAL_INSTALL_PREFIX)
+   set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
+ else()
+-  set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
++  set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ endif()
+ 
+ install(DIRECTORY ../../include/clang-c
+@@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
+index ec0702d76f18..d25d982f51da 100644
+--- a/tools/scan-build/CMakeLists.txt
++++ b/tools/scan-build/CMakeLists.txt
+@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+     install(PROGRAMS bin/${BinFile}
+-            DESTINATION bin
++            DESTINATION ${CMAKE_INSTALL_BINDIR}
+             COMPONENT scan-build)
+   endforeach()
+ 
+@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
+     install(PROGRAMS libexec/${LibexecFile}
+-            DESTINATION libexec
++            DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
+             COMPONENT scan-build)
+   endforeach()
+ 
+@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
+     install(FILES share/scan-build/${ShareFile}
+-            DESTINATION share/scan-build
++            DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build
+             COMPONENT scan-build)
+   endforeach()
+ 
+diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
+index dd3d33439299..fea19c12ce70 100644
+--- a/tools/scan-view/CMakeLists.txt
++++ b/tools/scan-view/CMakeLists.txt
+@@ -19,7 +19,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+     install(PROGRAMS bin/${BinFile}
+-            DESTINATION bin
++            DESTINATION ${CMAKE_INSTALL_BINDIR}
+             COMPONENT scan-view)
+   endforeach()
+ 
+@@ -33,7 +33,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
+     install(FILES share/${ShareFile}
+-            DESTINATION share/scan-view
++            DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view
+             COMPONENT scan-view)
+   endforeach()
+ 
+diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt
+index 62f2de0cb15c..6aa66825b6ec 100644
+--- a/utils/hmaptool/CMakeLists.txt
++++ b/utils/hmaptool/CMakeLists.txt
+@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
+ 
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
+ install(PROGRAMS ${CLANG_HMAPTOOL}
+-        DESTINATION bin
++        DESTINATION ${CMAKE_INSTALL_BINDIR}
+         COMPONENT hmaptool)
+ 
+ add_custom_target(hmaptool ALL DEPENDS ${Depends})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/12/clang/purity.patch
new file mode 100644
index 000000000000..deb230a36c5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/clang/purity.patch
@@ -0,0 +1,28 @@
+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
+@@ -487,12 +487,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) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..66742e5b1498
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -345,4 +345,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -608,6 +612,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/armv7l.patch
new file mode 100644
index 000000000000..120cfe6feb2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/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/12/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix
new file mode 100644
index 000000000000..4b2bdad454ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix
@@ -0,0 +1,131 @@
+{ lib, stdenv, llvm_meta, version, fetch
+, cmake, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+  src = fetch "compiler-rt" "1950rg294izdwkaasi7yjrmadc9mzdd5paf0q63jjcq2m3rdbj5l";
+
+  nativeBuildInputs = [ cmake python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-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}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || 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)}"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ../../common/compiler-rt/7-12-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    ./armv7l.patch
+    # Fix build on armv6l
+    ../../common/compiler-rt/armv6-mcr-dmb.patch
+    ../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
+    ../../common/compiler-rt/armv6-no-ldrexd-strexd.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + 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>" ""
+  '';
+
+  preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
+    cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + 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
+  '' + lib.optionalString doFakeLibgcc ''
+    ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..5f025764de1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,129 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b44ad2c2118e..d42f5664d448 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.13.4)
+ # Check if compiler-rt is built as a standalone project.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
+   project(CompilerRT C CXX ASM)
++  include(GNUInstallDirs)
+   set(COMPILER_RT_STANDALONE_BUILD TRUE)
+   set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ endif()
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index 361538a58e47..f0d8d9ab80f1 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -495,7 +495,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
+   add_custom_target(${target_name} DEPENDS ${dst_file})
+   # Install in Clang resource directory.
+   install(FILES ${file_name}
+-    DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
+     COMPONENT ${component})
+   add_dependencies(${component} ${target_name})
+ 
+@@ -512,7 +512,7 @@ macro(add_compiler_rt_script name)
+   add_custom_target(${name} DEPENDS ${dst})
+   install(FILES ${dst}
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+-    DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin)
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR})
+ endmacro(add_compiler_rt_script src name)
+ 
+ # Builds custom version of libc++ and installs it in <prefix>.
+diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
+index 456a8dcda59f..7a09e74c7c79 100644
+--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
++++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
+@@ -508,7 +508,7 @@ macro(darwin_add_embedded_builtin_libraries)
+     set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
+       ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+     set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
+-      ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
++      ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded)
+       
+     set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
+     set(CFLAGS_i386 "-march=pentium")
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index f61d487e93a0..f1f46fb9599c 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -378,7 +378,7 @@ endfunction()
+ function(get_compiler_rt_install_dir arch install_dir)
+   if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+     get_compiler_rt_target(${arch} target)
+-    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
++    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE)
+   else()
+     set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
+   endif()
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index 1edab43e7c0d..1aac6b73ff82 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -65,11 +65,11 @@ if (LLVM_TREE_AVAILABLE)
+ else()
+     # Take output dir and install path from the user.
+   set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
+-    "Path where built compiler-rt libraries should be stored.")
++    "Path where built compiler-rt build artifacts should be stored.")
+   set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
+     "Path where built compiler-rt executables should be stored.")
+-  set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH
+-    "Path where built compiler-rt libraries should be installed.")
++  set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
++    "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.")
+   option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
+   option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF)
+   # Use a host compiler to compile/link tests.
+@@ -97,7 +97,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+   set(COMPILER_RT_LIBRARY_OUTPUT_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+   set(COMPILER_RT_LIBRARY_INSTALL_DIR
+-    ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
++    ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR})
+ endif()
+ 
+ if(APPLE)
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index b00e8caa1ddd..0fe64e4862c9 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -69,22 +69,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
+ install(FILES ${SANITIZER_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer)
+ # Install fuzzer headers.
+ install(FILES ${FUZZER_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer)
+ # Install xray headers.
+ install(FILES ${XRAY_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray)
+ # Install profile headers.
+ install(FILES ${PROFILE_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile)
+ 
+ if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
+   add_custom_target(install-compiler-rt-headers
+diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt
+index a29de8deff1b..d39ff01613d2 100644
+--- a/lib/dfsan/CMakeLists.txt
++++ b/lib/dfsan/CMakeLists.txt
+@@ -57,4 +57,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
+                    DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
+ add_dependencies(dfsan dfsan_abilist)
+ install(FILES ${dfsan_abilist_filename}
+-        DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
++        DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..135cf625ef78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index f1f46fb9599c..6f19e69507ba 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -302,8 +302,9 @@ macro(load_llvm_config)
+     # Get some LLVM variables from LLVMConfig.
+     include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+ 
+-    set(LLVM_LIBRARY_OUTPUT_INTDIR
+-      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++    get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++      REALPATH)
+   endif()
+ endmacro()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/default.nix
new file mode 100644
index 000000000000..a38e35e91f6d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/default.nix
@@ -0,0 +1,286 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, preLibcCrossHeaders
+, 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
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM version's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+}:
+
+let
+  release_version = "12.0.1";
+  candidate = ""; # empty or "rcN"
+  dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
+  version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
+
+  fetch = name: sha256: fetchurl {
+    url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}-${release_version}${candidate}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "1r9a4fdz9ci58b5z2inwvm4z4cdp6scrivnaw05dggkxz7yrwrb5";
+
+  inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit clang-tools-extra_src llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    # disabled until recommonmark supports sphinx 3
+    #Llvm-manpages = lowPrio (tools.libllvm.override {
+    #  enableManpages = true;
+    #  python3 = pkgs.python3;  # don't use python-boot
+    #});
+
+    clang-manpages = lowPrio (tools.libclang.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    # disabled until recommonmark supports sphinx 3
+    # lldb-manpages = lowPrio (tools.lldb.override {
+    #   enableManpages = true;
+    #   python3 = pkgs.python3;  # don't use python-boot
+    # });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
+      else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+      inherit (libraries) libunwind;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      src = fetch "lldb" "0g3pj1m3chafavpr35r9fynm85y2hdyla6klj0h28khxs2613i78";
+      patches =
+        let
+          resourceDirPatch = callPackage
+            ({ substituteAll, libclang }: substituteAll
+              {
+                src = ./lldb/resource-dir.patch;
+                clangLibDir = "${libclang.lib}/lib";
+              })
+            { };
+        in
+        [
+          ./lldb/procfs.patch
+          resourceDirPatch
+          ./lldb/gnu-install-dirs.patch
+        ];
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        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
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+        echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        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;
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands0 cc;
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      inherit (buildLlvmTools) llvm;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/libcxx/default.nix
new file mode 100644
index 000000000000..40bff3c1168b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/libcxx/default.nix
@@ -0,0 +1,79 @@
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, llvm, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+assert stdenv.isDarwin -> cxxabi.pname == "libcxxabi";
+
+stdenv.mkDerivation {
+  pname = "libcxx";
+  inherit version;
+
+  src = fetch "libcxx" "05cx39ldlxchck454lgfly1xj0c7x65iyx4hqhiihrlg6p6qj854";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    mv libcxxabi-* libcxxabi
+    unpackFile ${llvm.src}
+    mv llvm-* llvm
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ cxxabi ];
+
+  cmakeFlags = [
+    "-DLIBCXX_CXX_ABI=${cxxabi.pname}"
+  ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  preInstall = lib.optionalString (stdenv.isDarwin) ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      baseName=$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))
+      installName="$out/lib/$baseName"
+      abiName=$(echo "$baseName" | sed -e 's/libc++/libc++abi/')
+
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other ${cxxabi}/lib/$abiName $file
+      done
+    done
+  '';
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..1f9de00a9d56
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,100 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9bf1a02f0908..612cd4aab76c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,6 +28,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+   project(libcxx CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxx)
+   set(PACKAGE_VERSION 12.0.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -402,7 +404,7 @@ endif ()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+     string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+@@ -410,11 +412,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+   set(LIBCXX_HEADER_DIR  ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+   set(LIBCXX_HEADER_DIR  ${CMAKE_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ endif()
+ 
+ file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index 5d2764e870e9..bb1ec5de6ca2 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
+ 
+         if (LIBCXX_INSTALL_HEADERS)
+           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
+-            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
++            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}
+             COMPONENT cxx-headers
+             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+             )
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index 29a317b8ae9a..4747263cfd1b 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -252,7 +252,7 @@ if (LIBCXX_INSTALL_HEADERS)
+   foreach(file ${files})
+     get_filename_component(dir ${file} DIRECTORY)
+     install(FILES ${file}
+-      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
++      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dir}
+       COMPONENT cxx-headers
+       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     )
+@@ -260,7 +260,7 @@ if (LIBCXX_INSTALL_HEADERS)
+ 
+   # Install the generated header as __config.
+   install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
+-    DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
++    DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1
+     PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     RENAME __config
+     COMPONENT cxx-headers)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 9965104cb5b2..9b55dbb1d822 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -352,21 +352,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
+   install(TARGETS cxx_shared
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ if (LIBCXX_INSTALL_STATIC_LIBRARY)
+   install(TARGETS cxx_static
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
+   install(TARGETS cxx_experimental
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++    RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ # NOTE: This install command must go after the cxx install command otherwise
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/default.nix
new file mode 100644
index 000000000000..78a4a68d6a16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/default.nix
@@ -0,0 +1,87 @@
+{ lib, stdenv, llvm_meta, cmake, python3, fetch, libcxx, libunwind, llvm, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+, standalone ? stdenv.hostPlatform.useLLVM or false
+, withLibunwind ? !stdenv.isDarwin && !stdenv.hostPlatform.isWasm
+}:
+
+stdenv.mkDerivation {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1l4idd8npbkm168d26kqn529yv3npsd8f2dm8a7iwyknj7iyivw8";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    mv libcxx-* libcxx
+    unpackFile ${llvm.src}
+    mv llvm-* llvm
+  '' + lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d libcxx -i ${../../libcxx-0001-musl-hacks.patch}
+  '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = lib.optional withLibunwind libunwind;
+
+  cmakeFlags = lib.optionals standalone [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      # Fix up the install name. Preserve the basename, just replace the path.
+      installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
+
+      # 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
+      ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+      # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+      # libcxxabi to sometimes link against a different version of itself.
+      # Here we simply make that second reference point to ourselves.
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+      done
+    done
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..b49b1685940f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 426c855288fc..a9812a994f53 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+   project(libcxxabi CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxxabi)
+   set(PACKAGE_VERSION 11.0.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -180,17 +182,17 @@ set(CMAKE_MODULE_PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+     string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/libunwind/default.nix
new file mode 100644
index 000000000000..8ed246876959
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/libunwind/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, llvm_meta, version, fetch, libcxx, llvm, cmake
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  src = fetch pname "192ww6n81lj2mb9pj4043z79jp3cf58a9c2qrxjwm5c3a64n1shb";
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    mv libcxx-* libcxx
+    unpackFile ${llvm.src}
+    mv llvm-* llvm
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..a791d6c43231
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48cb8e004e08..fec8144fb95a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
+   project(libunwind LANGUAGES C CXX ASM)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libunwind)
+   set(PACKAGE_VERSION 12.0.0)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -115,17 +117,17 @@ set(CMAKE_MODULE_PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+     string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
+ else()
+   set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/lld/default.nix
new file mode 100644
index 000000000000..01b7e410aa07
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/lld/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, fetch
+, libunwind
+, cmake
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  src = fetch pname "0qg3fgc7wj34hdkqn21y03zcmsdd01szhhm1hfki63iifrm3y2v9";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace MachO/CMakeLists.txt --replace \
+      '(''${LLVM_MAIN_SRC_DIR}/' '('
+    mkdir -p libunwind/include
+    tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..61e2f0e48653
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/lld/gnu-install-dirs.patch
@@ -0,0 +1,68 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d4e561b50d8f..cfa5bdd79c2a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+   set(CMAKE_INCLUDE_CURRENT_DIR ON)
+   set(LLD_BUILT_STANDALONE TRUE)
+ 
++  include(GNUInstallDirs)
++
+   find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
+   if(NOT LLVM_CONFIG_PATH)
+     message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
+@@ -179,7 +181,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     )
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index 23df41312403..d62372c88de7 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -20,9 +20,9 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      RUNTIME DESTINATION bin)
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+       add_llvm_install_targets(install-${name}
+@@ -54,7 +54,7 @@ macro(add_lld_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_lldtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT CMAKE_CONFIGURATION_TYPES)
+@@ -69,5 +69,5 @@ endmacro()
+ macro(add_lld_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt
+index 5cff736ff57f..64e775c771b9 100644
+--- a/tools/lld/CMakeLists.txt
++++ b/tools/lld/CMakeLists.txt
+@@ -21,7 +21,7 @@ target_link_libraries(lld
+   )
+ 
+ install(TARGETS lld
+-  RUNTIME DESTINATION bin)
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ if(NOT LLD_SYMLINKS_TO_CREATE)
+   set(LLD_SYMLINKS_TO_CREATE
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/lldb/gnu-install-dirs.patch
new file mode 100644
index 000000000000..afc945ce2614
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/lldb/gnu-install-dirs.patch
@@ -0,0 +1,91 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5633e21c56a..f2f1035e9238 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH
+ # If we are not building as part of LLVM, build LLDB as a standalone project,
+ # using LLVM as an external library.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
++  include(GNUInstallDirs)
++
+   project(lldb)
+   include(LLDBStandalone)
+ 
+diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
+index 4ed5c647c5d2..89f96e710d55 100644
+--- a/cmake/modules/AddLLDB.cmake
++++ b/cmake/modules/AddLLDB.cmake
+@@ -107,13 +107,13 @@ function(add_lldb_library name)
+   endif()
+ 
+   if(PARAM_SHARED)
+-    set(install_dest lib${LLVM_LIBDIR_SUFFIX})
++    set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+     if(PARAM_INSTALL_PREFIX)
+       set(install_dest ${PARAM_INSTALL_PREFIX})
+     endif()
+     # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
+     install(TARGETS ${name} COMPONENT ${name}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       LIBRARY DESTINATION ${install_dest}
+       ARCHIVE DESTINATION ${install_dest}
+       FRAMEWORK DESTINATION ${install_dest})
+diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
+index 2fdf1502d055..37364341ff8b 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -225,7 +225,7 @@ include_directories(BEFORE
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".cmake" EXCLUDE
+@@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".cmake" EXCLUDE
+diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
+index 734167e51bc5..f95761b5df58 100644
+--- a/tools/intel-features/CMakeLists.txt
++++ b/tools/intel-features/CMakeLists.txt
+@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+ endif()
+ 
+ install(TARGETS lldbIntelFeatures
+-  LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
+index 752113b..010f187 100644
+--- a/cmake/modules/LLDBStandalone.cmake
++++ b/cmake/modules/LLDBStandalone.cmake
+@@ -62,7 +62,7 @@ endif()
+
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+ if(WIN32 OR CYGWIN)
+   # DLL platform -- put DLLs into bin.
+   set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5633e2..86e4738 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON)
+   if(LLDB_BUILD_FRAMEWORK)
+     set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
+   else()
+-    set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
++    set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb")
+   endif()
+   get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
+   finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/lldb/procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/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/12/lldb/resource-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/12/lldb/resource-dir.patch
new file mode 100644
index 000000000000..e0db80afeb9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/lldb/resource-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
+index 37364341ff8b..7f74c1a3e257 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
+   # Iterate over the possible places where the external resource directory
+   # could be and pick the first that exists.
+   foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
+-                    "${LLVM_BUILD_LIBRARY_DIR}"
++                    "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
+                     "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
+     # Build the resource directory path by appending 'clang/<version number>'.
+     set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix
new file mode 100644
index 000000000000..3263c4ddaf35
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix
@@ -0,0 +1,351 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, fetch
+, fetchpatch
+, cmake
+, python3
+, libffi
+, enableGoldPlugin ? libbfd.hasPluginAPI
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+# broken for the armv7l builder
+, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
+, enablePolly ? false
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in python3.withPackages checkDeps
+  else python3;
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = fetch pname "1pzx9zrmd7r3481sbhwvkms68fwhffpp4mmz45dgrkjpyl2q96kx";
+  polly_src = fetch "polly" "1yfm9ixda4a2sx7ak5vswijx4ydk5lv1c1xh39xmd2kh299y4m12";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${release_version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake python ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ ncurses ]
+    ++ [ zlib ];
+
+  patches = [
+    # When cross-compiling we configure llvm-config-native with an approximation
+    # of the flags used for the normal LLVM build. To avoid the need for building
+    # a native libLLVM.so (which would fail) we force llvm-config to be linked
+    # statically against the necessary LLVM components always.
+    ../../llvm-config-link-static.patch
+    # Fix llvm being miscompiled by some gccs. See llvm/llvm-project#49955
+    # Fix llvm being miscompiled by some gccs. See https://github.com/llvm/llvm-project/issues/49955
+    ./fix-llvm-issue-49955.patch
+
+    ./gnu-install-dirs.patch
+    # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.
+    (fetchpatch {
+      name = "uops-CMOV16rm-noreg.diff";
+      url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff";
+      sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
+      stripLen = 1;
+    })
+
+    # Fix musl build.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
+      relative = "llvm";
+      hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
+    })
+
+    # Backport gcc-13 fixes with missing includes.
+    (fetchpatch {
+      name = "signals-gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch";
+      hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs=";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      name = "base64-gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch";
+      hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U=";
+      stripLen = 1;
+    })
+  ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    # TODO: Fix failing tests:
+    rm test/DebugInfo/X86/vla-multi.ll
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-objcopy/MachO/universal-object.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
+  '' + ''
+    # Tweak tests to ignore namespace part of type to support
+    # gcc-12: https://gcc.gnu.org/PR103598.
+    # The change below mangles strings like:
+    #    CHECK-NEXT: Starting llvm::Function pass manager run.
+    # to:
+    #    CHECK-NEXT: Starting {{.*}}Function pass manager run.
+    for f in \
+      test/Other/new-pass-manager.ll \
+      test/Other/new-pm-O0-defaults.ll \
+      test/Other/new-pm-defaults.ll \
+      test/Other/new-pm-lto-defaults.ll \
+      test/Other/new-pm-thinlto-defaults.ll \
+      test/Other/pass-pipeline-parsing.ll \
+      test/Transforms/Inline/cgscc-incremental-invalidate.ll \
+      test/Transforms/Inline/clear-analyses.ll \
+      test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \
+      test/Transforms/SCCP/ipsccp-preserve-analysis.ll \
+      test/Transforms/SCCP/preserve-analysis.ll \
+      test/Transforms/SROA/dead-inst.ll \
+      test/tools/gold/X86/new-pm.ll \
+      ; do
+      echo "PATCH: $f"
+      substituteInPlace $f \
+        --replace 'Starting llvm::' 'Starting {{.*}}' \
+        --replace 'Finished llvm::' 'Finished {{.*}}'
+    done
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar'
+    )
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (enableGoldPlugin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  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
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // 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 = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/fix-llvm-issue-49955.patch b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/fix-llvm-issue-49955.patch
new file mode 100644
index 000000000000..b515583a0c42
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/fix-llvm-issue-49955.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt b/lib/CodeGen/AsmPrinter/CMakeLists.txt
+index eb924282..c77c140b 100644
+--- a/lib/CodeGen/AsmPrinter/CMakeLists.txt
++++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt
+@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter
+   Support
+   Target
+   )
++
++if (CMAKE_COMPILER_IS_GNUCXX)
++  set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES
++                              COMPILE_FLAGS -fno-strict-aliasing)
++endif()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..68f3c45396f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,105 @@
+diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
+index ca7c04c565bb..6ed5db5dd4f8 100644
+--- a/tools/polly/CMakeLists.txt
++++ b/tools/polly/CMakeLists.txt
+@@ -2,7 +2,11 @@
+ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   project(Polly)
+   cmake_minimum_required(VERSION 3.13.4)
++endif()
++
++include(GNUInstallDirs)
+ 
++if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   # Where is LLVM installed?
+   find_package(LLVM CONFIG REQUIRED)
+   set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
+@@ -122,13 +126,13 @@ include_directories(
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     )
+ 
+   install(DIRECTORY ${POLLY_BINARY_DIR}/include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN "CMakeFiles" EXCLUDE
+diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
+index 7cc129ba2e90..137be25e4b80 100644
+--- a/tools/polly/cmake/CMakeLists.txt
++++ b/tools/polly/cmake/CMakeLists.txt
+@@ -79,18 +79,18 @@ file(GENERATE
+ 
+ # Generate PollyConfig.cmake for the install tree.
+ unset(POLLY_EXPORTS)
+-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
++set(POLLY_INSTALL_PREFIX "")
+ set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
++set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
++set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ if (POLLY_BUNDLED_ISL)
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
+-    "${POLLY_INSTALL_PREFIX}/include/polly"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
+     )
+ else()
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+     ${ISL_INCLUDE_DIRS}
+     )
+ endif()
+@@ -100,12 +100,12 @@ endif()
+ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
+   get_target_property(tgt_type ${tgt} TYPE)
+   if (tgt_type STREQUAL "EXECUTABLE")
+-    set(tgt_prefix "bin/")
++    set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
+   else()
+-    set(tgt_prefix "lib/")
++    set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
+   endif()
+ 
+-  set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
++  set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
+   file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
+ 
+   if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
+diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
+index 8991094d92c7..178d8ad606bb 100644
+--- a/tools/polly/lib/External/CMakeLists.txt
++++ b/tools/polly/lib/External/CMakeLists.txt
+@@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL)
+     install(DIRECTORY
+       ${ISL_SOURCE_DIR}/include/
+       ${ISL_BINARY_DIR}/include/
+-      DESTINATION include/polly
++      DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
+       FILES_MATCHING
+       PATTERN "*.h"
+       PATTERN "CMakeFiles" EXCLUDE
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..da8dc1445171
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs.patch
@@ -0,0 +1,417 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 277d0fe54d7b..af69c8be8745 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -256,15 +256,21 @@ if (CMAKE_BUILD_TYPE AND
+   message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ endif()
+ 
++include(GNUInstallDirs)
++
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ 
+-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
++set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
++    "Path for binary subdirectory (defaults to 'bin')")
+ mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+ 
+ set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
+     "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
+ mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
+ 
++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
++	"Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
++
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+@@ -567,9 +573,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
+ option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
+ option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
+ 
+-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
++set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
+     CACHE STRING "Doxygen-generated HTML documentation install directory")
+-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
++set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
+     CACHE STRING "OCamldoc-generated HTML documentation install directory")
+ 
+ option (LLVM_BUILD_EXTERNAL_COMPILER_RT
+@@ -1027,7 +1033,7 @@ endif()
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/llvm include/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1038,7 +1044,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1052,13 +1058,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   if (LLVM_INSTALL_MODULEMAPS)
+     install(DIRECTORY include/llvm include/llvm-c
+-            DESTINATION include
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+             COMPONENT llvm-headers
+             FILES_MATCHING
+             PATTERN "module.modulemap"
+             )
+     install(FILES include/llvm/module.install.modulemap
+-            DESTINATION include/llvm
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
+             COMPONENT llvm-headers
+             RENAME "module.extern.modulemap"
+             )
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 97c9980c7de3..409e8b615f75 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -804,9 +804,9 @@ macro(add_llvm_library name)
+ 
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              RUNTIME DESTINATION bin COMPONENT ${name})
++              LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+         add_llvm_install_targets(install-${name}
+@@ -1022,7 +1022,7 @@ function(process_llvm_pass_plugins)
+           "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
+       install(FILES
+           ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
+-          DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
++          DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
+           COMPONENT cmake-exports)
+ 
+       set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+@@ -1242,7 +1242,7 @@ macro(add_llvm_example name)
+   endif()
+   add_llvm_executable(${name} ${ARGN})
+   if( LLVM_BUILD_EXAMPLES )
+-    install(TARGETS ${name} RUNTIME DESTINATION examples)
++    install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   endif()
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endmacro(add_llvm_example name)
+@@ -1854,7 +1854,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir bin)
+   endif()
+@@ -1871,7 +1871,7 @@ function(llvm_install_library_symlink name dest type)
+   endif()
+ endfunction()
+ 
+-function(llvm_install_symlink name dest)
++function(llvm_install_symlink name dest output_dir)
+   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
+   foreach(path ${CMAKE_MODULE_PATH})
+     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
+@@ -1894,7 +1894,7 @@ function(llvm_install_symlink name dest)
+   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
+ 
+   install(SCRIPT ${INSTALL_SYMLINK}
+-          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
++          CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
+           COMPONENT ${component})
+ 
+   if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
+@@ -1977,7 +1977,8 @@ function(add_llvm_tool_symlink link_name target)
+     endif()
+ 
+     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
+-      llvm_install_symlink(${link_name} ${target})
++      GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
++      llvm_install_symlink(${link_name} ${target} ${output_dir})
+     endif()
+   endif()
+ endfunction()
+@@ -2100,9 +2101,9 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 554046b20edf..4d1ad980641e 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -144,9 +144,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
+index e80c3b5c1cac..482f6d715ef5 100644
+--- a/cmake/modules/AddSphinxTarget.cmake
++++ b/cmake/modules/AddSphinxTarget.cmake
+@@ -90,7 +90,7 @@ function (add_sphinx_target builder project)
+         endif()
+       elseif (builder STREQUAL html)
+         string(TOUPPER "${project}" project_upper)
+-        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
++        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
+             CACHE STRING "HTML documentation install directory for ${project}")
+ 
+         # '/.' indicates: copy the contents of the directory directly into
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index 505dc9a29d70..36e6c63af3f4 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
++set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+ 
+ # First for users who use an installed LLVM, create the LLVMExports.cmake file.
+@@ -107,13 +107,13 @@ foreach(p ${_count})
+   set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+ get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+ endforeach(p)
+-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
++set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+ set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
++set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
+ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
+-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
++set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ 
+ # Generate a default location for lit
+ if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
+diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
+index 09fed8085c23..aa79f192abf0 100644
+--- a/cmake/modules/LLVMInstallSymlink.cmake
++++ b/cmake/modules/LLVMInstallSymlink.cmake
+@@ -10,7 +10,7 @@ function(install_symlink name target outdir)
+     set(LINK_OR_COPY copy)
+   endif()
+ 
+-  set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
++  set(bindir "${DESTDIR}${outdir}/")
+ 
+   message(STATUS "Creating ${name}")
+ 
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index bb821b417ad9..6a528f7c2ad3 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -196,7 +196,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ **CMAKE_C_FLAGS**:STRING
+   Extra flags to use when compiling C source files.
+@@ -550,8 +550,8 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
+   The path to install Doxygen-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/doxygen-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
+ 
+ **LLVM_ENABLE_SPHINX**:BOOL
+   If specified, CMake will search for the ``sphinx-build`` executable and will make
+@@ -582,13 +582,33 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_SPHINX_HTML_DIR**:STRING
+   The path to install Sphinx-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/html`.
+ 
+ **LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING
+   The path to install OCamldoc-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/ocaml-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html`.
++
++**CMAKE_INSTALL_BINDIR**:STRING
++  The path to install binary tools, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `bin`.
++
++**CMAKE_INSTALL_LIBDIR**:STRING
++  The path to install libraries, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `lib`.
++
++**CMAKE_INSTALL_INCLUDEDIR**:STRING
++  The path to install header files, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `include`.
++
++**CMAKE_INSTALL_DOCDIR**:STRING
++  The path to install documentation, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `share/doc`.
++
++**CMAKE_INSTALL_MANDIR**:STRING
++  The path to install manpage files, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `share/man`.
+ 
+ **LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL
+   macOS Only: If enabled CMake will generate a target named
+@@ -786,9 +806,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
+ 
+ This file is available in two different locations.
+ 
+-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
+-  ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
+-  On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
++* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
++  ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
++  installed as part of an installed version of LLVM. This is typically
++  ``cmake/llvm/`` within the lib directory. On Linux, this is typically
++  ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+ 
+ * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
+   ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
+diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt
+index bb96edb4b4bf..678c22fb43c8 100644
+--- a/examples/Bye/CMakeLists.txt
++++ b/examples/Bye/CMakeLists.txt
+@@ -14,6 +14,6 @@ if (NOT WIN32)
+     BUILDTREE_ONLY
+    )
+ 
+-  install(TARGETS ${name} RUNTIME DESTINATION examples)
++  install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endif()
+diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
+index b46319f24fc8..2feabd1954e4 100644
+--- a/include/llvm/CMakeLists.txt
++++ b/include/llvm/CMakeLists.txt
+@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
+ # If we're doing an out-of-tree build, copy a module map for generated
+ # header files into the build area.
+ if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+-  configure_file(module.modulemap.build module.modulemap COPYONLY)
++  configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
+ endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index ebe5b73a5c65..70c497be12f5 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,10 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
++#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+ #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 1a2f04552d13..44fa7d3eec6b 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -357,12 +357,26 @@ int main(int argc, char **argv) {
+         ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
+   } else {
+     ActivePrefix = CurrentExecPrefix;
+-    ActiveIncludeDir = ActivePrefix + "/include";
+-    SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
+-    sys::fs::make_absolute(ActivePrefix, path);
+-    ActiveBinDir = std::string(path.str());
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+-    ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveIncludeDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveBinDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveLibDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveCMakeDir = std::string(path.str());
++    }
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
+diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
+index 2963f97cad88..69d66c9c9ca1 100644
+--- a/tools/lto/CMakeLists.txt
++++ b/tools/lto/CMakeLists.txt
+@@ -25,7 +25,7 @@ add_llvm_library(LTO SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS
+     intrinsics_gen)
+ 
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
+-  DESTINATION include/llvm-c
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+   COMPONENT LTO)
+ 
+ if (APPLE)
+diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
+index ead73ec13a8f..250362021f17 100644
+--- a/tools/opt-viewer/CMakeLists.txt
++++ b/tools/opt-viewer/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (files
+ 
+ foreach (file ${files})
+   install(PROGRAMS ${file}
+-    DESTINATION share/opt-viewer
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
+     COMPONENT opt-viewer)
+ endforeach (file)
+ 
+diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
+index 865436247270..ce1daa62f6ab 100644
+--- a/tools/remarks-shlib/CMakeLists.txt
++++ b/tools/remarks-shlib/CMakeLists.txt
+@@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC)
+   endif()
+   
+   install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
+-    DESTINATION include/llvm-c
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+     COMPONENT Remarks)
+ 
+   if (APPLE)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/openmp/default.nix
new file mode 100644
index 000000000000..6040f3d1621a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/openmp/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, fetchpatch
+, cmake
+, llvm
+, targetLlvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0";
+
+  patches = [
+    # Fix cross.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
+      hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
+    })
+  ];
+
+  patchFlags = [ "-p2" ];
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix
new file mode 100644
index 000000000000..7673c903e71c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix
@@ -0,0 +1,126 @@
+{ lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    inherit src;
+    sourceRoot = "${src.name}/clang";
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      # Revert of https://reviews.llvm.org/D100879
+      # The malloc alignment assumption is incorrect for jemalloc and causes
+      # mis-compilation in firefox.
+      # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1741454
+      ./revert-malloc-alignment-assumption.patch
+      ../../common/clang/add-nostdlibinc-flag.patch
+      (substituteAll {
+        src = ../../clang-11-15-LLVMgold-path.patch;
+        libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      (cd tools && ln -s ../../clang-tools-extra extra)
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      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,scan-view}
+      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
+      mv $out/share/scan-view/*.py $python/share/scan-view
+      rm $out/bin/c-index-test
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/clang-tblgen $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // 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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..b834d386b4eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch
@@ -0,0 +1,235 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9e74014134a0..976e6a1757fd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4)
+ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+   project(Clang)
+ 
++  include(GNUInstallDirs)
++
+   set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+   set(CMAKE_CXX_STANDARD_REQUIRED YES)
+   set(CMAKE_CXX_EXTENSIONS NO)
+@@ -416,7 +418,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/clang include/clang-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -425,7 +427,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "CMakeFiles" EXCLUDE
+@@ -445,7 +447,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
+   install(PROGRAMS utils/bash-autocomplete.sh
+-          DESTINATION share/clang
++          DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+           COMPONENT bash-autocomplete)
+   if(NOT LLVM_ENABLE_IDE)
+     add_llvm_install_targets(install-bash-autocomplete
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 704278a0e93b..d25c8d325c71 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -123,9 +123,9 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          RUNTIME DESTINATION bin)
++          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+         if (NOT LLVM_ENABLE_IDE)
+           add_llvm_install_targets(install-${lib}
+@@ -170,7 +170,7 @@ macro(add_clang_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_clangtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT LLVM_ENABLE_IDE)
+@@ -185,7 +185,7 @@ endmacro()
+ macro(add_clang_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+ 
+ function(clang_target_link_libraries target type)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index b2c0ce8dd4a0..19e5443d8c25 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -215,7 +215,7 @@ set_target_properties(clang-resource-headers PROPERTIES
+   FOLDER "Misc"
+   RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
+ 
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+ 
+ install(
+   FILES ${files} ${generated_files}
+diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
+index ceef4b08637c..8efad5520ca4 100644
+--- a/tools/c-index-test/CMakeLists.txt
++++ b/tools/c-index-test/CMakeLists.txt
+@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
+        "@executable_path/../../lib")
+   else()
+-    set(INSTALL_DESTINATION bin)
++    set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
+   endif()
+ 
+   install(TARGETS c-index-test
+diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt
+index 35ecdb11253c..d77d75de0094 100644
+--- a/tools/clang-format/CMakeLists.txt
++++ b/tools/clang-format/CMakeLists.txt
+@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
+ endif()
+ 
+ install(PROGRAMS clang-format-bbedit.applescript
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-diff.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-sublime.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS git-clang-format
+-  DESTINATION bin
++  DESTINATION ${CMAKE_INSTALL_BINDIR}
+   COMPONENT clang-format)
+diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt
+index cda8e29ec5b1..0134d8ccd70b 100644
+--- a/tools/clang-rename/CMakeLists.txt
++++ b/tools/clang-rename/CMakeLists.txt
+@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename
+   )
+ 
+ install(PROGRAMS clang-rename.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+ install(PROGRAMS clang-rename.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 51ff2e7e1565..1ed5f8a079a1 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -166,7 +166,7 @@ endif()
+ if(INTERNAL_INSTALL_PREFIX)
+   set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
+ else()
+-  set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
++  set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ endif()
+ 
+ install(DIRECTORY ../../include/clang-c
+@@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
+index ec0702d76f18..d25d982f51da 100644
+--- a/tools/scan-build/CMakeLists.txt
++++ b/tools/scan-build/CMakeLists.txt
+@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+     install(PROGRAMS bin/${BinFile}
+-            DESTINATION bin
++            DESTINATION ${CMAKE_INSTALL_BINDIR}
+             COMPONENT scan-build)
+   endforeach()
+ 
+@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
+     install(PROGRAMS libexec/${LibexecFile}
+-            DESTINATION libexec
++            DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
+             COMPONENT scan-build)
+   endforeach()
+ 
+@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
+     install(FILES share/scan-build/${ShareFile}
+-            DESTINATION share/scan-build
++            DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build
+             COMPONENT scan-build)
+   endforeach()
+ 
+diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
+index dd3d33439299..fea19c12ce70 100644
+--- a/tools/scan-view/CMakeLists.txt
++++ b/tools/scan-view/CMakeLists.txt
+@@ -19,7 +19,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+     install(PROGRAMS bin/${BinFile}
+-            DESTINATION bin
++            DESTINATION ${CMAKE_INSTALL_BINDIR}
+             COMPONENT scan-view)
+   endforeach()
+ 
+@@ -33,7 +33,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
+     install(FILES share/${ShareFile}
+-            DESTINATION share/scan-view
++            DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view
+             COMPONENT scan-view)
+   endforeach()
+ 
+diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt
+index 62f2de0cb15c..6aa66825b6ec 100644
+--- a/utils/hmaptool/CMakeLists.txt
++++ b/utils/hmaptool/CMakeLists.txt
+@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
+ 
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
+ install(PROGRAMS ${CLANG_HMAPTOOL}
+-        DESTINATION bin
++        DESTINATION ${CMAKE_INSTALL_BINDIR}
+         COMPONENT hmaptool)
+ 
+ add_custom_target(hmaptool ALL DEPENDS ${Depends})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch
new file mode 100644
index 000000000000..deb230a36c5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch
@@ -0,0 +1,28 @@
+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
+@@ -487,12 +487,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) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/clang/revert-malloc-alignment-assumption.patch b/nixpkgs/pkgs/development/compilers/llvm/13/clang/revert-malloc-alignment-assumption.patch
new file mode 100644
index 000000000000..f8e55ff7f897
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/revert-malloc-alignment-assumption.patch
@@ -0,0 +1,78 @@
+--- b/include/clang/Basic/TargetInfo.h
++++ a/include/clang/Basic/TargetInfo.h
+@@ -612,8 +612,8 @@
+   }
+ 
+   /// Return the largest alignment for which a suitably-sized allocation with
++  /// '::operator new(size_t)' is guaranteed to produce a correctly-aligned
++  /// pointer.
+-  /// '::operator new(size_t)' or 'malloc' is guaranteed to produce a
+-  /// correctly-aligned pointer.
+   unsigned getNewAlign() const {
+     return NewAlign ? NewAlign : std::max(LongDoubleAlign, LongLongAlign);
+   }
+--- b/lib/CodeGen/CGCall.cpp
++++ a/lib/CodeGen/CGCall.cpp
+@@ -2048,24 +2048,6 @@
+       // allows it to work on indirect virtual function calls.
+       if (AttrOnCallSite && TargetDecl->hasAttr<NoMergeAttr>())
+         FuncAttrs.addAttribute(llvm::Attribute::NoMerge);
+-
+-      // Add known guaranteed alignment for allocation functions.
+-      if (unsigned BuiltinID = Fn->getBuiltinID()) {
+-        switch (BuiltinID) {
+-        case Builtin::BIaligned_alloc:
+-        case Builtin::BIcalloc:
+-        case Builtin::BImalloc:
+-        case Builtin::BImemalign:
+-        case Builtin::BIrealloc:
+-        case Builtin::BIstrdup:
+-        case Builtin::BIstrndup:
+-          RetAttrs.addAlignmentAttr(Context.getTargetInfo().getNewAlign() /
+-                                    Context.getTargetInfo().getCharWidth());
+-          break;
+-        default:
+-          break;
+-        }
+-      }
+     }
+ 
+     // 'const', 'pure' and 'noalias' attributed functions are also nounwind.
+--- b/test/CodeGen/alloc-fns-alignment.c
++++ /dev/null
+@@ -1,35 +0,0 @@
+-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
+-// RUN: %clang_cc1 -triple x86_64-windows-msvc      -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
+-// RUN: %clang_cc1 -triple i386-apple-darwin        -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
+-// RUN: %clang_cc1 -triple i386-unknown-linux-gnu   -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN8
+-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-malloc  -emit-llvm < %s  | FileCheck %s --check-prefix=NOBUILTIN-MALLOC
+-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-calloc  -emit-llvm < %s  | FileCheck %s --check-prefix=NOBUILTIN-CALLOC
+-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-realloc -emit-llvm < %s  | FileCheck %s --check-prefix=NOBUILTIN-REALLOC
+-
+-typedef __SIZE_TYPE__ size_t;
+-
+-void *malloc(size_t);
+-void *calloc(size_t, size_t);
+-void *realloc(void *, size_t);
+-
+-void *malloc_test(size_t n) {
+-  return malloc(n);
+-}
+-
+-void *calloc_test(size_t n) {
+-  return calloc(1, n);
+-}
+-
+-void *raalloc_test(void *p, size_t n) {
+-  return realloc(p, n);
+-}
+-
+-// ALIGN16: align 16 i8* @malloc
+-// ALIGN16: align 16 i8* @calloc
+-// ALIGN16: align 16 i8* @realloc
+-// ALIGN8: align 8 i8* @malloc
+-// ALIGN8: align 8 i8* @calloc
+-// ALIGN8: align 8 i8* @realloc
+-// NOBUILTIN-MALLOC: declare i8* @malloc
+-// NOBUILTIN-CALLOC: declare i8* @calloc
+-// NOBUILTIN-REALLOC: declare i8* @realloc
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..66742e5b1498
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -345,4 +345,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -608,6 +612,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch
new file mode 100644
index 000000000000..6818684e6a71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch
@@ -0,0 +1,31 @@
+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
+@@ -37,6 +37,6 @@
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv8m.main armv8.1m.main)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l armv8m.main armv8.1m.main)
+ 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
+@@ -555,6 +555,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
+@@ -705,7 +705,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|armv8m.main|armv8.1m.main)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
+         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/13/compiler-rt/codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch
new file mode 100644
index 000000000000..065959d14d46
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/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 bc69ec95c419..9f100fdcec2f 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -366,14 +366,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_OUTPUT_LIBRARY_DIR}
+-        )
+-      endif()
+     endif()
+ 
+     set(parent_target_arg)
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch
new file mode 100644
index 000000000000..425dc2af01e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch
@@ -0,0 +1,71 @@
+diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
+--- a/lib/sanitizer_common/sanitizer_mac.cpp
++++ b/lib/sanitizer_common/sanitizer_mac.cpp
+@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
+ // Offset example:
+ // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
+ constexpr u16 GetOSMajorKernelOffset() {
+-  if (TARGET_OS_OSX) return 4;
+-  if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
+-  if (TARGET_OS_WATCH) return 13;
++#if TARGET_OS_OSX
++  return 4;
++#endif
++#if TARGET_OS_IOS || TARGET_OS_TV
++  return 6;
++#endif
++#if TARGET_OS_WATCH
++  return 13;
++#endif
+ }
+ 
+ using VersStr = char[64];
+@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
+   u16 os_major = kernel_major - offset;
+ 
+   const char *format = "%d.0";
+-  if (TARGET_OS_OSX) {
+-    if (os_major >= 16) {  // macOS 11+
+-      os_major -= 5;
+-    } else {  // macOS 10.15 and below
+-      format = "10.%d";
+-    }
++#if TARGET_OS_OSX
++  if (os_major >= 16) {  // macOS 11+
++    os_major -= 5;
++  } else {  // macOS 10.15 and below
++    format = "10.%d";
+   }
++#endif
+   return internal_snprintf(vers, sizeof(VersStr), format, os_major);
+ }
+ 
+@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
+ // Aligned versions example:
+ // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
+ static void MapToMacos(u16 *major, u16 *minor) {
+-  if (TARGET_OS_OSX)
+-    return;
+-
+-  if (TARGET_OS_IOS || TARGET_OS_TV)
++#if !TARGET_OS_OSX
++#if TARGET_OS_IOS || TARGET_OS_TV
+     *major += 2;
+-  else if (TARGET_OS_WATCH)
++#elif TARGET_OS_WATCH
+     *major += 9;
+-  else
++#else
+     UNREACHABLE("unsupported platform");
++#endif
+ 
+   if (*major >= 16) {  // macOS 11+
+     *major -= 5;
+@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
+     *minor = *major;
+     *major = 10;
+   }
++#endif
+ }
+ 
+ static MacosVersion GetMacosAlignedVersionInternal() {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
new file mode 100644
index 000000000000..b6a9c13ba943
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
@@ -0,0 +1,138 @@
+{ lib, stdenv, llvm_meta, version, src
+, cmake, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  inherit (stdenv.hostPlatform) isMusl isAarch64;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/compiler-rt";
+
+  nativeBuildInputs = [ cmake python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-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}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+    "-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || 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)}"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    # Prevent a compilation error on darwin
+    ./darwin-targetconditionals.patch
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    ./armv7l.patch
+    # Fix build on armv6l
+    ../../common/compiler-rt/armv6-mcr-dmb.patch
+    ../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
+    ../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
+    ../../common/compiler-rt/armv6-scudo-no-yield.patch
+    ../../common/compiler-rt/armv6-scudo-libatomic.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + 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>" ""
+  '';
+
+  preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
+    cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + 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
+  '' + lib.optionalString doFakeLibgcc ''
+    ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..135cf625ef78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index f1f46fb9599c..6f19e69507ba 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -302,8 +302,9 @@ macro(load_llvm_config)
+     # Get some LLVM variables from LLVMConfig.
+     include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+ 
+-    set(LLVM_LIBRARY_OUTPUT_INTDIR
+-      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++    get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++      REALPATH)
+   endif()
+ endmacro()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix
new file mode 100644
index 000000000000..c811b24c48ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix
@@ -0,0 +1,335 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, preLibcCrossHeaders
+, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM version's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+# LLVM release information; specify one of these but not both:
+, gitRelease ? null
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   rev = /* commit SHA */;
+  #   rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+, officialRelease ? { version = "13.0.1"; sha256 = "06dv6h5dmvzdxbif2s8njki6h32796v368dyb5945x8gjj72xh7k"; }
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   candidate = /* optional; if specified, should be: "rcN" */
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+# By default, we'll try to fetch a release from `github:llvm/llvm-project`
+# corresponding to the `gitRelease` or `officialRelease` specified.
+#
+# You can provide your own LLVM source by specifying this arg but then it's up
+# to you to make sure that the LLVM repo given matches the release configuration
+# specified.
+, monorepoSrc ? null
+
+}:
+
+assert let
+  int = a: if a then 1 else 0;
+  xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
+in
+  lib.assertMsg
+    (xor
+      (gitRelease != null)
+      (officialRelease != null))
+    ("must specify `gitRelease` or `officialRelease`" +
+      (lib.optionalString (gitRelease != null) " — not both"));
+let
+  monorepoSrc' = monorepoSrc;
+in let
+  # Import releaseInfo separately to avoid infinite recursion
+  inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
+  inherit (releaseInfo) release_version version;
+  inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
+
+  src = monorepoSrc;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version src buildLlvmTools; });
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
+    # lldb-manpages = lowPrio (tools.lldb.override {
+    #   enableManpages = true;
+    #   python3 = pkgs.python3;  # don't use python-boot
+    # });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
+      else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      patches =
+        let
+          resourceDirPatch = callPackage
+            ({ substituteAll, libclang }: substituteAll
+              {
+                src = ./lldb/resource-dir.patch;
+                clangLibDir = "${libclang.lib}/lib";
+              })
+            { };
+        in
+        [
+          ./lldb/procfs.patch
+          resourceDirPatch
+          ./lldb/gnu-install-dirs.patch
+        ]
+        # This is a stopgap solution if/until the macOS SDK used for x86_64 is
+        # updated.
+        #
+        # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
+        # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
+        # of this preprocessor symbol in `lldb` with its expansion.
+        #
+        # See here for some context:
+        # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+        ++ lib.optional (
+          stdenv.targetPlatform.isDarwin
+            && !stdenv.targetPlatform.isAarch64
+            && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
+        ) ./lldb/cpu_subtype_arm64e_replacement.patch;
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        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
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+        echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        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;
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands0 cc;
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version src; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else (
+                 # libcxx >= 13 does not build on gcc9
+                 if stdenv.cc.isGNU && lib.versionOlder stdenv.cc.version "10"
+                 then pkgs.gcc10Stdenv
+                 else stdenv
+               );
+    };
+
+    libcxxabi = let
+      stdenv_ = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+      cxx-headers = callPackage ./libcxx {
+        inherit llvm_meta;
+        stdenv = stdenv_;
+        headersOnly = true;
+      };
+    in callPackage ./libcxxabi {
+      stdenv = stdenv_;
+      inherit llvm_meta cxx-headers;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix
new file mode 100644
index 000000000000..994ec7dd5a56
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix
@@ -0,0 +1,92 @@
+{ lib, stdenv, llvm_meta, src, cmake, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# If headersOnly is true, the resulting package would only include the headers.
+# Use this to break the circular dependency between libcxx and libcxxabi.
+#
+# Some context:
+# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
+, headersOnly ? false
+}:
+
+assert stdenv.isDarwin -> cxxabi.pname == "libcxxabi";
+
+stdenv.mkDerivation rec {
+  pname = if headersOnly then "cxx-headers" else "libcxx";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/libcxx";
+
+  outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = lib.optionals (!headersOnly) [ cxxabi ];
+
+  cmakeFlags = [ "-DLIBCXX_CXX_ABI=${cxxabi.pname}" ]
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  buildFlags = lib.optional headersOnly "generate-cxx-headers";
+  installTargets = lib.optional headersOnly "install-cxx-headers";
+
+  preInstall = lib.optionalString (stdenv.isDarwin && !headersOnly) ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      baseName=$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))
+      installName="$out/lib/$baseName"
+      abiName=$(echo "$baseName" | sed -e 's/libc++/libc++abi/')
+
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other ${cxxabi}/lib/$abiName $file
+      done
+    done
+  '';
+
+  # At this point, cxxabi headers would be installed in the dev output, which
+  # prevents moveToOutput from doing its job later in the build process.
+  postInstall = lib.optionalString (!headersOnly) ''
+    mv "$dev/include/c++/v1/"* "$out/include/c++/v1/"
+    pushd "$dev"
+    rmdir -p include/c++/v1
+    popd
+  '';
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..744967a6ee0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,82 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b1e25358d41a..7fe1f4d85401 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,6 +26,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+   project(libcxx CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxx)
+   set(PACKAGE_VERSION 13.0.0git)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -412,7 +414,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+   set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+       "Path where target-agnostic libc++ headers should be installed.")
+@@ -426,7 +428,7 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+   set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+       "Path where target-agnostic libc++ headers should be installed.")
+@@ -436,7 +438,7 @@ else()
+   set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+   set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+       "Path where target-agnostic libc++ headers should be installed.")
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index 5a8a4a270a1a..c06bae0001aa 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
+ 
+         if (LIBCXX_INSTALL_HEADERS)
+           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
+-            DESTINATION include/c++/v1/${dstdir}
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}
+             COMPONENT cxx-headers
+             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+             )
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 496429f3841e..1a0c9c0a3159 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -376,21 +376,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
+   install(TARGETS cxx_shared
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION bin COMPONENT cxx)
++    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ if (LIBCXX_INSTALL_STATIC_LIBRARY)
+   install(TARGETS cxx_static
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION bin COMPONENT cxx)
++    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
+   install(TARGETS cxx_experimental
+     LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+     ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-    RUNTIME DESTINATION bin COMPONENT cxx)
++    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+ 
+ # NOTE: This install command must go after the cxx install command otherwise
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix
new file mode 100644
index 000000000000..50f09831e974
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix
@@ -0,0 +1,84 @@
+{ lib, stdenv, llvm_meta, cmake, python3, src, cxx-headers, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+, standalone ? stdenv.hostPlatform.useLLVM or false
+, withLibunwind ? !stdenv.isDarwin && !stdenv.hostPlatform.isWasm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcxxabi";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = lib.optional withLibunwind libunwind;
+
+  cmakeFlags = [
+    "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
+  ] ++ lib.optionals standalone [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+  ] ++ lib.optionals (standalone && withLibunwind) [
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      # Fix up the install name. Preserve the basename, just replace the path.
+      installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
+
+      # 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
+      ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+      # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+      # libcxxabi to sometimes link against a different version of itself.
+      # Here we simply make that second reference point to ourselves.
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+      done
+    done
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..5d562dd59a99
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,37 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9fb35860d483..5739d9e8af62 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+   project(libcxxabi CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxxabi)
+   set(PACKAGE_VERSION 11.0.0git)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -195,7 +197,7 @@ set(CMAKE_MODULE_PATH
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -204,12 +206,12 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ else()
+   set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix
new file mode 100644
index 000000000000..d837bc60de37
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, llvm_meta, version, src, cmake
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..8cd25c56f8cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,36 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 81eddbc24879..e2afb2002150 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
+   project(libunwind LANGUAGES C CXX ASM)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libunwind)
+   set(PACKAGE_VERSION 13.0.0git)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+@@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+ else()
+   set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix
new file mode 100644
index 000000000000..d506f396f65c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, src
+, cmake
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  # On Darwin the llvm-config is perhaps not working fine as the
+  # LLVM_MAIN_SRC_DIR is not getting set correctly, and the build fails as the
+  # include path is not correct.
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace MachO/CMakeLists.txt --replace \
+      '(''${LLVM_MAIN_SRC_DIR}/' '(../'
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..61e2f0e48653
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch
@@ -0,0 +1,68 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d4e561b50d8f..cfa5bdd79c2a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+   set(CMAKE_INCLUDE_CURRENT_DIR ON)
+   set(LLD_BUILT_STANDALONE TRUE)
+ 
++  include(GNUInstallDirs)
++
+   find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
+   if(NOT LLVM_CONFIG_PATH)
+     message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
+@@ -179,7 +181,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     )
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index 23df41312403..d62372c88de7 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -20,9 +20,9 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      RUNTIME DESTINATION bin)
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+       add_llvm_install_targets(install-${name}
+@@ -54,7 +54,7 @@ macro(add_lld_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_lldtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT CMAKE_CONFIGURATION_TYPES)
+@@ -69,5 +69,5 @@ endmacro()
+ macro(add_lld_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt
+index 5cff736ff57f..64e775c771b9 100644
+--- a/tools/lld/CMakeLists.txt
++++ b/tools/lld/CMakeLists.txt
+@@ -21,7 +21,7 @@ target_link_libraries(lld
+   )
+ 
+ install(TARGETS lld
+-  RUNTIME DESTINATION bin)
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ if(NOT LLD_SYMLINKS_TO_CREATE)
+   set(LLD_SYMLINKS_TO_CREATE
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch
new file mode 100644
index 000000000000..afc945ce2614
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch
@@ -0,0 +1,91 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5633e21c56a..f2f1035e9238 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH
+ # If we are not building as part of LLVM, build LLDB as a standalone project,
+ # using LLVM as an external library.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
++  include(GNUInstallDirs)
++
+   project(lldb)
+   include(LLDBStandalone)
+ 
+diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
+index 4ed5c647c5d2..89f96e710d55 100644
+--- a/cmake/modules/AddLLDB.cmake
++++ b/cmake/modules/AddLLDB.cmake
+@@ -107,13 +107,13 @@ function(add_lldb_library name)
+   endif()
+ 
+   if(PARAM_SHARED)
+-    set(install_dest lib${LLVM_LIBDIR_SUFFIX})
++    set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+     if(PARAM_INSTALL_PREFIX)
+       set(install_dest ${PARAM_INSTALL_PREFIX})
+     endif()
+     # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
+     install(TARGETS ${name} COMPONENT ${name}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       LIBRARY DESTINATION ${install_dest}
+       ARCHIVE DESTINATION ${install_dest}
+       FRAMEWORK DESTINATION ${install_dest})
+diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
+index 2fdf1502d055..37364341ff8b 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -225,7 +225,7 @@ include_directories(BEFORE
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".cmake" EXCLUDE
+@@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".cmake" EXCLUDE
+diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
+index 734167e51bc5..f95761b5df58 100644
+--- a/tools/intel-features/CMakeLists.txt
++++ b/tools/intel-features/CMakeLists.txt
+@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+ endif()
+ 
+ install(TARGETS lldbIntelFeatures
+-  LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
+index 752113b..010f187 100644
+--- a/cmake/modules/LLDBStandalone.cmake
++++ b/cmake/modules/LLDBStandalone.cmake
+@@ -62,7 +62,7 @@ endif()
+
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+ if(WIN32 OR CYGWIN)
+   # DLL platform -- put DLLs into bin.
+   set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5633e2..86e4738 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON)
+   if(LLDB_BUILD_FRAMEWORK)
+     set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
+   else()
+-    set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
++    set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb")
+   endif()
+   get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
+   finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/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/13/lldb/resource-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch
new file mode 100644
index 000000000000..e0db80afeb9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
+index 37364341ff8b..7f74c1a3e257 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
+   # Iterate over the possible places where the external resource directory
+   # could be and pick the first that exists.
+   foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
+-                    "${LLVM_BUILD_LIBRARY_DIR}"
++                    "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
+                     "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
+     # Build the resource directory path by appending 'clang/<version number>'.
+     set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix
new file mode 100644
index 000000000000..1e71cdd89c6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix
@@ -0,0 +1,313 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, src
+, fetchpatch
+, cmake
+, python3
+, libffi
+, enableGoldPlugin ? libbfd.hasPluginAPI
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+# broken for the armv7l builder
+, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
+, enablePolly ? false
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in python3.withPackages checkDeps
+  else python3;
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake python ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ ncurses ]
+    ++ [ zlib ];
+
+  nativeCheckInputs = [ which ];
+
+  patches = [
+    # When cross-compiling we configure llvm-config-native with an approximation
+    # of the flags used for the normal LLVM build. To avoid the need for building
+    # a native libLLVM.so (which would fail) we force llvm-config to be linked
+    # statically against the necessary LLVM components always.
+    ../../llvm-config-link-static.patch
+
+    ./gnu-install-dirs.patch
+
+    # Fix random compiler crashes: https://bugs.llvm.org/show_bug.cgi?id=50611
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4764a4f8c920912a2bfd8b0eea57273acfe0d8a8/trunk/no-strict-aliasing-DwarfCompileUnit.patch";
+      sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g";
+      stripLen = 1;
+    })
+
+    # Fix musl build.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
+      relative = "llvm";
+      hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
+    })
+
+    # Backport gcc-13 fixes with missing includes.
+    (fetchpatch {
+      name = "signals-gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch";
+      hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs=";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      name = "base64-gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch";
+      hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U=";
+      stripLen = 1;
+    })
+  ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+  '' + 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
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar'
+    )
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (enableGoldPlugin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  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
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // 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 = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..68f3c45396f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,105 @@
+diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
+index ca7c04c565bb..6ed5db5dd4f8 100644
+--- a/tools/polly/CMakeLists.txt
++++ b/tools/polly/CMakeLists.txt
+@@ -2,7 +2,11 @@
+ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   project(Polly)
+   cmake_minimum_required(VERSION 3.13.4)
++endif()
++
++include(GNUInstallDirs)
+ 
++if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   # Where is LLVM installed?
+   find_package(LLVM CONFIG REQUIRED)
+   set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
+@@ -122,13 +126,13 @@ include_directories(
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     )
+ 
+   install(DIRECTORY ${POLLY_BINARY_DIR}/include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN "CMakeFiles" EXCLUDE
+diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
+index 7cc129ba2e90..137be25e4b80 100644
+--- a/tools/polly/cmake/CMakeLists.txt
++++ b/tools/polly/cmake/CMakeLists.txt
+@@ -79,18 +79,18 @@ file(GENERATE
+ 
+ # Generate PollyConfig.cmake for the install tree.
+ unset(POLLY_EXPORTS)
+-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
++set(POLLY_INSTALL_PREFIX "")
+ set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
++set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
++set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ if (POLLY_BUNDLED_ISL)
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
+-    "${POLLY_INSTALL_PREFIX}/include/polly"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
+     )
+ else()
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+     ${ISL_INCLUDE_DIRS}
+     )
+ endif()
+@@ -100,12 +100,12 @@ endif()
+ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
+   get_target_property(tgt_type ${tgt} TYPE)
+   if (tgt_type STREQUAL "EXECUTABLE")
+-    set(tgt_prefix "bin/")
++    set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
+   else()
+-    set(tgt_prefix "lib/")
++    set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
+   endif()
+ 
+-  set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
++  set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
+   file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
+ 
+   if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
+diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
+index 8991094d92c7..178d8ad606bb 100644
+--- a/tools/polly/lib/External/CMakeLists.txt
++++ b/tools/polly/lib/External/CMakeLists.txt
+@@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL)
+     install(DIRECTORY
+       ${ISL_SOURCE_DIR}/include/
+       ${ISL_BINARY_DIR}/include/
+-      DESTINATION include/polly
++      DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
+       FILES_MATCHING
+       PATTERN "*.h"
+       PATTERN "CMakeFiles" EXCLUDE
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..18fa5fc6d89c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch
@@ -0,0 +1,381 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 135036f509d2..265c36f8211b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,15 +270,21 @@ if (CMAKE_BUILD_TYPE AND
+   message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ endif()
+ 
++include(GNUInstallDirs)
++
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ 
+-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
++set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
++    "Path for binary subdirectory (defaults to 'bin')")
+ mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+ 
+ set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
+     "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
+ mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
+ 
++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
++	"Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
++
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+@@ -581,9 +587,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
+ option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
+ option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
+ 
+-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
++set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
+     CACHE STRING "Doxygen-generated HTML documentation install directory")
+-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
++set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
+     CACHE STRING "OCamldoc-generated HTML documentation install directory")
+ 
+ option (LLVM_BUILD_EXTERNAL_COMPILER_RT
+@@ -1048,7 +1054,7 @@ endif()
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/llvm include/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1059,7 +1065,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1073,13 +1079,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   if (LLVM_INSTALL_MODULEMAPS)
+     install(DIRECTORY include/llvm include/llvm-c
+-            DESTINATION include
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+             COMPONENT llvm-headers
+             FILES_MATCHING
+             PATTERN "module.modulemap"
+             )
+     install(FILES include/llvm/module.install.modulemap
+-            DESTINATION include/llvm
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
+             COMPONENT llvm-headers
+             RENAME "module.extern.modulemap"
+             )
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 9c2b85374307..5531ceeb2eeb 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -818,9 +818,9 @@ macro(add_llvm_library name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              RUNTIME DESTINATION bin COMPONENT ${name})
++              LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+         add_llvm_install_targets(install-${name}
+@@ -1036,7 +1036,7 @@ function(process_llvm_pass_plugins)
+           "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
+       install(FILES
+           ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
+-          DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
++          DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
+           COMPONENT cmake-exports)
+ 
+       set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+@@ -1250,7 +1250,7 @@ macro(add_llvm_example name)
+   endif()
+   add_llvm_executable(${name} ${ARGN})
+   if( LLVM_BUILD_EXAMPLES )
+-    install(TARGETS ${name} RUNTIME DESTINATION examples)
++    install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   endif()
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endmacro(add_llvm_example name)
+@@ -1868,7 +1868,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir bin)
+   endif()
+@@ -1879,7 +1879,7 @@ function(llvm_install_library_symlink name dest type)
+ 
+ endfunction()
+ 
+-function(llvm_install_symlink name dest)
++function(llvm_install_symlink name dest output_dir)
+   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
+   foreach(path ${CMAKE_MODULE_PATH})
+     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
+@@ -1902,7 +1902,7 @@ function(llvm_install_symlink name dest)
+   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
+ 
+   install(SCRIPT ${INSTALL_SYMLINK}
+-          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
++          CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
+           COMPONENT ${component})
+ 
+   if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
+@@ -1985,7 +1985,8 @@ function(add_llvm_tool_symlink link_name target)
+     endif()
+ 
+     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
+-      llvm_install_symlink(${link_name} ${target})
++      GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
++      llvm_install_symlink(${link_name} ${target} ${output_dir})
+     endif()
+   endif()
+ endfunction()
+@@ -2114,9 +2115,9 @@ function(llvm_setup_rpath name)
+     # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+     # hardcode the rpath to build/install lib dir first in this mode.
+     # FIXME: update this when there is better solution.
+-    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 554046b20edf..4d1ad980641e 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -144,9 +144,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
+index e80c3b5c1cac..482f6d715ef5 100644
+--- a/cmake/modules/AddSphinxTarget.cmake
++++ b/cmake/modules/AddSphinxTarget.cmake
+@@ -90,7 +90,7 @@ function (add_sphinx_target builder project)
+         endif()
+       elseif (builder STREQUAL html)
+         string(TOUPPER "${project}" project_upper)
+-        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
++        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
+             CACHE STRING "HTML documentation install directory for ${project}")
+ 
+         # '/.' indicates: copy the contents of the directory directly into
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index 51b6a4fdc284..4adc2acfc074 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include(LLVMDistributionSupport)
+ 
+-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
++set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+ 
+ # First for users who use an installed LLVM, create the LLVMExports.cmake file.
+@@ -109,13 +109,13 @@ foreach(p ${_count})
+   set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+ get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+ endforeach(p)
+-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
++set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+ set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
++set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
+ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
+-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
++set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ 
+ # Generate a default location for lit
+ if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
+diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
+index 3e6a2c9a2648..52e14d955c60 100644
+--- a/cmake/modules/LLVMInstallSymlink.cmake
++++ b/cmake/modules/LLVMInstallSymlink.cmake
+@@ -4,7 +4,7 @@
+ 
+ function(install_symlink name target outdir)
+   set(DESTDIR $ENV{DESTDIR})
+-  set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
++  set(bindir "${DESTDIR}${outdir}/")
+ 
+   message(STATUS "Creating ${name}")
+ 
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index f1ac2c7d4934..c6e1469b5e13 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -202,7 +202,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ Rarely-used CMake variables
+ ---------------------------
+@@ -551,8 +551,8 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
+   The path to install Doxygen-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/doxygen-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
+ 
+ **LLVM_LINK_LLVM_DYLIB**:BOOL
+   If enabled, tools will be linked with the libLLVM shared library. Defaults
+@@ -792,9 +792,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
+ 
+ This file is available in two different locations.
+ 
+-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
+-  ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
+-  On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
++* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
++  ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
++  installed as part of an installed version of LLVM. This is typically
++  ``cmake/llvm/`` within the lib directory. On Linux, this is typically
++  ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+ 
+ * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
+   ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
+diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt
+index bb96edb4b4bf..678c22fb43c8 100644
+--- a/examples/Bye/CMakeLists.txt
++++ b/examples/Bye/CMakeLists.txt
+@@ -14,6 +14,6 @@ if (NOT WIN32)
+     BUILDTREE_ONLY
+    )
+ 
+-  install(TARGETS ${name} RUNTIME DESTINATION examples)
++  install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endif()
+diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
+index b46319f24fc8..2feabd1954e4 100644
+--- a/include/llvm/CMakeLists.txt
++++ b/include/llvm/CMakeLists.txt
+@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
+ # If we're doing an out-of-tree build, copy a module map for generated
+ # header files into the build area.
+ if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+-  configure_file(module.modulemap.build module.modulemap COPYONLY)
++  configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
+ endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index ebe5b73a5c65..70c497be12f5 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,10 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
++#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+ #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 1a2f04552d13..44fa7d3eec6b 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -357,12 +357,26 @@ int main(int argc, char **argv) {
+         ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
+   } else {
+     ActivePrefix = CurrentExecPrefix;
+-    ActiveIncludeDir = ActivePrefix + "/include";
+-    SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
+-    sys::fs::make_absolute(ActivePrefix, path);
+-    ActiveBinDir = std::string(path.str());
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+-    ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveIncludeDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveBinDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveLibDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveCMakeDir = std::string(path.str());
++    }
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
+diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
+index 0af29ad762c5..37b99b83e35c 100644
+--- a/tools/lto/CMakeLists.txt
++++ b/tools/lto/CMakeLists.txt
+@@ -33,7 +33,7 @@ add_llvm_library(${LTO_LIBRARY_NAME} ${LTO_LIBRARY_TYPE} INSTALL_WITH_TOOLCHAIN
+     ${SOURCES} DEPENDS intrinsics_gen)
+ 
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
+-  DESTINATION include/llvm-c
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+   COMPONENT LTO)
+ 
+ if (APPLE)
+diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
+index ead73ec13a8f..250362021f17 100644
+--- a/tools/opt-viewer/CMakeLists.txt
++++ b/tools/opt-viewer/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (files
+ 
+ foreach (file ${files})
+   install(PROGRAMS ${file}
+-    DESTINATION share/opt-viewer
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
+     COMPONENT opt-viewer)
+ endforeach (file)
+ 
+diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
+index 865436247270..ce1daa62f6ab 100644
+--- a/tools/remarks-shlib/CMakeLists.txt
++++ b/tools/remarks-shlib/CMakeLists.txt
+@@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC)
+   endif()
+   
+   install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
+-    DESTINATION include/llvm-c
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+     COMPONENT Remarks)
+ 
+   if (APPLE)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix
new file mode 100644
index 000000000000..7b461df438f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, llvm_meta
+, src
+, fetchpatch
+, cmake
+, llvm
+, targetLlvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    # Fix cross.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
+      hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
+    })
+  ];
+
+  patchFlags = [ "-p2" ];
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  cmakeFlags = [
+    "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/clang/default.nix
new file mode 100644
index 000000000000..f63f55cfa546
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/clang/default.nix
@@ -0,0 +1,129 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand
+, substituteAll, cmake, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation (rec {
+    pname = "clang";
+    inherit version;
+
+    src = runCommand "${pname}-src-${version}" {} ''
+      mkdir -p "$out"
+      cp -r ${monorepoSrc}/cmake "$out"
+      cp -r ${monorepoSrc}/${pname} "$out"
+      cp -r ${monorepoSrc}/clang-tools-extra "$out"
+    '';
+
+    sourceRoot = "${src.name}/${pname}";
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      ../../common/clang/add-nostdlibinc-flag.patch
+      (substituteAll {
+        src = ../../clang-11-15-LLVMgold-path.patch;
+        libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      (cd tools && ln -s ../../clang-tools-extra extra)
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      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,scan-view}
+      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
+      mv $out/share/scan-view/*.py $python/share/scan-view
+      rm $out/bin/c-index-test
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/clang-tblgen $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // 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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..57c54e18c37b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/clang/gnu-install-dirs.patch
@@ -0,0 +1,50 @@
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 9bbbfc032b7d..947bd0da865d 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -119,8 +119,8 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
+           RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+
+         if (NOT LLVM_ENABLE_IDE)
+@@ -175,7 +175,7 @@ endmacro()
+ macro(add_clang_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+
+ function(clang_target_link_libraries target type)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index 078988980c52..14b58614b40a 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES
+   FOLDER "Misc"
+   RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
+
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+
+ install(
+   FILES ${files} ${generated_files}
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 4e0647971ab4..68dd67fcc476 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -216,7 +216,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/14/clang/purity.patch
new file mode 100644
index 000000000000..deb230a36c5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/clang/purity.patch
@@ -0,0 +1,28 @@
+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
+@@ -487,12 +487,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) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..66742e5b1498
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -345,4 +345,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -608,6 +612,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch
new file mode 100644
index 000000000000..6818684e6a71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch
@@ -0,0 +1,31 @@
+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
+@@ -37,6 +37,6 @@
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv8m.main armv8.1m.main)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l armv8m.main armv8.1m.main)
+ 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
+@@ -555,6 +555,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
+@@ -705,7 +705,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|armv8m.main|armv8.1m.main)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
+         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/14/compiler-rt/codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/codesign.patch
new file mode 100644
index 000000000000..065959d14d46
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/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 bc69ec95c419..9f100fdcec2f 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -366,14 +366,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_OUTPUT_LIBRARY_DIR}
+-        )
+-      endif()
+     endif()
+ 
+     set(parent_target_arg)
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/darwin-targetconditionals.patch
new file mode 100644
index 000000000000..425dc2af01e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/darwin-targetconditionals.patch
@@ -0,0 +1,71 @@
+diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
+--- a/lib/sanitizer_common/sanitizer_mac.cpp
++++ b/lib/sanitizer_common/sanitizer_mac.cpp
+@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
+ // Offset example:
+ // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
+ constexpr u16 GetOSMajorKernelOffset() {
+-  if (TARGET_OS_OSX) return 4;
+-  if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
+-  if (TARGET_OS_WATCH) return 13;
++#if TARGET_OS_OSX
++  return 4;
++#endif
++#if TARGET_OS_IOS || TARGET_OS_TV
++  return 6;
++#endif
++#if TARGET_OS_WATCH
++  return 13;
++#endif
+ }
+ 
+ using VersStr = char[64];
+@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
+   u16 os_major = kernel_major - offset;
+ 
+   const char *format = "%d.0";
+-  if (TARGET_OS_OSX) {
+-    if (os_major >= 16) {  // macOS 11+
+-      os_major -= 5;
+-    } else {  // macOS 10.15 and below
+-      format = "10.%d";
+-    }
++#if TARGET_OS_OSX
++  if (os_major >= 16) {  // macOS 11+
++    os_major -= 5;
++  } else {  // macOS 10.15 and below
++    format = "10.%d";
+   }
++#endif
+   return internal_snprintf(vers, sizeof(VersStr), format, os_major);
+ }
+ 
+@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
+ // Aligned versions example:
+ // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
+ static void MapToMacos(u16 *major, u16 *minor) {
+-  if (TARGET_OS_OSX)
+-    return;
+-
+-  if (TARGET_OS_IOS || TARGET_OS_TV)
++#if !TARGET_OS_OSX
++#if TARGET_OS_IOS || TARGET_OS_TV
+     *major += 2;
+-  else if (TARGET_OS_WATCH)
++#elif TARGET_OS_WATCH
+     *major += 9;
+-  else
++#else
+     UNREACHABLE("unsupported platform");
++#endif
+ 
+   if (*major >= 16) {  // macOS 11+
+     *major -= 5;
+@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
+     *minor = *major;
+     *major = 10;
+   }
++#endif
+ }
+ 
+ static MacosVersion GetMacosAlignedVersionInternal() {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/default.nix
new file mode 100644
index 000000000000..1652b3a7fac0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/default.nix
@@ -0,0 +1,146 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  inherit (stdenv.hostPlatform) isMusl;
+
+  baseName = "compiler-rt";
+
+  src = runCommand "${baseName}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${baseName} "$out"
+  '';
+in
+
+stdenv.mkDerivation {
+  pname = baseName + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${baseName}";
+
+  nativeBuildInputs = [ cmake python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-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}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+    "-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || 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)}"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    # Prevent a compilation error on darwin
+    ./darwin-targetconditionals.patch
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    ./armv7l.patch
+    # Fix build on armv6l
+    ../../common/compiler-rt/armv6-mcr-dmb.patch
+    ../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
+    ../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
+    ../../common/compiler-rt/armv6-scudo-no-yield.patch
+    ../../common/compiler-rt/armv6-scudo-libatomic.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + 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>" ""
+  '';
+
+  preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
+    cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + 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
+  '' + lib.optionalString doFakeLibgcc ''
+    ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..55837bd8e45b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,42 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3a41aa43e406..f000cee6eae0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,6 +5,8 @@
+
+ cmake_minimum_required(VERSION 3.13.4)
+
++include(GNUInstallDirs)
++
+ # Check if compiler-rt is built as a standalone project.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
+   project(CompilerRT C CXX ASM)
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index d7b0124f3546..3e111146df4d 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -67,7 +67,7 @@ if (LLVM_TREE_AVAILABLE)
+ else()
+     # Take output dir and install path from the user.
+   set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
+-    "Path where built compiler-rt libraries should be stored.")
++    "Path where built compiler-rt build artifacts should be stored.")
+   set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
+     "Path where built compiler-rt executables should be stored.")
+   set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
+@@ -99,13 +99,13 @@ endif()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib)
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ endif()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..135cf625ef78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index f1f46fb9599c..6f19e69507ba 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -302,8 +302,9 @@ macro(load_llvm_config)
+     # Get some LLVM variables from LLVMConfig.
+     include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+ 
+-    set(LLVM_LIBRARY_OUTPUT_INTDIR
+-      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++    get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++      REALPATH)
+   endif()
+ endmacro()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/default.nix
new file mode 100644
index 000000000000..090eec234886
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/default.nix
@@ -0,0 +1,329 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, preLibcCrossHeaders
+, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM version's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+# LLVM release information; specify one of these but not both:
+, gitRelease ? null
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   rev = /* commit SHA */;
+  #   rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+, officialRelease ? { version = "14.0.6"; sha256 = "sha256-vffu4HilvYwtzwgq+NlS26m65DGbp6OSSne2aje1yJE="; }
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   candidate = /* optional; if specified, should be: "rcN" */
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+# By default, we'll try to fetch a release from `github:llvm/llvm-project`
+# corresponding to the `gitRelease` or `officialRelease` specified.
+#
+# You can provide your own LLVM source by specifying this arg but then it's up
+# to you to make sure that the LLVM repo given matches the release configuration
+# specified.
+, monorepoSrc ? null
+}:
+
+assert let
+  int = a: if a then 1 else 0;
+  xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
+in
+  lib.assertMsg
+    (xor
+      (gitRelease != null)
+      (officialRelease != null))
+    ("must specify `gitRelease` or `officialRelease`" +
+      (lib.optionalString (gitRelease != null) " — not both"));
+let
+  monorepoSrc' = monorepoSrc;
+in let
+  # Import releaseInfo separately to avoid infinite recursion
+  inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
+  inherit (releaseInfo) release_version version;
+  inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
+    # lldb-manpages = lowPrio (tools.lldb.override {
+    #   enableManpages = true;
+    #   python3 = pkgs.python3;  # don't use python-boot
+    # });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
+      else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      patches =
+        let
+          resourceDirPatch = callPackage
+            ({ substituteAll, libclang }: substituteAll
+              {
+                src = ./lldb/resource-dir.patch;
+                clangLibDir = "${libclang.lib}/lib";
+              })
+            { };
+        in
+        [
+          ./lldb/procfs.patch
+          resourceDirPatch
+          ../common/lldb/gnu-install-dirs.patch
+        ]
+        # This is a stopgap solution if/until the macOS SDK used for x86_64 is
+        # updated.
+        #
+        # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
+        # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
+        # of this preprocessor symbol in `lldb` with its expansion.
+        #
+        # See here for some context:
+        # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+        ++ lib.optional (
+          stdenv.targetPlatform.isDarwin
+            && !stdenv.targetPlatform.isAarch64
+            && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
+        ) ./lldb/cpu_subtype_arm64e_replacement.patch;
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [ "-rtlib=compiler-rt"
+          "-Wno-unused-command-line-argument"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
+        ++ lib.optional
+          (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
+          "-lunwind"
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+      nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags = [
+        "-rtlib=compiler-rt"
+        "-B${targetLlvmLibraries.compiler-rt}/lib"
+        "-nostdlib++"
+      ];
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags = [
+        "-rtlib=compiler-rt"
+        "-B${targetLlvmLibraries.compiler-rt}/lib"
+      ];
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+      nixSupport.cc-cflags = [ "-nostartfiles" ];
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 release_version version monorepoSrc; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libcxxabi = let
+      stdenv_ = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+      cxx-headers = callPackage ./libcxx {
+        inherit llvm_meta;
+        stdenv = stdenv_;
+        headersOnly = true;
+      };
+    in callPackage ./libcxxabi {
+      stdenv = stdenv_;
+      inherit llvm_meta cxx-headers;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/libcxx/default.nix
new file mode 100644
index 000000000000..3e42a8b1e43c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/libcxx/default.nix
@@ -0,0 +1,98 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand
+, cmake, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# If headersOnly is true, the resulting package would only include the headers.
+# Use this to break the circular dependency between libcxx and libcxxabi.
+#
+# Some context:
+# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
+, headersOnly ? false
+}:
+
+let
+  basename = "libcxx";
+in
+
+assert stdenv.isDarwin -> cxxabi.pname == "libcxxabi";
+
+stdenv.mkDerivation rec {
+  pname = basename + lib.optionalString headersOnly "-headers";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${basename} "$out"
+    mkdir -p "$out/libcxxabi"
+    cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${basename}";
+
+  outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = lib.optionals (!headersOnly) [ cxxabi ];
+
+  cmakeFlags = [ "-DLIBCXX_CXX_ABI=${cxxabi.pname}" ]
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  buildFlags = lib.optional headersOnly "generate-cxx-headers";
+  installTargets = lib.optional headersOnly "install-cxx-headers";
+
+  preInstall = lib.optionalString (stdenv.isDarwin && !headersOnly) ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      baseName=$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))
+      installName="$out/lib/$baseName"
+      abiName=$(echo "$baseName" | sed -e 's/libc++/libc++abi/')
+
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other ${cxxabi}/lib/$abiName $file
+      done
+    done
+  '';
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..bddf55d1e605
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -436,7 +436,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+   set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
+       "Path where target-specific libc++ headers should be installed.")
+@@ -453,7 +453,7 @@ else()
+     set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
+   endif()
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
+       "Path where target-specific libc++ headers should be installed.")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/default.nix
new file mode 100644
index 000000000000..0f7cec3695d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/default.nix
@@ -0,0 +1,103 @@
+{ lib, stdenv, llvm_meta, cmake, python3
+, monorepoSrc, runCommand
+, cxx-headers, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx/src"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/include "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = [
+    "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
+  ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        if [ -L "$file" ]; then continue; fi
+
+        # Fix up the install name. Preserve the basename, just replace the path.
+        installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
+
+        # 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
+        ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+        # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+        # libcxxabi to sometimes link against a different version of itself.
+        # Here we simply make that second reference point to ourselves.
+        for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+          ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+        done
+      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
+    '' + 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
+    '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..bd25c903d5bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ecbc7091864e..53ba2dbc3bd1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -216,7 +216,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -230,7 +230,7 @@ else()
+     set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+     set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/libunwind/default.nix
new file mode 100644
index 000000000000..c6d9eda5e474
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/libunwind/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  # I am not so comfortable giving libc++ and friends the whole monorepo as
+  # requested, so I filter it to what is needed.
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..3fce8bf90343
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -147,7 +147,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+@@ -159,7 +159,7 @@ else()
+   else()
+     set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/lld/default.nix
new file mode 100644
index 000000000000..02ca4c802487
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/lld/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, monorepoSrc, runCommand
+, cmake
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  # Blank llvm dir just so relative path works
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libunwind"
+    cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
+    mkdir -p "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+    # On Darwin the llvm-config is perhaps not working fine as the
+    # LLVM_MAIN_SRC_DIR is not getting set correctly, and the build fails as
+    # the include path is not correct.
+    ./fix-root-src-dir.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/lld/fix-root-src-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/14/lld/fix-root-src-dir.patch
new file mode 100644
index 000000000000..38fb965b472a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/lld/fix-root-src-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9bcc135665d0..d38679ed41e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,7 +74,7 @@ if(LLD_BUILT_STANDALONE)
+
+   set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
+   set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
+-  set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
++  set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
+
+   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+     NO_DEFAULT_PATH)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..89a5822df49c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/lld/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index dd2898ce6236..ebbea040ff54 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -18,8 +18,8 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++      LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++      ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+@@ -62,5 +62,5 @@ endmacro()
+ macro(add_lld_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/14/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/lldb/procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/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/14/lldb/resource-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/14/lldb/resource-dir.patch
new file mode 100644
index 000000000000..e0db80afeb9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/lldb/resource-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
+index 37364341ff8b..7f74c1a3e257 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
+   # Iterate over the possible places where the external resource directory
+   # could be and pick the first that exists.
+   foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
+-                    "${LLVM_BUILD_LIBRARY_DIR}"
++                    "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
+                     "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
+     # Build the resource directory path by appending 'clang/<version number>'.
+     set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix
new file mode 100644
index 000000000000..eab49d326ad4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix
@@ -0,0 +1,315 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, monorepoSrc
+, runCommand
+, fetchpatch
+, cmake
+, python3
+, libffi
+, enableGoldPlugin ? libbfd.hasPluginAPI
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+# broken for the armv7l builder
+, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
+, enablePolly ? true
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in python3.withPackages checkDeps
+  else python3;
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} (''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    cp -r ${monorepoSrc}/third-party "$out"
+  '' + lib.optionalString enablePolly ''
+    chmod u+w "$out/${pname}/tools"
+    cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
+  '');
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake python ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  nativeCheckInputs = [ which ];
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # Fix musl build.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
+      relative = "llvm";
+      hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
+    })
+  ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
+    rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+  '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
+    # Seems to require certain floating point hardware (NEON?)
+    rm test/ExecutionEngine/frem.ll
+  '' + optionalString stdenv.hostPlatform.isRiscV ''
+    rm test/ExecutionEngine/frem.ll
+    rm test/ExecutionEngine/mov64zext32.ll
+    rm test/ExecutionEngine/test-interp-vec-arithm_float.ll
+    rm test/ExecutionEngine/test-interp-vec-arithm_int.ll
+    rm test/ExecutionEngine/test-interp-vec-logical.ll
+    rm test/ExecutionEngine/test-interp-vec-setcond-fp.ll
+    rm test/ExecutionEngine/test-interp-vec-setcond-int.ll
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "CrashRecoveryTest.cpp" ""
+    rm unittests/Support/CrashRecoveryTest.cpp
+    substituteInPlace unittests/ExecutionEngine/Orc/CMakeLists.txt \
+      --replace "OrcCAPITest.cpp" ""
+    rm unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+  '' + ''
+    patchShebangs test/BugPoint/compile-custom.ll.py
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar'
+    )
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    "-DLLVM_LINK_LLVM_DYLIB=off"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (enableGoldPlugin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  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
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  # For the update script:
+  passthru.monorepoSrc = monorepoSrc;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // 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 = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..b01363e98aa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,19 @@
+This is the one remaining Polly install dirs related change that hasn't made it
+into upstream yet; previously this patch file also included:
+https://reviews.llvm.org/D117541
+
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..55862ab39304
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs.patch
@@ -0,0 +1,220 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fec956091cd5..5a766f5c5d7c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -303,6 +303,9 @@ set(LLVM_EXAMPLES_INSTALL_DIR "examples" CACHE STRING
+     "Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON) (defaults to 'examples')")
+ mark_as_advanced(LLVM_EXAMPLES_INSTALL_DIR)
+ 
++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
++	"Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
++
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index fed1fec7d72e..4baed19b9e98 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -838,8 +838,8 @@ macro(add_llvm_library name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
++              ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+               RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+@@ -1056,7 +1056,7 @@ function(process_llvm_pass_plugins)
+           "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
+       install(FILES
+           ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
+-          DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
++          DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
+           COMPONENT cmake-exports)
+ 
+       set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+@@ -1902,7 +1902,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir bin)
+   endif()
+@@ -1913,7 +1913,7 @@ function(llvm_install_library_symlink name dest type)
+ 
+ endfunction()
+ 
+-function(llvm_install_symlink name dest)
++function(llvm_install_symlink name dest output_dir)
+   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
+   foreach(path ${CMAKE_MODULE_PATH})
+     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
+@@ -1936,7 +1936,7 @@ function(llvm_install_symlink name dest)
+   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
+ 
+   install(SCRIPT ${INSTALL_SYMLINK}
+-          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
++          CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
+           COMPONENT ${component})
+ 
+   if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
+@@ -2019,7 +2019,8 @@ function(add_llvm_tool_symlink link_name target)
+     endif()
+ 
+     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
+-      llvm_install_symlink(${link_name} ${target})
++      GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
++      llvm_install_symlink(${link_name} ${target} ${output_dir})
+     endif()
+   endif()
+ endfunction()
+@@ -2148,9 +2149,9 @@ function(llvm_setup_rpath name)
+     # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+     # hardcode the rpath to build/install lib dir first in this mode.
+     # FIXME: update this when there is better solution.
+-    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 891c9e6d618c..8d963f3b0069 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -147,9 +147,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index cea0c1df0a14..eedcd9450312 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -2,7 +2,7 @@ include(ExtendPath)
+ include(LLVMDistributionSupport)
+ include(FindPrefixFromConfig)
+ 
+-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
++set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+ 
+ # First for users who use an installed LLVM, create the LLVMExports.cmake file.
+@@ -122,7 +122,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
+   )
+ list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
+ 
+-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
++extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_LIBRARY_DIRS
+   "${LLVM_CONFIG_LIBRARY_DIR}"
+   # FIXME: Should there be other entries here?
+diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
+index b5c35f706cb7..9261ab797de6 100644
+--- a/cmake/modules/LLVMInstallSymlink.cmake
++++ b/cmake/modules/LLVMInstallSymlink.cmake
+@@ -6,7 +6,7 @@ include(GNUInstallDirs)
+ 
+ function(install_symlink name target outdir)
+   set(DESTDIR $ENV{DESTDIR})
+-  set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}")
++  set(bindir "${DESTDIR}${outdir}/")
+ 
+   message(STATUS "Creating ${name}")
+ 
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index 044ec8a4d39d..504d0eac3ade 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -224,7 +224,7 @@ description is in `LLVM-related variables`_ below.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
+   Building the llvm toolchain can use a lot of resources, particularly
+@@ -910,9 +910,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
+ 
+ This file is available in two different locations.
+ 
+-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
+-  ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
+-  On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
++* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
++  ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
++  installed as part of an installed version of LLVM. This is typically
++  ``cmake/llvm/`` within the lib directory. On Linux, this is typically
++  ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+ 
+ * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
+   ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
+diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
+index b46319f24fc8..2feabd1954e4 100644
+--- a/include/llvm/CMakeLists.txt
++++ b/include/llvm/CMakeLists.txt
+@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
+ # If we're doing an out-of-tree build, copy a module map for generated
+ # header files into the build area.
+ if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+-  configure_file(module.modulemap.build module.modulemap COPYONLY)
++  configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
+ endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index abbb8a450da6..70c497be12f5 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,7 +23,10 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
+ #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+ #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 8ed88f33ead4..5e7184bab90d 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -363,12 +363,20 @@ int main(int argc, char **argv) {
+       ActiveIncludeDir = std::string(Path.str());
+     }
+     {
+-      SmallString<256> Path(LLVM_TOOLS_INSTALL_DIR);
++      SmallString<256> Path(LLVM_INSTALL_BINDIR);
+       sys::fs::make_absolute(ActivePrefix, Path);
+       ActiveBinDir = std::string(Path.str());
+     }
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+-    ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
++    {
++      SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
++      sys::fs::make_absolute(ActivePrefix, Path);
++      ActiveLibDir = std::string(Path.str());
++    }
++    {
++      SmallString<256> Path(LLVM_INSTALL_CMAKEDIR);
++      sys::fs::make_absolute(ActivePrefix, Path);
++      ActiveCMakeDir = std::string(Path.str());
++    }
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/openmp/default.nix
new file mode 100644
index 000000000000..d1c6a46b4d69
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/openmp/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, llvm_meta
+, monorepoSrc
+, runCommand
+, cmake
+, llvm
+, targetLlvm
+, lit
+, clang-unwrapped
+, perl
+, pkg-config
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+    ./run-lit-directly.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake perl pkg-config lit ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  # Unsup:Pass:XFail:Fail
+  # 26:267:16:8
+  doCheck = false;
+  checkTarget = "check-openmp";
+
+  preCheck = ''
+    patchShebangs ../tools/archer/tests/deflake.bash
+  '';
+
+  cmakeFlags = [
+    "-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
+    "-DOPT_TOOL=${llvm}/bin/opt"
+    "-DLINK_TOOL=${llvm}/bin/llvm-link"
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/openmp/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/14/openmp/gnu-install-dirs.patch
new file mode 100644
index 000000000000..e85fde46ca3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/openmp/gnu-install-dirs.patch
@@ -0,0 +1,45 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,7 +24,7 @@ if (OPENMP_STANDALONE_BUILD)
+   set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
+     "Suffix of lib installation directory, e.g. 64 => lib64")
+   # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
+-  set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
+ 
+   # Group test settings.
+   set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
+@@ -35,7 +35,7 @@ if (OPENMP_STANDALONE_BUILD)
+ else()
+   set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
+   # If building in tree, we honor the same install suffix LLVM uses.
+-  set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ 
+   if (NOT MSVC)
+     set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
+diff --git a/libomptarget/plugins/amdgpu/CMakeLists.txt b/libomptarget/plugins/amdgpu/CMakeLists.txt
+--- a/libomptarget/plugins/amdgpu/CMakeLists.txt
++++ b/libomptarget/plugins/amdgpu/CMakeLists.txt
+@@ -74,7 +74,7 @@ add_library(omptarget.rtl.amdgpu SHARED
+ 
+ # Install plugin under the lib destination folder.
+ # When we build for debug, OPENMP_LIBDIR_SUFFIX get set to -debug
+-install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "lib${OPENMP_LIBDIR_SUFFIX}")
++install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
+ set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
+ 
+ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+diff --git a/libomptarget/plugins/ve/CMakeLists.txt b/libomptarget/plugins/ve/CMakeLists.txt
+--- a/libomptarget/plugins/ve/CMakeLists.txt
++++ b/libomptarget/plugins/ve/CMakeLists.txt
+@@ -32,7 +32,7 @@ if(${LIBOMPTARGET_DEP_VEO_FOUND})
+ 
+   # Install plugin under the lib destination folder.
+   install(TARGETS "omptarget.rtl.${tmachine_libname}"
+-    LIBRARY DESTINATION lib${OPENMP_LIBDIR_SUFFIX})
++    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX})
+ 
+   target_link_libraries(
+     "omptarget.rtl.${tmachine_libname}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/openmp/run-lit-directly.patch b/nixpkgs/pkgs/development/compilers/llvm/14/openmp/run-lit-directly.patch
new file mode 100644
index 000000000000..1e952fdc36a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/openmp/run-lit-directly.patch
@@ -0,0 +1,12 @@
+diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake
+--- a/cmake/OpenMPTesting.cmake
++++ b/cmake/OpenMPTesting.cmake
+@@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment)
+   if (${OPENMP_STANDALONE_BUILD})
+     set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
+     add_custom_target(${target}
+-      COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
++      COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
+       COMMENT ${comment}
+       DEPENDS ${ARG_DEPENDS}
+       USES_TERMINAL
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/clang/default.nix
new file mode 100644
index 000000000000..9ec15a393004
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/clang/default.nix
@@ -0,0 +1,143 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand
+, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation (finalAttrs: rec {
+    pname = "clang";
+    inherit version;
+
+    src = runCommand "${pname}-src-${version}" {} ''
+      mkdir -p "$out"
+      cp -r ${monorepoSrc}/cmake "$out"
+      cp -r ${monorepoSrc}/${pname} "$out"
+      cp -r ${monorepoSrc}/clang-tools-extra "$out"
+    '';
+
+    sourceRoot = "${src.name}/${pname}";
+
+    nativeBuildInputs = [ cmake ninja python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+      # Added in LLVM15:
+      # `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
+      # `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
+      "-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
+      "-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      ../../common/clang/add-nostdlibinc-flag.patch
+      (substituteAll {
+        src = ../../clang-11-15-LLVMgold-path.patch;
+        libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      (cd tools && ln -s ../../clang-tools-extra extra)
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+      # The following warning is triggered with (at least) gcc >=
+      # 12, but appears to occur only for cross compiles.
+      NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized";
+    };
+
+    postInstall = ''
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      moveToOutput "lib/libclang-cpp.*" "$lib"
+      substituteInPlace $dev/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
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [
+        "fortify3"
+      ];
+      hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
+        lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
+        ++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    ninjaFlags = [ "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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..f767c56836d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/clang/gnu-install-dirs.patch
@@ -0,0 +1,105 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c27beec313d7..480f13e73c9f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,15 +78,17 @@ if(CLANG_BUILT_STANDALONE)
+   if (NOT LLVM_CONFIG_FOUND)
+     # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
+     # path is removed.
+-    set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
+     set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
+     # N.B. this is just a default value, the CACHE PATHs below can be overriden.
+     set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+     set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
+     set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
+   endif()
+ 
+-  set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
++  set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+   set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
+   set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
+   set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
+@@ -128,7 +130,7 @@ if(CLANG_BUILT_STANDALONE)
+     set(LLVM_INCLUDE_TESTS ON)
+   endif()
+ 
+-  include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
++  include_directories(${LLVM_INCLUDE_DIRS})
+   link_directories("${LLVM_LIBRARY_DIR}")
+ 
+   set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 21ac332e4f5f..b16c314bd1e2 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -119,8 +119,8 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+           RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+         if (NOT LLVM_ENABLE_IDE)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index 6e2060991b92..b9bc930d26b8 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
+ add_header_target("windows-resource-headers" ${windows_only_files})
+ add_header_target("utility-resource-headers" ${utility_files})
+ 
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+ 
+ #############################################################
+ # Install rules for the catch-all clang-resource-headers target
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 8d95d0900e8c..ebc70ff7526d 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -180,7 +180,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
+index 061dc7ef4dd9..adc54b2edc32 100644
+--- a/tools/scan-build-py/CMakeLists.txt
++++ b/tools/scan-build-py/CMakeLists.txt
+@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
+   install(PROGRAMS lib/libscanbuild/${lib}
+-          DESTINATION lib/libscanbuild
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
+   install(PROGRAMS lib/libscanbuild/resources/${resource}
+-          DESTINATION lib/libscanbuild/resources
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
+   install(PROGRAMS lib/libear/${lib}
+-          DESTINATION lib/libear
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/15/clang/purity.patch
new file mode 100644
index 000000000000..1c94f293eb93
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/clang/purity.patch
@@ -0,0 +1,29 @@
+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
+@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   } else {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+
+-    if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE &&
+-        !Args.hasArg(options::OPT_r)) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..07013e5a6825
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -348,4 +348,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -723,6 +723,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/darwin-targetconditionals.patch
new file mode 100644
index 000000000000..425dc2af01e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/darwin-targetconditionals.patch
@@ -0,0 +1,71 @@
+diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
+--- a/lib/sanitizer_common/sanitizer_mac.cpp
++++ b/lib/sanitizer_common/sanitizer_mac.cpp
+@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
+ // Offset example:
+ // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
+ constexpr u16 GetOSMajorKernelOffset() {
+-  if (TARGET_OS_OSX) return 4;
+-  if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
+-  if (TARGET_OS_WATCH) return 13;
++#if TARGET_OS_OSX
++  return 4;
++#endif
++#if TARGET_OS_IOS || TARGET_OS_TV
++  return 6;
++#endif
++#if TARGET_OS_WATCH
++  return 13;
++#endif
+ }
+ 
+ using VersStr = char[64];
+@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
+   u16 os_major = kernel_major - offset;
+ 
+   const char *format = "%d.0";
+-  if (TARGET_OS_OSX) {
+-    if (os_major >= 16) {  // macOS 11+
+-      os_major -= 5;
+-    } else {  // macOS 10.15 and below
+-      format = "10.%d";
+-    }
++#if TARGET_OS_OSX
++  if (os_major >= 16) {  // macOS 11+
++    os_major -= 5;
++  } else {  // macOS 10.15 and below
++    format = "10.%d";
+   }
++#endif
+   return internal_snprintf(vers, sizeof(VersStr), format, os_major);
+ }
+ 
+@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
+ // Aligned versions example:
+ // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
+ static void MapToMacos(u16 *major, u16 *minor) {
+-  if (TARGET_OS_OSX)
+-    return;
+-
+-  if (TARGET_OS_IOS || TARGET_OS_TV)
++#if !TARGET_OS_OSX
++#if TARGET_OS_IOS || TARGET_OS_TV
+     *major += 2;
+-  else if (TARGET_OS_WATCH)
++#elif TARGET_OS_WATCH
+     *major += 9;
+-  else
++#else
+     UNREACHABLE("unsupported platform");
++#endif
+ 
+   if (*major >= 16) {  // macOS 11+
+     *major -= 5;
+@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
+     *minor = *major;
+     *major = 10;
+   }
++#endif
+ }
+ 
+ static MacosVersion GetMacosAlignedVersionInternal() {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/default.nix
new file mode 100644
index 000000000000..fbf25786efee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/default.nix
@@ -0,0 +1,145 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake, ninja, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  inherit (stdenv.hostPlatform) isMusl;
+
+  baseName = "compiler-rt";
+
+  src = runCommand "${baseName}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${baseName} "$out"
+  '';
+in
+
+stdenv.mkDerivation {
+  pname = baseName + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${baseName}";
+
+  nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-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}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+    "-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || 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)}"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+
+    # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
+    # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
+    "-DCOMPILER_RT_ENABLE_IOS=OFF"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    # Prevent a compilation error on darwin
+    ./darwin-targetconditionals.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/186575
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
+    ../../common/compiler-rt/armv7l-15.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + 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>" ""
+  '';
+
+  preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
+    cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + 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
+  '' + lib.optionalString doFakeLibgcc ''
+     ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..f3b1f63a7d71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index 8a6219568b3f..30ee68a47ccf 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -100,13 +100,13 @@ endif()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib)
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ endif()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..135cf625ef78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index f1f46fb9599c..6f19e69507ba 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -302,8 +302,9 @@ macro(load_llvm_config)
+     # Get some LLVM variables from LLVMConfig.
+     include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+ 
+-    set(LLVM_LIBRARY_OUTPUT_INTDIR
+-      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++    get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++      ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++      REALPATH)
+   endif()
+ endmacro()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/default.nix
new file mode 100644
index 000000000000..d9ca0819f2e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/default.nix
@@ -0,0 +1,369 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
+, preLibcCrossHeaders
+, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM version's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+# LLVM release information; specify one of these but not both:
+, gitRelease ? null
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   rev = /* commit SHA */;
+  #   rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+, officialRelease ? { version = "15.0.7"; sha256 = "sha256-wjuZQyXQ/jsmvy6y1aksCcEDXGBjuhpgngF3XQJ/T4s="; }
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   candidate = /* optional; if specified, should be: "rcN" */
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+# By default, we'll try to fetch a release from `github:llvm/llvm-project`
+# corresponding to the `gitRelease` or `officialRelease` specified.
+#
+# You can provide your own LLVM source by specifying this arg but then it's up
+# to you to make sure that the LLVM repo given matches the release configuration
+# specified.
+, monorepoSrc ? null
+}:
+
+assert let
+  int = a: if a then 1 else 0;
+  xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
+in
+  lib.assertMsg
+    (xor
+      (gitRelease != null)
+      (officialRelease != null))
+    ("must specify `gitRelease` or `officialRelease`" +
+      (lib.optionalString (gitRelease != null) " — not both"));
+let
+  monorepoSrc' = monorepoSrc;
+in let
+  # Import releaseInfo separately to avoid infinite recursion
+  inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
+  inherit (releaseInfo) release_version version;
+  inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
+
+  lldbPlugins = lib.makeExtensible (lldbPlugins: let
+    callPackage = newScope (lldbPlugins // { inherit stdenv; inherit (tools) lldb; });
+  in {
+    llef = callPackage ../common/lldb-plugins/llef.nix {};
+  });
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.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
+    });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
+      else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      patches =
+        let
+          resourceDirPatch = callPackage
+            ({ substituteAll, libclang }: substituteAll
+              {
+                src = ./lldb/resource-dir.patch;
+                clangLibDir = "${libclang.lib}/lib";
+              })
+            { };
+        in
+        [
+          ./lldb/procfs.patch
+          resourceDirPatch
+          ../common/lldb/gnu-install-dirs.patch
+        ]
+        # This is a stopgap solution if/until the macOS SDK used for x86_64 is
+        # updated.
+        #
+        # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
+        # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
+        # of this preprocessor symbol in `lldb` with its expansion.
+        #
+        # See here for some context:
+        # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+        ++ lib.optional (
+          stdenv.targetPlatform.isDarwin
+            && !stdenv.targetPlatform.isAarch64
+            && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
+        ) ./lldb/cpu_subtype_arm64e_replacement.patch;
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [ "-rtlib=compiler-rt"
+          "-Wno-unused-command-line-argument"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
+        ++ lib.optional
+          (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
+          "-lunwind"
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+      nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+          "-nostdlib++"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+      nixSupport.cc-cflags =
+        [
+          "-nostartfiles"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith (rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    } // lib.optionalAttrs stdenv.targetPlatform.isWasm {
+      nixSupport.cc-cflags = [ "-fno-exceptions" ];
+    });
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxxabi = let
+      # CMake will "require" a compiler capable of compiling C++ programs
+      # cxx-header's build does not actually use one so it doesn't really matter
+      # what stdenv we use here, as long as CMake is happy.
+      cxx-headers = callPackage ./libcxx {
+        inherit llvm_meta;
+        # Note that if we use the regular stdenv here we'll get cycle errors
+        # when attempting to use this compiler in the stdenv.
+        #
+        # The final stdenv pulls `cxx-headers` from the package set where
+        # hostPlatform *is* the target platform which means that `stdenv` at
+        # that point attempts to use this toolchain.
+        #
+        # So, we use `stdenv_` (the stdenv containing `clang` from this package
+        # set, defined below) to sidestep this issue.
+        #
+        # Because we only use `cxx-headers` in `libcxxabi` (which depends on the
+        # clang stdenv _anyways_), this is okay.
+        stdenv = stdenv_;
+        headersOnly = true;
+      };
+
+      # `libcxxabi` *doesn't* need a compiler with a working C++ stdlib but it
+      # *does* need a relatively modern C++ compiler (see:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support).
+      #
+      # So, we use the clang from this LLVM package set, like libc++
+      # "boostrapping builds" do:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build
+      #
+      # We cannot use `clangNoLibcxx` because that contains `compiler-rt` which,
+      # on macOS, depends on `libcxxabi`, thus forming a cycle.
+      stdenv_ = overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc;
+    in callPackage ./libcxxabi {
+      stdenv = stdenv_;
+      inherit llvm_meta cxx-headers;
+    };
+
+    # Like `libcxxabi` above, `libcxx` requires a fairly modern C++ compiler,
+    # so: we use the clang from this LLVM package set instead of the regular
+    # stdenv's compiler.
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version lldbPlugins; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/libcxx/default.nix
new file mode 100644
index 000000000000..be56770039d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/libcxx/default.nix
@@ -0,0 +1,139 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand, fetchpatch
+, cmake, ninja, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt, libunwind
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# If headersOnly is true, the resulting package would only include the headers.
+# Use this to break the circular dependency between libcxx and libcxxabi.
+#
+# Some context:
+# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
+, headersOnly ? false
+}:
+
+let
+  basename = "libcxx";
+in
+
+assert stdenv.isDarwin -> cxxabi.libName == "c++abi";
+
+stdenv.mkDerivation rec {
+  pname = basename + lib.optionalString headersOnly "-headers";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${basename} "$out"
+    mkdir -p "$out/libcxxabi"
+    cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/third-party "$out"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
+
+  prePatch = ''
+    cd ../${basename}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+    # See:
+    #   - https://reviews.llvm.org/D133566
+    #   - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432
+    # !!! Drop in LLVM 16+
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch";
+      hash = "sha256-AaM9A6tQ4YAw7uDqCIV4VaiUyLZv+unwcOqbakwW9/k=";
+      relative = "libcxx";
+    })
+    # fix for https://github.com/NixOS/nixpkgs/issues/269548
+    # https://github.com/llvm/llvm-project/pull/77218
+    (fetchpatch {
+      name = "darwin-system-libcxxabi-link-flags.patch";
+      url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
+      hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
+      relative = "libcxx";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs =
+    lib.optionals (!headersOnly) [ cxxabi ]
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ libunwind ];
+
+  cmakeFlags = let
+    # See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
+    libcxx_cxx_abi_opt = {
+      "c++abi" = "system-libcxxabi";
+      "cxxrt" = "libcxxrt";
+    }.${cxxabi.libName} or (throw "unknown cxxabi: ${cxxabi.libName} (${cxxabi.pname})");
+  in [
+    "-DLLVM_ENABLE_RUNTIMES=libcxx"
+    "-DLIBCXX_CXX_ABI=${if headersOnly then "none" else libcxx_cxx_abi_opt}"
+  ] ++ lib.optional (!headersOnly && cxxabi.libName == "c++abi") "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi.dev}/include/c++/v1"
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+      "-DLIBCXX_USE_COMPILER_RT=ON"
+      # (Backport fix from 16, which has LIBCXX_ADDITIONAL_LIBRARIES, but 15
+      # does not appear to)
+      # There's precedent for this in llvm-project/libcxx/cmake/caches.
+      # In a monorepo build you might do the following in the libcxxabi build:
+      #   -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwind
+      #   -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
+      # libcxx appears to require unwind and doesn't pull it in via other means.
+      # "-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
+      "-DCMAKE_SHARED_LINKER_FLAGS=-lunwind"
+    ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
+    # If we're only building the headers we don't actually *need* a functioning
+    # C/C++ compiler:
+    ++ lib.optionals (headersOnly) [
+      "-DCMAKE_C_COMPILER_WORKS=ON"
+      "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    ];
+
+  ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
+  installTargets = lib.optional headersOnly "install-cxx-headers";
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..daee5bdd0ed3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74eff2002fc9..c935d10878bb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -419,7 +419,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+   set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
+       "Path where target-specific libc++ headers should be installed.")
+@@ -436,7 +436,7 @@ else()
+     set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
+   endif()
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
+       "Path where target-specific libc++ headers should be installed.")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/default.nix
new file mode 100644
index 000000000000..04bfee14aa18
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/default.nix
@@ -0,0 +1,113 @@
+{ lib, stdenv, llvm_meta, cmake, ninja, python3
+, monorepoSrc, runCommand, fetchpatch
+, cxx-headers, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx/src"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/include "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
+  '';
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # https://reviews.llvm.org/D132298, Allow building libcxxabi alone
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/e6a0800532bb409f6d1c62f3698bdd6994a877dc.patch";
+      sha256 = "1xyjd56m4pfwq8p3xh6i8lhkk9kq15jaml7qbhxdf87z4jjkk63a";
+      stripLen = 1;
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libcxxabi"
+    "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
+
+    # `libcxxabi`'s build does not need a toolchain with a c++ stdlib attached
+    # (we specify the headers it should use explicitly above).
+    #
+    # CMake however checks for this anyways; this flag tells it not to. See:
+    # https://github.com/llvm/llvm-project/blob/4bd3f3759259548e159aeba5c76efb9a0864e6fa/llvm/runtimes/CMakeLists.txt#L243
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+    # libcxxabi's CMake looks as though it treats -nostdlib++ as implying -nostdlib,
+    # but that does not appear to be the case for example when building
+    # pkgsLLVM.libcxxabi (which uses clangNoCompilerRtWithLibc).
+    "-DCMAKE_EXE_LINKER_FLAGS=-nostdlib"
+    "-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    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
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..fa587612aaf6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b8326d08d23a..a1e36f713161 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -187,7 +187,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -201,7 +201,7 @@ else()
+     set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+     set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/libunwind/default.nix
new file mode 100644
index 000000000000..1b677a7a2c0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/libunwind/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, python3
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  # I am not so comfortable giving libc++ and friends the whole monorepo as
+  # requested, so I filter it to what is needed.
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  postInstall = lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) ''
+    # libcxxabi wants to link to libunwind_shared.so (?).
+    ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libunwind"
+  ] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..edfb2a8760bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5a06805f05f1..86a50329e6a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+@@ -129,7 +129,7 @@ else()
+   else()
+     set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/lld/default.nix
new file mode 100644
index 000000000000..cc18aee76a44
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/lld/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  # Blank llvm dir just so relative path works
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libunwind"
+    cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
+    mkdir -p "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..ea62b2ad50c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/lld/gnu-install-dirs.patch
@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dcc649629a4b..58dca54642e4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,13 +70,15 @@ if(LLD_BUILT_STANDALONE)
+   if (NOT LLVM_CONFIG_FOUND)
+     # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
+     # path is removed.
+-    set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
+     set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
+     # N.B. this is just a default value, the CACHE PATHs below can be overridden.
+     set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
+   endif()
+ 
+-  set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
++  set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+   set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
+   set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
+ 
+@@ -95,7 +97,7 @@ if(LLD_BUILT_STANDALONE)
+ 
+   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
+ 
+-  include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS})
++  include_directories(${LLVM_INCLUDE_DIRS})
+   link_directories(${LLVM_LIBRARY_DIRS})
+ 
+   if(LLVM_INCLUDE_TESTS)
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index d3924f7243d4..42a7cd62281c 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -18,8 +18,8 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++      LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++      ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/15/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/lldb/procfs.patch
new file mode 100644
index 000000000000..7b200e86505c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/lldb/procfs.patch
@@ -0,0 +1,46 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -10,6 +10,13 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
++
++// on i686 preprocessor symbols with these register names are defined as
++// numeric constants; these symbols clash with identifier names used in
++// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
++#undef FS
++#undef CS
+ 
+ #include "lldb/lldb-types.h"
+ 
+@@ -17,23 +24,13 @@
+ 
+ #include <vector>
+ 
+-#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
+ 
+ namespace lldb_private {
+ namespace process_linux {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/lldb/resource-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/15/lldb/resource-dir.patch
new file mode 100644
index 000000000000..e0db80afeb9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/lldb/resource-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
+index 37364341ff8b..7f74c1a3e257 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
+   # Iterate over the possible places where the external resource directory
+   # could be and pick the first that exists.
+   foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
+-                    "${LLVM_BUILD_LIBRARY_DIR}"
++                    "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
+                     "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
+     # Build the resource directory path by appending 'clang/<version number>'.
+     set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix
new file mode 100644
index 000000000000..4f17678ba14f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix
@@ -0,0 +1,440 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, monorepoSrc
+, runCommand
+, fetchpatch
+, cmake
+, darwin
+, ninja
+, python3
+, python3Packages
+, libffi
+, enableGoldPlugin ? libbfd.hasPluginAPI
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, sysctl
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
+  # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  # broken for the armv7l builder
+  && !stdenv.hostPlatform.isAarch
+, enablePolly ? true
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    # Note that we _explicitly_ ask for a python interpreter for our host
+    # platform here; the splicing that would ordinarily take care of this for
+    # us does not seem to work once we use `withPackages`.
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
+  else python3;
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} (''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    cp -r ${monorepoSrc}/third-party "$out"
+  '' + lib.optionalString enablePolly ''
+    chmod u+w "$out/${pname}/tools"
+    cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
+  '');
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake ninja python ]
+    ++ optionals enableManpages [
+      # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
+      # splicing does *not* work with the latter. (TODO: fix)
+      python3Packages.sphinx python3Packages.recommonmark
+    ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  nativeCheckInputs = [
+    which
+  ] ++ lib.optional stdenv.isDarwin sysctl;
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # Running the tests involves invoking binaries (like `opt`) that depend on
+    # the LLVM dylibs and reference them by absolute install path (i.e. their
+    # nix store path).
+    #
+    # Because we have not yet run the install phase (we're running these tests
+    # as part of `checkPhase` instead of `installCheckPhase`) these absolute
+    # paths do not exist yet; to work around this we point the loader (`ld` on
+    # unix, `dyld` on macOS) at the `lib` directory which will later become this
+    # package's `lib` output.
+    #
+    # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib`
+    # dir but:
+    #   - this doesn't generalize well to other platforms; `lit` doesn't forward
+    #     `DYLD_LIBRARY_PATH` (macOS):
+    #     + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26
+    #   - even if `lit` forwarded this env var, we actually cannot set
+    #     `DYLD_LIBRARY_PATH` in the child processes `lit` launches because
+    #     `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for
+    #     "protected processes" (i.e. the python interpreter that runs `lit`):
+    #     https://stackoverflow.com/a/35570229
+    #   - other LLVM subprojects deal with this issue by having their `lit`
+    #     configuration set these env vars for us; it makes sense to do the same
+    #     for LLVM:
+    #     + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31
+    #
+    # !!! TODO: look into upstreaming this patch
+    ./llvm-lit-cfg-add-libs-to-dylib-path.patch
+
+    # `lit` has a mode where it executes run lines as a shell script which is
+    # constructs; this is problematic for macOS because it means that there's
+    # another process in between `lit` and the binaries being tested. As noted
+    # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our
+    # tests fail with dyld errors.
+    #
+    # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when
+    # present in the test configuration.
+    #
+    # It's not clear to me why this isn't an issue for LLVM developers running
+    # on macOS (nothing about this _seems_ nix specific)..
+    ./lit-shell-script-runner-set-dyld-library-path.patch
+
+    # Fix musl build.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
+      relative = "llvm";
+      hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
+    })
+  ] ++ lib.optionals enablePolly [
+    ./gnu-install-dirs-polly.patch
+
+    # Just like the `llvm-lit-cfg` patch, but for `polly`.
+    ./polly-lit-cfg-add-libs-to-dylib-path.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+
+    # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
+    # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
+    rm test/MC/ELF/cfi-version.ll
+
+    # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
+    # and thus fails under the sandbox:
+    substituteInPlace unittests/Support/Host.cpp \
+      --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
+  '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
+    # This test tries to call the intrinsics `@llvm.roundeven.f32` and
+    # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
+    # and `roundeven` on x86_64 macOS.
+    #
+    # However these functions are glibc specific so the test fails:
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
+    #
+    # TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it
+    # pass there?
+    substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
+      --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
+      --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
+
+    # This test fails on darwin x86_64 because `sw_vers` reports a different
+    # macOS version than what LLVM finds by reading
+    # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
+    # the sandbox on macOS).
+    #
+    # The `sw_vers` provided by nixpkgs reports the macOS version associated
+    # with the `CoreFoundation` framework with which it was built. Because
+    # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what
+    # `sw_vers` reports is not guaranteed to match the macOS version of the host
+    # that's building this derivation.
+    #
+    # Astute readers will note that we only _patch_ this test on aarch64-darwin
+    # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright.
+    # So why does this test pass on aarch64?
+    #
+    # Well, it seems that `sw_vers` on aarch64 actually links against the _host_
+    # CoreFoundation framework instead of the nixpkgs provided one.
+    #
+    # Not entirely sure what the right fix is here. I'm assuming aarch64
+    # `sw_vers` doesn't intentionally link against the host `CoreFoundation`
+    # (still digging into how this ends up happening, will follow up) but that
+    # aside I think the more pertinent question is: should we be patching LLVM's
+    # macOS version detection logic to use `sw_vers` instead of reading host
+    # paths? This *is* a way in which details about builder machines can creep
+    # into the artifacts that are produced, affecting reproducibility, but it's
+    # not clear to me when/where/for what this even gets used in LLVM.
+    #
+    # TODO(@rrbutani): fix/follow-up
+    substituteInPlace unittests/Support/Host.cpp \
+      --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
+
+    # This test fails with a `dysmutil` crash; have not yet dug into what's
+    # going on here (TODO(@rrbutani)).
+    rm test/tools/dsymutil/ARM/obfuscated.test
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+    # timing-based tests are trouble
+    rm utils/lit/tests/googletest-timeout.py
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
+    rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+
+    # !!! Note: these tests are removed in LLVM 16.
+    #
+    # See here for context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999790443
+    rm test/CodeGen/RISCV/rv32zbp.ll
+    rm test/CodeGen/RISCV/rv64zbp.ll
+  '' + 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
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar"
+    )
+  '';
+
+  # Defensive check: some paths (that we make symlinks to) depend on the release
+  # version, for example:
+  #  - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185
+  #
+  # So we want to sure that the version in the source matches the release
+  # version we were given.
+  #
+  # We do this check here, in the LLVM build, because it happens early.
+  postConfigure = let
+    v = lib.versions;
+    major = v.major release_version;
+    minor = v.minor release_version;
+    patch = v.patch release_version;
+  in ''
+    # $1: part, $2: expected
+    check_version() {
+      part="''${1^^}"
+      part="$(cat include/llvm/Config/llvm-config.h  | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)"
+
+      if [[ "$part" != "$2" ]]; then
+        echo >&2 \
+          "mismatch in the $1 version! we have version ${release_version}" \
+          "and expected the $1 version to be '$2'; the source has '$part' instead"
+        exit 3
+      fi
+    }
+
+    check_version major ${major}
+    check_version minor ${minor}
+    check_version patch ${patch}
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    "-DLLVM_LINK_LLVM_DYLIB=off"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (enableGoldPlugin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  # For the update script:
+  passthru.monorepoSrc = monorepoSrc;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  propagatedBuildInputs = [];
+
+  ninjaFlags = [ "docs-llvm-man" ];
+  installTargets = [ "install-docs-llvm-man" ];
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..b01363e98aa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,19 @@
+This is the one remaining Polly install dirs related change that hasn't made it
+into upstream yet; previously this patch file also included:
+https://reviews.llvm.org/D117541
+
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..0ef317af8cc7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs.patch
@@ -0,0 +1,138 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 45399dc0537e..5d946e9e6583 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -942,7 +942,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
+   add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
+     ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
+   install(TARGETS tf_xla_runtime EXPORT LLVMExports
+-    ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
++    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
+   # Once we add more modules, we should handle this more automatically.
+   if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 057431208322..56f0dcb258da 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -844,8 +844,8 @@ macro(add_llvm_library name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
++              ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+               RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+@@ -2007,7 +2007,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir "${CMAKE_INSTALL_BINDIR}")
+   endif()
+@@ -2271,15 +2271,15 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
+     # $ORIGIN is not interpreted at link time by aix ld.
+     # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+     # hardcode the rpath to build/install lib dir first in this mode.
+     # FIXME: update this when there is better solution.
+-    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 891c9e6d618c..8d963f3b0069 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -147,9 +147,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index d4b0ab959148..26ed981fd09f 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -128,7 +128,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
+   )
+ list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
+ 
+-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
++extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_LIBRARY_DIRS
+   "${LLVM_CONFIG_LIBRARY_DIR}"
+   # FIXME: Should there be other entries here?
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index 879b7b231d4c..9c31d14e8950 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
+   Building the llvm toolchain can use a lot of resources, particularly
+@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+   The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
+   Defaults to "bin".
+ 
++**CMAKE_INSTALL_LIBDIR**:PATH
++  The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
++  Defaults to "lib".
++
+ **CMAKE_INSTALL_INCLUDEDIR**:PATH
+   The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
+   Defaults to "include".
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index 370005cd8d7d..7e790bc52111 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,7 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
+ #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
+ #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 2c6c55f89d38..f6d2068a0827 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -369,7 +369,11 @@ int main(int argc, char **argv) {
+       sys::fs::make_absolute(ActivePrefix, Path);
+       ActiveBinDir = std::string(Path.str());
+     }
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
++    {
++      SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
++      sys::fs::make_absolute(ActivePrefix, Path);
++      ActiveLibDir = std::string(Path.str());
++    }
+     {
+       SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
+       sys::fs::make_absolute(ActivePrefix, Path);
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/lit-shell-script-runner-set-dyld-library-path.patch b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/lit-shell-script-runner-set-dyld-library-path.patch
new file mode 100644
index 000000000000..32f1d13a9dc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/lit-shell-script-runner-set-dyld-library-path.patch
@@ -0,0 +1,26 @@
+diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
+index 0242e0b75af3..d732011306f7 100644
+--- a/utils/lit/lit/TestRunner.py
++++ b/utils/lit/lit/TestRunner.py
+@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
+             f.write('@echo off\n')
+         f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
+     else:
++        # This env var is *purged* when invoking subprocesses so we have to
++        # manually set it from within the bash script in order for the commands
++        # in run lines to see this var:
++        if "DYLD_LIBRARY_PATH" in test.config.environment:
++            f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
++
+         for i, ln in enumerate(commands):
+             match = re.match(kPdbgRegex, ln)
+             if match:
+@@ -1363,7 +1369,7 @@ def applySubstitutions(script, substitutions, conditions={},
+         return processed
+ 
+     process = processLine if recursion_limit is None else processLineToFixedPoint
+-    
++
+     return [unescapePercents(process(ln)) for ln in script]
+ 
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..d824516c0a16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,79 @@
+diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py
+index 81e8dc04acea..479ff95681e2 100644
+--- a/test/Unit/lit.cfg.py
++++ b/test/Unit/lit.cfg.py
+@@ -3,6 +3,7 @@
+ # Configuration file for the 'lit' test runner.
+ 
+ import os
++import platform
+ import subprocess
+ 
+ import lit.formats
+@@ -55,3 +56,26 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
+ # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
+ if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ:
+     config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE']
++
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
++        yield 'LD_LIBRARY_PATH'
++    elif platform.system() == 'Darwin':
++        yield 'DYLD_LIBRARY_PATH'
++    elif platform.system() == 'Windows':
++        yield 'PATH'
++    elif platform.system() == 'AIX':
++        yield 'LIBPATH'
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = os.path.pathsep.join(
++        (config.shlibdir,
++         config.environment.get(shlibpath_var, '')))
++    config.environment[shlibpath_var] = shlibpath
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+diff --git a/test/lit.cfg.py b/test/lit.cfg.py
+index 75a38b4c5dad..856fc75c9d74 100644
+--- a/test/lit.cfg.py
++++ b/test/lit.cfg.py
+@@ -42,6 +42,26 @@ llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
+ llvm_config.with_system_environment(
+     ['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP'])
+ 
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
++        yield 'LD_LIBRARY_PATH'
++    elif platform.system() == 'Darwin':
++        yield 'DYLD_LIBRARY_PATH'
++    elif platform.system() == 'Windows':
++        yield 'PATH'
++    elif platform.system() == 'AIX':
++        yield 'LIBPATH'
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = config.llvm_shlib_dir
++    llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True)
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+ 
+ # Set up OCAMLPATH to include newly built OCaml libraries.
+ top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml')
+@@ -318,7 +338,7 @@ def have_cxx_shared_library():
+ 
+     try:
+         readobj_cmd = subprocess.Popen(
+-            [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE)
++            [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE, env=config.environment)
+     except OSError:
+         print('could not exec llvm-readobj')
+         return False
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..1354ad267314
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,24 @@
+diff --git a/tools/polly/test/lit.cfg b/tools/polly/test/lit.cfg
+index 41e3a589c61e..09f3b17498b0 100644
+--- a/tools/polly/test/lit.cfg
++++ b/tools/polly/test/lit.cfg
+@@ -36,9 +36,17 @@ base_paths = [config.llvm_tools_dir, config.environment['PATH']]
+ path = os.path.pathsep.join(base_paths + config.extra_paths)
+ config.environment['PATH'] = path
+ 
++# (Copied from polly/test/Unit/lit.cfg)
++if platform.system() == 'Darwin':
++    shlibpath_var = 'DYLD_LIBRARY_PATH'
++elif platform.system() == 'Windows':
++    shlibpath_var = 'PATH'
++else:
++    shlibpath_var = 'LD_LIBRARY_PATH'
++
+ path = os.path.pathsep.join((config.llvm_libs_dir,
+-                              config.environment.get('LD_LIBRARY_PATH','')))
+-config.environment['LD_LIBRARY_PATH'] = path
++                              config.environment.get(shlibpath_var,'')))
++config.environment[shlibpath_var] = path
+ 
+ llvm_config.use_default_substitutions()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/default.nix
new file mode 100644
index 000000000000..d51335436ad2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, llvm_meta
+, monorepoSrc
+, runCommand
+, cmake
+, ninja
+, llvm
+, targetLlvm
+, lit
+, clang-unwrapped
+, perl
+, pkg-config
+, xcbuild
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./fix-find-tool.patch
+    ./gnu-install-dirs.patch
+    ./run-lit-directly.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
+
+  # Unsup:Pass:XFail:Fail
+  # 26:267:16:8
+  doCheck = false;
+  checkTarget = "check-openmp";
+
+  preCheck = ''
+    patchShebangs ../tools/archer/tests/deflake.bash
+  '';
+
+  cmakeFlags = [
+    "-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
+    "-DOPT_TOOL=${llvm}/bin/opt"
+    "-DLINK_TOOL=${llvm}/bin/llvm-link"
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/openmp/fix-find-tool.patch b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/fix-find-tool.patch
new file mode 100644
index 000000000000..103b054ed176
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/fix-find-tool.patch
@@ -0,0 +1,18 @@
+diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
+index ce66214822a2..6ab7b33c95da 100644
+--- a/libomptarget/DeviceRTL/CMakeLists.txt
++++ b/libomptarget/DeviceRTL/CMakeLists.txt
+@@ -27,10 +27,10 @@ endif()
+ if (LLVM_DIR)
+   # Builds that use pre-installed LLVM have LLVM_DIR set.
+   # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
+-  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
+   find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
+-    NO_DEFAULT_PATH)
+-  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++    )
++  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
+   if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
+     libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
+     return()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/openmp/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/gnu-install-dirs.patch
new file mode 100644
index 000000000000..77a93208832a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b6ddbe90516d..311ab1d50e7f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
+   set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
+     "Suffix of lib installation directory, e.g. 64 => lib64")
+   # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
+-  set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
+ 
+   # Group test settings.
+   set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
+@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
+ else()
+   set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
+   # If building in tree, we honor the same install suffix LLVM uses.
+-  set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ 
+   if (NOT MSVC)
+     set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/openmp/run-lit-directly.patch b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/run-lit-directly.patch
new file mode 100644
index 000000000000..1e952fdc36a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/openmp/run-lit-directly.patch
@@ -0,0 +1,12 @@
+diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake
+--- a/cmake/OpenMPTesting.cmake
++++ b/cmake/OpenMPTesting.cmake
+@@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment)
+   if (${OPENMP_STANDALONE_BUILD})
+     set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
+     add_custom_target(${target}
+-      COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
++      COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
+       COMMENT ${comment}
+       DEPENDS ${ARG_DEPENDS}
+       USES_TERMINAL
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/clang/default.nix
new file mode 100644
index 000000000000..43c497b92761
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/clang/default.nix
@@ -0,0 +1,137 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand
+, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation (finalAttrs: rec {
+    pname = "clang";
+    inherit version;
+
+    src = runCommand "${pname}-src-${version}" {} ''
+      mkdir -p "$out"
+      cp -r ${monorepoSrc}/cmake "$out"
+      cp -r ${monorepoSrc}/${pname} "$out"
+      cp -r ${monorepoSrc}/clang-tools-extra "$out"
+    '';
+
+    sourceRoot = "${src.name}/${pname}";
+
+    nativeBuildInputs = [ cmake ninja python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+      # Added in LLVM15:
+      # `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
+      # `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
+      "-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
+      "-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      ../../common/clang/add-nostdlibinc-flag.patch
+      (substituteAll {
+        src = ../../clang-at-least-16-LLVMgold-path.patch;
+       libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      (cd tools && ln -s ../../clang-tools-extra extra)
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      moveToOutput "lib/libclang-cpp.*" "$lib"
+      substituteInPlace $dev/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
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [
+        "fortify3"
+      ];
+      hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
+        lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
+        ++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    ninjaFlags = [ "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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..e5465c9bf4f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/clang/gnu-install-dirs.patch
@@ -0,0 +1,109 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 090cfa352078..624b7c9f3400 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,12 +38,26 @@ if(CLANG_BUILT_STANDALONE)
+   find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
+   list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
+ 
+-  # Turn into CACHE PATHs for overwritting
+-  set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+-  set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
+-  set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
+-  set(LLVM_TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
+-  set(LLVM_LIBRARY_DIR "${LLVM_LIBRARY_DIR}" CACHE PATH "Path to llvm/lib")
++  # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
++  # LLVM_CONFIG.
++  if (NOT LLVM_CONFIG_FOUND)
++    # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
++    # path is removed.
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
++    set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
++    # N.B. this is just a default value, the CACHE PATHs below can be overriden.
++    set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++    set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
++    set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
++  endif()
++
++  set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
++  set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
++  set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
++  set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
++  set(LLVM_LIBRARY_DIR "${LIBRARY_DIR}" CACHE PATH "Path to llvm/lib")
+ 
+   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+     NO_DEFAULT_PATH)
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 75b0080f6715..c895b884cd27 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -119,8 +119,8 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+           RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+         if (NOT LLVM_ENABLE_IDE)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index bb9a11eabbef..e2de91c65fbb 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -437,7 +437,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
+ add_header_target("windows-resource-headers" ${windows_only_files})
+ add_header_target("utility-resource-headers" ${utility_files})
+ 
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include)
+ 
+ #############################################################
+ # Install rules for the catch-all clang-resource-headers target
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 4f23065a2472..6a0f55991e24 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
+index 3aca22c0b0a8..3115353e3fe3 100644
+--- a/tools/scan-build-py/CMakeLists.txt
++++ b/tools/scan-build-py/CMakeLists.txt
+@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
+   install(FILES lib/libscanbuild/${lib}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
+   install(FILES lib/libscanbuild/resources/${resource}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
+   install(FILES lib/libear/${lib}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/16/clang/purity.patch
new file mode 100644
index 000000000000..1c94f293eb93
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/clang/purity.patch
@@ -0,0 +1,29 @@
+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
+@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   } else {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+
+-    if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE &&
+-        !Args.hasArg(options::OPT_r)) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..07013e5a6825
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -348,4 +348,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -723,6 +723,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/darwin-targetconditionals.patch
new file mode 100644
index 000000000000..425dc2af01e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/darwin-targetconditionals.patch
@@ -0,0 +1,71 @@
+diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
+--- a/lib/sanitizer_common/sanitizer_mac.cpp
++++ b/lib/sanitizer_common/sanitizer_mac.cpp
+@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
+ // Offset example:
+ // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
+ constexpr u16 GetOSMajorKernelOffset() {
+-  if (TARGET_OS_OSX) return 4;
+-  if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
+-  if (TARGET_OS_WATCH) return 13;
++#if TARGET_OS_OSX
++  return 4;
++#endif
++#if TARGET_OS_IOS || TARGET_OS_TV
++  return 6;
++#endif
++#if TARGET_OS_WATCH
++  return 13;
++#endif
+ }
+ 
+ using VersStr = char[64];
+@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
+   u16 os_major = kernel_major - offset;
+ 
+   const char *format = "%d.0";
+-  if (TARGET_OS_OSX) {
+-    if (os_major >= 16) {  // macOS 11+
+-      os_major -= 5;
+-    } else {  // macOS 10.15 and below
+-      format = "10.%d";
+-    }
++#if TARGET_OS_OSX
++  if (os_major >= 16) {  // macOS 11+
++    os_major -= 5;
++  } else {  // macOS 10.15 and below
++    format = "10.%d";
+   }
++#endif
+   return internal_snprintf(vers, sizeof(VersStr), format, os_major);
+ }
+ 
+@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
+ // Aligned versions example:
+ // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
+ static void MapToMacos(u16 *major, u16 *minor) {
+-  if (TARGET_OS_OSX)
+-    return;
+-
+-  if (TARGET_OS_IOS || TARGET_OS_TV)
++#if !TARGET_OS_OSX
++#if TARGET_OS_IOS || TARGET_OS_TV
+     *major += 2;
+-  else if (TARGET_OS_WATCH)
++#elif TARGET_OS_WATCH
+     *major += 9;
+-  else
++#else
+     UNREACHABLE("unsupported platform");
++#endif
+ 
+   if (*major >= 16) {  // macOS 11+
+     *major -= 5;
+@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
+     *minor = *major;
+     *major = 10;
+   }
++#endif
+ }
+ 
+ static MacosVersion GetMacosAlignedVersionInternal() {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/default.nix
new file mode 100644
index 000000000000..0f15a9e12cde
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/default.nix
@@ -0,0 +1,159 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake, ninja, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic;
+  inherit (stdenv.hostPlatform) isMusl;
+
+  baseName = "compiler-rt";
+
+  src = runCommand "${baseName}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${baseName} "$out"
+  '';
+in
+
+stdenv.mkDerivation {
+  pname = baseName + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${baseName}";
+
+  nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ] ++ lib.optionals (!haveLibc) [
+    # The compiler got stricter about this, and there is a usellvm patch below
+    # which patches out the assert include causing an implicit definition of
+    # assert. It would be nicer to understand why compiler-rt thinks it should
+    # be able to #include <assert.h> in the first place; perhaps it's in the
+    # wrong, or perhaps there is a way to provide an assert.h.
+    "-Wno-error=implicit-function-declaration"
+  ]);
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isDarwinStatic) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+    "-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal || isDarwinStatic ) [
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DCMAKE_LIPO=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo"
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+
+    # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
+    # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
+    "-DCOMPILER_RT_ENABLE_IOS=OFF"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    # Prevent a compilation error on darwin
+    ./darwin-targetconditionals.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/186575
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
+    # ../../common/compiler-rt/armv7l-15.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + lib.optionalString (useLLVM && !haveLibc) ''
+    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 = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + lib.optionalString (useLLVM && stdenv.hostPlatform.isLinux) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    # Note the history of crt{begin,end}S in previous versions of llvm in nixpkg:
+    # The presence of crtbegin_shared has been added and removed; it's possible
+    # people have added/removed it to get it working on their platforms.
+    # Try each in turn for now.
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.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
+  '' + lib.optionalString doFakeLibgcc ''
+     ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..f3b1f63a7d71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index 8a6219568b3f..30ee68a47ccf 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -100,13 +100,13 @@ endif()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib)
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ endif()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..2b25fd4a0744
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index 4c85551d7766..297d7a47c54b 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -328,8 +328,9 @@ macro(load_llvm_config)
+     endif()
+   endif()
+ 
+-  set(LLVM_LIBRARY_OUTPUT_INTDIR
+-    ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++  get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++    ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++    REALPATH)
+ 
+   set(LLVM_MAIN_SRC_DIR "${LLVM_MAIN_SRC_DIR_DEFAULT}" CACHE PATH "Path to LLVM source tree")
+   message(STATUS "LLVM_MAIN_SRC_DIR: \"${LLVM_MAIN_SRC_DIR}\"")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
new file mode 100644
index 000000000000..db9385043be2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
@@ -0,0 +1,380 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
+, preLibcCrossHeaders
+, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+# LLVM release information; specify one of these but not both:
+, gitRelease ? null
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   rev = /* commit SHA */;
+  #   rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+, officialRelease ? { version = "16.0.6"; sha256 = "sha256-fspqSReX+VD+Nl/Cfq+tDcdPtnQPV1IRopNDfd5VtUs="; }
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   candidate = /* optional; if specified, should be: "rcN" */
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+# By default, we'll try to fetch a release from `github:llvm/llvm-project`
+# corresponding to the `gitRelease` or `officialRelease` specified.
+#
+# You can provide your own LLVM source by specifying this arg but then it's up
+# to you to make sure that the LLVM repo given matches the release configuration
+# specified.
+, monorepoSrc ? null
+}:
+
+assert let
+  int = a: if a then 1 else 0;
+  xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
+in
+  lib.assertMsg
+    (xor
+      (gitRelease != null)
+      (officialRelease != null))
+    ("must specify `gitRelease` or `officialRelease`" +
+      (lib.optionalString (gitRelease != null) " — not both"));
+let
+  monorepoSrc' = monorepoSrc;
+in let
+  # Import releaseInfo separately to avoid infinite recursion
+  inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
+  inherit (releaseInfo) release_version version;
+  inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
+
+  lldbPlugins = lib.makeExtensible (lldbPlugins: let
+    callPackage = newScope (lldbPlugins // { inherit stdenv; inherit (tools) lldb; });
+  in {
+    llef = callPackage ../common/lldb-plugins/llef.nix {};
+  });
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
+    major = lib.versions.major release_version;
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${major}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.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
+    });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      src = callPackage ({ runCommand }: runCommand "lldb-src-${version}" {} ''
+        mkdir -p "$out"
+        cp -r ${monorepoSrc}/cmake "$out"
+        cp -r ${monorepoSrc}/lldb "$out"
+      '') { };
+      patches =
+        let
+          resourceDirPatch = callPackage
+            ({ substituteAll, libclang }: substituteAll
+              {
+                src = ./lldb/resource-dir.patch;
+                clangLibDir = "${libclang.lib}/lib";
+              })
+            { };
+        in
+        [
+          # FIXME: do we need this? ./procfs.patch
+          resourceDirPatch
+          ../common/lldb/gnu-install-dirs.patch
+        ]
+        # This is a stopgap solution if/until the macOS SDK used for x86_64 is
+        # updated.
+        #
+        # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
+        # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
+        # of this preprocessor symbol in `lldb` with its expansion.
+        #
+        # See here for some context:
+        # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+        ++ lib.optional (
+          stdenv.targetPlatform.isDarwin
+            && !stdenv.targetPlatform.isAarch64
+            && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
+        ) ./lldb/cpu_subtype_arm64e_replacement.patch;
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [ "-rtlib=compiler-rt"
+          "-Wno-unused-command-line-argument"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
+        ++ lib.optional
+          (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
+          "-lunwind"
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+      nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+          "-nostdlib++"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+      nixSupport.cc-cflags =
+        [
+          "-nostartfiles"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith (rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    } // lib.optionalAttrs stdenv.targetPlatform.isWasm {
+      nixSupport.cc-cflags = [ "-fno-exceptions" ];
+    });
+
+    # Has to be in tools despite mostly being a library,
+    # because we use a native helper executable from a
+    # non-cross build in cross builds.
+    libclc = callPackage ../common/libclc.nix {
+      inherit buildLlvmTools;
+    };
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid || stdenv.hostPlatform.isDarwin
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxxabi = let
+      # CMake will "require" a compiler capable of compiling C++ programs
+      # cxx-header's build does not actually use one so it doesn't really matter
+      # what stdenv we use here, as long as CMake is happy.
+      cxx-headers = callPackage ./libcxx {
+        inherit llvm_meta;
+        # Note that if we use the regular stdenv here we'll get cycle errors
+        # when attempting to use this compiler in the stdenv.
+        #
+        # The final stdenv pulls `cxx-headers` from the package set where
+        # hostPlatform *is* the target platform which means that `stdenv` at
+        # that point attempts to use this toolchain.
+        #
+        # So, we use `stdenv_` (the stdenv containing `clang` from this package
+        # set, defined below) to sidestep this issue.
+        #
+        # Because we only use `cxx-headers` in `libcxxabi` (which depends on the
+        # clang stdenv _anyways_), this is okay.
+        stdenv = stdenv_;
+        headersOnly = true;
+      };
+
+      # `libcxxabi` *doesn't* need a compiler with a working C++ stdlib but it
+      # *does* need a relatively modern C++ compiler (see:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support).
+      #
+      # So, we use the clang from this LLVM package set, like libc++
+      # "boostrapping builds" do:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build
+      #
+      # We cannot use `clangNoLibcxx` because that contains `compiler-rt` which,
+      # on macOS, depends on `libcxxabi`, thus forming a cycle.
+      stdenv_ = overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc;
+    in callPackage ./libcxxabi {
+      stdenv = stdenv_;
+      inherit llvm_meta cxx-headers;
+    };
+
+    # Like `libcxxabi` above, `libcxx` requires a fairly modern C++ compiler,
+    # so: we use the clang from this LLVM package set instead of the regular
+    # stdenv's compiler.
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version lldbPlugins; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/libcxx/default.nix
new file mode 100644
index 000000000000..d6c8c57c1743
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/libcxx/default.nix
@@ -0,0 +1,126 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand, fetchpatch
+, cmake, ninja, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt, libunwind
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# If headersOnly is true, the resulting package would only include the headers.
+# Use this to break the circular dependency between libcxx and libcxxabi.
+#
+# Some context:
+# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
+, headersOnly ? false
+}:
+
+let
+  basename = "libcxx";
+in
+
+assert stdenv.isDarwin -> cxxabi.libName == "c++abi";
+
+stdenv.mkDerivation rec {
+  pname = basename + lib.optionalString headersOnly "-headers";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${basename} "$out"
+    mkdir -p "$out/libcxxabi"
+    cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/third-party "$out"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
+
+  prePatch = ''
+    cd ../${basename}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+    # fix for https://github.com/NixOS/nixpkgs/issues/269548
+    # https://github.com/llvm/llvm-project/pull/77218
+    (fetchpatch {
+      name = "darwin-system-libcxxabi-link-flags.patch";
+      url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
+      hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
+      relative = "libcxx";
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs =
+    lib.optionals (!headersOnly) [ cxxabi ]
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [ libunwind ];
+
+  cmakeFlags = let
+    # See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
+    libcxx_cxx_abi_opt = {
+      "c++abi" = "system-libcxxabi";
+      "cxxrt" = "libcxxrt";
+    }.${cxxabi.libName} or (throw "unknown cxxabi: ${cxxabi.libName} (${cxxabi.pname})");
+  in [
+    "-DLLVM_ENABLE_RUNTIMES=libcxx"
+    "-DLIBCXX_CXX_ABI=${if headersOnly then "none" else libcxx_cxx_abi_opt}"
+  ] ++ lib.optional (!headersOnly && cxxabi.libName == "c++abi") "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi.dev}/include/c++/v1"
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+      "-DLIBCXX_USE_COMPILER_RT=ON"
+      # There's precedent for this in llvm-project/libcxx/cmake/caches.
+      # In a monorepo build you might do the following in the libcxxabi build:
+      #   -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwinder
+      #   -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
+      # libcxx appears to require unwind and doesn't pull it in via other means.
+      "-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
+    ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+      "-DUNIX=ON" # Required otherwise libc++ fails to detect the correct linker
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
+    # If we're only building the headers we don't actually *need* a functioning
+    # C/C++ compiler:
+    ++ lib.optionals (headersOnly) [
+      "-DCMAKE_C_COMPILER_WORKS=ON"
+      "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    ];
+
+  ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
+  installTargets = lib.optional headersOnly "install-cxx-headers";
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..daee5bdd0ed3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74eff2002fc9..c935d10878bb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -419,7 +419,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+   set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
+       "Path where target-specific libc++ headers should be installed.")
+@@ -436,7 +436,7 @@ else()
+     set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
+   endif()
+   set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++ libraries should be installed.")
+   set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
+       "Path where target-specific libc++ headers should be installed.")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/default.nix
new file mode 100644
index 000000000000..90c57dc52a2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/default.nix
@@ -0,0 +1,114 @@
+{ lib, stdenv, llvm_meta, cmake, ninja, python3
+, monorepoSrc, runCommand, fetchpatch
+, cxx-headers, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx/src"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/include "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '';
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # https://reviews.llvm.org/D132298, Allow building libcxxabi alone
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/e6a0800532bb409f6d1c62f3698bdd6994a877dc.patch";
+      sha256 = "1xyjd56m4pfwq8p3xh6i8lhkk9kq15jaml7qbhxdf87z4jjkk63a";
+      stripLen = 1;
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libcxxabi"
+    "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
+
+    # `libcxxabi`'s build does not need a toolchain with a c++ stdlib attached
+    # (we specify the headers it should use explicitly above).
+    #
+    # CMake however checks for this anyways; this flag tells it not to. See:
+    # https://github.com/llvm/llvm-project/blob/4bd3f3759259548e159aeba5c76efb9a0864e6fa/llvm/runtimes/CMakeLists.txt#L243
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+    # libcxxabi's CMake looks as though it treats -nostdlib++ as implying -nostdlib,
+    # but that does not appear to be the case for example when building
+    # pkgsLLVM.libcxxabi (which uses clangNoCompilerRtWithLibc).
+    "-DCMAKE_EXE_LINKER_FLAGS=-nostdlib"
+    "-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+    "-DUNIX=ON" # Required otherwise libc++ fails to detect the correct linker
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    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
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..fa587612aaf6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b8326d08d23a..a1e36f713161 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -187,7 +187,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -201,7 +201,7 @@ else()
+     set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+     set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/libunwind/default.nix
new file mode 100644
index 000000000000..1b677a7a2c0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/libunwind/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, python3
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  # I am not so comfortable giving libc++ and friends the whole monorepo as
+  # requested, so I filter it to what is needed.
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  postInstall = lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) ''
+    # libcxxabi wants to link to libunwind_shared.so (?).
+    ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libunwind"
+  ] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..edfb2a8760bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5a06805f05f1..86a50329e6a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+@@ -129,7 +129,7 @@ else()
+   else()
+     set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libunwind libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/lld/add-table-base.patch b/nixpkgs/pkgs/development/compilers/llvm/16/lld/add-table-base.patch
new file mode 100644
index 000000000000..15fc903a5e3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/lld/add-table-base.patch
@@ -0,0 +1,190 @@
+From 93adcb770b99351b18553089c164fe3ef2119699 Mon Sep 17 00:00:00 2001
+From: Sam Clegg <sbc@chromium.org>
+Date: Fri, 25 Aug 2023 13:56:16 -0700
+Subject: [PATCH] [lld][WebAssembly] Add `--table-base` setting
+
+This is similar to `--global-base` but determines where to place the
+table segments rather than that data segments.
+
+See https://github.com/emscripten-core/emscripten/issues/20097
+
+Differential Revision: https://reviews.llvm.org/D158892
+---
+ test/wasm/table-base.s | 72 ++++++++++++++++++++++++++++++++++++++
+ wasm/Driver.cpp        | 19 ++++++++--
+ wasm/Options.td        |  5 ++-
+ wasm/Writer.cpp        |  8 -----
+ 4 files changed, 93 insertions(+), 11 deletions(-)
+ create mode 100644 test/wasm/table-base.s
+
+diff --git a/test/wasm/table-base.s b/test/wasm/table-base.s
+new file mode 100644
+index 000000000000000..56fff414fd31d96
+--- /dev/null
++++ b/test/wasm/table-base.s
+@@ -0,0 +1,72 @@
++# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
++
++# RUN: wasm-ld --export=__table_base -o %t.wasm %t.o
++# RUN: obj2yaml %t.wasm | FileCheck %s  -check-prefix=CHECK-DEFAULT
++
++# RUN: wasm-ld --table-base=100 --export=__table_base -o %t.wasm %t.o
++# RUN: obj2yaml %t.wasm | FileCheck %s  -check-prefix=CHECK-100
++
++.globl _start
++_start:
++  .functype _start () -> ()
++  i32.const _start
++  drop
++  end_function
++
++# CHECK-DEFAULT:       - Type:            TABLE
++# CHECK-DEFAULT-NEXT:    Tables:
++# CHECK-DEFAULT-NEXT:      - Index:           0
++# CHECK-DEFAULT-NEXT:        ElemType:        FUNCREF
++# CHECK-DEFAULT-NEXT:        Limits:
++# CHECK-DEFAULT-NEXT:          Flags:           [ HAS_MAX ]
++# CHECK-DEFAULT-NEXT:          Minimum:         0x2
++# CHECK-DEFAULT-NEXT:          Maximum:         0x2
++
++# CHECK-DEFAULT:       - Type:            GLOBAL
++# CHECK-DEFAULT-NEXT:    Globals:
++# CHECK-DEFAULT-NEXT:      - Index:           0
++# CHECK-DEFAULT-NEXT:        Type:            I32
++# CHECK-DEFAULT-NEXT:        Mutable:         true
++# CHECK-DEFAULT-NEXT:        InitExpr:
++# CHECK-DEFAULT-NEXT:          Opcode:          I32_CONST
++# CHECK-DEFAULT-NEXT:          Value:           66560
++# CHECK-DEFAULT-NEXT:      - Index:           1
++# CHECK-DEFAULT-NEXT:        Type:            I32
++# CHECK-DEFAULT-NEXT:        Mutable:         false
++# CHECK-DEFAULT-NEXT:        InitExpr:
++# CHECK-DEFAULT-NEXT:          Opcode:          I32_CONST
++# CHECK-DEFAULT-NEXT:          Value:           1
++
++# CHECK-DEFAULT:       - Type:            EXPORT
++# CHECK-DEFAULT:           - Name:            __table_base
++# CHECK-DEFAULT-NEXT:        Kind:            GLOBAL
++# CHECK-DEFAULT-NEXT:        Index:           1
++
++# CHECK-100:       - Type:            TABLE
++# CHECK-100-NEXT:    Tables:
++# CHECK-100-NEXT:      - Index:           0
++# CHECK-100-NEXT:        ElemType:        FUNCREF
++# CHECK-100-NEXT:        Limits:
++# CHECK-100-NEXT:          Flags:           [ HAS_MAX ]
++# CHECK-100-NEXT:          Minimum:         0x65
++# CHECK-100-NEXT:          Maximum:         0x65
++
++# CHECK-100:       - Type:            GLOBAL
++# CHECK-100-NEXT:    Globals:
++# CHECK-100-NEXT:      - Index:           0
++# CHECK-100-NEXT:        Type:            I32
++# CHECK-100-NEXT:        Mutable:         true
++# CHECK-100-NEXT:        InitExpr:
++# CHECK-100-NEXT:          Opcode:          I32_CONST
++# CHECK-100-NEXT:          Value:           66560
++# CHECK-100-NEXT:      - Index:           1
++# CHECK-100-NEXT:        Type:            I32
++# CHECK-100-NEXT:        Mutable:         false
++# CHECK-100-NEXT:        InitExpr:
++# CHECK-100-NEXT:          Opcode:          I32_CONST
++# CHECK-100-NEXT:          Value:           100
++
++# CHECK-100:       - Type:            EXPORT
++# CHECK-100:           - Name:            __table_base
++# CHECK-100-NEXT:        Kind:            GLOBAL
++# CHECK-100-NEXT:        Index:           1
+diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
+index 84304881f5ca34e..c2f5f0185781f36 100644
+--- a/wasm/Driver.cpp
++++ b/wasm/Driver.cpp
+@@ -502,6 +502,7 @@ static void readConfigs(opt::InputArgList &args) {
+ 
+   config->initialMemory = args::getInteger(args, OPT_initial_memory, 0);
+   config->globalBase = args::getInteger(args, OPT_global_base, 0);
++  config->tableBase = args::getInteger(args, OPT_table_base, 0);
+   config->maxMemory = args::getInteger(args, OPT_max_memory, 0);
+   config->zStackSize =
+       args::getZOptionValue(args, OPT_z, "stack-size", WasmPageSize);
+@@ -573,6 +574,17 @@ static void setConfigs() {
+     if (config->exportTable)
+       error("-shared/-pie is incompatible with --export-table");
+     config->importTable = true;
++  } else {
++    // Default table base.  Defaults to 1, reserving 0 for the NULL function
++    // pointer.
++    if (!config->tableBase)
++      config->tableBase = 1;
++    // The default offset for static/global data, for when --global-base is
++    // not specified on the command line.  The precise value of 1024 is
++    // somewhat arbitrary, and pre-dates wasm-ld (Its the value that
++    // emscripten used prior to wasm-ld).
++    if (!config->globalBase && !config->relocatable && !config->stackFirst)
++      config->globalBase = 1024;
+   }
+ 
+   if (config->relocatable) {
+@@ -666,8 +678,11 @@ static void checkOptions(opt::InputArgList &args) {
+     warn("-Bsymbolic is only meaningful when combined with -shared");
+   }
+ 
+-  if (config->globalBase && config->isPic) {
+-    error("--global-base may not be used with -shared/-pie");
++  if (config->isPic) {
++    if (config->globalBase)
++      error("--global-base may not be used with -shared/-pie");
++    if (config->tableBase)
++      error("--table-base may not be used with -shared/-pie");
+   }
+ }
+ 
+diff --git a/wasm/Options.td b/wasm/Options.td
+index 50417d2928e0a34..bb764396bf4df14 100644
+--- a/wasm/Options.td
++++ b/wasm/Options.td
+@@ -191,7 +191,7 @@ def growable_table: FF<"growable-table">,
+   HelpText<"Remove maximum size from function table, allowing table to grow">;
+ 
+ def global_base: JJ<"global-base=">,
+-  HelpText<"Where to start to place global data">;
++  HelpText<"Memory offset at which to place global data (Defaults to 1024)">;
+ 
+ def import_memory: FF<"import-memory">,
+   HelpText<"Import the module's memory from the default module of \"env\" with the name \"memory\".">;
+@@ -224,6 +224,9 @@ def no_entry: FF<"no-entry">,
+ def stack_first: FF<"stack-first">,
+   HelpText<"Place stack at start of linear memory rather than after data">;
+ 
++def table_base: JJ<"table-base=">,
++  HelpText<"Table offset at which to place address taken functions (Defaults to 1)">;
++
+ defm whole_archive: B<"whole-archive",
+     "Force load of all members in a static library",
+     "Do not force load of all members in a static library (default)">;
+diff --git a/wasm/Writer.cpp b/wasm/Writer.cpp
+index f25d358dc5bae6f..0576bf2907e49c4 100644
+--- a/wasm/Writer.cpp
++++ b/wasm/Writer.cpp
+@@ -358,13 +358,6 @@ void Writer::layoutMemory() {
+       memoryPtr = config->globalBase;
+     }
+   } else {
+-    if (!config->globalBase && !config->relocatable && !config->isPic) {
+-      // The default offset for static/global data, for when --global-base is
+-      // not specified on the command line.  The precise value of 1024 is
+-      // somewhat arbitrary, and pre-dates wasm-ld (Its the value that
+-      // emscripten used prior to wasm-ld).
+-      config->globalBase = 1024;
+-    }
+     memoryPtr = config->globalBase;
+   }
+ 
+@@ -1685,7 +1678,6 @@ void Writer::run() {
+   // For PIC code the table base is assigned dynamically by the loader.
+   // For non-PIC, we start at 1 so that accessing table index 0 always traps.
+   if (!config->isPic) {
+-    config->tableBase = 1;
+     if (WasmSym::definedTableBase)
+       WasmSym::definedTableBase->setVA(config->tableBase);
+     if (WasmSym::definedTableBase32)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/lld/default.nix
new file mode 100644
index 000000000000..84943e8effce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/lld/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  # Blank llvm dir just so relative path works
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libunwind"
+    cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
+    mkdir -p "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+    ./add-table-base.patch
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..86e76f4a16d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/lld/gnu-install-dirs.patch
@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d6225646fe6..9b5d0b15af13 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE)
+   find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
+   list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
+ 
+-  # Turn into CACHE PATHs for overwriting
+-  set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+-  set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
+-  set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
++  # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
++  # LLVM_CONFIG.
++  if (NOT LLVM_CONFIG_FOUND)
++    # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
++    # path is removed.
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
++    set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
++    # N.B. this is just a default value, the CACHE PATHs below can be overridden.
++    set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
++  endif()
++
++  set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
++  set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
++  set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
+ 
+   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+     NO_DEFAULT_PATH)
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index d3924f7243d4..42a7cd62281c 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -18,8 +18,8 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++      LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++      ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/16/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/lldb/procfs.patch
new file mode 100644
index 000000000000..7b200e86505c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/lldb/procfs.patch
@@ -0,0 +1,46 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -10,6 +10,13 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
++
++// on i686 preprocessor symbols with these register names are defined as
++// numeric constants; these symbols clash with identifier names used in
++// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
++#undef FS
++#undef CS
+ 
+ #include "lldb/lldb-types.h"
+ 
+@@ -17,23 +24,13 @@
+ 
+ #include <vector>
+ 
+-#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
+ 
+ namespace lldb_private {
+ namespace process_linux {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/lldb/resource-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/16/lldb/resource-dir.patch
new file mode 100644
index 000000000000..3e1a8b7d7142
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/lldb/resource-dir.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
+index ec06ba285f27..286162f098fb 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -290,7 +290,8 @@ if (NOT TARGET clang-resource-headers)
+   # could be and pick the first that exists.
+   foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
+                     "${LLVM_BUILD_LIBRARY_DIR}"
+-                    "${LLVM_LIBRARY_DIR}")
++                    "${LLVM_LIBRARY_DIR}"
++                    "@clangLibDir@")
+     # Build the resource directory path by appending 'clang/<version number>'.
+     set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
+     if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix
new file mode 100644
index 000000000000..73fb6a785413
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix
@@ -0,0 +1,428 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, monorepoSrc
+, runCommand
+, cmake
+, darwin
+, ninja
+, python3
+, python3Packages
+, libffi
+# TODO: Gold plugin on LLVM16 has a severe memory corruption bug: https://github.com/llvm/llvm-project/issues/61350.
+, enableGoldPlugin ? false
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, sysctl
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
+  # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  # broken for the armv7l builder
+  && !stdenv.hostPlatform.isAarch
+, enablePolly ? true
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    # Note that we _explicitly_ ask for a python interpreter for our host
+    # platform here; the splicing that would ordinarily take care of this for
+    # us does not seem to work once we use `withPackages`.
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
+  else python3;
+
+in
+  assert (lib.assertMsg (!enableGoldPlugin) "Gold plugin cannot be enabled on LLVM16 due to a upstream issue: https://github.com/llvm/llvm-project/issues/61350");
+  stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} (''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    cp -r ${monorepoSrc}/third-party "$out"
+  '' + lib.optionalString enablePolly ''
+    chmod u+w "$out/${pname}/tools"
+    cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
+  '');
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake ninja python ]
+    ++ optionals enableManpages [
+      # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
+      # splicing does *not* work with the latter. (TODO: fix)
+      python3Packages.sphinx python3Packages.recommonmark
+    ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  nativeCheckInputs = [
+    which
+  ] ++ lib.optional stdenv.isDarwin sysctl;
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # Running the tests involves invoking binaries (like `opt`) that depend on
+    # the LLVM dylibs and reference them by absolute install path (i.e. their
+    # nix store path).
+    #
+    # Because we have not yet run the install phase (we're running these tests
+    # as part of `checkPhase` instead of `installCheckPhase`) these absolute
+    # paths do not exist yet; to work around this we point the loader (`ld` on
+    # unix, `dyld` on macOS) at the `lib` directory which will later become this
+    # package's `lib` output.
+    #
+    # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib`
+    # dir but:
+    #   - this doesn't generalize well to other platforms; `lit` doesn't forward
+    #     `DYLD_LIBRARY_PATH` (macOS):
+    #     + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26
+    #   - even if `lit` forwarded this env var, we actually cannot set
+    #     `DYLD_LIBRARY_PATH` in the child processes `lit` launches because
+    #     `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for
+    #     "protected processes" (i.e. the python interpreter that runs `lit`):
+    #     https://stackoverflow.com/a/35570229
+    #   - other LLVM subprojects deal with this issue by having their `lit`
+    #     configuration set these env vars for us; it makes sense to do the same
+    #     for LLVM:
+    #     + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31
+    #
+    # !!! TODO: look into upstreaming this patch
+    ./llvm-lit-cfg-add-libs-to-dylib-path.patch
+
+    # `lit` has a mode where it executes run lines as a shell script which is
+    # constructs; this is problematic for macOS because it means that there's
+    # another process in between `lit` and the binaries being tested. As noted
+    # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our
+    # tests fail with dyld errors.
+    #
+    # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when
+    # present in the test configuration.
+    #
+    # It's not clear to me why this isn't an issue for LLVM developers running
+    # on macOS (nothing about this _seems_ nix specific)..
+    ./lit-shell-script-runner-set-dyld-library-path.patch
+  ] ++ lib.optionals enablePolly [
+    ./gnu-install-dirs-polly.patch
+
+    # Just like the `llvm-lit-cfg` patch, but for `polly`.
+    ./polly-lit-cfg-add-libs-to-dylib-path.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+
+    # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
+    # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
+    rm test/MC/ELF/cfi-version.ll
+
+    # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
+    # and thus fails under the sandbox:
+    substituteInPlace unittests/TargetParser/Host.cpp \
+      --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
+
+    # This test tries to call the intrinsics `@llvm.roundeven.f32` and
+    # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
+    # and `roundeven` on macOS.
+    #
+    # However these functions are glibc specific so the test fails:
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
+    #
+    substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
+      --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
+      --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
+  '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
+    # This test fails on darwin x86_64 because `sw_vers` reports a different
+    # macOS version than what LLVM finds by reading
+    # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
+    # the sandbox on macOS).
+    #
+    # The `sw_vers` provided by nixpkgs reports the macOS version associated
+    # with the `CoreFoundation` framework with which it was built. Because
+    # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what
+    # `sw_vers` reports is not guaranteed to match the macOS version of the host
+    # that's building this derivation.
+    #
+    # Astute readers will note that we only _patch_ this test on aarch64-darwin
+    # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright.
+    # So why does this test pass on aarch64?
+    #
+    # Well, it seems that `sw_vers` on aarch64 actually links against the _host_
+    # CoreFoundation framework instead of the nixpkgs provided one.
+    #
+    # Not entirely sure what the right fix is here. I'm assuming aarch64
+    # `sw_vers` doesn't intentionally link against the host `CoreFoundation`
+    # (still digging into how this ends up happening, will follow up) but that
+    # aside I think the more pertinent question is: should we be patching LLVM's
+    # macOS version detection logic to use `sw_vers` instead of reading host
+    # paths? This *is* a way in which details about builder machines can creep
+    # into the artifacts that are produced, affecting reproducibility, but it's
+    # not clear to me when/where/for what this even gets used in LLVM.
+    #
+    # TODO(@rrbutani): fix/follow-up
+    substituteInPlace unittests/TargetParser/Host.cpp \
+      --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
+
+    # This test fails with a `dysmutil` crash; have not yet dug into what's
+    # going on here (TODO(@rrbutani)).
+    rm test/tools/dsymutil/ARM/obfuscated.test
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+    # timing-based tests are trouble
+    rm utils/lit/tests/googletest-timeout.py
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
+    rm test/tools/llvm-dwarfdump/X86/simplified-template-names.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
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar"
+    )
+  '';
+
+  # Defensive check: some paths (that we make symlinks to) depend on the release
+  # version, for example:
+  #  - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185
+  #
+  # So we want to sure that the version in the source matches the release
+  # version we were given.
+  #
+  # We do this check here, in the LLVM build, because it happens early.
+  postConfigure = let
+    v = lib.versions;
+    major = v.major release_version;
+    minor = v.minor release_version;
+    patch = v.patch release_version;
+  in ''
+    # $1: part, $2: expected
+    check_version() {
+      part="''${1^^}"
+      part="$(cat include/llvm/Config/llvm-config.h  | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)"
+
+      if [[ "$part" != "$2" ]]; then
+        echo >&2 \
+          "mismatch in the $1 version! we have version ${release_version}" \
+          "and expected the $1 version to be '$2'; the source has '$part' instead"
+        exit 3
+      fi
+    }
+
+    check_version major ${major}
+    check_version minor ${minor}
+    check_version patch ${patch}
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    "-DLLVM_LINK_LLVM_DYLIB=off"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals enableGoldPlugin [
+    # For LLVMgold plugin
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  # For the update script:
+  passthru.monorepoSrc = monorepoSrc;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  propagatedBuildInputs = [];
+
+  ninjaFlags = [ "docs-llvm-man" ];
+  installTargets = [ "install-docs-llvm-man" ];
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..b01363e98aa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,19 @@
+This is the one remaining Polly install dirs related change that hasn't made it
+into upstream yet; previously this patch file also included:
+https://reviews.llvm.org/D117541
+
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..1c2d52d59ef2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs.patch
@@ -0,0 +1,161 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7e25e0407db2..72f031a82b75 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -995,7 +995,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
+   add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
+     ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
+   install(TARGETS tf_xla_runtime EXPORT LLVMExports
+-    ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
++    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
+   # Once we add more modules, we should handle this more automatically.
+   if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 93e6d67551de..8d367457af5a 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -874,8 +874,8 @@ macro(add_llvm_library name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
++              ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+               RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+@@ -2043,7 +2043,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir "${CMAKE_INSTALL_BINDIR}")
+   endif()
+@@ -2312,16 +2312,37 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
+     # $ORIGIN is not interpreted at link time by aix ld.
+     # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+     # hardcode the rpath to build/install lib dir first in this mode.
+     # FIXME: update this when there is better solution.
+-    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
++    # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
++    # to `_install_rpath` here.
++    #
++    # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
++    # clang); instead LLVM is its own package and thus lands at its own nix
++    # store path. This makes it so that the default relative rpath (`../lib/`)
++    # does not point at the LLVM shared objects.
++    #
++    # More discussion here:
++    #   - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
++    #   - https://reviews.llvm.org/D146918 (16.0.5+)
++    #
++    # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
++    # no potential that this will result in us pulling in the "wrong" LLVM.
++    # Adding this to the build rpath means we aren't forced to use
++    # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
++    # dir, pre-install, will have the right rpath for LLVM).
++    #
++    # As noted in the differential above, an alternative solution is to have
++    # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
++    # `CMAKE_INSTALL_RPATH`.
++    set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 891c9e6d618c..8d963f3b0069 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -147,9 +147,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index d99af79aa38e..21e794224b99 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
+   )
+ list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
+ 
+-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
++extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_LIBRARY_DIRS
+   "${LLVM_CONFIG_LIBRARY_DIR}"
+   # FIXME: Should there be other entries here?
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index 7926de258ec8..5ae01adc3905 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
+   Building the llvm toolchain can use a lot of resources, particularly
+@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+   The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
+   Defaults to "bin".
+ 
++**CMAKE_INSTALL_LIBDIR**:PATH
++  The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
++  Defaults to "lib".
++
+ **CMAKE_INSTALL_INCLUDEDIR**:PATH
+   The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
+   Defaults to "include".
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index 370005cd8d7d..7e790bc52111 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,7 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
+ #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
+ #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index b1d795a0a349..de6cb1514f05 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
+       sys::fs::make_absolute(ActivePrefix, Path);
+       ActiveBinDir = std::string(Path.str());
+     }
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
++    {
++      SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
++      sys::fs::make_absolute(ActivePrefix, Path);
++      ActiveLibDir = std::string(Path.str());
++    }
+     {
+       SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
+       sys::fs::make_absolute(ActivePrefix, Path);
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/lit-shell-script-runner-set-dyld-library-path.patch b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/lit-shell-script-runner-set-dyld-library-path.patch
new file mode 100644
index 000000000000..82b7b21c55fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/lit-shell-script-runner-set-dyld-library-path.patch
@@ -0,0 +1,17 @@
+diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
+index 0242e0b75af3..d732011306f7 100644
+--- a/utils/lit/lit/TestRunner.py
++++ b/utils/lit/lit/TestRunner.py
+@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
+             f.write('@echo off\n')
+         f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
+     else:
++        # This env var is *purged* when invoking subprocesses so we have to
++        # manually set it from within the bash script in order for the commands
++        # in run lines to see this var:
++        if "DYLD_LIBRARY_PATH" in test.config.environment:
++            f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
++
+         for i, ln in enumerate(commands):
+             match = re.match(kPdbgRegex, ln)
+             if match:
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..d824516c0a16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,79 @@
+diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py
+index 81e8dc04acea..479ff95681e2 100644
+--- a/test/Unit/lit.cfg.py
++++ b/test/Unit/lit.cfg.py
+@@ -3,6 +3,7 @@
+ # Configuration file for the 'lit' test runner.
+ 
+ import os
++import platform
+ import subprocess
+ 
+ import lit.formats
+@@ -55,3 +56,26 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
+ # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
+ if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ:
+     config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE']
++
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
++        yield 'LD_LIBRARY_PATH'
++    elif platform.system() == 'Darwin':
++        yield 'DYLD_LIBRARY_PATH'
++    elif platform.system() == 'Windows':
++        yield 'PATH'
++    elif platform.system() == 'AIX':
++        yield 'LIBPATH'
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = os.path.pathsep.join(
++        (config.shlibdir,
++         config.environment.get(shlibpath_var, '')))
++    config.environment[shlibpath_var] = shlibpath
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+diff --git a/test/lit.cfg.py b/test/lit.cfg.py
+index 75a38b4c5dad..856fc75c9d74 100644
+--- a/test/lit.cfg.py
++++ b/test/lit.cfg.py
+@@ -42,6 +42,26 @@ llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
+ llvm_config.with_system_environment(
+     ['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP'])
+ 
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
++        yield 'LD_LIBRARY_PATH'
++    elif platform.system() == 'Darwin':
++        yield 'DYLD_LIBRARY_PATH'
++    elif platform.system() == 'Windows':
++        yield 'PATH'
++    elif platform.system() == 'AIX':
++        yield 'LIBPATH'
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = config.llvm_shlib_dir
++    llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True)
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+ 
+ # Set up OCAMLPATH to include newly built OCaml libraries.
+ top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml')
+@@ -318,7 +338,7 @@ def have_cxx_shared_library():
+ 
+     try:
+         readobj_cmd = subprocess.Popen(
+-            [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE)
++            [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE, env=config.environment)
+     except OSError:
+         print('could not exec llvm-readobj')
+         return False
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..1354ad267314
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,24 @@
+diff --git a/tools/polly/test/lit.cfg b/tools/polly/test/lit.cfg
+index 41e3a589c61e..09f3b17498b0 100644
+--- a/tools/polly/test/lit.cfg
++++ b/tools/polly/test/lit.cfg
+@@ -36,9 +36,17 @@ base_paths = [config.llvm_tools_dir, config.environment['PATH']]
+ path = os.path.pathsep.join(base_paths + config.extra_paths)
+ config.environment['PATH'] = path
+ 
++# (Copied from polly/test/Unit/lit.cfg)
++if platform.system() == 'Darwin':
++    shlibpath_var = 'DYLD_LIBRARY_PATH'
++elif platform.system() == 'Windows':
++    shlibpath_var = 'PATH'
++else:
++    shlibpath_var = 'LD_LIBRARY_PATH'
++
+ path = os.path.pathsep.join((config.llvm_libs_dir,
+-                              config.environment.get('LD_LIBRARY_PATH','')))
+-config.environment['LD_LIBRARY_PATH'] = path
++                              config.environment.get(shlibpath_var,'')))
++config.environment[shlibpath_var] = path
+ 
+ llvm_config.use_default_substitutions()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/default.nix
new file mode 100644
index 000000000000..d51335436ad2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, llvm_meta
+, monorepoSrc
+, runCommand
+, cmake
+, ninja
+, llvm
+, targetLlvm
+, lit
+, clang-unwrapped
+, perl
+, pkg-config
+, xcbuild
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./fix-find-tool.patch
+    ./gnu-install-dirs.patch
+    ./run-lit-directly.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
+
+  # Unsup:Pass:XFail:Fail
+  # 26:267:16:8
+  doCheck = false;
+  checkTarget = "check-openmp";
+
+  preCheck = ''
+    patchShebangs ../tools/archer/tests/deflake.bash
+  '';
+
+  cmakeFlags = [
+    "-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
+    "-DOPT_TOOL=${llvm}/bin/opt"
+    "-DLINK_TOOL=${llvm}/bin/llvm-link"
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/openmp/fix-find-tool.patch b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/fix-find-tool.patch
new file mode 100644
index 000000000000..dd0a79f1d325
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/fix-find-tool.patch
@@ -0,0 +1,21 @@
+diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
+index 49b398c9f765..6f1dd1340010 100644
+--- a/libomptarget/DeviceRTL/CMakeLists.txt
++++ b/libomptarget/DeviceRTL/CMakeLists.txt
+@@ -27,11 +27,11 @@ endif()
+ if (LLVM_DIR)
+   # Builds that use pre-installed LLVM have LLVM_DIR set.
+   # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
+-  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+-  find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+-  find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+-  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+-  find_program(EXTRACT_TOOL llvm-extract PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
++  find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR})
++  find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR})
++  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
++  find_program(EXTRACT_TOOL llvm-extract PATHS ${LLVM_TOOLS_BINARY_DIR})
+   if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT EXTRACT_TOOL) OR (NOT PACKAGER_TOOL))
+     libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, llvm-extract: ${EXTRACT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
+     return()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/openmp/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/gnu-install-dirs.patch
new file mode 100644
index 000000000000..77a93208832a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b6ddbe90516d..311ab1d50e7f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
+   set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
+     "Suffix of lib installation directory, e.g. 64 => lib64")
+   # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
+-  set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
+ 
+   # Group test settings.
+   set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
+@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
+ else()
+   set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
+   # If building in tree, we honor the same install suffix LLVM uses.
+-  set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ 
+   if (NOT MSVC)
+     set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/openmp/run-lit-directly.patch b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/run-lit-directly.patch
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/openmp/run-lit-directly.patch
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/clang/default.nix
new file mode 100644
index 000000000000..f2f114233c28
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/clang/default.nix
@@ -0,0 +1,141 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand
+, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation (finalAttrs: rec {
+    pname = "clang";
+    inherit version;
+
+    src = runCommand "${pname}-src-${version}" {} ''
+      mkdir -p "$out"
+      cp -r ${monorepoSrc}/cmake "$out"
+      cp -r ${monorepoSrc}/${pname} "$out"
+      cp -r ${monorepoSrc}/clang-tools-extra "$out"
+    '';
+
+    sourceRoot = "${src.name}/${pname}";
+
+    nativeBuildInputs = [ cmake ninja python3 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+      "-DLLVM_INCLUDE_TESTS=OFF"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+      # Added in LLVM15:
+      # `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
+      # `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
+      "-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
+      "-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      ../../common/clang/add-nostdlibinc-flag.patch
+      (substituteAll {
+        src = ../../clang-at-least-16-LLVMgold-path.patch;
+       libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      (cd tools && ln -s ../../clang-tools-extra extra)
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      mkdir -p $lib/lib/clang
+      mv $lib/lib/17 $lib/lib/clang/17
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      moveToOutput "lib/libclang-cpp.*" "$lib"
+      substituteInPlace $dev/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
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [
+        "fortify3"
+      ];
+      hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
+        lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
+        ++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    ninjaFlags = [ "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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..cc8737f35343
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/clang/gnu-install-dirs.patch
@@ -0,0 +1,98 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f7936d72e088..a362fa49b534 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,21 @@ if(CLANG_BUILT_STANDALONE)
+   find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
+   list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
+ 
+-  # Turn into CACHE PATHs for overwritting
++  # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
++  # LLVM_CONFIG.
++  if (NOT LLVM_CONFIG_FOUND)
++    # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
++    # path is removed.
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
++    set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
++    # N.B. this is just a default value, the CACHE PATHs below can be overriden.
++    set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++    set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
++    set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
++  endif()
++
+   set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+   set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
+   set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 75b0080f6715..c895b884cd27 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -119,8 +119,8 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+           RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+         if (NOT LLVM_ENABLE_IDE)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index f2b0c5cddcbb..52f37fc368ce 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -473,6 +473,7 @@ add_header_target("windows-resource-headers" ${windows_only_files})
+ add_header_target("utility-resource-headers" ${utility_files})
+ 
+ get_clang_resource_dir(header_install_dir SUBDIR include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${CLANG_VERSION_MAJOR}/include)
+ 
+ #############################################################
+ # Install rules for the catch-all clang-resource-headers target
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 4f23065a2472..6a0f55991e24 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
+index 3aca22c0b0a8..3115353e3fe3 100644
+--- a/tools/scan-build-py/CMakeLists.txt
++++ b/tools/scan-build-py/CMakeLists.txt
+@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
+   install(FILES lib/libscanbuild/${lib}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
+   install(FILES lib/libscanbuild/resources/${resource}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
+   install(FILES lib/libear/${lib}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/17/clang/purity.patch
new file mode 100644
index 000000000000..1c94f293eb93
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/clang/purity.patch
@@ -0,0 +1,29 @@
+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
+@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   } else {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+
+-    if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE &&
+-        !Args.hasArg(options::OPT_r)) {
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..07013e5a6825
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -348,4 +348,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -723,6 +723,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/darwin-targetconditionals.patch
new file mode 100644
index 000000000000..425dc2af01e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/darwin-targetconditionals.patch
@@ -0,0 +1,71 @@
+diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
+--- a/lib/sanitizer_common/sanitizer_mac.cpp
++++ b/lib/sanitizer_common/sanitizer_mac.cpp
+@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
+ // Offset example:
+ // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
+ constexpr u16 GetOSMajorKernelOffset() {
+-  if (TARGET_OS_OSX) return 4;
+-  if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
+-  if (TARGET_OS_WATCH) return 13;
++#if TARGET_OS_OSX
++  return 4;
++#endif
++#if TARGET_OS_IOS || TARGET_OS_TV
++  return 6;
++#endif
++#if TARGET_OS_WATCH
++  return 13;
++#endif
+ }
+ 
+ using VersStr = char[64];
+@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
+   u16 os_major = kernel_major - offset;
+ 
+   const char *format = "%d.0";
+-  if (TARGET_OS_OSX) {
+-    if (os_major >= 16) {  // macOS 11+
+-      os_major -= 5;
+-    } else {  // macOS 10.15 and below
+-      format = "10.%d";
+-    }
++#if TARGET_OS_OSX
++  if (os_major >= 16) {  // macOS 11+
++    os_major -= 5;
++  } else {  // macOS 10.15 and below
++    format = "10.%d";
+   }
++#endif
+   return internal_snprintf(vers, sizeof(VersStr), format, os_major);
+ }
+ 
+@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
+ // Aligned versions example:
+ // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
+ static void MapToMacos(u16 *major, u16 *minor) {
+-  if (TARGET_OS_OSX)
+-    return;
+-
+-  if (TARGET_OS_IOS || TARGET_OS_TV)
++#if !TARGET_OS_OSX
++#if TARGET_OS_IOS || TARGET_OS_TV
+     *major += 2;
+-  else if (TARGET_OS_WATCH)
++#elif TARGET_OS_WATCH
+     *major += 9;
+-  else
++#else
+     UNREACHABLE("unsupported platform");
++#endif
+ 
+   if (*major >= 16) {  // macOS 11+
+     *major -= 5;
+@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
+     *minor = *major;
+     *major = 10;
+   }
++#endif
+ }
+ 
+ static MacosVersion GetMacosAlignedVersionInternal() {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/default.nix
new file mode 100644
index 000000000000..0f15a9e12cde
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/default.nix
@@ -0,0 +1,159 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake, ninja, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic;
+  inherit (stdenv.hostPlatform) isMusl;
+
+  baseName = "compiler-rt";
+
+  src = runCommand "${baseName}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${baseName} "$out"
+  '';
+in
+
+stdenv.mkDerivation {
+  pname = baseName + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${baseName}";
+
+  nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ] ++ lib.optionals (!haveLibc) [
+    # The compiler got stricter about this, and there is a usellvm patch below
+    # which patches out the assert include causing an implicit definition of
+    # assert. It would be nicer to understand why compiler-rt thinks it should
+    # be able to #include <assert.h> in the first place; perhaps it's in the
+    # wrong, or perhaps there is a way to provide an assert.h.
+    "-Wno-error=implicit-function-declaration"
+  ]);
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isDarwinStatic) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+    "-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal || isDarwinStatic ) [
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DCMAKE_LIPO=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo"
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+
+    # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
+    # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
+    "-DCOMPILER_RT_ENABLE_IOS=OFF"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    # Prevent a compilation error on darwin
+    ./darwin-targetconditionals.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/186575
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
+    # ../../common/compiler-rt/armv7l-15.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + lib.optionalString (useLLVM && !haveLibc) ''
+    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 = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + lib.optionalString (useLLVM && stdenv.hostPlatform.isLinux) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    # Note the history of crt{begin,end}S in previous versions of llvm in nixpkg:
+    # The presence of crtbegin_shared has been added and removed; it's possible
+    # people have added/removed it to get it working on their platforms.
+    # Try each in turn for now.
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.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
+  '' + lib.optionalString doFakeLibgcc ''
+     ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..f3b1f63a7d71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index 8a6219568b3f..30ee68a47ccf 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -100,13 +100,13 @@ endif()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib)
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ endif()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..2b25fd4a0744
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index 4c85551d7766..297d7a47c54b 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -328,8 +328,9 @@ macro(load_llvm_config)
+     endif()
+   endif()
+ 
+-  set(LLVM_LIBRARY_OUTPUT_INTDIR
+-    ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++  get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++    ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++    REALPATH)
+ 
+   set(LLVM_MAIN_SRC_DIR "${LLVM_MAIN_SRC_DIR_DEFAULT}" CACHE PATH "Path to LLVM source tree")
+   message(STATUS "LLVM_MAIN_SRC_DIR: \"${LLVM_MAIN_SRC_DIR}\"")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/default.nix
new file mode 100644
index 000000000000..95281df892e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/default.nix
@@ -0,0 +1,364 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
+, preLibcCrossHeaders
+, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+# LLVM release information; specify one of these but not both:
+, gitRelease ? null
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   rev = /* commit SHA */;
+  #   rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+, officialRelease ? { version = "17.0.6"; sha256 = "sha256-8MEDLLhocshmxoEBRSKlJ/GzJ8nfuzQ8qn0X/vLA+ag="; }
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   candidate = /* optional; if specified, should be: "rcN" */
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+# By default, we'll try to fetch a release from `github:llvm/llvm-project`
+# corresponding to the `gitRelease` or `officialRelease` specified.
+#
+# You can provide your own LLVM source by specifying this arg but then it's up
+# to you to make sure that the LLVM repo given matches the release configuration
+# specified.
+, monorepoSrc ? null
+}:
+
+assert let
+  int = a: if a then 1 else 0;
+  xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
+in
+  lib.assertMsg
+    (xor
+      (gitRelease != null)
+      (officialRelease != null))
+    ("must specify `gitRelease` or `officialRelease`" +
+      (lib.optionalString (gitRelease != null) " — not both"));
+let
+  monorepoSrc' = monorepoSrc;
+in let
+  inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
+
+  inherit (releaseInfo) release_version version;
+
+  inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
+    major = lib.versions.major release_version;
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${major}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.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
+    });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      src = callPackage ({ runCommand }: runCommand "lldb-src-${version}" {} ''
+        mkdir -p "$out"
+        cp -r ${monorepoSrc}/cmake "$out"
+        cp -r ${monorepoSrc}/lldb "$out"
+      '') { };
+      patches =
+        [
+          # FIXME: do we need this? ./procfs.patch
+          ../common/lldb/gnu-install-dirs.patch
+        ]
+        # This is a stopgap solution if/until the macOS SDK used for x86_64 is
+        # updated.
+        #
+        # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
+        # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
+        # of this preprocessor symbol in `lldb` with its expansion.
+        #
+        # See here for some context:
+        # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+        ++ lib.optional (
+          stdenv.targetPlatform.isDarwin
+            && !stdenv.targetPlatform.isAarch64
+            && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
+        ) ./lldb/cpu_subtype_arm64e_replacement.patch;
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [ "-rtlib=compiler-rt"
+          "-Wno-unused-command-line-argument"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
+        ++ lib.optional
+          (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
+          "-lunwind"
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+          "-nostdlib++"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+      nixSupport.cc-cflags =
+        [
+          "-nostartfiles"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith (rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    } // lib.optionalAttrs stdenv.targetPlatform.isWasm {
+      nixSupport.cc-cflags = [ "-fno-exceptions" ];
+    });
+
+    # Has to be in tools despite mostly being a library,
+    # because we use a native helper executable from a
+    # non-cross build in cross builds.
+    libclc = callPackage ../common/libclc.nix {
+      inherit buildLlvmTools;
+    };
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid || stdenv.hostPlatform.isDarwin
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxxabi = let
+      # CMake will "require" a compiler capable of compiling C++ programs
+      # cxx-header's build does not actually use one so it doesn't really matter
+      # what stdenv we use here, as long as CMake is happy.
+      cxx-headers = callPackage ./libcxx {
+        inherit llvm_meta;
+        # Note that if we use the regular stdenv here we'll get cycle errors
+        # when attempting to use this compiler in the stdenv.
+        #
+        # The final stdenv pulls `cxx-headers` from the package set where
+        # hostPlatform *is* the target platform which means that `stdenv` at
+        # that point attempts to use this toolchain.
+        #
+        # So, we use `stdenv_` (the stdenv containing `clang` from this package
+        # set, defined below) to sidestep this issue.
+        #
+        # Because we only use `cxx-headers` in `libcxxabi` (which depends on the
+        # clang stdenv _anyways_), this is okay.
+        stdenv = stdenv_;
+        headersOnly = true;
+      };
+
+      # `libcxxabi` *doesn't* need a compiler with a working C++ stdlib but it
+      # *does* need a relatively modern C++ compiler (see:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support).
+      #
+      # So, we use the clang from this LLVM package set, like libc++
+      # "boostrapping builds" do:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build
+      #
+      # We cannot use `clangNoLibcxx` because that contains `compiler-rt` which,
+      # on macOS, depends on `libcxxabi`, thus forming a cycle.
+      stdenv_ = overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc;
+    in callPackage ./libcxxabi {
+      stdenv = stdenv_;
+      inherit llvm_meta cxx-headers;
+    };
+
+    # Like `libcxxabi` above, `libcxx` requires a fairly modern C++ compiler,
+    # so: we use the clang from this LLVM package set instead of the regular
+    # stdenv's compiler.
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/libcxx/default.nix
new file mode 100644
index 000000000000..8f4b0cec8d40
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/libcxx/default.nix
@@ -0,0 +1,133 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand, fetchpatch
+, cmake, ninja, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt, libunwind
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# If headersOnly is true, the resulting package would only include the headers.
+# Use this to break the circular dependency between libcxx and libcxxabi.
+#
+# Some context:
+# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
+, headersOnly ? false
+}:
+
+let
+  basename = "libcxx";
+in
+
+assert stdenv.isDarwin -> cxxabi.libName == "c++abi";
+
+stdenv.mkDerivation rec {
+  pname = basename + lib.optionalString headersOnly "-headers";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${basename} "$out"
+    mkdir -p "$out/libcxxabi"
+    cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/third-party "$out"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
+
+  prePatch = ''
+    cd ../${basename}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    # fix for https://github.com/NixOS/nixpkgs/issues/269548
+    # https://github.com/llvm/llvm-project/pull/77218
+    (fetchpatch {
+      name = "darwin-system-libcxxabi-link-flags.patch";
+      url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
+      hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
+      relative = "libcxx";
+    })
+  ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [
+    # https://github.com/llvm/llvm-project/issues/64226
+    (fetchpatch {
+      name = "0042-mbstate_t-not-defined.patch";
+      url = "https://github.com/macports/macports-ports/raw/acd8acb171f1658596ed1cf25da48d5b932e2d19/lang/llvm-17/files/0042-mbstate_t-not-defined.patch";
+      relative = "libcxx";
+      hash = "sha256-fVbX99W1gQrSaMFeBkzsJmNWNy0xVSw+oFvDe4AYXL0=";
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs =
+    lib.optionals (!headersOnly) [ cxxabi ]
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [ libunwind ];
+
+  cmakeFlags = let
+    # See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
+    libcxx_cxx_abi_opt = {
+      "c++abi" = "system-libcxxabi";
+      "cxxrt" = "libcxxrt";
+    }.${cxxabi.libName} or (throw "unknown cxxabi: ${cxxabi.libName} (${cxxabi.pname})");
+  in [
+    "-DLLVM_ENABLE_RUNTIMES=libcxx"
+    "-DLIBCXX_CXX_ABI=${if headersOnly then "none" else libcxx_cxx_abi_opt}"
+  ] ++ lib.optional (!headersOnly && cxxabi.libName == "c++abi") "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi.dev}/include/c++/v1"
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+      "-DLIBCXX_USE_COMPILER_RT=ON"
+      # There's precedent for this in llvm-project/libcxx/cmake/caches.
+      # In a monorepo build you might do the following in the libcxxabi build:
+      #   -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwinder
+      #   -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
+      # libcxx appears to require unwind and doesn't pull it in via other means.
+      "-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
+    ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+      "-DUNIX=ON" # Required otherwise libc++ fails to detect the correct linker
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
+    # If we're only building the headers we don't actually *need* a functioning
+    # C/C++ compiler:
+    ++ lib.optionals (headersOnly) [
+      "-DCMAKE_C_COMPILER_WORKS=ON"
+      "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    ];
+
+  ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
+  installTargets = lib.optional headersOnly "install-cxx-headers";
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/default.nix
new file mode 100644
index 000000000000..30ca99b20fd7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/default.nix
@@ -0,0 +1,114 @@
+{ lib, stdenv, llvm_meta, cmake, ninja, python3
+, monorepoSrc, runCommand, fetchpatch
+, cxx-headers, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx/src"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/include "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '';
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # https://reviews.llvm.org/D132298, Allow building libcxxabi alone
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/e6a0800532bb409f6d1c62f3698bdd6994a877dc.patch";
+      sha256 = "1xyjd56m4pfwq8p3xh6i8lhkk9kq15jaml7qbhxdf87z4jjkk63a";
+      stripLen = 1;
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libcxxabi"
+    "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
+
+    # `libcxxabi`'s build does not need a toolchain with a c++ stdlib attached
+    # (we specify the headers it should use explicitly above).
+    #
+    # CMake however checks for this anyways; this flag tells it not to. See:
+    # https://github.com/llvm/llvm-project/blob/4bd3f3759259548e159aeba5c76efb9a0864e6fa/llvm/runtimes/CMakeLists.txt#L243
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+    # libcxxabi's CMake looks as though it treats -nostdlib++ as implying -nostdlib,
+    # but that does not appear to be the case for example when building
+    # pkgsLLVM.libcxxabi (which uses clangNoCompilerRtWithLibc).
+    "-DCMAKE_EXE_LINKER_FLAGS=-nostdlib"
+    "-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+    "-DUNIX=ON"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    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
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..51382fcefed2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
+index f380fe6b6b92..a9656258c38e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -188,7 +188,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -202,7 +202,7 @@ else()
+     set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+     set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/libunwind/default.nix
new file mode 100644
index 000000000000..a3c8e2594f5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/libunwind/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, python3
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  # I am not so comfortable giving libc++ and friends the whole monorepo as
+  # requested, so I filter it to what is needed.
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  postInstall = lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) ''
+    # libcxxabi wants to link to libunwind_shared.so (?).
+    ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libunwind"
+  ] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/lld/add-table-base.patch b/nixpkgs/pkgs/development/compilers/llvm/17/lld/add-table-base.patch
new file mode 100644
index 000000000000..15fc903a5e3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/lld/add-table-base.patch
@@ -0,0 +1,190 @@
+From 93adcb770b99351b18553089c164fe3ef2119699 Mon Sep 17 00:00:00 2001
+From: Sam Clegg <sbc@chromium.org>
+Date: Fri, 25 Aug 2023 13:56:16 -0700
+Subject: [PATCH] [lld][WebAssembly] Add `--table-base` setting
+
+This is similar to `--global-base` but determines where to place the
+table segments rather than that data segments.
+
+See https://github.com/emscripten-core/emscripten/issues/20097
+
+Differential Revision: https://reviews.llvm.org/D158892
+---
+ test/wasm/table-base.s | 72 ++++++++++++++++++++++++++++++++++++++
+ wasm/Driver.cpp        | 19 ++++++++--
+ wasm/Options.td        |  5 ++-
+ wasm/Writer.cpp        |  8 -----
+ 4 files changed, 93 insertions(+), 11 deletions(-)
+ create mode 100644 test/wasm/table-base.s
+
+diff --git a/test/wasm/table-base.s b/test/wasm/table-base.s
+new file mode 100644
+index 000000000000000..56fff414fd31d96
+--- /dev/null
++++ b/test/wasm/table-base.s
+@@ -0,0 +1,72 @@
++# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
++
++# RUN: wasm-ld --export=__table_base -o %t.wasm %t.o
++# RUN: obj2yaml %t.wasm | FileCheck %s  -check-prefix=CHECK-DEFAULT
++
++# RUN: wasm-ld --table-base=100 --export=__table_base -o %t.wasm %t.o
++# RUN: obj2yaml %t.wasm | FileCheck %s  -check-prefix=CHECK-100
++
++.globl _start
++_start:
++  .functype _start () -> ()
++  i32.const _start
++  drop
++  end_function
++
++# CHECK-DEFAULT:       - Type:            TABLE
++# CHECK-DEFAULT-NEXT:    Tables:
++# CHECK-DEFAULT-NEXT:      - Index:           0
++# CHECK-DEFAULT-NEXT:        ElemType:        FUNCREF
++# CHECK-DEFAULT-NEXT:        Limits:
++# CHECK-DEFAULT-NEXT:          Flags:           [ HAS_MAX ]
++# CHECK-DEFAULT-NEXT:          Minimum:         0x2
++# CHECK-DEFAULT-NEXT:          Maximum:         0x2
++
++# CHECK-DEFAULT:       - Type:            GLOBAL
++# CHECK-DEFAULT-NEXT:    Globals:
++# CHECK-DEFAULT-NEXT:      - Index:           0
++# CHECK-DEFAULT-NEXT:        Type:            I32
++# CHECK-DEFAULT-NEXT:        Mutable:         true
++# CHECK-DEFAULT-NEXT:        InitExpr:
++# CHECK-DEFAULT-NEXT:          Opcode:          I32_CONST
++# CHECK-DEFAULT-NEXT:          Value:           66560
++# CHECK-DEFAULT-NEXT:      - Index:           1
++# CHECK-DEFAULT-NEXT:        Type:            I32
++# CHECK-DEFAULT-NEXT:        Mutable:         false
++# CHECK-DEFAULT-NEXT:        InitExpr:
++# CHECK-DEFAULT-NEXT:          Opcode:          I32_CONST
++# CHECK-DEFAULT-NEXT:          Value:           1
++
++# CHECK-DEFAULT:       - Type:            EXPORT
++# CHECK-DEFAULT:           - Name:            __table_base
++# CHECK-DEFAULT-NEXT:        Kind:            GLOBAL
++# CHECK-DEFAULT-NEXT:        Index:           1
++
++# CHECK-100:       - Type:            TABLE
++# CHECK-100-NEXT:    Tables:
++# CHECK-100-NEXT:      - Index:           0
++# CHECK-100-NEXT:        ElemType:        FUNCREF
++# CHECK-100-NEXT:        Limits:
++# CHECK-100-NEXT:          Flags:           [ HAS_MAX ]
++# CHECK-100-NEXT:          Minimum:         0x65
++# CHECK-100-NEXT:          Maximum:         0x65
++
++# CHECK-100:       - Type:            GLOBAL
++# CHECK-100-NEXT:    Globals:
++# CHECK-100-NEXT:      - Index:           0
++# CHECK-100-NEXT:        Type:            I32
++# CHECK-100-NEXT:        Mutable:         true
++# CHECK-100-NEXT:        InitExpr:
++# CHECK-100-NEXT:          Opcode:          I32_CONST
++# CHECK-100-NEXT:          Value:           66560
++# CHECK-100-NEXT:      - Index:           1
++# CHECK-100-NEXT:        Type:            I32
++# CHECK-100-NEXT:        Mutable:         false
++# CHECK-100-NEXT:        InitExpr:
++# CHECK-100-NEXT:          Opcode:          I32_CONST
++# CHECK-100-NEXT:          Value:           100
++
++# CHECK-100:       - Type:            EXPORT
++# CHECK-100:           - Name:            __table_base
++# CHECK-100-NEXT:        Kind:            GLOBAL
++# CHECK-100-NEXT:        Index:           1
+diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
+index 84304881f5ca34e..c2f5f0185781f36 100644
+--- a/wasm/Driver.cpp
++++ b/wasm/Driver.cpp
+@@ -502,6 +502,7 @@ static void readConfigs(opt::InputArgList &args) {
+ 
+   config->initialMemory = args::getInteger(args, OPT_initial_memory, 0);
+   config->globalBase = args::getInteger(args, OPT_global_base, 0);
++  config->tableBase = args::getInteger(args, OPT_table_base, 0);
+   config->maxMemory = args::getInteger(args, OPT_max_memory, 0);
+   config->zStackSize =
+       args::getZOptionValue(args, OPT_z, "stack-size", WasmPageSize);
+@@ -573,6 +574,17 @@ static void setConfigs() {
+     if (config->exportTable)
+       error("-shared/-pie is incompatible with --export-table");
+     config->importTable = true;
++  } else {
++    // Default table base.  Defaults to 1, reserving 0 for the NULL function
++    // pointer.
++    if (!config->tableBase)
++      config->tableBase = 1;
++    // The default offset for static/global data, for when --global-base is
++    // not specified on the command line.  The precise value of 1024 is
++    // somewhat arbitrary, and pre-dates wasm-ld (Its the value that
++    // emscripten used prior to wasm-ld).
++    if (!config->globalBase && !config->relocatable && !config->stackFirst)
++      config->globalBase = 1024;
+   }
+ 
+   if (config->relocatable) {
+@@ -666,8 +678,11 @@ static void checkOptions(opt::InputArgList &args) {
+     warn("-Bsymbolic is only meaningful when combined with -shared");
+   }
+ 
+-  if (config->globalBase && config->isPic) {
+-    error("--global-base may not be used with -shared/-pie");
++  if (config->isPic) {
++    if (config->globalBase)
++      error("--global-base may not be used with -shared/-pie");
++    if (config->tableBase)
++      error("--table-base may not be used with -shared/-pie");
+   }
+ }
+ 
+diff --git a/wasm/Options.td b/wasm/Options.td
+index 50417d2928e0a34..bb764396bf4df14 100644
+--- a/wasm/Options.td
++++ b/wasm/Options.td
+@@ -191,7 +191,7 @@ def growable_table: FF<"growable-table">,
+   HelpText<"Remove maximum size from function table, allowing table to grow">;
+ 
+ def global_base: JJ<"global-base=">,
+-  HelpText<"Where to start to place global data">;
++  HelpText<"Memory offset at which to place global data (Defaults to 1024)">;
+ 
+ def import_memory: FF<"import-memory">,
+   HelpText<"Import the module's memory from the default module of \"env\" with the name \"memory\".">;
+@@ -224,6 +224,9 @@ def no_entry: FF<"no-entry">,
+ def stack_first: FF<"stack-first">,
+   HelpText<"Place stack at start of linear memory rather than after data">;
+ 
++def table_base: JJ<"table-base=">,
++  HelpText<"Table offset at which to place address taken functions (Defaults to 1)">;
++
+ defm whole_archive: B<"whole-archive",
+     "Force load of all members in a static library",
+     "Do not force load of all members in a static library (default)">;
+diff --git a/wasm/Writer.cpp b/wasm/Writer.cpp
+index f25d358dc5bae6f..0576bf2907e49c4 100644
+--- a/wasm/Writer.cpp
++++ b/wasm/Writer.cpp
+@@ -358,13 +358,6 @@ void Writer::layoutMemory() {
+       memoryPtr = config->globalBase;
+     }
+   } else {
+-    if (!config->globalBase && !config->relocatable && !config->isPic) {
+-      // The default offset for static/global data, for when --global-base is
+-      // not specified on the command line.  The precise value of 1024 is
+-      // somewhat arbitrary, and pre-dates wasm-ld (Its the value that
+-      // emscripten used prior to wasm-ld).
+-      config->globalBase = 1024;
+-    }
+     memoryPtr = config->globalBase;
+   }
+ 
+@@ -1685,7 +1678,6 @@ void Writer::run() {
+   // For PIC code the table base is assigned dynamically by the loader.
+   // For non-PIC, we start at 1 so that accessing table index 0 always traps.
+   if (!config->isPic) {
+-    config->tableBase = 1;
+     if (WasmSym::definedTableBase)
+       WasmSym::definedTableBase->setVA(config->tableBase);
+     if (WasmSym::definedTableBase32)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/lld/default.nix
new file mode 100644
index 000000000000..84943e8effce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/lld/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  # Blank llvm dir just so relative path works
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libunwind"
+    cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
+    mkdir -p "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+    ./add-table-base.patch
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..86e76f4a16d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/lld/gnu-install-dirs.patch
@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d6225646fe6..9b5d0b15af13 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE)
+   find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
+   list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
+ 
+-  # Turn into CACHE PATHs for overwriting
+-  set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+-  set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
+-  set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
++  # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
++  # LLVM_CONFIG.
++  if (NOT LLVM_CONFIG_FOUND)
++    # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
++    # path is removed.
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
++    set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
++    # N.B. this is just a default value, the CACHE PATHs below can be overridden.
++    set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
++  endif()
++
++  set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
++  set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
++  set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
+ 
+   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+     NO_DEFAULT_PATH)
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index d3924f7243d4..42a7cd62281c 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -18,8 +18,8 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++      LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++      ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/17/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/lldb/procfs.patch
new file mode 100644
index 000000000000..7b200e86505c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/lldb/procfs.patch
@@ -0,0 +1,46 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -10,6 +10,13 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
++
++// on i686 preprocessor symbols with these register names are defined as
++// numeric constants; these symbols clash with identifier names used in
++// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
++#undef FS
++#undef CS
+ 
+ #include "lldb/lldb-types.h"
+ 
+@@ -17,23 +24,13 @@
+ 
+ #include <vector>
+ 
+-#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
+ 
+ namespace lldb_private {
+ namespace process_linux {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix
new file mode 100644
index 000000000000..627679ce812f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix
@@ -0,0 +1,427 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, monorepoSrc
+, runCommand
+, cmake
+, darwin
+, ninja
+, python3
+, python3Packages
+, libffi
+, enableGoldPlugin ? true
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, sysctl
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
+  # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  # broken for the armv7l builder
+  && !stdenv.hostPlatform.isAarch
+, enablePolly ? true
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    # Note that we _explicitly_ ask for a python interpreter for our host
+    # platform here; the splicing that would ordinarily take care of this for
+    # us does not seem to work once we use `withPackages`.
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
+  else python3;
+
+in
+
+stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} (''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    cp -r ${monorepoSrc}/third-party "$out"
+  '' + lib.optionalString enablePolly ''
+    chmod u+w "$out/${pname}/tools"
+    cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
+  '');
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake ninja python ]
+    ++ optionals enableManpages [
+      # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
+      # splicing does *not* work with the latter. (TODO: fix)
+      python3Packages.sphinx python3Packages.recommonmark
+    ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  nativeCheckInputs = [
+    which
+  ] ++ lib.optional stdenv.isDarwin sysctl;
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # Running the tests involves invoking binaries (like `opt`) that depend on
+    # the LLVM dylibs and reference them by absolute install path (i.e. their
+    # nix store path).
+    #
+    # Because we have not yet run the install phase (we're running these tests
+    # as part of `checkPhase` instead of `installCheckPhase`) these absolute
+    # paths do not exist yet; to work around this we point the loader (`ld` on
+    # unix, `dyld` on macOS) at the `lib` directory which will later become this
+    # package's `lib` output.
+    #
+    # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib`
+    # dir but:
+    #   - this doesn't generalize well to other platforms; `lit` doesn't forward
+    #     `DYLD_LIBRARY_PATH` (macOS):
+    #     + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26
+    #   - even if `lit` forwarded this env var, we actually cannot set
+    #     `DYLD_LIBRARY_PATH` in the child processes `lit` launches because
+    #     `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for
+    #     "protected processes" (i.e. the python interpreter that runs `lit`):
+    #     https://stackoverflow.com/a/35570229
+    #   - other LLVM subprojects deal with this issue by having their `lit`
+    #     configuration set these env vars for us; it makes sense to do the same
+    #     for LLVM:
+    #     + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31
+    #
+    # !!! TODO: look into upstreaming this patch
+    ./llvm-lit-cfg-add-libs-to-dylib-path.patch
+
+    # `lit` has a mode where it executes run lines as a shell script which is
+    # constructs; this is problematic for macOS because it means that there's
+    # another process in between `lit` and the binaries being tested. As noted
+    # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our
+    # tests fail with dyld errors.
+    #
+    # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when
+    # present in the test configuration.
+    #
+    # It's not clear to me why this isn't an issue for LLVM developers running
+    # on macOS (nothing about this _seems_ nix specific)..
+    ./lit-shell-script-runner-set-dyld-library-path.patch
+  ] ++ lib.optionals enablePolly [
+    ./gnu-install-dirs-polly.patch
+
+    # Just like the `llvm-lit-cfg` patch, but for `polly`.
+    ./polly-lit-cfg-add-libs-to-dylib-path.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+
+    # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
+    # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
+    rm test/MC/ELF/cfi-version.ll
+
+    # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
+    # and thus fails under the sandbox:
+    substituteInPlace unittests/TargetParser/Host.cpp \
+      --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
+
+    # This test tries to call the intrinsics `@llvm.roundeven.f32` and
+    # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
+    # and `roundeven` on macOS.
+    #
+    # However these functions are glibc specific so the test fails:
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
+    #
+    substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
+      --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
+      --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
+  '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
+    # This test fails on darwin x86_64 because `sw_vers` reports a different
+    # macOS version than what LLVM finds by reading
+    # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
+    # the sandbox on macOS).
+    #
+    # The `sw_vers` provided by nixpkgs reports the macOS version associated
+    # with the `CoreFoundation` framework with which it was built. Because
+    # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what
+    # `sw_vers` reports is not guaranteed to match the macOS version of the host
+    # that's building this derivation.
+    #
+    # Astute readers will note that we only _patch_ this test on aarch64-darwin
+    # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright.
+    # So why does this test pass on aarch64?
+    #
+    # Well, it seems that `sw_vers` on aarch64 actually links against the _host_
+    # CoreFoundation framework instead of the nixpkgs provided one.
+    #
+    # Not entirely sure what the right fix is here. I'm assuming aarch64
+    # `sw_vers` doesn't intentionally link against the host `CoreFoundation`
+    # (still digging into how this ends up happening, will follow up) but that
+    # aside I think the more pertinent question is: should we be patching LLVM's
+    # macOS version detection logic to use `sw_vers` instead of reading host
+    # paths? This *is* a way in which details about builder machines can creep
+    # into the artifacts that are produced, affecting reproducibility, but it's
+    # not clear to me when/where/for what this even gets used in LLVM.
+    #
+    # TODO(@rrbutani): fix/follow-up
+    substituteInPlace unittests/TargetParser/Host.cpp \
+      --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
+
+    # This test fails with a `dysmutil` crash; have not yet dug into what's
+    # going on here (TODO(@rrbutani)).
+    rm test/tools/dsymutil/ARM/obfuscated.test
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
+    rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+    rm test/CodeGen/RISCV/attributes.ll
+    rm test/CodeGen/RISCV/xtheadmempair.ll
+  '' + 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
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar"
+    )
+  '';
+
+  # Defensive check: some paths (that we make symlinks to) depend on the release
+  # version, for example:
+  #  - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185
+  #
+  # So we want to sure that the version in the source matches the release
+  # version we were given.
+  #
+  # We do this check here, in the LLVM build, because it happens early.
+  postConfigure = let
+    v = lib.versions;
+    major = v.major release_version;
+    minor = v.minor release_version;
+    patch = v.patch release_version;
+  in ''
+    # $1: part, $2: expected
+    check_version() {
+      part="''${1^^}"
+      part="$(cat include/llvm/Config/llvm-config.h  | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)"
+
+      if [[ "$part" != "$2" ]]; then
+        echo >&2 \
+          "mismatch in the $1 version! we have version ${release_version}" \
+          "and expected the $1 version to be '$2'; the source has '$part' instead"
+        exit 3
+      fi
+    }
+
+    check_version major ${major}
+    check_version minor ${minor}
+    check_version patch ${patch}
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    "-DLLVM_LINK_LLVM_DYLIB=off"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals enableGoldPlugin [
+    # For LLVMgold plugin
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  # For the update script:
+  passthru.monorepoSrc = monorepoSrc;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  propagatedBuildInputs = [];
+
+  ninjaFlags = [ "docs-llvm-man" ];
+  installTargets = [ "install-docs-llvm-man" ];
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..b01363e98aa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,19 @@
+This is the one remaining Polly install dirs related change that hasn't made it
+into upstream yet; previously this patch file also included:
+https://reviews.llvm.org/D117541
+
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..e2122ebf603d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs.patch
@@ -0,0 +1,137 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 471817d68286..c51463304159 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1010,7 +1010,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
+   add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
+     ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
+   install(TARGETS tf_xla_runtime EXPORT LLVMExports
+-    ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
++    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
+   # Once we add more modules, we should handle this more automatically.
+   if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 230620c37027..dd16cab1835e 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -876,8 +876,8 @@ macro(add_llvm_library name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
++              ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+               RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+@@ -2069,7 +2069,7 @@ function(llvm_install_library_symlink name dest type)
+     set(LLVM_LINK_OR_COPY copy)
+   endif()
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir "${CMAKE_INSTALL_BINDIR}")
+   endif()
+@@ -2344,16 +2344,37 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
+     # $ORIGIN is not interpreted at link time by aix ld.
+     # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+     # hardcode the rpath to build/install lib dir first in this mode.
+     # FIXME: update this when there is better solution.
+-    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
++    # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
++    # to `_install_rpath` here.
++    #
++    # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
++    # clang); instead LLVM is its own package and thus lands at its own nix
++    # store path. This makes it so that the default relative rpath (`../lib/`)
++    # does not point at the LLVM shared objects.
++    #
++    # More discussion here:
++    #   - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
++    #   - https://reviews.llvm.org/D146918 (16.0.5+)
++    #
++    # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
++    # no potential that this will result in us pulling in the "wrong" LLVM.
++    # Adding this to the build rpath means we aren't forced to use
++    # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
++    # dir, pre-install, will have the right rpath for LLVM).
++    #
++    # As noted in the differential above, an alternative solution is to have
++    # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
++    # `CMAKE_INSTALL_RPATH`.
++    set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 891c9e6d618c..8d963f3b0069 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -147,9 +147,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index d99af79aa38e..21e794224b99 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
+   )
+ list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
+ 
+-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
++extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_LIBRARY_DIRS
+   "${LLVM_CONFIG_LIBRARY_DIR}"
+   # FIXME: Should there be other entries here?
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index 370005cd8d7d..7e790bc52111 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,7 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
+ #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
+ #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index e86eb2b44b10..f63e207e792e 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
+       sys::fs::make_absolute(ActivePrefix, Path);
+       ActiveBinDir = std::string(Path.str());
+     }
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
++    {
++      SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
++      sys::fs::make_absolute(ActivePrefix, Path);
++      ActiveLibDir = std::string(Path.str());
++    }
+     {
+       SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
+       sys::fs::make_absolute(ActivePrefix, Path);
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/lit-shell-script-runner-set-dyld-library-path.patch b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/lit-shell-script-runner-set-dyld-library-path.patch
new file mode 100644
index 000000000000..82b7b21c55fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/lit-shell-script-runner-set-dyld-library-path.patch
@@ -0,0 +1,17 @@
+diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
+index 0242e0b75af3..d732011306f7 100644
+--- a/utils/lit/lit/TestRunner.py
++++ b/utils/lit/lit/TestRunner.py
+@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
+             f.write('@echo off\n')
+         f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
+     else:
++        # This env var is *purged* when invoking subprocesses so we have to
++        # manually set it from within the bash script in order for the commands
++        # in run lines to see this var:
++        if "DYLD_LIBRARY_PATH" in test.config.environment:
++            f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
++
+         for i, ln in enumerate(commands):
+             match = re.match(kPdbgRegex, ln)
+             if match:
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..d4ccb2ae9822
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,80 @@
+diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py
+index 81e8dc04acea..479ff95681e2 100644
+--- a/test/Unit/lit.cfg.py
++++ b/test/Unit/lit.cfg.py
+@@ -3,6 +3,7 @@
+ # Configuration file for the 'lit' test runner.
+ 
+ import os
++import platform
+ import subprocess
+ 
+ import lit.formats
+@@ -55,3 +56,26 @@ if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):
+ # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
+ if sys.platform == "win32" and "SYSTEMDRIVE" in os.environ:
+     config.environment["SYSTEMDRIVE"] = os.environ["SYSTEMDRIVE"]
++
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
++        yield "LD_LIBRARY_PATH"
++    elif platform.system() == "Darwin":
++        yield "DYLD_LIBRARY_PATH"
++    elif platform.system() == "Windows":
++        yield "PATH"
++    elif platform.system() == "AIX":
++        yield "LIBPATH"
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = os.path.pathsep.join(
++        (config.shlibdir,
++         config.environment.get(shlibpath_var, '')))
++    config.environment[shlibpath_var] = shlibpath
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+diff --git a/test/lit.cfg.py b/test/lit.cfg.py
+index 75a38b4c5dad..856fc75c9d74 100644
+--- a/test/lit.cfg.py
++++ b/test/lit.cfg.py
+@@ -42,6 +42,26 @@ llvm_config.with_environment("PATH", config.llvm_tools_dir, append_path=True)
+ llvm_config.with_system_environment(
+     ["HOME", "INCLUDE", "LIB", "TMP", "TEMP"])
+ 
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
++        yield "LD_LIBRARY_PATH"
++    elif platform.system() == "Darwin":
++        yield "DYLD_LIBRARY_PATH"
++    elif platform.system() == "Windows":
++        yield "PATH"
++    elif platform.system() == "AIX":
++        yield "LIBPATH"
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = config.llvm_shlib_dir
++    llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True)
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+ 
+ # Set up OCAMLPATH to include newly built OCaml libraries.
+ top_ocaml_lib = os.path.join(config.llvm_lib_dir, "ocaml")
+@@ -318,7 +338,7 @@ def have_cxx_shared_library():
+ 
+     try:
+         readobj_cmd = subprocess.Popen(
+-            [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE
++            [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE, env=config.environment
+         )
+     except OSError:
+         print("could not exec llvm-readobj")
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..1354ad267314
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,24 @@
+diff --git a/tools/polly/test/lit.cfg b/tools/polly/test/lit.cfg
+index 41e3a589c61e..09f3b17498b0 100644
+--- a/tools/polly/test/lit.cfg
++++ b/tools/polly/test/lit.cfg
+@@ -36,9 +36,17 @@ base_paths = [config.llvm_tools_dir, config.environment['PATH']]
+ path = os.path.pathsep.join(base_paths + config.extra_paths)
+ config.environment['PATH'] = path
+ 
++# (Copied from polly/test/Unit/lit.cfg)
++if platform.system() == 'Darwin':
++    shlibpath_var = 'DYLD_LIBRARY_PATH'
++elif platform.system() == 'Windows':
++    shlibpath_var = 'PATH'
++else:
++    shlibpath_var = 'LD_LIBRARY_PATH'
++
+ path = os.path.pathsep.join((config.llvm_libs_dir,
+-                              config.environment.get('LD_LIBRARY_PATH','')))
+-config.environment['LD_LIBRARY_PATH'] = path
++                              config.environment.get(shlibpath_var,'')))
++config.environment[shlibpath_var] = path
+ 
+ llvm_config.use_default_substitutions()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/default.nix
new file mode 100644
index 000000000000..d51335436ad2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, llvm_meta
+, monorepoSrc
+, runCommand
+, cmake
+, ninja
+, llvm
+, targetLlvm
+, lit
+, clang-unwrapped
+, perl
+, pkg-config
+, xcbuild
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./fix-find-tool.patch
+    ./gnu-install-dirs.patch
+    ./run-lit-directly.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
+
+  # Unsup:Pass:XFail:Fail
+  # 26:267:16:8
+  doCheck = false;
+  checkTarget = "check-openmp";
+
+  preCheck = ''
+    patchShebangs ../tools/archer/tests/deflake.bash
+  '';
+
+  cmakeFlags = [
+    "-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
+    "-DOPT_TOOL=${llvm}/bin/opt"
+    "-DLINK_TOOL=${llvm}/bin/llvm-link"
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/openmp/fix-find-tool.patch b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/fix-find-tool.patch
new file mode 100644
index 000000000000..b7f51196f7ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/fix-find-tool.patch
@@ -0,0 +1,17 @@
+diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
+index 630947abec7e..9f032dc7bd3f 100644
+--- a/libomptarget/DeviceRTL/CMakeLists.txt
++++ b/libomptarget/DeviceRTL/CMakeLists.txt
+@@ -27,10 +27,10 @@ endif()
+ if (LLVM_DIR)
+   # Builds that use pre-installed LLVM have LLVM_DIR set.
+   # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
+-  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
+   find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+   find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+-  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
+   if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
+     libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
+     return()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/openmp/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/gnu-install-dirs.patch
new file mode 100644
index 000000000000..77a93208832a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b6ddbe90516d..311ab1d50e7f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
+   set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
+     "Suffix of lib installation directory, e.g. 64 => lib64")
+   # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
+-  set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
+ 
+   # Group test settings.
+   set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
+@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
+ else()
+   set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
+   # If building in tree, we honor the same install suffix LLVM uses.
+-  set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ 
+   if (NOT MSVC)
+     set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/openmp/run-lit-directly.patch b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/run-lit-directly.patch
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/openmp/run-lit-directly.patch
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..e8a2a4bd0db1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/clang/default.nix
@@ -0,0 +1,140 @@
+{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
+, buildLlvmTools
+, 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 ]
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++11"
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+    ] ++ 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
+      ./gnu-install-dirs.patch
+      (substituteAll {
+        src = ../../clang-6-10-LLVMgold-path.patch;
+        libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace tools/extra/clangd/CMakeLists.txt \
+        --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      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,scan-view}
+      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
+      mv $out/share/scan-view/*.py $python/share/scan-view
+      rm $out/bin/c-index-test
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/clang-tblgen $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // 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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..625cbcc72361
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/clang/gnu-install-dirs.patch
@@ -0,0 +1,278 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 60937aa9db38..45522ff32998 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,6 +9,8 @@ endif()
+ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+   project(Clang)
+ 
++  include(GNUInstallDirs)
++
+   # Rely on llvm-config.
+   set(CONFIG_OUTPUT)
+   if(LLVM_CONFIG)
+@@ -413,7 +415,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/clang include/clang-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -423,7 +425,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT clang-headers
+     FILES_MATCHING
+     PATTERN "CMakeFiles" EXCLUDE
+@@ -442,7 +444,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   endif()
+ 
+   install(PROGRAMS utils/bash-autocomplete.sh
+-    DESTINATION share/clang
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+     )
+ endif()
+ 
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index cbd618e18afb..63ba43f18e64 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -109,9 +109,9 @@ macro(add_clang_library name)
+       install(TARGETS ${name}
+         COMPONENT ${name}
+         ${export_to_clangtargets}
+-        LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-        ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-        RUNTIME DESTINATION bin)
++        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+         add_llvm_install_targets(install-${name}
+@@ -155,7 +155,7 @@ macro(add_clang_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_clangtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT LLVM_ENABLE_IDE)
+@@ -170,7 +170,7 @@ endmacro()
+ macro(add_clang_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+ 
+ function(clang_target_link_libraries target type)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index a3c0b08fa364..aa4215c0999c 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -185,7 +185,7 @@ set_target_properties(clang-resource-headers PROPERTIES
+   FOLDER "Misc"
+   RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
+ 
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+ 
+ install(
+   FILES ${files} ${generated_files}
+diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
+index ceef4b08637c..8efad5520ca4 100644
+--- a/tools/c-index-test/CMakeLists.txt
++++ b/tools/c-index-test/CMakeLists.txt
+@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
+        "@executable_path/../../lib")
+   else()
+-    set(INSTALL_DESTINATION bin)
++    set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
+   endif()
+ 
+   install(TARGETS c-index-test
+diff --git a/tools/clang-check/CMakeLists.txt b/tools/clang-check/CMakeLists.txt
+index 4576d78bcfb4..7c3b302d8d59 100644
+--- a/tools/clang-check/CMakeLists.txt
++++ b/tools/clang-check/CMakeLists.txt
+@@ -21,4 +21,4 @@ clang_target_link_libraries(clang-check
+   )
+ 
+ install(TARGETS clang-check
+-  RUNTIME DESTINATION bin)
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/tools/clang-extdef-mapping/CMakeLists.txt b/tools/clang-extdef-mapping/CMakeLists.txt
+index 4798bdb71ad0..02d07b9982ac 100644
+--- a/tools/clang-extdef-mapping/CMakeLists.txt
++++ b/tools/clang-extdef-mapping/CMakeLists.txt
+@@ -18,4 +18,4 @@ clang_target_link_libraries(clang-extdef-mapping
+   )
+ 
+ install(TARGETS clang-extdef-mapping
+-  RUNTIME DESTINATION bin)
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt
+index 35ecdb11253c..d77d75de0094 100644
+--- a/tools/clang-format/CMakeLists.txt
++++ b/tools/clang-format/CMakeLists.txt
+@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
+ endif()
+ 
+ install(PROGRAMS clang-format-bbedit.applescript
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-diff.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format-sublime.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS clang-format.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-format)
+ install(PROGRAMS git-clang-format
+-  DESTINATION bin
++  DESTINATION ${CMAKE_INSTALL_BINDIR}
+   COMPONENT clang-format)
+diff --git a/tools/clang-offload-bundler/CMakeLists.txt b/tools/clang-offload-bundler/CMakeLists.txt
+index 465bef040a6c..729369ed9429 100644
+--- a/tools/clang-offload-bundler/CMakeLists.txt
++++ b/tools/clang-offload-bundler/CMakeLists.txt
+@@ -22,4 +22,4 @@ clang_target_link_libraries(clang-offload-bundler
+   ${CLANG_OFFLOAD_BUNDLER_LIB_DEPS}
+   )
+ 
+-install(TARGETS clang-offload-bundler RUNTIME DESTINATION bin)
++install(TARGETS clang-offload-bundler RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt
+index cda8e29ec5b1..0134d8ccd70b 100644
+--- a/tools/clang-rename/CMakeLists.txt
++++ b/tools/clang-rename/CMakeLists.txt
+@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename
+   )
+ 
+ install(PROGRAMS clang-rename.py
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+ install(PROGRAMS clang-rename.el
+-  DESTINATION share/clang
++  DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
+   COMPONENT clang-rename)
+diff --git a/tools/diagtool/CMakeLists.txt b/tools/diagtool/CMakeLists.txt
+index a95444be40ee..136d96d9bf5b 100644
+--- a/tools/diagtool/CMakeLists.txt
++++ b/tools/diagtool/CMakeLists.txt
+@@ -21,7 +21,7 @@ clang_target_link_libraries(diagtool
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(TARGETS diagtool
+     COMPONENT diagtool
+-    RUNTIME DESTINATION bin)
++    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+   if (NOT LLVM_ENABLE_IDE)
+     add_llvm_install_targets(install-diagtool
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 613ead1a36b6..e5c7bf27f739 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -137,7 +137,7 @@ endif()
+ if(INTERNAL_INSTALL_PREFIX)
+   set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
+ else()
+-  set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
++  set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ endif()
+ 
+ install(DIRECTORY ../../include/clang-c
+@@ -168,7 +168,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
+index 380379300b09..adfd58ed5f7d 100644
+--- a/tools/scan-build/CMakeLists.txt
++++ b/tools/scan-build/CMakeLists.txt
+@@ -41,7 +41,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                          ${CMAKE_BINARY_DIR}/bin/
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+-    install(PROGRAMS bin/${BinFile} DESTINATION bin)
++    install(PROGRAMS bin/${BinFile} DESTINATION ${CMAKE_INSTALL_BINDIR})
+   endforeach()
+ 
+   foreach(LibexecFile ${LibexecFiles})
+@@ -53,7 +53,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                          ${CMAKE_BINARY_DIR}/libexec/
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
+-    install(PROGRAMS libexec/${LibexecFile} DESTINATION libexec)
++    install(PROGRAMS libexec/${LibexecFile} DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
+   endforeach()
+ 
+   foreach(ManPage ${ManPages})
+@@ -77,7 +77,7 @@ if(CLANG_INSTALL_SCANBUILD)
+                          ${CMAKE_BINARY_DIR}/share/scan-build/
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
+-    install(FILES share/scan-build/${ShareFile} DESTINATION share/scan-build)
++    install(FILES share/scan-build/${ShareFile} DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build)
+   endforeach()
+ 
+   add_custom_target(scan-build ALL DEPENDS ${Depends})
+diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
+index b305ca562a72..554bcb379061 100644
+--- a/tools/scan-view/CMakeLists.txt
++++ b/tools/scan-view/CMakeLists.txt
+@@ -21,7 +21,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                          ${CMAKE_BINARY_DIR}/bin/
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+-    install(PROGRAMS bin/${BinFile} DESTINATION bin)
++    install(PROGRAMS bin/${BinFile} DESTINATION ${CMAKE_INSTALL_BINDIR})
+   endforeach()
+ 
+   foreach(ShareFile ${ShareFiles})
+@@ -33,7 +33,7 @@ if(CLANG_INSTALL_SCANVIEW)
+                          ${CMAKE_BINARY_DIR}/share/scan-view/
+                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
+     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
+-    install(FILES share/${ShareFile} DESTINATION share/scan-view)
++    install(FILES share/${ShareFile} DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view)
+   endforeach()
+ 
+   add_custom_target(scan-view ALL DEPENDS ${Depends})
+diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt
+index 5573009d343a..24b3a90f233f 100644
+--- a/utils/hmaptool/CMakeLists.txt
++++ b/utils/hmaptool/CMakeLists.txt
+@@ -9,7 +9,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
+                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${CLANG_HMAPTOOL})
+ 
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
+-install(PROGRAMS ${CLANG_HMAPTOOL} DESTINATION bin)
++install(PROGRAMS ${CLANG_HMAPTOOL} DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ add_custom_target(hmaptool ALL DEPENDS ${Depends})
+ set_target_properties(hmaptool PROPERTIES FOLDER "Utils")
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/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix
new file mode 100644
index 000000000000..4dddbc67d7cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix
@@ -0,0 +1,123 @@
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+  src = fetch "compiler-rt" "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2";
+
+  nativeBuildInputs = [ cmake python3 libllvm.dev ];
+  buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-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}"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
+    "-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)}"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    # The compiler-rt build infrastructure sniffs supported platforms on Darwin
+    # and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
+    # when it tries to use libc++ and libc++api for i386.
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
+    ../../common/compiler-rt/glibc.patch
+    ../../common/compiler-rt/7-12-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ./gnu-install-dirs.patch
+    ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch
+    # Fix build on armv6l
+    ../../common/compiler-rt/armv6-mcr-dmb.patch
+    ../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
+    ../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
+  ] ++ lib.optional stdenv.hostPlatform.isAarch32 ./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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + 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>" ""
+  '';
+
+  preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
+    cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + 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
+  '' + lib.optionalString doFakeLibgcc ''
+    ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    broken = stdenv.hostPlatform.system == "aarch64-darwin"
+      # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+      # https://reviews.llvm.org/D43106#1019077
+      || (stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang);
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..9f63bef2f861
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,117 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f26ae25ada30..8ba536afdccc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,6 +12,7 @@ endif()
+ # Check if compiler-rt is built as a standalone project.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
+   project(CompilerRT C CXX ASM)
++  include(GNUInstallDirs)
+   set(COMPILER_RT_STANDALONE_BUILD TRUE)
+   set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ endif()
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index f7ee932f214f..ef94a97c4be9 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -488,7 +488,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
+   add_custom_target(${target_name} DEPENDS ${dst_file})
+   # Install in Clang resource directory.
+   install(FILES ${file_name}
+-    DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
+     COMPONENT ${component})
+   add_dependencies(${component} ${target_name})
+ 
+@@ -505,7 +505,7 @@ macro(add_compiler_rt_script name)
+   add_custom_target(${name} DEPENDS ${dst})
+   install(FILES ${dst}
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+-    DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin)
++    DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR})
+ endmacro(add_compiler_rt_script src name)
+ 
+ # Builds custom version of libc++ and installs it in <prefix>.
+diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
+index b50d55b56940..7e5729ad9c8e 100644
+--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
++++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
+@@ -386,7 +386,7 @@ macro(darwin_add_embedded_builtin_libraries)
+     set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
+       ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+     set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
+-      ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
++      ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded)
+       
+     set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
+     set(CFLAGS_i386 "-march=pentium")
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index 6e672b1e1818..64999709958e 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -371,7 +371,7 @@ endfunction()
+ function(get_compiler_rt_install_dir arch install_dir)
+   if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+     get_compiler_rt_target(${arch} target)
+-    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
++    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE)
+   else()
+     set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
+   endif()
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index cef0e0d73d87..db33fb028287 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -55,11 +55,11 @@ if (LLVM_TREE_AVAILABLE)
+ else()
+     # Take output dir and install path from the user.
+   set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
+-    "Path where built compiler-rt libraries should be stored.")
++    "Path where built compiler-rt build artifacts should be stored.")
+   set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
+     "Path where built compiler-rt executables should be stored.")
+-  set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH
+-    "Path where built compiler-rt libraries should be installed.")
++  set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
++    "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.")
+   option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
+   option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF)
+   # Use a host compiler to compile/link tests.
+@@ -87,7 +87,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+   set(COMPILER_RT_LIBRARY_OUTPUT_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+   set(COMPILER_RT_LIBRARY_INSTALL_DIR
+-    ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
++    ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR})
+ endif()
+ 
+ if(APPLE)
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index 38bd6e41a912..2092d0d08247 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -50,12 +50,12 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
+ install(FILES ${SANITIZER_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer)
+ # Install xray headers.
+ install(FILES ${XRAY_HEADERS}
+   COMPONENT compiler-rt-headers
+   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+-  DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
++  DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray)
+ 
+ if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
+   add_custom_target(install-compiler-rt-headers
+diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt
+index b3ae713cf02c..52b364b900f5 100644
+--- a/lib/dfsan/CMakeLists.txt
++++ b/lib/dfsan/CMakeLists.txt
+@@ -54,4 +54,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
+                    DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
+ add_dependencies(dfsan dfsan_abilist)
+ install(FILES ${dfsan_abilist_filename}
+-        DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
++        DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})
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..a6274c8b2b9c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/default.nix
@@ -0,0 +1,273 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, preLibcCrossHeaders
+, 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
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM version's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+}:
+
+let
+  release_version = "9.0.1";
+  version = release_version; # differentiating these is important for rc's
+
+  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";
+
+  inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libllvm-polly = callPackage ./llvm {
+      inherit llvm_meta;
+      enablePolly = true;
+    };
+
+    llvm-polly = tools.libllvm-polly.lib // { outputSpecified = false; };
+
+    libclang = callPackage ./clang {
+      inherit clang-tools-extra_src llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    clang-polly-unwrapped = callPackage ./clang {
+      inherit llvm_meta;
+      inherit clang-tools-extra_src;
+      libllvm = tools.libllvm-polly;
+      enablePolly = true;
+    };
+
+    # disabled until recommonmark supports sphinx 3
+    #llvm-manpages = lowPrio (tools.libllvm.override {
+    #  enableManpages = true;
+    #  python3 = pkgs.python3;  # don't use python-boot
+    #});
+
+    clang-manpages = lowPrio (tools.libclang.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
+      else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ./lldb {
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        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
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+        echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+        echo "-lunwind" >> $out/nix-support/cc-ldflags
+      '' + lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        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;
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands0 cc;
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    };
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libcxxabi = callPackage ./libcxxabi {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+               else stdenv;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/libcxx/default.nix
new file mode 100644
index 000000000000..ec09998ed37d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libcxx/default.nix
@@ -0,0 +1,88 @@
+{ lib, stdenv, llvm_meta, fetch, cmake, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+assert stdenv.isDarwin -> cxxabi.pname == "libcxxabi";
+
+stdenv.mkDerivation {
+  pname = "libcxx";
+  inherit version;
+
+  src = fetch "libcxx" "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  # Prevent errors like "error: 'foo' is unavailable: introduced in macOS yy.zz"
+  postPatch = ''
+    substituteInPlace include/__config \
+      --replace "#    define _LIBCPP_USE_AVAILABILITY_APPLE" ""
+  '';
+
+  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 ]
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3
+    ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ cxxabi ];
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=${cxxabi.pname}"
+  ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optional (cxxabi.pname == "libcxxabi") "-DLIBCXX_LIBCXXABI_LIB_PATH=${cxxabi}/lib"
+    ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  preInstall = lib.optionalString (stdenv.isDarwin) ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      baseName=$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))
+      installName="$out/lib/$baseName"
+      abiName=$(echo "$baseName" | sed -e 's/libc++/libc++abi/')
+
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other ${cxxabi}/lib/$abiName $file
+      done
+    done
+  '';
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..424488bd2e52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,99 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ec1869ddc7ae..a1c040235c8d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,6 +26,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+   project(libcxx CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxx)
+   set(PACKAGE_VERSION 9.0.1)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -416,7 +418,7 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+     string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
+@@ -424,10 +426,10 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+   set(LIBCXX_HEADER_DIR  ${LLVM_BINARY_DIR})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+-  set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
++  set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
+ endif()
+ 
+ file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index 10f100f7f0fb..95ed3978ab73 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -61,7 +61,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
+ 
+         if (LIBCXX_INSTALL_HEADERS)
+           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
+-            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
++            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}
+             COMPONENT cxx-headers
+             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+             )
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index 7cbf82caa81f..7cbde7accd78 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -243,7 +243,7 @@ if (LIBCXX_INSTALL_HEADERS)
+   foreach(file ${files})
+     get_filename_component(dir ${file} DIRECTORY)
+     install(FILES ${file}
+-      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
++      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dir}
+       COMPONENT ${CXX_HEADER_TARGET}
+       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+     )
+@@ -252,7 +252,7 @@ if (LIBCXX_INSTALL_HEADERS)
+   if (LIBCXX_NEEDS_SITE_CONFIG)
+     # Install the generated header as __config.
+     install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
+-      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
++      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1
+       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+       RENAME __config
+       COMPONENT ${CXX_HEADER_TARGET})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 31cd24333a5e..a419cef662b0 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -437,21 +437,21 @@ if (LIBCXX_INSTALL_LIBRARY)
+     install(TARGETS cxx_shared
+       ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+       LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+   endif()
+ 
+   if (LIBCXX_INSTALL_STATIC_LIBRARY)
+     install(TARGETS cxx_static
+       ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+       LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+   endif()
+ 
+   if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
+     install(TARGETS ${LIBCXX_INSTALL_TARGETS} ${experimental_lib}
+       LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+       ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+-      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
++      RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+   endif()
+ 
+   # NOTE: This install command must go after the cxx install command otherwise
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/default.nix
new file mode 100644
index 000000000000..24d89b1a2da5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/default.nix
@@ -0,0 +1,85 @@
+{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1b4aiaa8cirx52vk2p5kfk57qmbqf1ipb4nqnjhdgqps9jm7iyg8";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    cmakeFlags+=" -DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../../libcxx-0001-musl-hacks.patch}
+  '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d $(ls -d llvm-*) -i ${../../common/libcxxabi/wasm.patch}
+  '';
+
+  patches = [
+    ../../common/libcxxabi/no-threads.patch
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    for file in lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+
+      # Fix up the install name. Preserve the basename, just replace the path.
+      installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
+
+      # 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
+      ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
+
+      # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
+      # libcxxabi to sometimes link against a different version of itself.
+      # Here we simply make that second reference point to ourselves.
+      for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
+        ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
+      done
+    done
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..70b41a6ff531
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index aa0b124fc3c4..d74373f465c5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,6 +20,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+   project(libcxxabi CXX C)
+ 
++  include(GNUInstallDirs)
++
+   set(PACKAGE_NAME libcxxabi)
+   set(PACKAGE_VERSION 9.0.1)
+   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -181,17 +183,17 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+     string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ else()
+   set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/libunwind/default.nix
new file mode 100644
index 000000000000..9a78025d71d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libunwind/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, llvm_meta, version, fetch, cmake, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  src = fetch pname "1wb02ha3gl6p0a321hwpll74pz5qvjr11xmjqx62g288f1m10njk";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..12171bb51550
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index df68491d686e..3b53267ae464 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,6 +18,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
+   project(libunwind)
+ 
++  include(GNUInstallDirs)
++
+   # Rely on llvm-config.
+   set(CONFIG_OUTPUT)
+   if(NOT LLVM_CONFIG_PATH)
+@@ -189,17 +191,17 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+ 
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+     string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+   endif()
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
+ else()
+   set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
++  set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
+ endif()
+ 
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/lld/default.nix
new file mode 100644
index 000000000000..bf79c7597829
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lld/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, fetch
+, cmake
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  src = fetch pname "10hckfxpapfnh6y9apjiya2jpw9nmbbmh8ayijx89mrg7snjn9l6";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..232f5cbac9dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lld/gnu-install-dirs.patch
@@ -0,0 +1,68 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 641f71c114ae..9d44c1463aff 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+   set(CMAKE_INCLUDE_CURRENT_DIR ON)
+   set(LLD_BUILT_STANDALONE TRUE)
+ 
++  include(GNUInstallDirs)
++
+   find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
+   if(NOT LLVM_CONFIG_PATH)
+     message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
+@@ -202,7 +204,7 @@ include_directories(BEFORE
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index fa48b428d26b..e7967aad3ceb 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -20,9 +20,9 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      RUNTIME DESTINATION bin)
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+       add_llvm_install_targets(install-${name}
+@@ -54,7 +54,7 @@ macro(add_lld_tool name)
+ 
+     install(TARGETS ${name}
+       ${export_to_lldtargets}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       COMPONENT ${name})
+ 
+     if(NOT CMAKE_CONFIGURATION_TYPES)
+@@ -69,5 +69,5 @@ endmacro()
+ macro(add_lld_symlink name dest)
+   add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+   # Always generate install targets
+-  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++  llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt
+index a15e296e31df..654c2cfdb9c0 100644
+--- a/tools/lld/CMakeLists.txt
++++ b/tools/lld/CMakeLists.txt
+@@ -17,7 +17,7 @@ target_link_libraries(lld
+   )
+ 
+ install(TARGETS lld
+-  RUNTIME DESTINATION bin)
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ if(NOT LLD_SYMLINKS_TO_CREATE)
+   set(LLD_SYMLINKS_TO_CREATE lld-link ld.lld ld64.lld wasm-ld)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lldb/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/lldb/default.nix
new file mode 100644
index 000000000000..49cc0a0d42a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lldb/default.nix
@@ -0,0 +1,117 @@
+{ lib, stdenv, llvm_meta
+, fetch
+, fetchpatch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, libllvm
+, libclang
+, python3
+, version
+, darwin
+, makeWrapper
+, perl
+, lit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch pname "02gb3fbz09kyw8n71218v5v77ip559x3gqbcp8y3w6n3jpbryywa";
+
+  patches = [
+    ./procfs.patch
+    ./gnu-install-dirs.patch
+
+    # Fix darwin build
+    (fetchpatch {
+      name = "lldb-use-system-debugserver-fix.patch";
+      url = "https://github.com/llvm-mirror/lldb/commit/be770754cc43da22eacdb70c6203f4582eeb011f.diff";
+      sha256 = "sha256-tKkk6sn//0Hu0nlzoKWs5fXMWc+O2JAWOEJ1ZnaLuVU=";
+      excludes = [ "packages/*" ];
+      postFetch = ''
+        substituteInPlace "$out" --replace add_lldb_tool_subdirectory add_subdirectory
+      '';
+    })
+    ./lldb-gdb-remote-no-libcompress.patch
+  ];
+
+  outputs = [ "out" "lib" "dev" ];
+
+  nativeBuildInputs = [
+    cmake python3 which swig lit makeWrapper
+  ] ++ lib.optionals stdenv.isDarwin [
+    # for scripts/generate-vers.pl
+    perl
+  ];
+
+  buildInputs = [
+    ncurses zlib libedit libxml2 libllvm
+  ] ++ 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
+    darwin.apple_sdk.frameworks.DebugSymbols
+  ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}"
+    "-DClang_DIR=${libclang.dev}/lib/cmake"
+    "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit"
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Building debugserver requires the proprietary libcompression
+    "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON"
+  ] ++ lib.optionals doCheck [
+    "-DLLDB_TEST_C_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
+    "-DLLDB_TEST_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"
+  ];
+
+  doCheck = false;
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    if [ ! -e "$lib/${python3.sitePackages}/lldb/_lldb.so" ] ; then
+        echo "ERROR: python files not installed where expected!";
+        return 1;
+    fi
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/
+
+    # 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/llvm-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+  '';
+
+  meta = llvm_meta // {
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+    homepage = "https://lldb.llvm.org/";
+    description = "A next-generation high-performance debugger";
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/lldb/gnu-install-dirs.patch
new file mode 100644
index 000000000000..6ceb29ced92f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lldb/gnu-install-dirs.patch
@@ -0,0 +1,105 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5d52f6450657..a05130cf80b9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,6 +14,8 @@ set(CMAKE_MODULE_PATH
+ # If we are not building as part of LLVM, build LLDB as a standalone project,
+ # using LLVM as an external library.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
++  include(GNUInstallDirs)
++
+   include(LLDBStandalone)
+ endif()
+ 
+diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
+index 4c99278c583b..36d3640a6afc 100644
+--- a/cmake/modules/AddLLDB.cmake
++++ b/cmake/modules/AddLLDB.cmake
+@@ -94,13 +94,13 @@ function(add_lldb_library name)
+   endif()
+ 
+   if(PARAM_SHARED)
+-    set(install_dest lib${LLVM_LIBDIR_SUFFIX})
++    set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+     if(PARAM_INSTALL_PREFIX)
+       set(install_dest ${PARAM_INSTALL_PREFIX})
+     endif()
+     # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
+     install(TARGETS ${name} COMPONENT ${name}
+-      RUNTIME DESTINATION bin
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       LIBRARY DESTINATION ${install_dest}
+       ARCHIVE DESTINATION ${install_dest}
+       FRAMEWORK DESTINATION ${install_dest})
+diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
+index e1a133709ff2..357b4bb4492a 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -335,7 +335,7 @@ include_directories(BEFORE
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+@@ -345,7 +345,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
+     COMPONENT lldb-headers
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
+index b5316540fdf3..3c3c882d503f 100644
+--- a/tools/intel-features/CMakeLists.txt
++++ b/tools/intel-features/CMakeLists.txt
+@@ -64,4 +64,4 @@ if (NOT LLDB_DISABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+ endif()
+ 
+ install(TARGETS lldbIntelFeatures
+-  LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cdf22c4..d56fc6a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -146,7 +146,7 @@ if (NOT LLDB_DISABLE_PYTHON)
+                --cfgBldDir=${lldb_scripts_dir}
+                --prefix=${CMAKE_BINARY_DIR}
+                --cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}
+-               --lldbLibDir=lib${LLVM_LIBDIR_SUFFIX}
++               --lldbLibDir=${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
+                ${use_python_wrapper_from_src_dir}
+                ${use_six_py_from_system}
+         VERBATIM
+diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
+index b726797..1f057ac 100644
+--- a/cmake/modules/LLDBStandalone.cmake
++++ b/cmake/modules/LLDBStandalone.cmake
+@@ -95,7 +95,7 @@ include_directories(
+   "${CLANG_INCLUDE_DIRS}")
+
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/lib${LLVM_LIBDIR_SUFFIX})
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
+
+ set(LLDB_BUILT_STANDALONE 1)
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index 7de7973..b70aecc 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -50,7 +50,8 @@ if(NOT LLDB_BUILD_FRAMEWORK)
+     OUTPUT_STRIP_TRAILING_WHITESPACE)
+   execute_process(
+     COMMAND ${PYTHON_EXECUTABLE}
+-        -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(True, False, ''))"
++        -c "import distutils.sysconfig, sys; print(distutils.sysconfig.get_python_lib(True, False, sys.argv[1]))"
++        ${CMAKE_INSTALL_LIBDIR}/../
+     OUTPUT_VARIABLE SWIG_INSTALL_DIR
+     OUTPUT_STRIP_TRAILING_WHITESPACE)
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lldb/lldb-gdb-remote-no-libcompress.patch b/nixpkgs/pkgs/development/compilers/llvm/9/lldb/lldb-gdb-remote-no-libcompress.patch
new file mode 100644
index 000000000000..ff2dcd301fa3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lldb/lldb-gdb-remote-no-libcompress.patch
@@ -0,0 +1,17 @@
+diff -ru a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp	2019-12-11 14:15:30.000000000 -0500
++++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp	2021-11-26 23:44:28.000000000 -0500
+@@ -36,13 +36,6 @@
+ 
+ #include "llvm/ADT/StringSwitch.h"
+ 
+-#if defined(__APPLE__)
+-#ifndef HAVE_LIBCOMPRESSION
+-#define HAVE_LIBCOMPRESSION
+-#endif
+-#include <compression.h>
+-#endif
+-
+ using namespace lldb;
+ using namespace lldb_private;
+ using namespace lldb_private::process_gdb_remote;
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/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix
new file mode 100644
index 000000000000..c0ef7801c348
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix
@@ -0,0 +1,344 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, fetch
+, fetchpatch
+, cmake
+, python3
+, libffi
+, enableGoldPlugin ? libbfd.hasPluginAPI
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isRiscV)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+# broken for the armv7l builder
+, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
+, enablePolly ? false
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in python3.withPackages checkDeps
+  else python3;
+
+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" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake python ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  patches = [
+    # When cross-compiling we configure llvm-config-native with an approximation
+    # of the flags used for the normal LLVM build. To avoid the need for building
+    # a native libLLVM.so (which would fail) we force llvm-config to be linked
+    # statically against the necessary LLVM components always.
+    ../../llvm-config-link-static.patch
+
+    ./gnu-install-dirs.patch
+    # Force a test to evaluate the saved benchmark for a CPU for which LLVM has
+    # an execution model. See NixOS/nixpkgs#119673.
+    ../../exegesis-force-bdver2.patch
+
+    # Fix missing includes for GCC 11
+    (fetchpatch {
+      name = "headers-gcc-11.patch";
+      url = "https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1.patch";
+      sha256 = "0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk";
+      stripLen = 1;
+    })
+
+    # Fix invalid std::string(nullptr) for GCC 12
+    (fetchpatch {
+      name = "nvptx-gcc-12.patch";
+      url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
+      sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
+      stripLen = 1;
+    })
+
+    # Fix musl build.
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
+      relative = "llvm";
+      hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
+    })
+  ] ++ lib.optionals enablePolly [
+    ./gnu-install-dirs-polly.patch
+    # Add missing isl header includess required to build LLVM 9 + Polly with clang 16.
+    (fetchpatch {
+      name = "polly-ppcg-isl-headers.patch";
+      url = "https://repo.or.cz/ppcg.git/patch/098ba285306114dc71497f7b51c357f69c9b4472";
+      hash = "sha256-c9L30rDROYAMbUSuaK9U/ixyFMlH/Sa1n+VgLODzSCQ=";
+      extraPrefix = "tools/polly/lib/External/ppcg/";
+      stripLen = 1;
+    })
+  ];
+
+  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/../''${CMAKE_INSTALL_LIBDIR}" ''${extra_libdir})' ""
+  '' + ''
+    # 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}
+  '' + ''
+    # Tweak tests to ignore namespace part of type to support
+    # gcc-12: https://gcc.gnu.org/PR103598.
+    # The change below mangles strings like:
+    #    CHECK-NEXT: Starting llvm::Function pass manager run.
+    # to:
+    #    CHECK-NEXT: Starting {{.*}}Function pass manager run.
+    for f in \
+      test/Other/new-pass-manager.ll \
+      test/Other/new-pm-defaults.ll \
+      test/Other/new-pm-lto-defaults.ll \
+      test/Other/new-pm-thinlto-defaults.ll \
+      test/Other/pass-pipeline-parsing.ll \
+      test/Transforms/Inline/cgscc-incremental-invalidate.ll \
+      test/Transforms/Inline/clear-analyses.ll \
+      test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \
+      test/Transforms/SCCP/ipsccp-preserve-analysis.ll \
+      test/Transforms/SCCP/preserve-analysis.ll \
+      test/Transforms/SROA/dead-inst.ll \
+      test/tools/gold/X86/new-pm.ll \
+      ; do
+      echo "PATCH: $f"
+      substituteInPlace $f \
+        --replace 'Starting llvm::' 'Starting {{.*}}' \
+        --replace 'Finished llvm::' 'Finished {{.*}}'
+    done
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar'
+    )
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=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 (enableGoldPlugin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals (isDarwin) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  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
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // 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 = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/llvm/fix-test-on-non-x86-like-others.patch b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/fix-test-on-non-x86-like-others.patch
new file mode 100644
index 000000000000..e6c2f0406844
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/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/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..7c477c7df58a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,106 @@
+diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
+index 9939097f743e..8cc538da912a 100644
+--- a/tools/polly/CMakeLists.txt
++++ b/tools/polly/CMakeLists.txt
+@@ -2,7 +2,11 @@
+ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   project(Polly)
+   cmake_minimum_required(VERSION 3.4.3)
++endif()
++
++include(GNUInstallDirs)
+ 
++if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+   # Where is LLVM installed?
+   find_package(LLVM CONFIG REQUIRED)
+   set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
+@@ -145,14 +149,14 @@ include_directories(
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN ".svn" EXCLUDE
+     )
+ 
+   install(DIRECTORY ${POLLY_BINARY_DIR}/include/
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     FILES_MATCHING
+     PATTERN "*.h"
+     PATTERN "CMakeFiles" EXCLUDE
+diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
+index 211f95512717..f9e04a4844b6 100644
+--- a/tools/polly/cmake/CMakeLists.txt
++++ b/tools/polly/cmake/CMakeLists.txt
+@@ -79,18 +79,18 @@ file(GENERATE
+ 
+ # Generate PollyConfig.cmake for the install tree.
+ unset(POLLY_EXPORTS)
+-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
++set(POLLY_INSTALL_PREFIX "")
+ set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
++set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
++set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ if (POLLY_BUNDLED_ISL)
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
+-    "${POLLY_INSTALL_PREFIX}/include/polly"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
+     )
+ else()
+   set(POLLY_CONFIG_INCLUDE_DIRS
+-    "${POLLY_INSTALL_PREFIX}/include"
++    "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+     ${ISL_INCLUDE_DIRS}
+     )
+ endif()
+@@ -100,12 +100,12 @@ endif()
+ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
+   get_target_property(tgt_type ${tgt} TYPE)
+   if (tgt_type STREQUAL "EXECUTABLE")
+-    set(tgt_prefix "bin/")
++    set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
+   else()
+-    set(tgt_prefix "lib/")
++    set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
+   endif()
+ 
+-  set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
++  set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
+   file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
+ 
+   if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index e48203871884..5bc8a2a52541 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
+diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
+index 8ffd984e542b..261cc19f3238 100644
+--- a/tools/polly/lib/External/CMakeLists.txt
++++ b/tools/polly/lib/External/CMakeLists.txt
+@@ -274,7 +274,7 @@ if (POLLY_BUNDLED_ISL)
+     install(DIRECTORY
+       ${ISL_SOURCE_DIR}/include/
+       ${ISL_BINARY_DIR}/include/
+-      DESTINATION include/polly
++      DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
+       FILES_MATCHING
+       PATTERN "*.h"
+       PATTERN "CMakeFiles" EXCLUDE
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..380cc3f6df39
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/gnu-install-dirs.patch
@@ -0,0 +1,395 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b9a10685b99f..c2750500df99 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -242,15 +242,21 @@ if (CMAKE_BUILD_TYPE AND
+   message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ endif()
+ 
++include(GNUInstallDirs)
++
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ 
+-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
++set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
++    "Path for binary subdirectory (defaults to 'bin')")
+ mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+ 
+ set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
+     "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
+ mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
+ 
++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
++	"Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
++
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+@@ -534,9 +540,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
+ option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
+ option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
+ 
+-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
++set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
+     CACHE STRING "Doxygen-generated HTML documentation install directory")
+-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
++set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
+     CACHE STRING "OCamldoc-generated HTML documentation install directory")
+ 
+ option (LLVM_BUILD_EXTERNAL_COMPILER_RT
+@@ -1002,7 +1008,7 @@ endif()
+ 
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+   install(DIRECTORY include/llvm include/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1014,7 +1020,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     )
+ 
+   install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
+-    DESTINATION include
++    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+     COMPONENT llvm-headers
+     FILES_MATCHING
+     PATTERN "*.def"
+@@ -1029,13 +1035,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ 
+   if (LLVM_INSTALL_MODULEMAPS)
+     install(DIRECTORY include/llvm include/llvm-c
+-            DESTINATION include
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+             COMPONENT llvm-headers
+             FILES_MATCHING
+             PATTERN "module.modulemap"
+             )
+     install(FILES include/llvm/module.install.modulemap
+-            DESTINATION include/llvm
++            DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
+             COMPONENT llvm-headers
+             RENAME "module.extern.modulemap"
+             )
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 619e986b8aa0..842b4f71d07e 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -697,9 +697,9 @@ macro(add_llvm_library name)
+ 
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              RUNTIME DESTINATION bin COMPONENT ${name})
++              LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+         add_llvm_install_targets(install-${name}
+@@ -930,7 +930,7 @@ macro(add_llvm_example name)
+   endif()
+   add_llvm_executable(${name} ${ARGN})
+   if( LLVM_BUILD_EXAMPLES )
+-    install(TARGETS ${name} RUNTIME DESTINATION examples)
++    install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+   endif()
+   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endmacro(add_llvm_example name)
+@@ -1485,7 +1485,7 @@ function(llvm_install_library_symlink name dest type)
+   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir bin)
+   endif()
+@@ -1501,7 +1501,7 @@ function(llvm_install_library_symlink name dest type)
+   endif()
+ endfunction()
+ 
+-function(llvm_install_symlink name dest)
++function(llvm_install_symlink name dest output_dir)
+   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
+   foreach(path ${CMAKE_MODULE_PATH})
+     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
+@@ -1524,7 +1524,7 @@ function(llvm_install_symlink name dest)
+   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
+ 
+   install(SCRIPT ${INSTALL_SYMLINK}
+-          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
++          CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
+           COMPONENT ${component})
+ 
+   if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
+@@ -1606,7 +1606,8 @@ function(add_llvm_tool_symlink link_name target)
+     endif()
+ 
+     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
+-      llvm_install_symlink(${link_name} ${target})
++      GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
++      llvm_install_symlink(${link_name} ${target} ${output_dir})
+     endif()
+   endif()
+ endfunction()
+@@ -1728,9 +1729,9 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 02bab6846376..eff26adb2efc 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -140,9 +140,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
+index 22e3dcb776aa..ba77b9c195e2 100644
+--- a/cmake/modules/AddSphinxTarget.cmake
++++ b/cmake/modules/AddSphinxTarget.cmake
+@@ -73,7 +73,7 @@ function (add_sphinx_target builder project)
+ 
+       elseif (builder STREQUAL html)
+         string(TOUPPER "${project}" project_upper)
+-        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
++        set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
+             CACHE STRING "HTML documentation install directory for ${project}")
+ 
+         # '/.' indicates: copy the contents of the directory directly into
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index 9cf22b436fa7..486e40010cd8 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
++set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+ 
+ # First for users who use an installed LLVM, create the LLVMExports.cmake file.
+@@ -96,13 +96,13 @@ foreach(p ${_count})
+   set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+ get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+ endforeach(p)
+-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
++set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+ set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
++set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
+ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
+-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
++set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
+ set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
+ configure_file(
+diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
+index 09fed8085c23..aa79f192abf0 100644
+--- a/cmake/modules/LLVMInstallSymlink.cmake
++++ b/cmake/modules/LLVMInstallSymlink.cmake
+@@ -10,7 +10,7 @@ function(install_symlink name target outdir)
+     set(LINK_OR_COPY copy)
+   endif()
+ 
+-  set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
++  set(bindir "${DESTDIR}${outdir}/")
+ 
+   message(STATUS "Creating ${name}")
+ 
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index 91fb5282206f..d2c9fd94d131 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -196,7 +196,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+   Extra suffix to append to the directory where libraries are to be
+   installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+-  to install libraries to ``/usr/lib64``.
++  to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+ 
+ **CMAKE_C_FLAGS**:STRING
+   Extra flags to use when compiling C source files.
+@@ -492,8 +492,8 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
+   The path to install Doxygen-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/doxygen-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
+ 
+ **LLVM_ENABLE_SPHINX**:BOOL
+   If specified, CMake will search for the ``sphinx-build`` executable and will make
+@@ -524,13 +524,33 @@ LLVM-specific variables
+ 
+ **LLVM_INSTALL_SPHINX_HTML_DIR**:STRING
+   The path to install Sphinx-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/html`.
+ 
+ **LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING
+   The path to install OCamldoc-generated HTML documentation to. This path can
+-  either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+-  `share/doc/llvm/ocaml-html`.
++  either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++  `${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html`.
++
++**CMAKE_INSTALL_BINDIR**:STRING
++  The path to install binary tools, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `bin`.
++
++**CMAKE_INSTALL_LIBDIR**:STRING
++  The path to install libraries, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `lib`.
++
++**CMAKE_INSTALL_INCLUDEDIR**:STRING
++  The path to install header files, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `include`.
++
++**CMAKE_INSTALL_DOCDIR**:STRING
++  The path to install documentation, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `share/doc`.
++
++**CMAKE_INSTALL_MANDIR**:STRING
++  The path to install manpage files, relative to the ``CMAKE_INSTALL_PREFIX``.
++  Defaults to `share/man`.
+ 
+ **LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL
+   macOS Only: If enabled CMake will generate a target named
+@@ -710,9 +730,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
+ 
+ This file is available in two different locations.
+ 
+-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
+-  ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
+-  On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
++* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
++  ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
++  installed as part of an installed version of LLVM. This is typically
++  ``cmake/llvm/`` within the lib directory. On Linux, this is typically
++  ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+ 
+ * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
+   ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
+diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
+index 1d5ca3ba92b0..026f5453c1da 100644
+--- a/include/llvm/CMakeLists.txt
++++ b/include/llvm/CMakeLists.txt
+@@ -4,5 +4,5 @@ add_subdirectory(Support)
+ # If we're doing an out-of-tree build, copy a module map for generated
+ # header files into the build area.
+ if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+-  configure_file(module.modulemap.build module.modulemap COPYONLY)
++  configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
+ endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index 3a24d3e974e1..987d82c1bb97 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,10 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
++#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+ #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 7ef7c46a2627..1f71f8b0f820 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -332,12 +332,26 @@ int main(int argc, char **argv) {
+         ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
+   } else {
+     ActivePrefix = CurrentExecPrefix;
+-    ActiveIncludeDir = ActivePrefix + "/include";
+-    SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
+-    sys::fs::make_absolute(ActivePrefix, path);
+-    ActiveBinDir = path.str();
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+-    ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveIncludeDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveBinDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveLibDir = std::string(path.str());
++    }
++    {
++      SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
++      sys::fs::make_absolute(ActivePrefix, path);
++      ActiveCMakeDir = std::string(path.str());
++    }
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
+diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
+index b86e4abd01a7..02ce5773f17d 100644
+--- a/tools/lto/CMakeLists.txt
++++ b/tools/lto/CMakeLists.txt
+@@ -23,7 +23,7 @@ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
+ add_llvm_library(LTO SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS intrinsics_gen)
+ 
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
+-  DESTINATION include/llvm-c
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+   COMPONENT LTO)
+ 
+ if (APPLE)
+diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
+index 19b606933082..27b9f71b3d79 100644
+--- a/tools/opt-viewer/CMakeLists.txt
++++ b/tools/opt-viewer/CMakeLists.txt
+@@ -8,6 +8,6 @@ set (files
+ 
+ foreach (file ${files})
+   install(PROGRAMS ${file}
+-    DESTINATION share/opt-viewer
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
+     COMPONENT opt-viewer)
+ endforeach (file)
+diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
+index e948496c603a..1f4df8a98b10 100644
+--- a/tools/remarks-shlib/CMakeLists.txt
++++ b/tools/remarks-shlib/CMakeLists.txt
+@@ -11,7 +11,7 @@ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports)
+ add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES})
+ 
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
+-  DESTINATION include/llvm-c
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+   COMPONENT Remarks)
+ 
+ if (APPLE)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/openmp/default.nix
new file mode 100644
index 000000000000..7cd9ad761fdf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/openmp/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, llvm_meta
+, fetch
+, cmake
+, llvm
+, targetLlvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/README.md b/nixpkgs/pkgs/development/compilers/llvm/README.md
new file mode 100644
index 000000000000..af5530f5a7d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/README.md
@@ -0,0 +1,79 @@
+## How to upgrade llvm_git
+
+- Run `update-git.py`.
+  This will set the github revision and sha256 for `llvmPackages_git.llvm` to whatever the latest chromium build is using.
+  For a more recent, commit run `nix-prefetch-github` and change the rev and sha256 accordingly.
+
+- That was the easy part.
+  The hard part is updating the patch files.
+
+  The general process is:
+
+  1. Try to build `llvmPackages_git.llvm` and associated packages such as
+     `clang` and `compiler-rt`. You can use the `-L` and `--keep-failed` flags to make
+     debugging patch errors easy, e.g., `nix build .#llvmPackages_git.clang -L --keep-failed`
+
+  2. The build will error out with something similar to this:
+     ```sh
+     ...
+     clang-unstable> patching sources
+     clang-unstable> applying patch /nix/store/nndv6gq6w608n197fndvv5my4a5zg2qi-purity.patch
+     clang-unstable> patching file lib/Driver/ToolChains/Gnu.cpp
+     clang-unstable> Hunk #1 FAILED at 487.
+     clang-unstable> 1 out of 1 hunk FAILED -- saving rejects to file lib/Driver/ToolChains/Gnu.cpp.rej
+     note: keeping build directory '/tmp/nix-build-clang-unstable-2022-25-07.drv-17'
+     error: builder for '/nix/store/zwi123kpkyz52fy7p6v23azixd807r8c-clang-unstable-2022-25-07.drv' failed with exit code 1;
+            last 8 log lines:
+            > unpacking sources
+            > unpacking source archive /nix/store/mrxadx11wv1ckjr2208qgxp472pmmg6g-clang-src-unstable-2022-25-07
+            > source root is clang-src-unstable-2022-25-07/clang
+            > patching sources
+            > applying patch /nix/store/nndv6gq6w608n197fndvv5my4a5zg2qi-purity.patch
+            > patching file lib/Driver/ToolChains/Gnu.cpp
+            > Hunk #1 FAILED at 487.
+            > 1 out of 1 hunk FAILED -- saving rejects to file lib/Driver/ToolChains/Gnu.cpp.rej
+            For full logs, run 'nix log /nix/store/zwi123kpkyz52fy7p6v23azixd807r8c-clang-unstable-2022-25-07.drv'.
+     note: keeping build directory '/tmp/nix-build-compiler-rt-libc-unstable-2022-25-07.drv-20'
+     error: 1 dependencies of derivation '/nix/store/ndbbh3wrl0l39b22azf46f1n7zlqwmag-clang-wrapper-unstable-2022-25-07.drv' failed to build
+     ```
+
+     Notice the `Hunk #1 Failed at 487` line.
+     The lines above show us that the `purity.patch` failed on `lib/Driver/ToolChains/Gnu.cpp` when compiling `clang`.
+
+ 3. The task now is to cross reference the hunks in the purity patch with
+    `lib/Driver/ToolCahins/Gnu.cpp.orig` to see why the patch failed.
+    The `.orig` file will be in the build directory referenced in the line `note: keeping build directory ...`;
+    this message results from the `--keep-failed` flag.
+
+ 4. Now you should be able to open whichever patch failed, and the `foo.orig` file that it failed on.
+    Correct the patch by adapting it to the new code and be mindful of whitespace;
+    which can be an easily missed reason for failures.
+    For cases where the hunk is no longer needed you can simply remove it from the patch.
+
+ This is fine for small corrections, but when more serious changes are needed its better to use git.
+
+ 1. Clone the LLVM monorepo at https://github.com/llvm/llvm-project/
+
+ 2. Check out the revision we were using before.
+
+ 3. Use `patch -p1 < path/to-path` in the project subdirectories to apply the patches and commit.
+
+ 4. Use `git rebase HEAD^ --onto <dest>` to rebase the patches onto the new revision we are trying to build, and fix all conflicts.
+
+ 5. Use `git diff HEAD^:<project> HEAD:<project>` to get subdir diff to write back to Nixpkgs.
+
+## Information on our current patch sets
+
+### "GNU Install Dirs" patches
+
+Use CMake's [`GNUInstallDirs`](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html) to support multiple outputs.
+
+Previously, LLVM Just hard-coded `bin`, `include`, and `lib${LLVM_TARGET_PREFIX}`.
+We are making it use these variables.
+
+For the older LLVM versions, these patches live in https://github.com/Ericson2314/llvm-project branches `split-prefix`.
+Instead of applying the patches to the worktree per the above instructions, one can checkout those directly and rebase those instead.
+
+For newer LLVM versions, enough has has been upstreamed,
+(see https://reviews.llvm.org/differential/query/5UAfpj_9zHwY/ for my progress upstreaming),
+that I have just assembled new gnu-install-dirs patches from the remaining unmerged patches instead of rebasing from the prior LLVM's gnu install dirs patch.
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/clang-11-15-LLVMgold-path.patch b/nixpkgs/pkgs/development/compilers/llvm/clang-11-15-LLVMgold-path.patch
new file mode 100644
index 000000000000..8f8991976f33
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/clang-11-15-LLVMgold-path.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
+index 6b6e276b8ce7..7896542a1202 100644
+--- a/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -409,7 +409,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
+ 
+     SmallString<1024> Plugin;
+     llvm::sys::path::native(
+-        Twine(D.Dir) + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold" + Suffix,
++        Twine("@libllvmLibdir@" "/LLVMgold") + Suffix,
+         Plugin);
+     CmdArgs.push_back(Args.MakeArgString(Plugin));
+   }
diff --git a/nixpkgs/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch b/nixpkgs/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch
new file mode 100644
index 000000000000..93504316edf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch
@@ -0,0 +1,15 @@
+diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
+index 37ec73468570..b73e75aa6e59 100644
+--- a/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -370,8 +370,8 @@ void tools::AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args,
+ #endif
+ 
+   SmallString<1024> Plugin;
+-  llvm::sys::path::native(Twine(ToolChain.getDriver().Dir) +
+-                              "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold" +
++  llvm::sys::path::native(Twine("@libllvmLibdir@"
++                                "/LLVMgold") +
+                               Suffix,
+                           Plugin);
+   CmdArgs.push_back(Args.MakeArgString(Plugin));
diff --git a/nixpkgs/pkgs/development/compilers/llvm/clang-at-least-16-LLVMgold-path.patch b/nixpkgs/pkgs/development/compilers/llvm/clang-at-least-16-LLVMgold-path.patch
new file mode 100644
index 000000000000..74cdbacc8a71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/clang-at-least-16-LLVMgold-path.patch
@@ -0,0 +1,14 @@
+diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
+index 34640b3c450d..93c4a4f4ec5c 100644
+--- a/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -589,8 +589,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
+ #endif
+ 
+     SmallString<1024> Plugin;
+-    llvm::sys::path::native(Twine(D.Dir) +
+-                                "/../" CLANG_INSTALL_LIBDIR_BASENAME +
++    llvm::sys::path::native(Twine("@libllvmLibdir@") +
+                                 PluginName + Suffix,
+                             Plugin);
+     CmdArgs.push_back(Args.MakeArgString(Twine(PluginPrefix) + Plugin));
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/bintools.nix b/nixpkgs/pkgs/development/compilers/llvm/common/bintools.nix
new file mode 100644
index 000000000000..85b570d976ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/bintools.nix
@@ -0,0 +1,49 @@
+{ lib, runCommand, stdenv, llvm, lld, version, release_version }:
+
+let
+  targetPrefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-";
+in
+runCommand "llvm-binutils-${version}"
+{
+  preferLocalBuild = true;
+  passthru = {
+    isLLVM = true;
+    inherit targetPrefix;
+  };
+}
+  (''
+    mkdir -p $out/bin
+    for prog in ${lld}/bin/*; do
+      ln -s $prog $out/bin/${targetPrefix}$(basename $prog)
+    done
+    for prog in ${llvm}/bin/*; do
+      ln -sf $prog $out/bin/${targetPrefix}$(basename $prog)
+    done
+
+    llvmBin="${llvm}/bin"
+
+    ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}ar
+    ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}dlltool
+    ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}ranlib
+    ln -s $llvmBin/llvm-cxxfilt $out/bin/${targetPrefix}c++filt
+    ln -s $llvmBin/llvm-dwp $out/bin/${targetPrefix}dwp
+    ln -s $llvmBin/llvm-nm $out/bin/${targetPrefix}nm
+    ln -s $llvmBin/llvm-objcopy $out/bin/${targetPrefix}objcopy
+    ln -s $llvmBin/llvm-objcopy $out/bin/${targetPrefix}strip
+    ln -s $llvmBin/llvm-objdump $out/bin/${targetPrefix}objdump
+    ln -s $llvmBin/llvm-readobj $out/bin/${targetPrefix}readelf
+    ln -s $llvmBin/llvm-size $out/bin/${targetPrefix}size
+    ln -s $llvmBin/llvm-strings $out/bin/${targetPrefix}strings
+    ln -s $llvmBin/llvm-symbolizer $out/bin/${targetPrefix}addr2line
+
+    if [ -e "$llvmBin/llvm-debuginfod" ]; then
+      ln -s $llvmBin/llvm-debuginfod $out/bin/${targetPrefix}debuginfod
+      ln -s $llvmBin/llvm-debuginfod-find $out/bin/${targetPrefix}debuginfod-find
+    fi
+
+    ln -s ${lld}/bin/lld $out/bin/${targetPrefix}ld
+
+    # Only >=13 show GNU windres compatible in help
+  '' + lib.optionalString (lib.versionAtLeast release_version "13") ''
+    ln -s $llvmBin/llvm-rc $out/bin/${targetPrefix}windres
+  '')
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/clang/add-nostdlibinc-flag.patch b/nixpkgs/pkgs/development/compilers/llvm/common/clang/add-nostdlibinc-flag.patch
new file mode 100644
index 000000000000..80c2eb362383
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/clang/add-nostdlibinc-flag.patch
@@ -0,0 +1,18 @@
+diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
+index 3f29afd35971..223d2769cdfc 100644
+--- a/lib/Driver/Driver.cpp
++++ b/lib/Driver/Driver.cpp
+@@ -491,6 +491,13 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const {
+   }
+ #endif
+ 
++  {
++    Arg *A = DAL->MakeFlagArg(/*BaseArg=*/nullptr,
++                              Opts.getOption(options::OPT_nostdlibinc));
++    A->claim();
++    DAL->append(A);
++  }
++
+   return DAL;
+ }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/common-let.nix b/nixpkgs/pkgs/development/compilers/llvm/common/common-let.nix
new file mode 100644
index 000000000000..31360f5b98b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/common-let.nix
@@ -0,0 +1,60 @@
+{ lib
+, fetchFromGitHub ? null
+, release_version ? null
+, gitRelease ? null
+, officialRelease ? null
+, monorepoSrc' ? null
+}:
+
+rec {
+  llvm_meta = {
+    license = lib.licenses.ncsa;
+    maintainers = lib.teams.llvm.members;
+
+    # See llvm/cmake/config-ix.cmake.
+    platforms =
+      lib.platforms.aarch64 ++
+      lib.platforms.arm ++
+      lib.platforms.mips ++
+      lib.platforms.power ++
+      lib.platforms.s390x ++
+      lib.platforms.wasi ++
+      lib.platforms.x86 ++
+      lib.optionals (lib.versionAtLeast release_version "7") lib.platforms.riscv ++
+      lib.optionals (lib.versionAtLeast release_version "14") lib.platforms.m68k;
+  };
+
+  releaseInfo =
+    if gitRelease != null then rec {
+      original = gitRelease;
+      release_version = original.version;
+      version = gitRelease.rev-version;
+    } else rec {
+      original = officialRelease;
+      release_version = original.version;
+      version =
+        if original ? candidate then
+          "${release_version}-${original.candidate}"
+        else
+          release_version;
+    };
+
+  monorepoSrc =
+    if monorepoSrc' != null then
+      monorepoSrc'
+    else
+      let
+        sha256 = releaseInfo.original.sha256;
+        rev =
+          if gitRelease != null then
+            gitRelease.rev
+          else
+            "llvmorg-${releaseInfo.version}";
+      in
+      fetchFromGitHub {
+        owner = "llvm";
+        repo = "llvm-project";
+        inherit rev sha256;
+      };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/7-12-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/7-12-codesign.patch
new file mode 100644
index 000000000000..3cc12b94b200
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/7-12-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/common/compiler-rt/armv6-mcr-dmb.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-mcr-dmb.patch
new file mode 100644
index 000000000000..acdcc9e983b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-mcr-dmb.patch
@@ -0,0 +1,75 @@
+From a11d1cc41c725ec6dee58f75e4a852a658dd7543 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 10 Mar 2022 19:30:00 -0800
+Subject: [PATCH] [builtins] Use mcr for dmb instruction on armv6
+
+At present compiler-rt cross compiles for armv6 ( -march=armv6 ) but includes
+dmb instructions which are only available in armv7+ this causes SIGILL on
+clang+compiler-rt compiled components on rpi0w platforms.
+
+Reviewed By: MaskRay
+
+Differential Revision: https://reviews.llvm.org/D99282
+---
+ compiler-rt/lib/builtins/arm/sync-ops.h | 8 ++++----
+ compiler-rt/lib/builtins/assembly.h     | 8 ++++++++
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/lib/builtins/arm/sync-ops.h b/lib/builtins/arm/sync-ops.h
+index c9623249e5d20..7a26170741ad2 100644
+--- a/lib/builtins/arm/sync-ops.h
++++ b/lib/builtins/arm/sync-ops.h
+@@ -19,14 +19,14 @@
+   .thumb;                                                                      \
+   .syntax unified;                                                             \
+   DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op)                      \
+-  dmb;                                                                         \
++  DMB;                                                                         \
+   mov r12, r0;                                                                 \
+   LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12];                               \
+   op(r2, r0, r1);                                                              \
+   strex r3, r2, [r12];                                                         \
+   cmp r3, #0;                                                                  \
+   bne LOCAL_LABEL(tryatomic_##op);                                             \
+-  dmb;                                                                         \
++  DMB;                                                                         \
+   bx lr
+ 
+ #define SYNC_OP_8(op)                                                          \
+@@ -35,14 +35,14 @@
+   .syntax unified;                                                             \
+   DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op)                      \
+   push {r4, r5, r6, lr};                                                       \
+-  dmb;                                                                         \
++  DMB;                                                                         \
+   mov r12, r0;                                                                 \
+   LOCAL_LABEL(tryatomic_##op) : ldrexd r0, r1, [r12];                          \
+   op(r4, r5, r0, r1, r2, r3);                                                  \
+   strexd r6, r4, r5, [r12];                                                    \
+   cmp r6, #0;                                                                  \
+   bne LOCAL_LABEL(tryatomic_##op);                                             \
+-  dmb;                                                                         \
++  DMB;                                                                         \
+   pop { r4, r5, r6, pc }
+ 
+ #define MINMAX_4(rD, rN, rM, cmp_kind)                                         \
+diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h
+index 69a3d8620f924..06aa18162e3b4 100644
+--- a/lib/builtins/assembly.h
++++ b/lib/builtins/assembly.h
+@@ -189,6 +189,14 @@
+   JMP(ip)
+ #endif
+ 
++#if __ARM_ARCH >= 7
++#define DMB dmb
++#elif __ARM_ARCH >= 6
++#define DMB mcr p15, #0, r0, c7, c10, #5
++#else
++#error only supported on ARMv6+
++#endif
++
+ #if defined(USE_THUMB_2)
+ #define WIDE(op) op.w
+ #else
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-no-ldrexd-strexd.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-no-ldrexd-strexd.patch
new file mode 100644
index 000000000000..2537ae1fae12
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-no-ldrexd-strexd.patch
@@ -0,0 +1,162 @@
+From 4fe3f21bf8b20c766877d2251d61118d0ff36688 Mon Sep 17 00:00:00 2001
+From: Ben Wolsieffer <benwolsieffer@gmail.com>
+Date: Wed, 7 Dec 2022 14:56:51 -0500
+Subject: [PATCH] [compiler-rt][builtins] Do not use ldrexd or strexd on ARMv6
+
+The ldrexd and strexd instructions are not available on base ARMv6, and were
+only added in ARMv6K (see [1]). This patch solves this problem once and for all
+using the __ARM_FEATURE_LDREX macro (see [2]) defined in the ARM C Language
+Extensions (ACLE). Although this macro is technically deprecated in the ACLE,
+it allows compiler-rt to reliably detect whether ldrexd and strexd are supported
+without complicated conditionals to detect different ARM architecture variants.
+
+[1] https://developer.arm.com/documentation/dht0008/a/ch01s02s01
+[2] https://arm-software.github.io/acle/main/acle.html#ldrexstrex
+
+Differential Revision: https://reviews.llvm.org/D139585
+---
+ compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S  | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_and_8.S  | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_max_8.S  | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_min_8.S  | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_nand_8.S | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_or_8.S   | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_sub_8.S  | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_umax_8.S | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_umin_8.S | 2 +-
+ compiler-rt/lib/builtins/arm/sync_fetch_and_xor_8.S  | 2 +-
+ 10 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/lib/builtins/arm/sync_fetch_and_add_8.S b/lib/builtins/arm/sync_fetch_and_add_8.S
+index 18bdd875b8b7..bee6f7ba0f34 100644
+--- a/lib/builtins/arm/sync_fetch_and_add_8.S
++++ b/lib/builtins/arm/sync_fetch_and_add_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define add_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \
+     adds rD_LO, rN_LO, rM_LO ; \
+     adc rD_HI, rN_HI, rM_HI
+diff --git a/lib/builtins/arm/sync_fetch_and_and_8.S b/lib/builtins/arm/sync_fetch_and_and_8.S
+index 3716eff809d5..b4e77a54edf6 100644
+--- a/lib/builtins/arm/sync_fetch_and_and_8.S
++++ b/lib/builtins/arm/sync_fetch_and_and_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define and_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \
+     and rD_LO, rN_LO, rM_LO ; \
+     and rD_HI, rN_HI, rM_HI
+diff --git a/lib/builtins/arm/sync_fetch_and_max_8.S b/lib/builtins/arm/sync_fetch_and_max_8.S
+index 06115ab55246..1813274cc649 100644
+--- a/lib/builtins/arm/sync_fetch_and_max_8.S
++++ b/lib/builtins/arm/sync_fetch_and_max_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define max_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI)         MINMAX_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI, gt)
+ 
+ SYNC_OP_8(max_8)
+diff --git a/lib/builtins/arm/sync_fetch_and_min_8.S b/lib/builtins/arm/sync_fetch_and_min_8.S
+index 4f3e299d95cc..fa8f3477757b 100644
+--- a/lib/builtins/arm/sync_fetch_and_min_8.S
++++ b/lib/builtins/arm/sync_fetch_and_min_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define min_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI)         MINMAX_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI, lt)
+ 
+ SYNC_OP_8(min_8)
+diff --git a/lib/builtins/arm/sync_fetch_and_nand_8.S b/lib/builtins/arm/sync_fetch_and_nand_8.S
+index 425c94474af7..fb27219ee200 100644
+--- a/lib/builtins/arm/sync_fetch_and_nand_8.S
++++ b/lib/builtins/arm/sync_fetch_and_nand_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define nand_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \
+     bic rD_LO, rN_LO, rM_LO ; \
+     bic rD_HI, rN_HI, rM_HI
+diff --git a/lib/builtins/arm/sync_fetch_and_or_8.S b/lib/builtins/arm/sync_fetch_and_or_8.S
+index 4f18dcf84df9..3b077c8737b1 100644
+--- a/lib/builtins/arm/sync_fetch_and_or_8.S
++++ b/lib/builtins/arm/sync_fetch_and_or_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define or_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \
+     orr rD_LO, rN_LO, rM_LO ; \
+     orr rD_HI, rN_HI, rM_HI
+diff --git a/lib/builtins/arm/sync_fetch_and_sub_8.S b/lib/builtins/arm/sync_fetch_and_sub_8.S
+index 25a4a1076555..c171607eabd8 100644
+--- a/lib/builtins/arm/sync_fetch_and_sub_8.S
++++ b/lib/builtins/arm/sync_fetch_and_sub_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define sub_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \
+     subs rD_LO, rN_LO, rM_LO ; \
+     sbc rD_HI, rN_HI, rM_HI
+diff --git a/lib/builtins/arm/sync_fetch_and_umax_8.S b/lib/builtins/arm/sync_fetch_and_umax_8.S
+index aa5213ff1def..d1224f758049 100644
+--- a/lib/builtins/arm/sync_fetch_and_umax_8.S
++++ b/lib/builtins/arm/sync_fetch_and_umax_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define umax_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI)         MINMAX_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI, hi)
+ 
+ SYNC_OP_8(umax_8)
+diff --git a/lib/builtins/arm/sync_fetch_and_umin_8.S b/lib/builtins/arm/sync_fetch_and_umin_8.S
+index 8b40541ab47d..595444e6d053 100644
+--- a/lib/builtins/arm/sync_fetch_and_umin_8.S
++++ b/lib/builtins/arm/sync_fetch_and_umin_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define umin_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI)         MINMAX_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI, lo)
+ 
+ SYNC_OP_8(umin_8)
+diff --git a/lib/builtins/arm/sync_fetch_and_xor_8.S b/lib/builtins/arm/sync_fetch_and_xor_8.S
+index 7436eb1d4cae..9fc3d85cef75 100644
+--- a/lib/builtins/arm/sync_fetch_and_xor_8.S
++++ b/lib/builtins/arm/sync_fetch_and_xor_8.S
+@@ -13,7 +13,7 @@
+ 
+ #include "sync-ops.h"
+ 
+-#if __ARM_ARCH_PROFILE != 'M'
++#if __ARM_FEATURE_LDREX & 8
+ #define xor_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \
+     eor rD_LO, rN_LO, rM_LO ; \
+     eor rD_HI, rN_HI, rM_HI
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-libatomic.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-libatomic.patch
new file mode 100644
index 000000000000..13b67eb2a41c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-libatomic.patch
@@ -0,0 +1,65 @@
+From a56bb19a9dc303a50ef12d83cd24c2395bf81076 Mon Sep 17 00:00:00 2001
+From: Ben Wolsieffer <benwolsieffer@gmail.com>
+Date: Wed, 7 Dec 2022 21:25:46 -0500
+Subject: [PATCH] [scudo][standalone] Use CheckAtomic to decide to link to
+ libatomic
+
+Standalone scudo uses the atomic operation builtin functions, which require
+linking to libatomic on some platforms. Currently, this is done in an ad-hoc
+manner. MIPS platforms always link to libatomic, and the tests are always linked
+to it as well. libatomic is required on base ARMv6 (but not ARMv6K), but it is
+currently not linked, causing the build to fail.
+
+This patch replaces this ad-hoc logic with the CheckAtomic CMake module already
+used in other parts of LLVM. The CheckAtomic module checks whether std::atomic
+requires libatomic, which is not strictly the same as checking the atomic
+builtins, but should have the same results as far as I know. If this is
+problematic, a custom version of CheckAtomic could be used to specifically test
+the builtins.
+---
+ compiler-rt/lib/scudo/standalone/CMakeLists.txt       | 7 +++++++
+ compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt | 4 +---
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/lib/scudo/standalone/CMakeLists.txt b/lib/scudo/standalone/CMakeLists.txt
+index ae5c354768c8..eb27374ca520 100644
+--- a/lib/scudo/standalone/CMakeLists.txt
++++ b/lib/scudo/standalone/CMakeLists.txt
+@@ -1,5 +1,8 @@
+ add_compiler_rt_component(scudo_standalone)
+ 
++include(DetermineGCCCompatible)
++include(CheckAtomic)
++
+ include_directories(../.. include)
+ 
+ set(SCUDO_CFLAGS)
+@@ -34,6 +37,10 @@ list(APPEND SCUDO_LINK_FLAGS -Wl,-z,defs,-z,now,-z,relro)
+ 
+ list(APPEND SCUDO_LINK_FLAGS -ffunction-sections -fdata-sections -Wl,--gc-sections)
+ 
++if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
++  list(APPEND SCUDO_LINK_FLAGS -latomic)
++endif()
++
+ # We don't use the C++ standard library, so avoid including it by mistake.
+ append_list_if(COMPILER_RT_HAS_NOSTDLIBXX_FLAG -nostdlib++ SCUDO_LINK_FLAGS)
+ 
+diff --git a/lib/scudo/standalone/tests/CMakeLists.txt b/lib/scudo/standalone/tests/CMakeLists.txt
+index 6d0936cbb5c1..70a5a7e959c1 100644
+--- a/lib/scudo/standalone/tests/CMakeLists.txt
++++ b/lib/scudo/standalone/tests/CMakeLists.txt
+@@ -38,9 +38,7 @@ set(LINK_FLAGS
+   ${SANITIZER_TEST_CXX_LIBRARIES}
+   )
+ list(APPEND LINK_FLAGS -pthread)
+-# Linking against libatomic is required with some compilers
+-check_library_exists(atomic __atomic_load_8 "" COMPILER_RT_HAS_LIBATOMIC)
+-if (COMPILER_RT_HAS_LIBATOMIC)
++if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
+   list(APPEND LINK_FLAGS -latomic)
+ endif()
+ 
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-no-yield.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-no-yield.patch
new file mode 100644
index 000000000000..2fd48eda6518
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-no-yield.patch
@@ -0,0 +1,34 @@
+From ff0b373b959165477f45d9f5f9a8da471ae111ab Mon Sep 17 00:00:00 2001
+From: Ben Wolsieffer <benwolsieffer@gmail.com>
+Date: Wed, 7 Dec 2022 18:03:56 -0500
+Subject: [PATCH] [scudo][standalone] Only use yield on ARMv6K and newer
+
+The yield instruction is only available in ARMv6K and newer. It behaves as a
+nop on single threaded platforms anyway, so use nop instead on unsupported
+architectures.
+
+Differential Revision: https://reviews.llvm.org/D139600
+---
+ compiler-rt/lib/scudo/standalone/common.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/scudo/standalone/common.h b/lib/scudo/standalone/common.h
+index bc3dfec6dbba..862cda1d4bc4 100644
+--- a/lib/scudo/standalone/common.h
++++ b/lib/scudo/standalone/common.h
+@@ -109,7 +109,12 @@ inline void yieldProcessor(u8 Count) {
+ #elif defined(__aarch64__) || defined(__arm__)
+   __asm__ __volatile__("" ::: "memory");
+   for (u8 I = 0; I < Count; I++)
++#if __ARM_ARCH >= 6 && !defined(__ARM_ARCH_6__)
++    // yield is supported on ARMv6K and newer
+     __asm__ __volatile__("yield");
++#else
++    __asm__ __volatile__("nop");
++#endif
+ #endif
+   __asm__ __volatile__("" ::: "memory");
+ }
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-sync-ops-no-thumb.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-sync-ops-no-thumb.patch
new file mode 100644
index 000000000000..098a155d448c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv6-sync-ops-no-thumb.patch
@@ -0,0 +1,52 @@
+From 5017de8ba4b1fe985169cf54590e858a9019a91f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 11 Mar 2022 16:25:49 -0800
+Subject: [PATCH] [builtins] Do not force thumb mode directive in
+ arm/sync-ops.h
+
+.thumb_func was not switching mode until [1]
+so it did not show up but now that .thumb_func (without argument) is
+switching mode, its causing build failures on armv6 ( rpi0 ) even when
+build is explicitly asking for this file to be built with -marm (ARM
+mode), therefore use DEFINE_COMPILERRT_FUNCTION macro to add function
+header which considers arch and mode from compiler cmdline to decide if
+the function is built using thumb mode or arm mode.
+
+[1] https://reviews.llvm.org/D101975
+
+Note that it also needs https://reviews.llvm.org/D99282
+
+Reviewed By: peter.smith, MaskRay
+
+Differential Revision: https://reviews.llvm.org/D104183
+---
+ compiler-rt/lib/builtins/arm/sync-ops.h | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/builtins/arm/sync-ops.h b/lib/builtins/arm/sync-ops.h
+index 7a26170741ad2..d914f9d3a1093 100644
+--- a/lib/builtins/arm/sync-ops.h
++++ b/lib/builtins/arm/sync-ops.h
+@@ -16,9 +16,8 @@
+ 
+ #define SYNC_OP_4(op)                                                          \
+   .p2align 2;                                                                  \
+-  .thumb;                                                                      \
+   .syntax unified;                                                             \
+-  DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op)                      \
++  DEFINE_COMPILERRT_FUNCTION(__sync_fetch_and_##op)                            \
+   DMB;                                                                         \
+   mov r12, r0;                                                                 \
+   LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12];                               \
+@@ -31,9 +30,8 @@
+ 
+ #define SYNC_OP_8(op)                                                          \
+   .p2align 2;                                                                  \
+-  .thumb;                                                                      \
+   .syntax unified;                                                             \
+-  DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op)                      \
++  DEFINE_COMPILERRT_FUNCTION(__sync_fetch_and_##op)                            \
+   push {r4, r5, r6, lr};                                                       \
+   DMB;                                                                         \
+   mov r12, r0;                                                                 \
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv7l-15.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv7l-15.patch
new file mode 100644
index 000000000000..ca1c2332abd9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/armv7l-15.patch
@@ -0,0 +1,32 @@
+diff -ur a/cmake/builtin-config-ix.cmake b/cmake/builtin-config-ix.cmake
+--- a/cmake/builtin-config-ix.cmake @llvm 15.0.6
++++ b/cmake/builtin-config-ix.cmake
+@@ -46,7 +46,7 @@
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv8m.main armv8.1m.main)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l armv8m.main armv8.1m.main)
+ set(AVR avr)
+ set(HEXAGON hexagon)
+ set(X86 i386)
+ set(X86_64 x86_64)
+diff -ur a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+--- a/lib/builtins/CMakeLists.txt @llvm 15.0.6
++++ b/lib/builtins/CMakeLists.txt
+@@ -565,6 +565,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
+@@ -734,7 +735,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|armv8m.main|armv8.1m.main)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
+         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/common/compiler-rt/darwin-plistbuddy-workaround.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch
new file mode 100644
index 000000000000..dae8b3a690ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch
@@ -0,0 +1,25 @@
+CMake tries to read a list field from SDKSettings.plist, but the output of
+xcbuild PlistBuddy is incompatible with Apple's. (Plus we don't want it in our
+dependencies.)
+
+Simply assume ARM64 is supported by the SDK. We already limit the actual archs
+we build for by setting DARWIN_osx_BUILTIN_ARCHS explicitely.
+
+--- a/cmake/builtin-config-ix.cmake
++++ b/cmake/builtin-config-ix.cmake
+@@ -97,14 +97,7 @@ if(APPLE)
+   set(DARWIN_osx_BUILTIN_MIN_VER 10.5)
+   set(DARWIN_osx_BUILTIN_MIN_VER_FLAG
+       -mmacosx-version-min=${DARWIN_osx_BUILTIN_MIN_VER})
+-  set(DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64})
+-  # Add support for arm64 macOS if available in SDK.
+-  foreach(arch ${ARM64})
+-    sdk_has_arch_support(${DARWIN_osx_SYSROOT} macosx ${arch} MACOS_ARM_SUPPORT)
+-    if (MACOS_ARM_SUPPORT)
+-     list(APPEND DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${arch})
+-    endif()
+-  endforeach(arch)
++  set(DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64} ${ARM64})
+ 
+   if(COMPILER_RT_ENABLE_IOS)
+     list(APPEND DARWIN_EMBEDDED_PLATFORMS ios)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/glibc.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/glibc.patch
new file mode 100644
index 000000000000..2d211795fc80
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/glibc.patch
@@ -0,0 +1,48 @@
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 54da635..c5dc1cd 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1158,8 +1158,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++   on many architectures.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+index f89a113..f6f986f 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -213,26 +213,13 @@ namespace __sanitizer {
+     u64 __unused1;
+     u64 __unused2;
+ #elif defined(__sparc__)
+-#if defined(__arch64__)
+     unsigned mode;
+-    unsigned short __pad1;
+-#else
+-    unsigned short __pad1;
+-    unsigned short mode;
+     unsigned short __pad2;
+-#endif
+     unsigned short __seq;
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
+-    unsigned int mode;
+-    unsigned short __seq;
+-    unsigned short __pad1;
+-    unsigned long __unused1;
+-    unsigned long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch
new file mode 100644
index 000000000000..890230cc14ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch
@@ -0,0 +1,80 @@
+https://github.com/llvm/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.patch
+https://reviews.llvm.org/D102059
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -370,15 +370,6 @@ static void ioctl_table_fill() {
+ 
+ #if SANITIZER_GLIBC
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+-  _(CYGETDEFTHRESH, WRITE, sizeof(int));
+-  _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+-  _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
+-  _(CYGETTHRESH, WRITE, sizeof(int));
+-  _(CYGETTIMEOUT, WRITE, sizeof(int));
+-  _(CYSETDEFTHRESH, NONE, 0);
+-  _(CYSETDEFTIMEOUT, NONE, 0);
+-  _(CYSETTHRESH, NONE, 0);
+-  _(CYSETTIMEOUT, NONE, 0);
+   _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
+   _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
+   _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+ #include <linux/lp.h>
+@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ 
+ #if SANITIZER_GLIBC
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+-  unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+   unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
+ #else
+@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif // SANITIZER_LINUX
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+-  unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+-  unsigned IOCTL_CYGETMON = CYGETMON;
+-  unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
+-  unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
+-  unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
+-  unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
+-  unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
+-  unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
+   unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
+   unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
+   unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ extern unsigned struct_ax25_parms_struct_sz;
+-extern unsigned struct_cyclades_monitor_sz;
+ extern unsigned struct_input_keymap_entry_sz;
+ extern unsigned struct_ipx_config_data_sz;
+ extern unsigned struct_kbdiacrs_sz;
+@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE;
+ #endif  // SANITIZER_LINUX
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-extern unsigned IOCTL_CYGETDEFTHRESH;
+-extern unsigned IOCTL_CYGETDEFTIMEOUT;
+-extern unsigned IOCTL_CYGETMON;
+-extern unsigned IOCTL_CYGETTHRESH;
+-extern unsigned IOCTL_CYGETTIMEOUT;
+-extern unsigned IOCTL_CYSETDEFTHRESH;
+-extern unsigned IOCTL_CYSETDEFTIMEOUT;
+-extern unsigned IOCTL_CYSETTHRESH;
+-extern unsigned IOCTL_CYSETTIMEOUT;
+ extern unsigned IOCTL_EQL_EMANCIPATE;
+ extern unsigned IOCTL_EQL_ENSLAVE;
+ extern unsigned IOCTL_EQL_GETMASTRCFG;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch
new file mode 100644
index 000000000000..7ef02a169269
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch
@@ -0,0 +1,80 @@
+https://github.com/llvm/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.patch
+https://reviews.llvm.org/D102059
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -370,15 +370,6 @@ static void ioctl_table_fill() {
+ 
+ #if SANITIZER_GLIBC
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+-  _(CYGETDEFTHRESH, WRITE, sizeof(int));
+-  _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+-  _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
+-  _(CYGETTHRESH, WRITE, sizeof(int));
+-  _(CYGETTIMEOUT, WRITE, sizeof(int));
+-  _(CYSETDEFTHRESH, NONE, 0);
+-  _(CYSETDEFTIMEOUT, NONE, 0);
+-  _(CYSETTHRESH, NONE, 0);
+-  _(CYSETTIMEOUT, NONE, 0);
+   _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
+   _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
+   _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+ #include <linux/lp.h>
+@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ 
+ #if SANITIZER_GLIBC
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+-  unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+   unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
+ #else
+@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif // SANITIZER_LINUX
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+-  unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+-  unsigned IOCTL_CYGETMON = CYGETMON;
+-  unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
+-  unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
+-  unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
+-  unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
+-  unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
+-  unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
+   unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
+   unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
+   unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   extern unsigned struct_ax25_parms_struct_sz;
+-  extern unsigned struct_cyclades_monitor_sz;
+   extern unsigned struct_input_keymap_entry_sz;
+   extern unsigned struct_ipx_config_data_sz;
+   extern unsigned struct_kbdiacrs_sz;
+@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE;
+ #endif  // SANITIZER_LINUX
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  extern unsigned IOCTL_CYGETDEFTHRESH;
+-  extern unsigned IOCTL_CYGETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYGETMON;
+-  extern unsigned IOCTL_CYGETTHRESH;
+-  extern unsigned IOCTL_CYGETTIMEOUT;
+-  extern unsigned IOCTL_CYSETDEFTHRESH;
+-  extern unsigned IOCTL_CYSETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYSETTHRESH;
+-  extern unsigned IOCTL_CYSETTIMEOUT;
+   extern unsigned IOCTL_EQL_EMANCIPATE;
+   extern unsigned IOCTL_EQL_ENSLAVE;
+   extern unsigned IOCTL_EQL_GETMASTRCFG;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/libclc.nix b/nixpkgs/pkgs/development/compilers/llvm/common/libclc.nix
new file mode 100644
index 000000000000..c91930963b20
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/libclc.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, version, runCommand, monorepoSrc, llvm, buildPackages, buildLlvmTools, ninja, cmake, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "libclc";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./libclc/libclc-gnu-install-dirs.patch
+  ];
+
+  # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
+                'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \
+      --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
+                'find_program( LLVM_AS llvm-as PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \
+      --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
+                'find_program( LLVM_LINK llvm-link PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \
+      --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
+                'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \
+      --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
+                'find_program( LLVM_SPIRV llvm-spirv PATHS "${buildPackages.spirv-llvm-translator.override { inherit (buildLlvmTools) llvm; }}/bin" NO_DEFAULT_PATH )'
+  '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    substituteInPlace CMakeLists.txt \
+      --replace 'COMMAND prepare_builtins' 'COMMAND ${buildLlvmTools.libclc.dev}/bin/prepare_builtins'
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+  buildInputs = [ llvm ];
+  strictDeps = true;
+
+  postInstall = ''
+    install -Dt $dev/bin prepare_builtins
+  '';
+
+  meta = with lib; {
+    homepage = "http://libclc.llvm.org/";
+    description = "Implementation of the library requirements of the OpenCL C programming language";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/libclc/libclc-gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/common/libclc/libclc-gnu-install-dirs.patch
new file mode 100644
index 000000000000..1e5108a27c38
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/libclc/libclc-gnu-install-dirs.patch
@@ -0,0 +1,10 @@
+--- a/libclc.pc.in
++++ b/libclc.pc.in
+@@ -1,5 +1,5 @@
+-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
+-libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc
+ 
+ Name: libclc
+ Description: Library requirements of the OpenCL C programming language
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/libcxxabi/no-threads.patch b/nixpkgs/pkgs/development/compilers/llvm/common/libcxxabi/no-threads.patch
new file mode 100644
index 000000000000..787f3e16500e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/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/common/libcxxabi/wasm.patch b/nixpkgs/pkgs/development/compilers/llvm/common/libcxxabi/wasm.patch
new file mode 100644
index 000000000000..4ebfe46aa813
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/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/common/lldb-plugins/llef.nix b/nixpkgs/pkgs/development/compilers/llvm/common/lldb-plugins/llef.nix
new file mode 100644
index 000000000000..f671132aa61e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/lldb-plugins/llef.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, lldb
+}:
+
+stdenv.mkDerivation {
+  pname = "llef";
+  version = "unstable-2023-10-18";
+
+  src = fetchFromGitHub {
+    owner = "foundryzero";
+    repo = "llef";
+    rev = "629bd75f44c356f7a3576a6436d3919ce111240d";
+    hash = "sha256-JtCHG89s436Di/6+V7Le4CZnkIPh/RYIllfXEO/B7+8";
+  };
+
+  dontBuild = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/llef
+    cp -r llef.py arch commands common handlers $out/share/llef
+    makeWrapper ${lib.getExe lldb} $out/bin/llef \
+      --add-flags "-o 'settings set stop-disassembly-display never'" \
+      --add-flags "-o \"command script import $out/share/llef/llef.py\""
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "LLEF is a plugin for LLDB to make it more useful for RE and VR";
+    homepage = "https://github.com/foundryzero/llef";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ nrabulinski ];
+    mainProgram = "llef";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/common/lldb.nix
new file mode 100644
index 000000000000..59e427e846c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/lldb.nix
@@ -0,0 +1,218 @@
+{ lib
+, stdenv
+, llvm_meta
+, release_version
+, cmake
+, zlib
+, ncurses
+, swig3
+, swig4
+, which
+, libedit
+, libxml2
+, libllvm
+, libclang
+, python3
+, version
+, darwin
+, lit
+, makeWrapper
+, lua5_3
+, ninja
+, runCommand
+, src ? null
+, monorepoSrc ? null
+, patches ? [ ]
+, enableManpages ? false
+, ...
+}:
+
+let
+  src' =
+    if monorepoSrc != null then
+      runCommand "lldb-src-${version}" { } ''
+        mkdir -p "$out"
+        cp -r ${monorepoSrc}/cmake "$out"
+        cp -r ${monorepoSrc}/lldb "$out"
+      '' else src;
+  vscodeExt = {
+    name = if lib.versionAtLeast release_version "18" then "lldb-dap" else "lldb-vscode";
+    version = if lib.versionAtLeast release_version "18" then "0.2.0" else "0.1.0";
+  };
+  swig = if lib.versionAtLeast release_version "18" then swig4 else swig3;
+in
+
+stdenv.mkDerivation (rec {
+  passthru.monorepoSrc = monorepoSrc;
+  pname = "lldb";
+  inherit version;
+
+  src = src';
+  inherit patches;
+
+  outputs = [ "out" "lib" "dev" ];
+
+  sourceRoot = lib.optional (lib.versionAtLeast release_version "13") "${src.name}/${pname}";
+
+  nativeBuildInputs = [
+    cmake
+    python3
+    which
+    swig
+    lit
+    makeWrapper
+    lua5_3
+  ] ++ lib.optionals enableManpages [
+    python3.pkgs.sphinx
+  ] ++ lib.optionals (lib.versionOlder release_version "18" && enableManpages) [
+    python3.pkgs.recommonmark
+  ] ++ lib.optionals (lib.versionAtLeast release_version "18" && enableManpages) [
+    python3.pkgs.myst-parser
+  ] ++ lib.optionals (lib.versionAtLeast release_version "14") [
+    ninja
+  ];
+
+  buildInputs = [
+    ncurses
+    zlib
+    libedit
+    libxml2
+    libllvm
+  ] ++ lib.optionals (lib.versionAtLeast release_version "16") [
+    # Starting with LLVM 16, the resource dir patch is no longer enough to get
+    # libclang into the rpath of the lldb executables. By putting it into
+    # buildInputs cc-wrapper will set up rpath correctly for us.
+    (lib.getLib libclang)
+  ] ++ 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
+  ]
+  # The older libSystem used on x86_64 macOS is missing the
+  # `<bsm/audit_session.h>` header which `lldb` uses.
+  #
+  # We copy this header over from macOS 10.12 SDK.
+  #
+  # See here for context:
+  # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+  ++ lib.optional
+    (
+      stdenv.targetPlatform.isDarwin
+        && !stdenv.targetPlatform.isAarch64
+        && (lib.versionAtLeast release_version "15")
+    )
+    (
+      runCommand "bsm-audit-session-header" { } ''
+        install -Dm444 \
+          "${lib.getDev darwin.apple_sdk.sdk}/include/bsm/audit_session.h" \
+          "$out/include/bsm/audit_session.h"
+      ''
+    );
+
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}"
+    "-DLLVM_ENABLE_RTTI=OFF"
+    "-DClang_DIR=${lib.getDev libclang}/lib/cmake"
+    "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+  ] ++ lib.optionals (lib.versionAtLeast release_version "17") [
+    "-DCLANG_RESOURCE_DIR=../../../../${libclang.lib}"
+  ] ++ lib.optionals enableManpages ([
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+  ] ++ lib.optionals (lib.versionAtLeast release_version "15") [
+    # docs reference `automodapi` but it's not added to the extensions list when
+    # only building the manpages:
+    # https://github.com/llvm/llvm-project/blob/af6ec9200b09039573d85e349496c4f5b17c3d7f/lldb/docs/conf.py#L54
+    #
+    # so, we just ignore the resulting errors
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ]) ++ lib.optionals doCheck [
+    "-DLLDB_TEST_C_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
+    "-DLLDB_TEST_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"
+  ];
+
+  doCheck = false;
+  doInstallCheck = lib.versionOlder release_version "15";
+
+  # TODO: cleanup with mass-rebuild
+  installCheckPhase = ''
+    if [ ! -e $lib/${python3.sitePackages}/lldb/_lldb*.so ] ; then
+        echo "ERROR: python files not installed where expected!";
+        return 1;
+    fi
+  '' # Something lua is built on older versions but this file doesn't exist.
+  + lib.optionalString (lib.versionAtLeast release_version "14") ''
+    if [ ! -e "$lib/lib/lua/${lua5_3.luaversion}/lldb.so" ] ; then
+        echo "ERROR: lua files not installed where expected!";
+        return 1;
+    fi
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/
+
+    # Editor support
+    # vscode:
+    install -D ../tools/${vscodeExt.name}/package.json $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/package.json
+    mkdir -p $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin
+    ln -s $out/bin/*${if lib.versionAtLeast release_version "18" then vscodeExt.name else "-vscode"} $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin
+  '';
+
+  passthru.vscodeExtName = vscodeExt.name;
+  passthru.vscodeExtPublisher = "llvm";
+  passthru.vscodeExtUniqueId = "llvm-org.${vscodeExt.name}-${vscodeExt.version}";
+
+  meta = llvm_meta // {
+    homepage = "https://lldb.llvm.org/";
+    description = "A next-generation high-performance debugger";
+    longDescription = ''
+      LLDB is a next generation, high-performance debugger. It is built as a set
+      of reusable components which highly leverage existing libraries in the
+      larger LLVM Project, such as the Clang expression parser and LLVM
+      disassembler.
+    '';
+    # llvm <10 never built on aarch64-darwin since first introduction in nixpkgs
+    broken =
+      (lib.versionOlder release_version "11" && stdenv.isDarwin && stdenv.isAarch64)
+        || (((lib.versions.major release_version) == "13") && stdenv.isDarwin);
+    mainProgram = "lldb";
+  };
+} // lib.optionalAttrs enableManpages {
+  pname = "lldb-manpages";
+
+  buildPhase = lib.optionalString (lib.versionOlder release_version "15") ''
+    make ${if (lib.versionOlder release_version "12") then "docs-man" else "docs-lldb-man"}
+  '';
+
+
+  ninjaFlags = lib.optionals (lib.versionAtLeast release_version "15") [ "docs-lldb-man" ];
+
+  propagatedBuildInputs = [ ];
+
+  # manually install lldb man page
+  installPhase = ''
+    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 = llvm_meta // {
+    description = "man pages for LLDB ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/common/lldb/gnu-install-dirs.patch
new file mode 100644
index 000000000000..093b9a8ba3ec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/lldb/gnu-install-dirs.patch
@@ -0,0 +1,49 @@
+diff --git a/bindings/lua/CMakeLists.txt b/bindings/lua/CMakeLists.txt
+index 1a739a980..59f8fc3a0 100644
+--- a/bindings/lua/CMakeLists.txt
++++ b/bindings/lua/CMakeLists.txt
+@@ -56,7 +56,7 @@ function(finish_swig_lua swig_target lldb_lua_bindings_dir lldb_lua_target_dir)
+   if(LLDB_BUILD_FRAMEWORK)
+     set(LLDB_LUA_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python)
+   else()
+-    set(LLDB_LUA_INSTALL_PATH ${LLDB_LUA_RELATIVE_PATH})
++    set(LLDB_LUA_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/../${LLDB_LUA_RELATIVE_PATH})
+   endif()
+   install(DIRECTORY ${lldb_lua_target_dir}/
+           DESTINATION ${LLDB_LUA_INSTALL_PATH}
+diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
+index c631faf52ac3..1d92d069960b 100644
+--- a/bindings/python/CMakeLists.txt
++++ b/bindings/python/CMakeLists.txt
+@@ -160,7 +160,7 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
+   if(LLDB_BUILD_FRAMEWORK)
+     set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/Python)
+   else()
+-    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
++    set(LLDB_PYTHON_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH})
+   endif()
+   if (NOT CMAKE_CFG_INTDIR STREQUAL  ".")
+     string(REPLACE ${CMAKE_CFG_INTDIR} "\$\{CMAKE_INSTALL_CONFIG_NAME\}" LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_INSTALL_PATH})
+diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
+index 3291a7c808e1..b27d27ce6a87 100644
+--- a/cmake/modules/AddLLDB.cmake
++++ b/cmake/modules/AddLLDB.cmake
+@@ -109,7 +109,7 @@ function(add_lldb_library name)
+   endif()
+ 
+   if(PARAM_SHARED)
+-    set(install_dest lib${LLVM_LIBDIR_SUFFIX})
++    set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+     if(PARAM_INSTALL_PREFIX)
+       set(install_dest ${PARAM_INSTALL_PREFIX})
+     endif()
+diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
+index 7d48491ec89a..c04543585588 100644
+--- a/tools/intel-features/CMakeLists.txt
++++ b/tools/intel-features/CMakeLists.txt
+@@ -30,4 +30,4 @@ add_lldb_library(lldbIntelFeatures SHARED
+   )
+ 
+ install(TARGETS lldbIntelFeatures
+-  LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/exegesis-force-bdver2.patch b/nixpkgs/pkgs/development/compilers/llvm/exegesis-force-bdver2.patch
new file mode 100644
index 000000000000..c2654153ed5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/exegesis-force-bdver2.patch
@@ -0,0 +1,11 @@
+diff --git a/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s b/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s
+index 3fc1f31d54dc..a4c9bdd92131 100644
+--- a/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s
++++ b/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s
+@@ -1,5 +1,6 @@
+ # RUN: llvm-exegesis -mode=uops -opcode-name=CMOV16rm  -benchmarks-file=%t.CMOV16rm-uops.yaml
+ # RUN: FileCheck -check-prefixes=CHECK-YAML -input-file=%t.CMOV16rm-uops.yaml %s
++# RUN: sed -i 's,cpu_name:.*,cpu_name: bdver2,g' %t.CMOV16rm-uops.yaml
+ # RUN: llvm-exegesis -mcpu=bdver2 -mode=analysis -benchmarks-file=%t.CMOV16rm-uops.yaml -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.1 -analysis-inconsistency-epsilon=0.1 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS %s
+ 
+ # https://bugs.llvm.org/show_bug.cgi?id=41448
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix
new file mode 100644
index 000000000000..eea346ef22ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix
@@ -0,0 +1,142 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand
+, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation (finalAttrs: rec {
+    pname = "clang";
+    inherit version;
+
+    src = runCommand "${pname}-src-${version}" {} ''
+      mkdir -p "$out"
+      cp -r ${monorepoSrc}/cmake "$out"
+      cp -r ${monorepoSrc}/${pname} "$out"
+      cp -r ${monorepoSrc}/clang-tools-extra "$out"
+    '';
+
+    sourceRoot = "${src.name}/${pname}";
+
+    nativeBuildInputs = [ cmake ninja python3 ]
+      ++ lib.optional (lib.versionAtLeast version "18" && enableManpages) python3.pkgs.myst-parser
+      ++ lib.optional enableManpages python3.pkgs.sphinx
+      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    buildInputs = [ libxml2 libllvm ];
+
+    cmakeFlags = [
+      "-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
+      "-DCLANGD_BUILD_XPC=OFF"
+      "-DLLVM_ENABLE_RTTI=ON"
+      "-DLLVM_INCLUDE_TESTS=OFF"
+    ] ++ lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+      "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+      "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+      # Added in LLVM15:
+      # `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
+      # `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
+      "-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
+      "-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./gnu-install-dirs.patch
+      ../../common/clang/add-nostdlibinc-flag.patch
+      (substituteAll {
+        src = ../../clang-at-least-16-LLVMgold-path.patch;
+       libllvmLibdir = "${libllvm.lib}/lib";
+      })
+    ];
+
+    postPatch = ''
+      (cd tools && ln -s ../../clang-tools-extra extra)
+    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "dev" "python" ];
+
+    postInstall = ''
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      mkdir -p $lib/lib/clang
+      mv $lib/lib/${lib.versions.major version} $lib/lib/clang/${lib.versions.major version}
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      moveToOutput "lib/libclang-cpp.*" "$lib"
+      substituteInPlace $dev/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
+      patchShebangs $python/bin
+
+      mkdir -p $dev/bin
+      cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
+    '';
+
+    passthru = {
+      inherit libllvm;
+      isClang = true;
+      hardeningUnsupportedFlags = [
+        "fortify3"
+      ];
+      hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
+        lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
+        ++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
+    };
+
+    meta = llvm_meta // {
+      homepage = "https://clang.llvm.org/";
+      description = "A C language family frontend for LLVM";
+      longDescription = ''
+        The Clang project provides a language front-end and tooling
+        infrastructure for languages in the C language family (C, C++, Objective
+        C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+        It aims to deliver amazingly fast compiles, extremely useful error and
+        warning messages and to provide a platform for building great source
+        level tools. The Clang Static Analyzer and clang-tidy are tools that
+        automatically find bugs in your code, and are great examples of the sort
+        of tools that can be built using the Clang frontend as a library to
+        parse C/C++ code.
+      '';
+      mainProgram = "clang";
+    };
+  } // lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    ninjaFlags = [ "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 = llvm_meta // {
+      description = "man page for Clang ${version}";
+    };
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..cc8737f35343
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/clang/gnu-install-dirs.patch
@@ -0,0 +1,98 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f7936d72e088..a362fa49b534 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,21 @@ if(CLANG_BUILT_STANDALONE)
+   find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
+   list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
+ 
+-  # Turn into CACHE PATHs for overwritting
++  # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
++  # LLVM_CONFIG.
++  if (NOT LLVM_CONFIG_FOUND)
++    # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
++    # path is removed.
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
++    set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
++    # N.B. this is just a default value, the CACHE PATHs below can be overriden.
++    set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++    set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
++    set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
++  endif()
++
+   set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+   set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
+   set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
+diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
+index 75b0080f6715..c895b884cd27 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -119,8 +119,8 @@ macro(add_clang_library name)
+         install(TARGETS ${lib}
+           COMPONENT ${lib}
+           ${export_to_clangtargets}
+-          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+           RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+         if (NOT LLVM_ENABLE_IDE)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index f2b0c5cddcbb..52f37fc368ce 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -473,6 +473,7 @@ add_header_target("windows-resource-headers" ${windows_only_files})
+ add_header_target("utility-resource-headers" ${utility_files})
+ 
+ get_clang_resource_dir(header_install_dir SUBDIR include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${CLANG_VERSION_MAJOR}/include)
+ 
+ #############################################################
+ # Install rules for the catch-all clang-resource-headers target
+diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
+index 4f23065a2472..6a0f55991e24 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+           COMPONENT
+             libclang-python-bindings
+           DESTINATION
+-            "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++            "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+   add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
+index 3aca22c0b0a8..3115353e3fe3 100644
+--- a/tools/scan-build-py/CMakeLists.txt
++++ b/tools/scan-build-py/CMakeLists.txt
+@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
+   install(FILES lib/libscanbuild/${lib}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
+   install(FILES lib/libscanbuild/resources/${resource}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
+@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
+                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
+   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
+   install(FILES lib/libear/${lib}
+-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
++          DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
+           COMPONENT scan-build-py)
+ endforeach()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/git/clang/purity.patch
new file mode 100644
index 000000000000..5ce14a3479a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/clang/purity.patch
@@ -0,0 +1,25 @@
+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 | 3 ---
+ 1 file changed, 3 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
+@@ -446,9 +446,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+                            ToolChain.isPIEDefault(Args));
+       if (IsPIE)
+         CmdArgs.push_back("-pie");
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+-                                           ToolChain.getDynamicLinker(Args)));
+     }
+   }
+ 
+-- 
+2.11.0
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..07013e5a6825
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -348,4 +348,8 @@ if (NOT MSVC)
+ 
++  set(i486_SOURCES ${i386_SOURCES})
++  set(i586_SOURCES ${i386_SOURCES})
++  set(i686_SOURCES ${i386_SOURCES})
++
+   if (WIN32)
+     set(i386_SOURCES
+       ${i386_SOURCES}
+@@ -723,6 +723,7 @@ else ()
+   endif()
+ 
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++      message("arch: ${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)$")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch
new file mode 100644
index 000000000000..425dc2af01e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch
@@ -0,0 +1,71 @@
+diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
+--- a/lib/sanitizer_common/sanitizer_mac.cpp
++++ b/lib/sanitizer_common/sanitizer_mac.cpp
+@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
+ // Offset example:
+ // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
+ constexpr u16 GetOSMajorKernelOffset() {
+-  if (TARGET_OS_OSX) return 4;
+-  if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
+-  if (TARGET_OS_WATCH) return 13;
++#if TARGET_OS_OSX
++  return 4;
++#endif
++#if TARGET_OS_IOS || TARGET_OS_TV
++  return 6;
++#endif
++#if TARGET_OS_WATCH
++  return 13;
++#endif
+ }
+ 
+ using VersStr = char[64];
+@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
+   u16 os_major = kernel_major - offset;
+ 
+   const char *format = "%d.0";
+-  if (TARGET_OS_OSX) {
+-    if (os_major >= 16) {  // macOS 11+
+-      os_major -= 5;
+-    } else {  // macOS 10.15 and below
+-      format = "10.%d";
+-    }
++#if TARGET_OS_OSX
++  if (os_major >= 16) {  // macOS 11+
++    os_major -= 5;
++  } else {  // macOS 10.15 and below
++    format = "10.%d";
+   }
++#endif
+   return internal_snprintf(vers, sizeof(VersStr), format, os_major);
+ }
+ 
+@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
+ // Aligned versions example:
+ // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
+ static void MapToMacos(u16 *major, u16 *minor) {
+-  if (TARGET_OS_OSX)
+-    return;
+-
+-  if (TARGET_OS_IOS || TARGET_OS_TV)
++#if !TARGET_OS_OSX
++#if TARGET_OS_IOS || TARGET_OS_TV
+     *major += 2;
+-  else if (TARGET_OS_WATCH)
++#elif TARGET_OS_WATCH
+     *major += 9;
+-  else
++#else
+     UNREACHABLE("unsupported platform");
++#endif
+ 
+   if (*major >= 16) {  // macOS 11+
+     *major -= 5;
+@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
+     *minor = *major;
+     *major = 10;
+   }
++#endif
+ }
+ 
+ static MacosVersion GetMacosAlignedVersionInternal() {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
new file mode 100644
index 000000000000..0f15a9e12cde
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
@@ -0,0 +1,159 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake, ninja, python3, xcbuild, libllvm, linuxHeaders, libcxxabi, libxcrypt
+, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
+}:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  haveLibc = stdenv.cc.libc != null;
+  isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic;
+  inherit (stdenv.hostPlatform) isMusl;
+
+  baseName = "compiler-rt";
+
+  src = runCommand "${baseName}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${baseName} "$out"
+  '';
+in
+
+stdenv.mkDerivation {
+  pname = baseName + lib.optionalString (haveLibc) "-libc";
+  inherit version;
+
+  inherit src;
+  sourceRoot = "${src.name}/${baseName}";
+
+  nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
+    ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
+  buildInputs =
+    lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders
+    ++ lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ] ++ lib.optionals (!haveLibc) [
+    # The compiler got stricter about this, and there is a usellvm patch below
+    # which patches out the assert include causing an implicit definition of
+    # assert. It would be nicer to understand why compiler-rt thinks it should
+    # be able to #include <assert.h> in the first place; perhaps it's in the
+    # wrong, or perhaps there is a way to provide an assert.h.
+    "-Wno-error=implicit-function-declaration"
+  ]);
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [
+    "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
+  ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isDarwinStatic) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_MEMPROF=OFF"
+    "-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
+  ] ++ lib.optionals (useLLVM || bareMetal) [
+     "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal || isDarwinStatic ) [
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ lib.optionals (useLLVM && !haveLibc) [
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+  ] ++ lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    #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"
+  ] ++ lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DCMAKE_LIPO=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo"
+    "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+    "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+    "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+
+    # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
+    # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
+    "-DCOMPILER_RT_ENABLE_IOS=OFF"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+    ./gnu-install-dirs.patch
+    # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+    # extra `/`.
+    ./normalize-var.patch
+    # Prevent a compilation error on darwin
+    ./darwin-targetconditionals.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/186575
+    ../../common/compiler-rt/darwin-plistbuddy-workaround.patch
+    # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
+    # ../../common/compiler-rt/armv7l-15.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 = lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + lib.optionalString (useLLVM && !haveLibc) ''
+    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 = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + lib.optionalString (useLLVM && stdenv.hostPlatform.isLinux) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    # Note the history of crt{begin,end}S in previous versions of llvm in nixpkg:
+    # The presence of crtbegin_shared has been added and removed; it's possible
+    # people have added/removed it to get it working on their platforms.
+    # Try each in turn for now.
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.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
+  '' + lib.optionalString doFakeLibgcc ''
+     ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
+  '';
+
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    # compiler-rt requires a Clang stdenv on 32-bit RISC-V:
+    # https://reviews.llvm.org/D43106#1019077
+    broken = stdenv.hostPlatform.isRiscV32 && !stdenv.cc.isClang;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch
new file mode 100644
index 000000000000..f3b1f63a7d71
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
+index 8a6219568b3f..30ee68a47ccf 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -100,13 +100,13 @@ endif()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib)
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(COMPILER_RT_OUTPUT_LIBRARY_DIR
+     ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
+-  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
++  extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
+   set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
+     "Path where built compiler-rt libraries should be installed.")
+ endif()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..2b25fd4a0744
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
+index 4c85551d7766..297d7a47c54b 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -328,8 +328,9 @@ macro(load_llvm_config)
+     endif()
+   endif()
+ 
+-  set(LLVM_LIBRARY_OUTPUT_INTDIR
+-    ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++  get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++    ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++    REALPATH)
+ 
+   set(LLVM_MAIN_SRC_DIR "${LLVM_MAIN_SRC_DIR_DEFAULT}" CACHE PATH "Path to LLVM source tree")
+   message(STATUS "LLVM_MAIN_SRC_DIR: \"${LLVM_MAIN_SRC_DIR}\"")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/default.nix
new file mode 100644
index 000000000000..7dfec234104d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/default.nix
@@ -0,0 +1,364 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, stdenvNoCC, cmake, ninja
+, gccForLibs, preLibcCrossHeaders
+, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+, targetLlvm
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintoolsNoLibc
+, bootBintools ?
+    if stdenv.targetPlatform.linker == "lld"
+    then null
+    else pkgs.bintools
+, darwin
+# LLVM release information; specify one of these but not both:
+, gitRelease ? {
+  version = "18.0.0";
+  rev = "2fd7657b6609454af7adb75765d164ec7d1bb80b";
+  rev-version = "18.0.0-unstable-2023-12-13";
+  sha256 = "sha256-/sMQzzFid0tAnreOIV9SUm2H6QbEGhpNcizl3LDPM5s=";
+}
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   rev = /* commit SHA */;
+  #   rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+, officialRelease ? null
+  # i.e.:
+  # {
+  #   version = /* i.e. "15.0.0" */;
+  #   candidate = /* optional; if specified, should be: "rcN" */
+  #   sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
+  # }
+# By default, we'll try to fetch a release from `github:llvm/llvm-project`
+# corresponding to the `gitRelease` or `officialRelease` specified.
+#
+# You can provide your own LLVM source by specifying this arg but then it's up
+# to you to make sure that the LLVM repo given matches the release configuration
+# specified.
+, monorepoSrc ? null
+}:
+
+assert let
+  int = a: if a then 1 else 0;
+  xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
+in
+  lib.assertMsg
+    (xor
+      (gitRelease != null)
+      (officialRelease != null))
+    ("must specify `gitRelease` or `officialRelease`" +
+      (lib.optionalString (gitRelease != null) " — not both"));
+let
+  monorepoSrc' = monorepoSrc;
+in let
+  inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
+
+  inherit (releaseInfo) release_version version;
+
+  inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
+
+  tools = lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
+    major = lib.versions.major release_version;
+    mkExtraBuildCommands0 = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc.lib}/lib/clang/${major}/include" "$rsrc"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '';
+    mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+    '';
+
+  bintoolsNoLibc' =
+    if bootBintoolsNoLibc == null
+    then tools.bintoolsNoLibc
+    else bootBintoolsNoLibc;
+  bintools' =
+    if bootBintools == null
+    then tools.bintools
+    else bootBintools;
+
+  in {
+
+    libllvm = callPackage ./llvm {
+      inherit llvm_meta;
+    };
+
+    # `llvm` historically had the binaries.  When choosing an output explicitly,
+    # we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
+    llvm = tools.libllvm;
+
+    libclang = callPackage ./clang {
+      inherit llvm_meta;
+    };
+
+    clang-unwrapped = tools.libclang;
+
+    llvm-manpages = lowPrio (tools.libllvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.libclang.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
+    });
+
+    # pick clang appropriate for package set we are targeting
+    clang =
+      /**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
+      else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
+      else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+      libcxx = null;
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld {
+      inherit llvm_meta;
+    };
+
+    lldb = callPackage ../common/lldb.nix {
+      src = callPackage ({ runCommand }: runCommand "lldb-src-${version}" {} ''
+        mkdir -p "$out"
+        cp -r ${monorepoSrc}/cmake "$out"
+        cp -r ${monorepoSrc}/lldb "$out"
+      '') { };
+      patches =
+        [
+          # FIXME: do we need this? ./procfs.patch
+          ../common/lldb/gnu-install-dirs.patch
+        ]
+        # This is a stopgap solution if/until the macOS SDK used for x86_64 is
+        # updated.
+        #
+        # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
+        # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
+        # of this preprocessor symbol in `lldb` with its expansion.
+        #
+        # See here for some context:
+        # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
+        ++ lib.optional (
+          stdenv.targetPlatform.isDarwin
+            && !stdenv.targetPlatform.isAarch64
+            && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
+        ) ./lldb/cpu_subtype_arm64e_replacement.patch;
+      inherit llvm_meta;
+    };
+
+    # 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-unwrapped = callPackage ../common/bintools.nix { };
+
+    bintoolsNoLibc = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+      libc = preLibcCrossHeaders;
+    };
+
+    bintools = wrapBintoolsWith {
+      bintools = tools.bintools-unwrapped;
+    };
+
+    clangUseLLVM = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = bintools';
+      extraPackages = [
+        libcxx.cxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [ "-rtlib=compiler-rt"
+          "-Wno-unused-command-line-argument"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
+        ++ lib.optional
+          (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
+          "-lunwind"
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+      nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
+    };
+
+    clangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+          "-nostdlib++"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+      nixSupport.cc-cflags =
+        [
+          "-rtlib=compiler-rt"
+          "-B${targetLlvmLibraries.compiler-rt}/lib"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRt = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintoolsNoLibc';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+      nixSupport.cc-cflags =
+        [
+          "-nostartfiles"
+        ]
+        ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
+    };
+
+    clangNoCompilerRtWithLibc = wrapCCWith (rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = bintools';
+      extraPackages = [ ];
+      extraBuildCommands = mkExtraBuildCommands0 cc;
+    } // lib.optionalAttrs stdenv.targetPlatform.isWasm {
+      nixSupport.cc-cflags = [ "-fno-exceptions" ];
+    });
+
+  });
+
+  libraries = lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc; });
+  in {
+
+    compiler-rt-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic)
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+               else stdenv;
+    };
+
+    compiler-rt-no-libc = callPackage ./compiler-rt {
+      inherit llvm_meta;
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+               else stdenv;
+    };
+
+    # N.B. condition is safe because without useLLVM both are the same.
+    compiler-rt = if stdenv.hostPlatform.isAndroid || stdenv.hostPlatform.isDarwin
+      then libraries.compiler-rt-libc
+      else libraries.compiler-rt-no-libc;
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxxabi = let
+      # CMake will "require" a compiler capable of compiling C++ programs
+      # cxx-header's build does not actually use one so it doesn't really matter
+      # what stdenv we use here, as long as CMake is happy.
+      cxx-headers = callPackage ./libcxx {
+        inherit llvm_meta;
+        # Note that if we use the regular stdenv here we'll get cycle errors
+        # when attempting to use this compiler in the stdenv.
+        #
+        # The final stdenv pulls `cxx-headers` from the package set where
+        # hostPlatform *is* the target platform which means that `stdenv` at
+        # that point attempts to use this toolchain.
+        #
+        # So, we use `stdenv_` (the stdenv containing `clang` from this package
+        # set, defined below) to sidestep this issue.
+        #
+        # Because we only use `cxx-headers` in `libcxxabi` (which depends on the
+        # clang stdenv _anyways_), this is okay.
+        stdenv = stdenv_;
+        headersOnly = true;
+      };
+
+      # `libcxxabi` *doesn't* need a compiler with a working C++ stdlib but it
+      # *does* need a relatively modern C++ compiler (see:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support).
+      #
+      # So, we use the clang from this LLVM package set, like libc++
+      # "boostrapping builds" do:
+      # https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build
+      #
+      # We cannot use `clangNoLibcxx` because that contains `compiler-rt` which,
+      # on macOS, depends on `libcxxabi`, thus forming a cycle.
+      stdenv_ = overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc;
+    in callPackage ./libcxxabi {
+      stdenv = stdenv_;
+      inherit llvm_meta cxx-headers;
+    };
+
+    # Like `libcxxabi` above, `libcxx` requires a fairly modern C++ compiler,
+    # so: we use the clang from this LLVM package set instead of the regular
+    # stdenv's compiler.
+    libcxx = callPackage ./libcxx {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    libunwind = callPackage ./libunwind {
+      inherit llvm_meta;
+      stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+    };
+
+    openmp = callPackage ./openmp {
+      inherit llvm_meta targetLlvm;
+    };
+  });
+  noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
+
+in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/default.nix
new file mode 100644
index 000000000000..8a5272ea07af
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/default.nix
@@ -0,0 +1,125 @@
+{ lib, stdenv, llvm_meta
+, monorepoSrc, runCommand, fetchpatch
+, cmake, ninja, python3, fixDarwinDylibNames, version
+, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
+, libcxxabi, libcxxrt, libunwind
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# If headersOnly is true, the resulting package would only include the headers.
+# Use this to break the circular dependency between libcxx and libcxxabi.
+#
+# Some context:
+# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
+, headersOnly ? false
+}:
+
+let
+  basename = "libcxx";
+in
+
+assert stdenv.isDarwin -> cxxabi.libName == "c++abi";
+
+stdenv.mkDerivation rec {
+  pname = basename + lib.optionalString headersOnly "-headers";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${basename} "$out"
+    mkdir -p "$out/libcxxabi"
+    cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/third-party "$out"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
+
+  prePatch = ''
+    cd ../${basename}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    # fix for https://github.com/NixOS/nixpkgs/issues/269548
+    # https://github.com/llvm/llvm-project/pull/77218
+    (fetchpatch {
+      name = "darwin-system-libcxxabi-link-flags.patch";
+      url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
+      hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
+      relative = "libcxx";
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs =
+    lib.optionals (!headersOnly) [ cxxabi ]
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [ libunwind ];
+
+  cmakeFlags = let
+    # See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
+    libcxx_cxx_abi_opt = {
+      "c++abi" = "system-libcxxabi";
+      "cxxrt" = "libcxxrt";
+    }.${cxxabi.libName} or (throw "unknown cxxabi: ${cxxabi.libName} (${cxxabi.pname})");
+  in [
+    "-DLLVM_ENABLE_RUNTIMES=libcxx"
+    "-DLIBCXX_CXX_ABI=${if headersOnly then "none" else libcxx_cxx_abi_opt}"
+  ] ++ lib.optional (!headersOnly && cxxabi.libName == "c++abi") "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi.dev}/include/c++/v1"
+    ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+      "-DLIBCXX_USE_COMPILER_RT=ON"
+      # There's precedent for this in llvm-project/libcxx/cmake/caches.
+      # In a monorepo build you might do the following in the libcxxabi build:
+      #   -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwinder
+      #   -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
+      # libcxx appears to require unwind and doesn't pull it in via other means.
+      "-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
+    ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+      "-DUNIX=ON" # Required otherwise libc++ fails to detect the correct linker
+    ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
+    # If we're only building the headers we don't actually *need* a functioning
+    # C/C++ compiler:
+    ++ lib.optionals (headersOnly) [
+      "-DCMAKE_C_COMPILER_WORKS=ON"
+      "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    ];
+
+  ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
+  installTargets = lib.optional headersOnly "install-cxx-headers";
+
+  passthru = {
+    isLLVM = true;
+    inherit cxxabi;
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxx.llvm.org/";
+    description = "C++ standard library";
+    longDescription = ''
+      libc++ is an implementation of the C++ standard library, targeting C++11,
+      C++14 and above.
+    '';
+    # "All of the code in libc++ is dual licensed under the MIT license and the
+    # UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix
new file mode 100644
index 000000000000..0a795da44ae4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix
@@ -0,0 +1,117 @@
+{ lib, stdenv, llvm_meta, cmake, ninja, python3
+, monorepoSrc, runCommand, fetchpatch
+, cxx-headers, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcxxabi";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx/src"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/include "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '';
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # https://reviews.llvm.org/D132298, Allow building libcxxabi alone
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/e6a0800532bb409f6d1c62f3698bdd6994a877dc.patch";
+      sha256 = "1xyjd56m4pfwq8p3xh6i8lhkk9kq15jaml7qbhxdf87z4jjkk63a";
+      stripLen = 1;
+    })
+  ];
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+  buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libcxxabi"
+    "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
+
+    # `libcxxabi`'s build does not need a toolchain with a c++ stdlib attached
+    # (we specify the headers it should use explicitly above).
+    #
+    # CMake however checks for this anyways; this flag tells it not to. See:
+    # https://github.com/llvm/llvm-project/blob/4bd3f3759259548e159aeba5c76efb9a0864e6fa/llvm/runtimes/CMakeLists.txt#L243
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+  ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+    # libcxxabi's CMake looks as though it treats -nostdlib++ as implying -nostdlib,
+    # but that does not appear to be the case for example when building
+    # pkgsLLVM.libcxxabi (which uses clangNoCompilerRtWithLibc).
+    "-DCMAKE_EXE_LINKER_FLAGS=-nostdlib"
+    "-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib"
+  ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+    "-DUNIX=ON"
+  ] ++ lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  preInstall = lib.optionalString stdenv.isDarwin ''
+    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
+  '';
+
+  postInstall = ''
+    mkdir -p "$dev/include"
+    install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
+  '';
+
+  passthru = {
+    libName = "c++abi";
+  };
+
+  meta = llvm_meta // {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "Provides C++ standard library support";
+    longDescription = ''
+      libc++abi is a new implementation of low level support for a standard C++ library.
+    '';
+    # "All of the code in libc++abi is dual licensed under the MIT license and
+    # the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+    maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+    # Broken until https://github.com/llvm/llvm-project/issues/64226 is resolved
+    # We should check if the version is not 10.13 but that is currently broken.
+    broken = stdenv.isDarwin && stdenv.isx86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..51382fcefed2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
+index f380fe6b6b92..a9656258c38e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -188,7 +188,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+   set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+   set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+   if(LIBCXX_LIBDIR_SUBDIR)
+     string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -202,7 +202,7 @@ else()
+     set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+     set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+   endif()
+-  set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
++  set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+       "Path where built libc++abi libraries should be installed.")
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/default.nix
new file mode 100644
index 000000000000..a3c8e2594f5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, llvm_meta, version
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, python3
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  # I am not so comfortable giving libc++ and friends the whole monorepo as
+  # requested, so I filter it to what is needed.
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
+    cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
+    mkdir -p "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
+    cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
+    cp -r ${monorepoSrc}/runtimes "$out"
+  '';
+
+  sourceRoot = "${src.name}/runtimes";
+
+  prePatch = ''
+    cd ../${pname}
+    chmod -R u+w .
+  '';
+
+  postPatch = ''
+    cd ../runtimes
+  '';
+
+  postInstall = lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) ''
+    # libcxxabi wants to link to libunwind_shared.so (?).
+    ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja python3 ];
+
+  cmakeFlags = [
+    "-DLLVM_ENABLE_RUNTIMES=libunwind"
+  ] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+  meta = llvm_meta // {
+    # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+    homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+    description = "LLVM's unwinder library";
+    longDescription = ''
+      The unwind library provides a family of _Unwind_* functions implementing
+      the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+      I). It is a dependency of the C++ ABI library, and sometimes is a
+      dependency of other runtimes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/lld/default.nix
new file mode 100644
index 000000000000..cc18aee76a44
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/lld/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, monorepoSrc, runCommand
+, cmake
+, ninja
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  # Blank llvm dir just so relative path works
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    mkdir -p "$out/libunwind"
+    cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
+    mkdir -p "$out/llvm"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./gnu-install-dirs.patch
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ libllvm libxml2 ];
+
+  cmakeFlags = [
+    "-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+  ];
+
+  # Musl's default stack size is too small for lld to be able to link Firefox.
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = llvm_meta // {
+    homepage = "https://lld.llvm.org/";
+    description = "The LLVM linker (unwrapped)";
+    longDescription = ''
+      LLD is a linker from the LLVM project that is a drop-in replacement for
+      system linkers and runs much faster than them. It also provides features
+      that are useful for toolchain developers.
+      The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+      WebAssembly in descending order of completeness. Internally, LLD consists
+      of several different linkers.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..86e76f4a16d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/lld/gnu-install-dirs.patch
@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d6225646fe6..9b5d0b15af13 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE)
+   find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
+   list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
+ 
+-  # Turn into CACHE PATHs for overwriting
+-  set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+-  set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
+-  set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
++  # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
++  # LLVM_CONFIG.
++  if (NOT LLVM_CONFIG_FOUND)
++    # Pull values from LLVMConfig.cmake.  We can drop this once the llvm-config
++    # path is removed.
++    set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
++    set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
++    # N.B. this is just a default value, the CACHE PATHs below can be overridden.
++    set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
++  else()
++    set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
++  endif()
++
++  set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
++  set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
++  set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
+ 
+   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+     NO_DEFAULT_PATH)
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index d3924f7243d4..42a7cd62281c 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -18,8 +18,8 @@ macro(add_lld_library name)
+     install(TARGETS ${name}
+       COMPONENT ${name}
+       ${export_to_lldtargets}
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
++      LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
++      ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+       RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ 
+     if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/procfs.patch
new file mode 100644
index 000000000000..7b200e86505c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/procfs.patch
@@ -0,0 +1,46 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -10,6 +10,13 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
++
++// on i686 preprocessor symbols with these register names are defined as
++// numeric constants; these symbols clash with identifier names used in
++// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
++#undef FS
++#undef CS
+ 
+ #include "lldb/lldb-types.h"
+ 
+@@ -17,23 +24,13 @@
+ 
+ #include <vector>
+ 
+-#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
+ 
+ namespace lldb_private {
+ namespace process_linux {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix
new file mode 100644
index 000000000000..3c52b7a9bb0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix
@@ -0,0 +1,430 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, monorepoSrc
+, runCommand
+, cmake
+, darwin
+, ninja
+, python3
+, python3Packages
+, libffi
+, enableGoldPlugin ? true
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, sysctl
+, buildLlvmTools
+, debugVersion ? false
+, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
+  && (stdenv.hostPlatform == stdenv.buildPlatform)
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
+  # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  # broken for the armv7l builder
+  && !stdenv.hostPlatform.isAarch
+, enablePolly ? true
+}:
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+  # Ordinarily we would just the `doCheck` and `checkDeps` functionality
+  # `mkDerivation` gives us to manage our test dependencies (instead of breaking
+  # out `doCheck` as a package level attribute).
+  #
+  # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
+  # particular the children it uses to do feature detection.
+  #
+  # This means that python deps we add to `checkDeps` (which the python
+  # interpreter is made aware of via `$PYTHONPATH` – populated by the python
+  # setup hook) are not picked up by `lit` which causes it to skip tests.
+  #
+  # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
+  # because this package is shadowed in `$PATH` by the regular `python3`
+  # package.
+  #
+  # So, we "manually" assemble one python derivation for the package to depend
+  # on, taking into account whether checks are enabled or not:
+  python = if doCheck then
+    # Note that we _explicitly_ ask for a python interpreter for our host
+    # platform here; the splicing that would ordinarily take care of this for
+    # us does not seem to work once we use `withPackages`.
+    let
+      checkDeps = ps: with ps; [ psutil ];
+    in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
+  else python3;
+
+in
+
+stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} (''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+    cp -r ${monorepoSrc}/third-party "$out"
+  '' + lib.optionalString enablePolly ''
+    chmod u+w "$out/${pname}/tools"
+    cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
+  '');
+
+  sourceRoot = "${src.name}/${pname}";
+
+  outputs = [ "out" "lib" "dev" "python" ];
+
+  nativeBuildInputs = [ cmake ninja python ]
+    ++ optionals enableManpages [
+    # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
+    # splicing does *not* work with the latter. (TODO: fix)
+    python3Packages.sphinx
+  ] ++ optionals (lib.versionOlder version "18" && enableManpages) [
+    python3Packages.recommonmark
+  ] ++ optionals (lib.versionAtLeast version "18" && enableManpages) [
+    python3Packages.myst-parser
+  ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  nativeCheckInputs = [
+    which
+  ] ++ lib.optional stdenv.isDarwin sysctl;
+
+  patches = [
+    ./gnu-install-dirs.patch
+
+    # Running the tests involves invoking binaries (like `opt`) that depend on
+    # the LLVM dylibs and reference them by absolute install path (i.e. their
+    # nix store path).
+    #
+    # Because we have not yet run the install phase (we're running these tests
+    # as part of `checkPhase` instead of `installCheckPhase`) these absolute
+    # paths do not exist yet; to work around this we point the loader (`ld` on
+    # unix, `dyld` on macOS) at the `lib` directory which will later become this
+    # package's `lib` output.
+    #
+    # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib`
+    # dir but:
+    #   - this doesn't generalize well to other platforms; `lit` doesn't forward
+    #     `DYLD_LIBRARY_PATH` (macOS):
+    #     + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26
+    #   - even if `lit` forwarded this env var, we actually cannot set
+    #     `DYLD_LIBRARY_PATH` in the child processes `lit` launches because
+    #     `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for
+    #     "protected processes" (i.e. the python interpreter that runs `lit`):
+    #     https://stackoverflow.com/a/35570229
+    #   - other LLVM subprojects deal with this issue by having their `lit`
+    #     configuration set these env vars for us; it makes sense to do the same
+    #     for LLVM:
+    #     + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31
+    #
+    # !!! TODO: look into upstreaming this patch
+    ./llvm-lit-cfg-add-libs-to-dylib-path.patch
+
+    # `lit` has a mode where it executes run lines as a shell script which is
+    # constructs; this is problematic for macOS because it means that there's
+    # another process in between `lit` and the binaries being tested. As noted
+    # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our
+    # tests fail with dyld errors.
+    #
+    # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when
+    # present in the test configuration.
+    #
+    # It's not clear to me why this isn't an issue for LLVM developers running
+    # on macOS (nothing about this _seems_ nix specific)..
+    ./lit-shell-script-runner-set-dyld-library-path.patch
+  ] ++ lib.optionals enablePolly [
+    ./gnu-install-dirs-polly.patch
+
+    # Just like the `llvm-lit-cfg` patch, but for `polly`.
+    ./polly-lit-cfg-add-libs-to-dylib-path.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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+
+    # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
+    # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
+    rm test/MC/ELF/cfi-version.ll
+
+    # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
+    # and thus fails under the sandbox:
+    substituteInPlace unittests/TargetParser/Host.cpp \
+      --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
+
+    # This test tries to call the intrinsics `@llvm.roundeven.f32` and
+    # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
+    # and `roundeven` on macOS.
+    #
+    # However these functions are glibc specific so the test fails:
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
+    #   - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
+    #
+    substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
+      --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
+      --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
+  '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
+    # This test fails on darwin x86_64 because `sw_vers` reports a different
+    # macOS version than what LLVM finds by reading
+    # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
+    # the sandbox on macOS).
+    #
+    # The `sw_vers` provided by nixpkgs reports the macOS version associated
+    # with the `CoreFoundation` framework with which it was built. Because
+    # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what
+    # `sw_vers` reports is not guaranteed to match the macOS version of the host
+    # that's building this derivation.
+    #
+    # Astute readers will note that we only _patch_ this test on aarch64-darwin
+    # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright.
+    # So why does this test pass on aarch64?
+    #
+    # Well, it seems that `sw_vers` on aarch64 actually links against the _host_
+    # CoreFoundation framework instead of the nixpkgs provided one.
+    #
+    # Not entirely sure what the right fix is here. I'm assuming aarch64
+    # `sw_vers` doesn't intentionally link against the host `CoreFoundation`
+    # (still digging into how this ends up happening, will follow up) but that
+    # aside I think the more pertinent question is: should we be patching LLVM's
+    # macOS version detection logic to use `sw_vers` instead of reading host
+    # paths? This *is* a way in which details about builder machines can creep
+    # into the artifacts that are produced, affecting reproducibility, but it's
+    # not clear to me when/where/for what this even gets used in LLVM.
+    #
+    # TODO(@rrbutani): fix/follow-up
+    substituteInPlace unittests/TargetParser/Host.cpp \
+      --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
+
+    # This test fails with a `dysmutil` crash; have not yet dug into what's
+    # going on here (TODO(@rrbutani)).
+    rm test/tools/dsymutil/ARM/obfuscated.test
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+    substituteInPlace unittests/IR/CMakeLists.txt \
+      --replace "PassBuilderCallbacksTest.cpp" ""
+    rm unittests/IR/PassBuilderCallbacksTest.cpp
+    rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+  '' + 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
+    rm test/tools/gold/X86/split-dwarf.ll
+    rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
+    rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+    rm test/CodeGen/RISCV/attributes.ll
+    rm test/CodeGen/RISCV/xtheadmempair.ll
+  '' + 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
+  '';
+
+  preConfigure = ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar"
+    )
+  '';
+
+  # Defensive check: some paths (that we make symlinks to) depend on the release
+  # version, for example:
+  #  - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185
+  #
+  # So we want to sure that the version in the source matches the release
+  # version we were given.
+  #
+  # We do this check here, in the LLVM build, because it happens early.
+  postConfigure = let
+    v = lib.versions;
+    major = v.major release_version;
+    minor = v.minor release_version;
+    patch = v.patch release_version;
+  in ''
+    # $1: part, $2: expected
+    check_version() {
+      part="''${1^^}"
+      part="$(cat include/llvm/Config/llvm-config.h  | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)"
+
+      if [[ "$part" != "$2" ]]; then
+        echo >&2 \
+          "mismatch in the $1 version! we have version ${release_version}" \
+          "and expected the $1 version to be '$2'; the source has '$part' instead"
+        exit 3
+      fi
+    }
+
+    check_version major ${major}
+    check_version minor ${minor}
+    check_version patch ${patch}
+  '';
+
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+  cmakeBuildType = if debugVersion then "Debug" else "Release";
+
+  cmakeFlags = with stdenv; let
+    # These flags influence llvm-config's BuildVariables.inc in addition to the
+    # general build. We need to make sure these are also passed via
+    # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
+    # will return different results from the cross llvm-config.
+    #
+    # Some flags don't need to be repassed because LLVM already does so (like
+    # CMAKE_BUILD_TYPE), others are irrelevant to the result.
+    flagsForLlvmConfig = [
+      "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
+      "-DLLVM_ENABLE_RTTI=ON"
+    ] ++ optionals enableSharedLibraries [
+      "-DLLVM_LINK_LLVM_DYLIB=ON"
+    ];
+  in flagsForLlvmConfig ++ [
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals stdenv.hostPlatform.isStatic [
+    # Disables building of shared libs, -fPIC is still injected by cc-wrapper
+    "-DLLVM_ENABLE_PIC=OFF"
+    "-DLLVM_BUILD_STATIC=ON"
+    "-DLLVM_LINK_LLVM_DYLIB=off"
+    # libxml2 needs to be disabled because the LLVM build system ignores its .la
+    # file and doesn't link zlib as well.
+    # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
+    "-DLLVM_ENABLE_LIBXML2=OFF"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals enableGoldPlugin [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+    (
+      let
+        nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+        nativeBintools = nativeCC.bintools.bintools;
+        nativeToolchainFlags = [
+          "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+          "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+          "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+          "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+          "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+        ];
+        # We need to repass the custom GNUInstallDirs values, otherwise CMake
+        # will choose them for us, leading to wrong results in llvm-config-native
+        nativeInstallFlags = [
+          "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+          "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
+          "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+          "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
+          "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
+        ];
+      in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+      + lib.concatStringsSep ";" (lib.concatLists [
+        flagsForLlvmConfig
+        nativeToolchainFlags
+        nativeInstallFlags
+      ])
+    )
+  ];
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+    moveToOutput "bin/llvm-config*" "$dev"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+      --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  ''
+  + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+  '';
+
+  inherit doCheck;
+
+  checkTarget = "check-all";
+
+  # For the update script:
+  passthru.monorepoSrc = monorepoSrc;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = llvm_meta // {
+    homepage = "https://llvm.org/";
+    description = "A collection of modular and reusable compiler and toolchain technologies";
+    longDescription = ''
+      The LLVM Project is a collection of modular and reusable compiler and
+      toolchain technologies. Despite its name, LLVM has little to do with
+      traditional virtual machines. The name "LLVM" itself is not an acronym; it
+      is the full name of the project.
+      LLVM began as a research project at the University of Illinois, with the
+      goal of providing a modern, SSA-based compilation strategy capable of
+      supporting both static and dynamic compilation of arbitrary programming
+      languages. Since then, LLVM has grown to be an umbrella project consisting
+      of a number of subprojects, many of which are being used in production by
+      a wide variety of commercial and open source projects as well as being
+      widely used in academic research. Code in the LLVM project is licensed
+      under the "Apache 2.0 License with LLVM exceptions".
+    '';
+  };
+} // lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  propagatedBuildInputs = [];
+
+  ninjaFlags = [ "docs-llvm-man" ];
+  installTargets = [ "install-docs-llvm-man" ];
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta = llvm_meta // {
+    description = "man pages for LLVM ${version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..b01363e98aa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,19 @@
+This is the one remaining Polly install dirs related change that hasn't made it
+into upstream yet; previously this patch file also included:
+https://reviews.llvm.org/D117541
+
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+     install(TARGETS ${name}
+       EXPORT LLVMExports
+-      LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+-      ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++	  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   endif()
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..e2122ebf603d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs.patch
@@ -0,0 +1,137 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 471817d68286..c51463304159 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1010,7 +1010,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
+   add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
+     ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
+   install(TARGETS tf_xla_runtime EXPORT LLVMExports
+-    ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
++    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
+   # Once we add more modules, we should handle this more automatically.
+   if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 230620c37027..dd16cab1835e 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -876,8 +876,8 @@ macro(add_llvm_library name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+       install(TARGETS ${name}
+               ${export_to_llvmexports}
+-              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+-              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++              LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
++              ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+               RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
+ 
+       if (NOT LLVM_ENABLE_IDE)
+@@ -2069,7 +2069,7 @@ function(llvm_install_library_symlink name dest type)
+     set(LLVM_LINK_OR_COPY copy)
+   endif()
+ 
+-  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++  set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+   if(WIN32 AND "${type}" STREQUAL "SHARED")
+     set(output_dir "${CMAKE_INSTALL_BINDIR}")
+   endif()
+@@ -2344,16 +2344,37 @@ function(llvm_setup_rpath name)
+ 
+   if (APPLE)
+     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+-    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
+     # $ORIGIN is not interpreted at link time by aix ld.
+     # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+     # hardcode the rpath to build/install lib dir first in this mode.
+     # FIXME: update this when there is better solution.
+-    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(UNIX)
+-    set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+-    set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
++    # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
++    # to `_install_rpath` here.
++    #
++    # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
++    # clang); instead LLVM is its own package and thus lands at its own nix
++    # store path. This makes it so that the default relative rpath (`../lib/`)
++    # does not point at the LLVM shared objects.
++    #
++    # More discussion here:
++    #   - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
++    #   - https://reviews.llvm.org/D146918 (16.0.5+)
++    #
++    # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
++    # no potential that this will result in us pulling in the "wrong" LLVM.
++    # Adding this to the build rpath means we aren't forced to use
++    # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
++    # dir, pre-install, will have the right rpath for LLVM).
++    #
++    # As noted in the differential above, an alternative solution is to have
++    # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
++    # `CMAKE_INSTALL_RPATH`.
++    set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++    set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+       set_property(TARGET ${name} APPEND_STRING PROPERTY
+                    LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 891c9e6d618c..8d963f3b0069 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -147,9 +147,9 @@ function(add_ocaml_library name)
+   endforeach()
+ 
+   if( APPLE )
+-    set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   elseif( UNIX )
+-    set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++    set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+   endif()
+   list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+ 
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index d99af79aa38e..21e794224b99 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
+   )
+ list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
+ 
+-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
++extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_LIBRARY_DIRS
+   "${LLVM_CONFIG_LIBRARY_DIR}"
+   # FIXME: Should there be other entries here?
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
+index 370005cd8d7d..7e790bc52111 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,7 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
+ #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
+ #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index e86eb2b44b10..f63e207e792e 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
+       sys::fs::make_absolute(ActivePrefix, Path);
+       ActiveBinDir = std::string(Path.str());
+     }
+-    ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
++    {
++      SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
++      sys::fs::make_absolute(ActivePrefix, Path);
++      ActiveLibDir = std::string(Path.str());
++    }
+     {
+       SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
+       sys::fs::make_absolute(ActivePrefix, Path);
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/lit-shell-script-runner-set-dyld-library-path.patch b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/lit-shell-script-runner-set-dyld-library-path.patch
new file mode 100644
index 000000000000..82b7b21c55fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/lit-shell-script-runner-set-dyld-library-path.patch
@@ -0,0 +1,17 @@
+diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
+index 0242e0b75af3..d732011306f7 100644
+--- a/utils/lit/lit/TestRunner.py
++++ b/utils/lit/lit/TestRunner.py
+@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
+             f.write('@echo off\n')
+         f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
+     else:
++        # This env var is *purged* when invoking subprocesses so we have to
++        # manually set it from within the bash script in order for the commands
++        # in run lines to see this var:
++        if "DYLD_LIBRARY_PATH" in test.config.environment:
++            f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
++
+         for i, ln in enumerate(commands):
+             match = re.match(kPdbgRegex, ln)
+             if match:
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..d4ccb2ae9822
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,80 @@
+diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py
+index 81e8dc04acea..479ff95681e2 100644
+--- a/test/Unit/lit.cfg.py
++++ b/test/Unit/lit.cfg.py
+@@ -3,6 +3,7 @@
+ # Configuration file for the 'lit' test runner.
+ 
+ import os
++import platform
+ import subprocess
+ 
+ import lit.formats
+@@ -55,3 +56,26 @@ if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):
+ # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
+ if sys.platform == "win32" and "SYSTEMDRIVE" in os.environ:
+     config.environment["SYSTEMDRIVE"] = os.environ["SYSTEMDRIVE"]
++
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
++        yield "LD_LIBRARY_PATH"
++    elif platform.system() == "Darwin":
++        yield "DYLD_LIBRARY_PATH"
++    elif platform.system() == "Windows":
++        yield "PATH"
++    elif platform.system() == "AIX":
++        yield "LIBPATH"
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = os.path.pathsep.join(
++        (config.shlibdir,
++         config.environment.get(shlibpath_var, '')))
++    config.environment[shlibpath_var] = shlibpath
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+diff --git a/test/lit.cfg.py b/test/lit.cfg.py
+index 75a38b4c5dad..856fc75c9d74 100644
+--- a/test/lit.cfg.py
++++ b/test/lit.cfg.py
+@@ -42,6 +42,26 @@ llvm_config.with_environment("PATH", config.llvm_tools_dir, append_path=True)
+ llvm_config.with_system_environment(
+     ["HOME", "INCLUDE", "LIB", "TMP", "TEMP"])
+ 
++# Add the LLVM dynamic libs to the platform-specific loader search path env var:
++#
++# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
++def find_shlibpath_var():
++    if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
++        yield "LD_LIBRARY_PATH"
++    elif platform.system() == "Darwin":
++        yield "DYLD_LIBRARY_PATH"
++    elif platform.system() == "Windows":
++        yield "PATH"
++    elif platform.system() == "AIX":
++        yield "LIBPATH"
++
++for shlibpath_var in find_shlibpath_var():
++    shlibpath = config.llvm_shlib_dir
++    llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True)
++    break
++else:
++    lit_config.warning("unable to inject shared library path on '{}'"
++                       .format(platform.system()))
+ 
+ # Set up OCAMLPATH to include newly built OCaml libraries.
+ top_ocaml_lib = os.path.join(config.llvm_lib_dir, "ocaml")
+@@ -318,7 +338,7 @@ def have_cxx_shared_library():
+ 
+     try:
+         readobj_cmd = subprocess.Popen(
+-            [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE
++            [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE, env=config.environment
+         )
+     except OSError:
+         print("could not exec llvm-readobj")
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
new file mode 100644
index 000000000000..1354ad267314
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
@@ -0,0 +1,24 @@
+diff --git a/tools/polly/test/lit.cfg b/tools/polly/test/lit.cfg
+index 41e3a589c61e..09f3b17498b0 100644
+--- a/tools/polly/test/lit.cfg
++++ b/tools/polly/test/lit.cfg
+@@ -36,9 +36,17 @@ base_paths = [config.llvm_tools_dir, config.environment['PATH']]
+ path = os.path.pathsep.join(base_paths + config.extra_paths)
+ config.environment['PATH'] = path
+ 
++# (Copied from polly/test/Unit/lit.cfg)
++if platform.system() == 'Darwin':
++    shlibpath_var = 'DYLD_LIBRARY_PATH'
++elif platform.system() == 'Windows':
++    shlibpath_var = 'PATH'
++else:
++    shlibpath_var = 'LD_LIBRARY_PATH'
++
+ path = os.path.pathsep.join((config.llvm_libs_dir,
+-                              config.environment.get('LD_LIBRARY_PATH','')))
+-config.environment['LD_LIBRARY_PATH'] = path
++                              config.environment.get(shlibpath_var,'')))
++config.environment[shlibpath_var] = path
+ 
+ llvm_config.use_default_substitutions()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/default.nix
new file mode 100644
index 000000000000..d51335436ad2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, llvm_meta
+, monorepoSrc
+, runCommand
+, cmake
+, ninja
+, llvm
+, targetLlvm
+, lit
+, clang-unwrapped
+, perl
+, pkg-config
+, xcbuild
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = runCommand "${pname}-src-${version}" {} ''
+    mkdir -p "$out"
+    cp -r ${monorepoSrc}/cmake "$out"
+    cp -r ${monorepoSrc}/${pname} "$out"
+  '';
+
+  sourceRoot = "${src.name}/${pname}";
+
+  patches = [
+    ./fix-find-tool.patch
+    ./gnu-install-dirs.patch
+    ./run-lit-directly.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
+  buildInputs = [
+    (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
+  ];
+
+  nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
+
+  # Unsup:Pass:XFail:Fail
+  # 26:267:16:8
+  doCheck = false;
+  checkTarget = "check-openmp";
+
+  preCheck = ''
+    patchShebangs ../tools/archer/tests/deflake.bash
+  '';
+
+  cmakeFlags = [
+    "-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
+    "-DOPT_TOOL=${llvm}/bin/opt"
+    "-DLINK_TOOL=${llvm}/bin/llvm-link"
+  ];
+
+  meta = llvm_meta // {
+    homepage = "https://openmp.llvm.org/";
+    description = "Support for the OpenMP language";
+    longDescription = ''
+      The OpenMP subproject of LLVM contains the components required to build an
+      executable OpenMP program that are outside the compiler itself.
+      Contains the code for the runtime library against which code compiled by
+      "clang -fopenmp" must be linked before it can run and the library that
+      supports offload to target devices.
+    '';
+    # "All of the code is dual licensed under the MIT license and the UIUC
+    # License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/openmp/fix-find-tool.patch b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/fix-find-tool.patch
new file mode 100644
index 000000000000..b7f51196f7ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/fix-find-tool.patch
@@ -0,0 +1,17 @@
+diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
+index 630947abec7e..9f032dc7bd3f 100644
+--- a/libomptarget/DeviceRTL/CMakeLists.txt
++++ b/libomptarget/DeviceRTL/CMakeLists.txt
+@@ -27,10 +27,10 @@ endif()
+ if (LLVM_DIR)
+   # Builds that use pre-installed LLVM have LLVM_DIR set.
+   # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
+-  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
+   find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+   find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+-  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
+   if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
+     libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
+     return()
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/openmp/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/gnu-install-dirs.patch
new file mode 100644
index 000000000000..77a93208832a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/gnu-install-dirs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b6ddbe90516d..311ab1d50e7f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
+   set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
+     "Suffix of lib installation directory, e.g. 64 => lib64")
+   # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
+-  set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
+ 
+   # Group test settings.
+   set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
+@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
+ else()
+   set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
+   # If building in tree, we honor the same install suffix LLVM uses.
+-  set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
++  set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ 
+   if (NOT MSVC)
+     set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/openmp/run-lit-directly.patch b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/run-lit-directly.patch
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/openmp/run-lit-directly.patch
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/llvm-config-link-static.patch b/nixpkgs/pkgs/development/compilers/llvm/llvm-config-link-static.patch
new file mode 100644
index 000000000000..3881cc5206e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/llvm-config-link-static.patch
@@ -0,0 +1,12 @@
+diff --git llvm/tools/llvm-config/CMakeLists.txt llvm/tools/llvm-config/CMakeLists.txt
+index 16ba54c0cf2f..20b017195e84 100644
+--- llvm/tools/llvm-config/CMakeLists.txt
++++ llvm/tools/llvm-config/CMakeLists.txt
+@@ -6,6 +6,7 @@ set(BUILDVARIABLES_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.inc)
+ # Add the llvm-config tool.
+ add_llvm_tool(llvm-config
+   llvm-config.cpp
++  DISABLE_LLVM_LINK_LLVM_DYLIB
+   )
+ 
+ # Compute the substitution values for various items.
diff --git a/nixpkgs/pkgs/development/compilers/llvm/multi.nix b/nixpkgs/pkgs/development/compilers/llvm/multi.nix
new file mode 100644
index 000000000000..136e13ba21f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/multi.nix
@@ -0,0 +1,60 @@
+{ 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" {
+    passthru = {
+      inherit (gcc64) version;
+      lib = gcc_multi_sysroot;
+    };
+  } ''
+    mkdir -p $out/lib{,64}/gcc
+
+    ln -s ${combine gcc64}/lib/gcc/* $out/lib64/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
+    mkdir -p $out/include
+    ln -s ${glibc_multi.dev}/include/* $out/include
+    ln -s ${gcc64.cc}/include/c++ $out/include/c++
+
+    # 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 via
+    # `gccForLibs`.
+    libc = gcc_multi_sysroot;
+
+    bintools = clang.bintools.override {
+      libc = gcc_multi_sysroot;
+    };
+
+    gccForLibs = gcc_multi_sysroot // {
+      inherit (glibc_multi) libgcc;
+      langCC =
+        assert (gcc64.cc.langCC != gcc32.cc.langCC)
+               -> throw "(gcc64.cc.langCC=${gcc64.cc.langCC}) != (gcc32.cc.langCC=${gcc32.cc.langCC})";
+        gcc64.cc.langCC;
+    };
+  };
+
+in clangMulti
diff --git a/nixpkgs/pkgs/development/compilers/llvm/update-git.py b/nixpkgs/pkgs/development/compilers/llvm/update-git.py
new file mode 100755
index 000000000000..b5e900df502b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/update-git.py
@@ -0,0 +1,88 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i python3 -p python3 nix
+
+import csv
+import fileinput
+import json
+import os
+import re
+import subprocess
+import sys
+
+from codecs import iterdecode
+from datetime import datetime
+from urllib.request import urlopen, Request
+
+
+DEFAULT_NIX = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'git/default.nix')
+
+
+def get_latest_chromium_build():
+    RELEASES_URL = 'https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/dev/versions/all/releases?filter=endtime=none&order_by=version%20desc'
+    print(f'GET {RELEASES_URL}')
+    with urlopen(RELEASES_URL) as resp:
+        return json.load(resp)['releases'][0]
+
+
+def get_file_revision(revision, file_path):
+    """Fetches the requested Git revision of the given Chromium file."""
+    url = f'https://raw.githubusercontent.com/chromium/chromium/{revision}/{file_path}'
+    with urlopen(url) as http_response:
+        return http_response.read().decode()
+
+
+def get_commit(ref):
+    url = f'https://api.github.com/repos/llvm/llvm-project/commits/{ref}'
+    headers = {'Accept': 'application/vnd.github.v3+json'}
+    request = Request(url, headers=headers)
+    with urlopen(request) as http_response:
+        return json.loads(http_response.read().decode())
+
+
+def get_current_revision():
+    """Get the current revision of llvmPackages_git."""
+    with open(DEFAULT_NIX) as f:
+        for line in f:
+            rev = re.search(r'^  rev = "(.*)";', line)
+            if rev:
+                return rev.group(1)
+    sys.exit(1)
+
+
+def nix_prefetch_url(url, algo='sha256'):
+    """Prefetches the content of the given URL."""
+    print(f'nix-prefetch-url {url}')
+    out = subprocess.check_output(['nix-prefetch-url', '--type', algo, '--unpack', url])
+    return out.decode('utf-8').rstrip()
+
+
+chromium_build = get_latest_chromium_build()
+chromium_version = chromium_build['version']
+print(f'chromiumDev version: {chromium_version}')
+print('Getting LLVM commit...')
+clang_update_script = get_file_revision(chromium_version, 'tools/clang/scripts/update.py')
+clang_revision = re.search(r"^CLANG_REVISION = '(.+)'$", clang_update_script, re.MULTILINE).group(1)
+clang_commit_short = re.search(r"llvmorg-[0-9]+-init-[0-9]+-g([0-9a-f]{8})", clang_revision).group(1)
+release_version = re.search(r"^RELEASE_VERSION = '(.+)'$", clang_update_script, re.MULTILINE).group(1)
+commit = get_commit(clang_commit_short)
+if get_current_revision() == commit["sha"]:
+    print('No new update available.')
+    sys.exit(0)
+date = datetime.fromisoformat(commit['commit']['committer']['date'].rstrip('Z')).date().isoformat()
+version = f'unstable-{date}'
+print('Prefetching source tarball...')
+hash = nix_prefetch_url(f'https://github.com/llvm/llvm-project/archive/{commit["sha"]}.tar.gz')
+print('Updating default.nix...')
+with fileinput.FileInput(DEFAULT_NIX, inplace=True) as f:
+    for line in f:
+        if match := re.search(r'^  rev-version = "unstable-(.+)";', line):
+                old_date = match.group(1)
+        result = re.sub(r'^  release_version = ".+";', f'  release_version = "{release_version}";', line)
+        result = re.sub(r'^  rev = ".*";', f'  rev = "{commit["sha"]}";', result)
+        result = re.sub(r'^  rev-version = ".+";', f'  rev-version = "{version}";', result)
+        result = re.sub(r'^    sha256 = ".+";', f'    sha256 = "{hash}";', result)
+        print(result, end='')
+# Commit the result:
+commit_message = f"llvmPackages_git: {old_date} -> {date}"
+subprocess.run(['git', 'add', DEFAULT_NIX], check=True)
+subprocess.run(['git', 'commit', '--file=-'], input=commit_message.encode(), check=True)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/update.sh b/nixpkgs/pkgs/development/compilers/llvm/update.sh
new file mode 100755
index 000000000000..95ad356dbd9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/update.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+
+set -eu
+
+# Example usage: ./pkgs/development/compilers/llvm/update.sh 12.0.0-rc4
+
+readonly VERSION="$1"
+readonly VERSION_MAJOR="${VERSION%%.*}"
+readonly VERSION_MAIN="${VERSION%%-*}"
+declare VERSION_PATCH="${VERSION/$VERSION_MAIN/}"
+readonly VERSION_PATCH="${VERSION_PATCH/-/}"
+
+readonly DIR="pkgs/development/compilers/llvm/$VERSION_MAJOR"
+readonly FILE="$DIR/default.nix"
+
+sed -Ei \
+  -e "s/release_version = \".+\";/release_version = \"$VERSION_MAIN\";/" \
+  -e "s/candidate = \".*\";/candidate = \"$VERSION_PATCH\";/" \
+  "$FILE"
+
+readonly ATTRSET="llvmPackages_$VERSION_MAJOR"
+
+if [ "$VERSION_MAJOR" -ge "14" ]; then
+  readonly SOURCES=(
+    "llvm.monorepoSrc"
+  )
+elif [ "$VERSION_MAJOR" -eq "13" ]; then
+  readonly SOURCES=(
+    "llvm.src"
+  )
+else
+  readonly SOURCES=(
+    "clang-unwrapped.src"
+    "compiler-rt.src"
+    "clang-unwrapped.clang-tools-extra_src"
+    "libcxx.src"
+    "libcxxabi.src"
+    "libunwind.src"
+    "lld.src"
+    "lldb.src"
+    "llvm.src"
+    "llvm.polly_src"
+    "openmp.src"
+  )
+fi
+
+for SOURCE in "${SOURCES[@]}"; do
+  echo "Updating the hash of $SOURCE:"
+  declare ATTR="$ATTRSET.$SOURCE"
+  declare OLD_HASH="$(nix --extra-experimental-features nix-command eval -f . $ATTR.outputHash)"
+  declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\""
+  find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} +
+done
+
+echo OK
diff --git a/nixpkgs/pkgs/development/compilers/lobster/default.nix b/nixpkgs/pkgs/development/compilers/lobster/default.nix
new file mode 100644
index 000000000000..e380cf735fb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/lobster/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, callPackage
+
+# Linux deps
+, libGL
+, xorg
+
+# Darwin deps
+, CoreFoundation
+, Cocoa
+, AudioToolbox
+, OpenGL
+, Foundation
+, ForceFeedback
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lobster";
+  version = "2023.13";
+
+  src = fetchFromGitHub {
+    owner = "aardappel";
+    repo = "lobster";
+    rev = "v${version}";
+    sha256 = "sha256-7lMIIJ3iduyxZKwK65tle3c+az2G2Mpi4JwAeCCsTxw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = if stdenv.isDarwin
+    then [
+      CoreFoundation
+      Cocoa
+      AudioToolbox
+      OpenGL
+      Foundation
+      ForceFeedback
+    ]
+    else [
+      libGL
+      xorg.libX11
+      xorg.libXext
+    ];
+
+  preConfigure = ''
+    cd dev
+  '';
+
+  passthru.tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix {};
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    homepage = "https://strlen.com/lobster/";
+    description = "The Lobster programming language";
+    longDescription = ''
+      Lobster is a programming language that tries to combine the advantages of
+      very static typing and memory management with a very lightweight,
+      friendly and terse syntax, by doing most of the heavy lifting for you.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/lobster/test-can-run-hello-world.nix b/nixpkgs/pkgs/development/compilers/lobster/test-can-run-hello-world.nix
new file mode 100644
index 000000000000..ceb0536b582c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/lobster/test-can-run-hello-world.nix
@@ -0,0 +1,13 @@
+{ stdenv, lobster }:
+
+stdenv.mkDerivation {
+  name = "lobster-test-can-run-hello-world";
+  meta.timeout = 10;
+  buildCommand = ''
+    ${lobster}/bin/lobster \
+      ${lobster}/share/Lobster/samples/rosettacode/hello_world_test.lobster \
+      | grep 'Goodbye, World!'
+    touch $out
+  '';
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/lunarml/default.nix b/nixpkgs/pkgs/development/compilers/lunarml/default.nix
new file mode 100644
index 000000000000..558a4e435a41
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/lunarml/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, fetchFromGitHub
+, stdenvNoCC
+, mlton
+, lua5_3
+}:
+
+let
+  version = "0.1.0";
+in
+stdenvNoCC.mkDerivation {
+  inherit version;
+
+  pname = "lunarml";
+
+  src = fetchFromGitHub {
+    owner = "minoki";
+    repo = "LunarML";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-wM6ppH0g8yIi+4fwTejzZGn1uv/Wvlajn87A+IKbPXw=";
+  };
+
+  outputs = [ "out" "doc" ];
+
+  nativeBuildInputs = [
+    mlton
+  ];
+
+  nativeCheckInputs = [
+    lua5_3
+  ];
+
+  postBuild = ''
+    make -C thirdparty install
+  '';
+
+  doCheck = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $doc/lunarml $out/{bin,lib}
+    cp -r bin $out
+    cp -r lib $out
+    cp -r example $doc/lunarml
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "Standard ML compiler that produces Lua/JavaScript";
+    homepage = "https://github.com/minoki/LunarML";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ toastal ratsclub ];
+    platforms = mlton.meta.platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/manticore/default.nix b/nixpkgs/pkgs/development/compilers/manticore/default.nix
new file mode 100644
index 000000000000..b767ccf150a6
--- /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/marst/default.nix b/nixpkgs/pkgs/development/compilers/marst/default.nix
new file mode 100644
index 000000000000..8644fcf7bf43
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/marst/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchurl
+, texinfo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "marst";
+  version = "2.7";
+
+  src = fetchurl {
+    url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
+    hash = "sha256-Pue50cvjzZ+19iJxfae7VQbxpto7MPgS4jhLh7zk2lA=";
+  };
+
+  nativeBuildInputs = [
+    texinfo
+  ];
+
+  postBuild = ''
+    makeinfo doc/marst.texi -o doc/marst.info
+  '';
+
+  postInstall = ''
+    install -m644 doc/marst.info -Dt $out/share/info/
+    install -m644 doc/marst.pdf -Dt $out/share/doc/${pname}/
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/marst/";
+    description = "An Algol-60-to-C translator";
+    longDescription = ''
+      MARST is an Algol-to-C translator. It automatically translates programs
+      written on the algorithmic language Algol 60 to the C programming
+      language.
+
+      The MARST package includes three main components:
+
+      - the translator, MARST, that translates Algol 60 programs to the C
+        programming language.
+
+      - the library, ALGLIB, that contains precompiled standard Algol 60
+        procedures and other necessary library routines. This library is to be
+        used at linking stage. (In the distribution the name libalgol.a is used
+        for this library.)
+
+      - the converter, MACVT, that allows to convert existing Algol 60 programs
+        from some other representations to MARST representation.
+    '';
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
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..2ef9e911b824
--- /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";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mcpp/default.nix b/nixpkgs/pkgs/development/compilers/mcpp/default.nix
new file mode 100644
index 000000000000..e8eb62a15f13
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mcpp/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mcpp";
+  version = "2.7.2.1";
+
+  src = fetchFromGitHub {
+    owner = "museoa";
+    repo = "mcpp";
+    rev = finalAttrs.version;
+    hash= "sha256-T4feegblOeG+NU+c+PAobf8HT8KDSfcINkRAa1hNpkY=";
+  };
+
+  patches = [
+    ./readlink.patch
+  ];
+
+  configureFlags = [ "--enable-mcpplib" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/museoa/mcpp";
+    description = "Matsui's C preprocessor";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/mcpp/readlink.patch b/nixpkgs/pkgs/development/compilers/mcpp/readlink.patch
new file mode 100644
index 000000000000..0f5fc6d7e963
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mcpp/readlink.patch
@@ -0,0 +1,24 @@
+From 1c4b0f26614bff331eb8a9f2b514309af6f31fd0 Mon Sep 17 00:00:00 2001
+From: Jose <pepone@users.noreply.github.com>
+Date: Mon, 26 Jun 2023 16:43:43 +0200
+Subject: [PATCH] Add 'unistd' header for readlink (#8)
+
+---
+ src/system.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/system.c b/src/system.c
+index a3501f9..646caf6 100644
+--- a/src/system.c
++++ b/src/system.c
+@@ -37,6 +37,11 @@
+  *      2. append the system-dependent routines in this file.
+  */
++
++#ifndef _MSC_VER
++#  include <unistd.h> // For readlink()
++#endif
++
+ #if PREPROCESSED
+ #include    "mcpp.H"
+ #else
diff --git a/nixpkgs/pkgs/development/compilers/mercury/default.nix b/nixpkgs/pkgs/development/compilers/mercury/default.nix
new file mode 100644
index 000000000000..d2e15dc6fc23
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mercury/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchurl, gcc, flex, bison, texinfo, jdk_headless, erlang, makeWrapper
+, readline }:
+
+stdenv.mkDerivation rec {
+  pname = "mercury";
+  version = "22.01.8";
+
+  src = fetchurl {
+    url    = "https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.gz";
+    sha256 = "sha256-oJfozI7KAVLtlSfByvc+XJyD9q2h0xOiW4D+eQcvutg=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ gcc flex bison texinfo jdk_headless erlang 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_headless}/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    = "https://mercurylang.org/";
+    changelog   = "https://dl.mercurylang.org/release/release-notes-${version}.html";
+    license     = lib.licenses.gpl2Only;
+    platforms   = lib.platforms.all;
+    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..195f0c0e36f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix
@@ -0,0 +1,15 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "meta-build-env";
+  version = "0.1";
+
+  src = fetchurl {
+    url = "http://www.meta-environment.org/releases/meta-build-env-${version}.tar.gz";
+    sha256 = "1imn1gaan4fv73v8w3k3lgyjzkcn7bdp69k6hlz0vqdg17ysd1x3";
+  };
+
+  meta = {
+    platforms = 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..50c34f7c35be
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mezzo/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4, menhir
+, menhirLib, yojson, ulex, pprint, fix, functory
+}:
+
+if lib.versionAtLeast ocaml.version "4.06"
+then throw "mezzo is not available for OCaml ${ocaml.version}"
+else
+
+let
+  check-ocaml-version = with lib; versionAtLeast (getVersion ocaml);
+in
+
+assert check-ocaml-version "4";
+
+stdenv.mkDerivation {
+
+  pname = "mezzo";
+  version = "0.0.m8";
+
+  src = fetchFromGitHub {
+    owner = "protz";
+    repo = "mezzo";
+    rev = "m8";
+    sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 menhir ];
+  buildInputs = [ yojson menhirLib ulex pprint fix functory ocamlbuild ];
+
+  # Sets warning 3 as non-fatal
+  prePatch = lib.optionalString (check-ocaml-version "4.02") ''
+    substituteInPlace myocamlbuild.pre.ml \
+    --replace '@1..3' '@1..2+3'
+  ''
+  # Compatibility with PPrint ≥ 20220103
+  + ''
+    substituteInPlace typing/Fact.ml --replace PPrintOCaml PPrint.OCaml
+  '';
+
+  createFindlibDestdir = true;
+
+  postInstall = ''
+    mkdir $out/bin
+    cp mezzo $out/bin/
+  '';
+
+  meta = with 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..fa65622ba0cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/microscheme/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper, unixtools }:
+
+stdenv.mkDerivation rec {
+  pname = "microscheme";
+  version = "0.9.3";
+
+  src = fetchFromGitHub {
+    owner = "ryansuchocki";
+    repo = "microscheme";
+    rev = "v${version}";
+    sha256 = "5qTWsBCfj5DCZ3f9W1bdo6WAc1DZqVxg8D7pwC95duQ=";
+  };
+
+  postPatch = ''
+    substituteInPlace makefile --replace gcc ${stdenv.cc.targetPrefix}cc
+  '';
+
+  nativeBuildInputs = [ makeWrapper unixtools.xxd ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    homepage = "https://ryansuchocki.github.io/microscheme/";
+    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.all;
+    maintainers = with maintainers; [ ardumont ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/minimacy/default.nix b/nixpkgs/pkgs/development/compilers/minimacy/default.nix
new file mode 100644
index 000000000000..6928ba4cdc42
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/minimacy/default.nix
@@ -0,0 +1,80 @@
+{ lib
+, stdenv
+, alsa-lib
+, fetchFromGitHub
+, libGL
+, libGLU
+, libX11
+, libXext
+, makeBinaryWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "minimacy";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "ambermind";
+    repo = pname;
+    rev =  version;
+    hash = "sha256-uA+4dnhOnv7qRE7nqew8a14DGaQblsMY2uBZ+iyLtFU=";
+  };
+
+  nativeBuildInputs = [ makeBinaryWrapper ];
+
+  buildInputs = [ libGL libGLU ] ++ lib.optionals stdenv.isLinux [ alsa-lib libX11 libXext ];
+
+  enableParallelBuilding = true;
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-unused-result";
+
+  preBuild = ''
+    pushd ${if stdenv.isDarwin then "macos/cmdline" else "unix"}
+  '';
+
+  # TODO: build graphic version for darwin
+  buildFlags = (if stdenv.isDarwin then [ "nox" ] else [ "all" ]) ++ [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  postBuild = ''
+    popd
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+
+    bin/${if stdenv.isDarwin then "minimacyMac" else "minimacy"} system/demo/demo.fun.mandelbrot.mcy
+
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib/minimacy
+    cp -r {README.md,LICENSE,system,rom,topLevel.mcy} $out/lib/minimacy
+    install bin/minimacy* -Dt $out/bin
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    for prog in $out/bin/minimacy*;
+      do wrapProgram $prog \
+        --set MINIMACY $out/lib/minimacy
+      done
+  '';
+
+  meta = {
+    description = "An open-source minimalist computing technology";
+    longDescription = ''
+      Minimacy is an open-source minimalist computation system based on the principle "Less is more".
+      It is designed and programmed by Sylvain Huet.
+    '';
+    maintainers = with lib.maintainers; [ jboy ];
+    homepage    = "https://minimacy.net";
+    license     = lib.licenses.gpl2;
+    platforms   = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mint/default.nix b/nixpkgs/pkgs/development/compilers/mint/default.nix
new file mode 100644
index 000000000000..b1baf88c936c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mint/default.nix
@@ -0,0 +1,34 @@
+{ lib, fetchFromGitHub, crystal, openssl }:
+
+crystal.buildCrystalPackage rec {
+  version = "0.19.0";
+  pname = "mint";
+
+  src = fetchFromGitHub {
+    owner = "mint-lang";
+    repo = "mint";
+    rev = version;
+    hash = "sha256-s/ehv8Z71nWnxpajO7eR4MxoHppqkdleFluv+e5Vv6I=";
+  };
+
+  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 ];
+
+  preConfigure = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  meta = with lib; {
+    description = "A refreshing language for the front-end web";
+    homepage = "https://www.mint-lang.com/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ manveru ];
+    broken = lib.versionOlder crystal.version "1.0";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mint/shards.nix b/nixpkgs/pkgs/development/compilers/mint/shards.nix
new file mode 100644
index 000000000000..47cd9a779173
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mint/shards.nix
@@ -0,0 +1,52 @@
+{
+  admiral = {
+    url = "https://github.com/jwaldrip/admiral.cr.git";
+    rev = "v1.12.1";
+    sha256 = "0x8v9i8ixs7xcwz35kdlqvz0pfm1cqzm6gvwdjfrps0drisk7f6i";
+  };
+  ameba = {
+    url = "https://github.com/crystal-ameba/ameba.git";
+    rev = "v1.5.0";
+    sha256 = "1idivsbpmi40aqvs82fsv37nrgikirprxrj3ls9chsb876fq9p2d";
+  };
+  ansi-escapes = {
+    url = "https://github.com/gtramontina/ansi-escapes.cr.git";
+    rev = "v1.0.0";
+    sha256 = "106cy7bq0j438cfs0zqcxhj84msjj9dybxlcjr8qhs1fpm02s00b";
+  };
+  backtracer = {
+    url = "https://github.com/sija/backtracer.cr.git";
+    rev = "v1.2.2";
+    sha256 = "1rknyylsi14m7i77x7c3138wdw27i4f6sd78m3srw851p47bwr20";
+  };
+  baked_file_system = {
+    url = "https://github.com/schovi/baked_file_system.git";
+    rev = "v0.10.0";
+    sha256 = "10f25sby8ipps5c2jj4j2q30kscgv4g1s5nhdddmldhg9isj0jli";
+  };
+  dotenv = {
+    url = "https://github.com/gdotdesign/cr-dotenv.git";
+    rev = "v1.0.0";
+    sha256 = "00pdawysns1w1iqwh6j3shilpwh41ljz1chsqkacn6dj2yn21n0r";
+  };
+  exception_page = {
+    url = "https://github.com/crystal-loot/exception_page.git";
+    rev = "v0.3.1";
+    sha256 = "00fpkhwaf94mz9d9qiinsa7hdbs3x2yqjwwzvbjwv86dv8s5008n";
+  };
+  kemal = {
+    url = "https://github.com/kemalcr/kemal.git";
+    rev = "v1.4.0";
+    sha256 = "0pmcnbfzb0bqrnwbqikci4j0hbxsabmkz8a879vprf5gswnr7b63";
+  };
+  markd = {
+    url = "https://github.com/icyleaf/markd.git";
+    rev = "v0.5.0";
+    sha256 = "1a677z57kwjq6lp4ws7br1ga8jgpgi8990glhd1r8756bdyd8mg0";
+  };
+  radix = {
+    url = "https://github.com/luislavena/radix.git";
+    rev = "v0.4.1";
+    sha256 = "1l08cydkdidq9yyil1wl240hvk41iycv04jrg6nx5mkvzw4z1bzg";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/miranda/default.nix b/nixpkgs/pkgs/development/compilers/miranda/default.nix
new file mode 100644
index 000000000000..f0d95323fe33
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/miranda/default.nix
@@ -0,0 +1,81 @@
+{ stdenv, lib, fetchzip, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "miranda";
+  version = "2.066";
+
+  # The build generates object files (`.x`) from module files (`.m`).
+  # To be able to invalidate object file, it contains the `mtime`
+  # of the corresponding module file at the time of the build.
+  # When a file is installed to Nix store its `mtime` is set to `1`,
+  # so the `mtime` field in the object file would no longer match
+  # and Miranda would try to regenerate it at the runtime,
+  # even though it is up to date.
+  # Using `fetchzip` will make all the source files have `mtime=1`
+  # from the start so this mismatch cannot occur.
+  src = fetchzip {
+    url = "https://www.cs.kent.ac.uk/people/staff/dat/miranda/src/mira-${builtins.replaceStrings [ "." ] [ "" ] version}-src.tgz";
+    sha256 = "KE/FTL9YW9l7VBAgkFZlqgSM1Bt/BXT6GkkONtyKJjQ=";
+  };
+
+  patches = [
+    # Allow passing `PREFIX` to makeFlags.
+    # Sent upstream on 2020-10-10.
+    (fetchpatch {
+      name = "fix-makefile-variables.patch";
+      url = "https://github.com/jtojnar/miranda/commit/be62d2150725a4c314aa7e3e1e75a165c90be65d.patch";
+      sha256 = "0r8nnr7iyzp1a3w3n6y1xi0ralqhm1ifp75yhyj3h1g229vk51a6";
+    })
+
+    # Create the installation directories.
+    # Sent upstream on 2020-10-10.
+    (fetchpatch {
+      name = "add-mkdirs-makefile.patch";
+      url = "https://github.com/jtojnar/miranda/commit/048754606625975d5358e946549c41ae7b5d3428.patch";
+      sha256 = "1n8xv679i7s789km2dxxrs2pphyyi7vr7rhafqvmkcdmhmxk9h2a";
+    })
+
+    # Use correct installation path for finding the library.
+    # Sent upstream on 2020-10-10.
+    (fetchpatch {
+      name = "c-path-fixes.patch";
+      url = "https://github.com/jtojnar/miranda/commit/aea0a118a802a0da6029b781f7cfd388224263cf.patch";
+      sha256 = "1z3giv8fzc35a23ga9ahz9d1fbvya67kavnb8h4rv2icbzr5j5gd";
+    })
+
+    # Make build reproducible.
+    # Sent upstream on 2020-10-10.
+    (fetchpatch {
+      name = "deterministic-build.patch";
+      url = "https://github.com/jtojnar/miranda/commit/daf8abb8f30ec1cca21698e3fc355578b9f7c571.patch";
+      sha256 = "TC/YrHrMzdlwicJ3oJ/TjwhkufmV3ypemgyqhMmVut4=";
+    })
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CFLAGS=-O2"
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    patchShebangs quotehostinfo
+    substituteInPlace Makefile --replace strip '${stdenv.cc.targetPrefix}strip'
+  '';
+
+  meta = with lib; {
+    description = "Compiler for Miranda -- a pure, non-strict, polymorphic, higher order functional programming language";
+    homepage = "https://www.cs.kent.ac.uk/people/staff/dat/miranda/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ siraben ];
+    platforms = platforms.all;
+    mainProgram = "mira";
+  };
+}
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..1abbac512aa7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix
@@ -0,0 +1,114 @@
+{ fetchurl
+, lib
+, stdenv
+, makeWrapper
+, gnum4
+, texinfo
+, texliveSmall
+, automake
+, autoconf
+, libtool
+, ghostscript
+, ncurses
+, enableX11 ? false, libX11
+}:
+
+let
+  version = "12.1";
+  bootstrapFromC = ! ((stdenv.isLinux && stdenv.isAarch64) || stdenv.isx86_64);
+
+  arch = if stdenv.isLinux && stdenv.isAarch64 then
+    "-aarch64le"
+   else
+     "-x86-64";
+in
+stdenv.mkDerivation {
+  pname = "mit-scheme" + lib.optionalString enableX11 "-x11";
+  inherit 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.isLinux && stdenv.isAarch64
+    then fetchurl {
+      url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-aarch64le.tar.gz";
+      sha256 = "12ra9bc93x8g07impbd8jr6djjzwpb9qvh9zhxvvrba3332zx3vh";
+  } else fetchurl {
+      url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-x86-64.tar.gz";
+      sha256 = "035f92vni0vqmgj9hq2i7vwasz7crx52wll4823vhfkm1qdv5ywc";
+    };
+
+  buildInputs = [ ncurses ] ++ lib.optionals enableX11 [ libX11 ];
+
+  configurePhase = ''
+    runHook preConfigure
+    (cd src && ./configure)
+    (cd doc && ./configure)
+    runHook postConfigure
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=array-parameter"
+    "-Wno-error=use-after-free"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    cd src
+
+   ${if bootstrapFromC
+      then "./etc/make-liarc.sh --prefix=$out"
+      else "make compile-microcode"}
+
+    cd ../doc
+
+    make
+
+    cd ..
+
+    runHook postBuild
+  '';
+
+
+  installPhase = ''
+    runHook preInstall
+    make prefix=$out install -C src
+    make prefix=$out install -C doc
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/mit-scheme${arch}-${version} --set MITSCHEME_LIBRARY_PATH \
+      $out/lib/mit-scheme${arch}-${version}
+  '';
+
+  nativeBuildInputs = [ makeWrapper gnum4 texinfo (texliveSmall.withPackages (ps: with ps; [ epsf ps.texinfo ])) automake ghostscript autoconf libtool ];
+
+  # XXX: The `check' target doesn't exist.
+  doCheck = false;
+
+  meta = with 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..0b95f3e9b2a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mkcl/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, gmp, gcc }:
+
+stdenv.mkDerivation rec {
+  pname = "mkcl";
+  version = "1.1.11";
+
+  src = fetchFromGitHub {
+    owner = "jcbeaudoin";
+    repo = "mkcl";
+    rev = "v${version}";
+    sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26";
+  };
+
+  patches = [
+    # "Array sys_siglist[] never was part of the public interface. Replace it with calls to psiginfo()."
+    (fetchpatch {
+      name = "sys_siglist.patch";
+      url = "https://github.com/jcbeaudoin/MKCL/commit/0777dd08254c88676f4f101117b10786b22111d6.patch";
+      sha256 = "1dnr1jzha77nrxs22mclrcqyqvxxn6q1sfn35qjs77fi3jcinjsc";
+    })
+
+    # Pull upstream fix for -fno-common toolchins like gcc-10
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://gitlab.common-lisp.net/mkcl/mkcl/-/commit/ef1981dbf4ceb1793cd6434e66e97b3db48b4ea0.patch";
+      sha256 = "00y6qanwvgb1r4haaqmvz7lbqa51l4wcnns1rwlfgvcvkpjc3dif";
+    })
+  ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  propagatedBuildInputs = [ gmp ];
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags = [
+    "GMP_CFLAGS=-I${lib.getDev gmp}/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=${lib.getLib stdenv.cc.libc}/lib \
+      --sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include \
+      --libpaths=${lib.getLib stdenv.cc.libc}/lib
+  )'';
+
+  postInstall = ''
+    wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "ANSI Common Lisp Implementation";
+    homepage = "https://common-lisp.net/project/mkcl/";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+    maintainers = lib.teams.lisp.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlkit/default.nix b/nixpkgs/pkgs/development/compilers/mlkit/default.nix
new file mode 100644
index 000000000000..082b768a2b00
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlkit/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, mlton }:
+
+stdenv.mkDerivation rec {
+  pname = "mlkit";
+  version = "4.7.8";
+
+  src = fetchFromGitHub {
+    owner = "melsman";
+    repo = "mlkit";
+    rev = "v${version}";
+    sha256 = "sha256-IAlcf4McvWoCflrH6d6PQP1aosHq2QNKBwde7i38Mc4=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook mlton ];
+
+  buildFlags = [ "mlkit" "mlkit_libs" ];
+
+  meta = with lib; {
+    description = "Standard ML Compiler and Toolkit";
+    homepage = "https://elsman.com/mlkit/";
+    changelog = "https://github.com/melsman/mlkit/blob/v${version}/NEWS.md";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ athas ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlton/20130715.nix b/nixpkgs/pkgs/development/compilers/mlton/20130715.nix
new file mode 100644
index 000000000000..98b4aeda5516
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/20130715.nix
@@ -0,0 +1,119 @@
+{ lib, 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 = 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
+  '' + 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
+  '' + 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
+
+  '' + 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
+  '' + 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..4846b58bf26b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/20180207-binary.nix
@@ -0,0 +1,57 @@
+{ lib, 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 = 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 = 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
+  '' + 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/20210107-binary.nix b/nixpkgs/pkgs/development/compilers/mlton/20210107-binary.nix
new file mode 100644
index 000000000000..26a20db0d391
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/20210107-binary.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, fetchurl, patchelf, gmp }:
+let
+  dynamic-linker = stdenv.cc.bintools.dynamicLinker;
+in
+stdenv.mkDerivation rec {
+  pname = "mlton";
+  version = "20210107";
+
+  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-glibc2.31.tgz.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-19.6.gmp-static.tgz";
+        sha256 = "1cw7yhw48qp12q0adwf8srpjzrgkp84kmlkqw3pz8vkxz4p9hbdv";
+      })
+    else
+      throw "Architecture not supported";
+
+  buildInputs = [ gmp ];
+  nativeBuildInputs = 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 = 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
+  '' + 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..1caeecccaadb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/default.nix
@@ -0,0 +1,30 @@
+{ callPackage }:
+
+rec {
+  mlton20130715 = callPackage ./20130715.nix { };
+
+  mlton20180207Binary = callPackage ./20180207-binary.nix { };
+
+  mlton20180207 = callPackage ./from-git-source.nix {
+    mltonBootstrap = mlton20180207Binary;
+    version = "20180207";
+    rev = "on-20180207-release";
+    sha256 = "00rdd2di5x1dzac64il9z05m3fdzicjd3226wwjyynv631jj3q2a";
+  };
+
+  mlton20210107Binary = callPackage ./20210107-binary.nix { };
+
+  mlton20210107 = callPackage ./from-git-source.nix {
+    mltonBootstrap = mlton20180207Binary;
+    version = "20210107";
+    rev = "on-20210117-release";
+    sha256 = "sha256-rqL8lnzVVR+5Hc7sWXK8dCXN92dU76qSoii3/4StODM=";
+  };
+
+  mltonHEAD = callPackage ./from-git-source.nix {
+    mltonBootstrap = mlton20180207Binary;
+    version = "HEAD";
+    rev = "875f7912a0b135a9a7e86a04ecac9cacf0bfe5e5";
+    sha256 = "sha256-/MIoVqqv8qrJPehU7VRFpXtAAo8UUzE3waEvB7WnS9A=";
+  };
+}
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..b91e6c7480da
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix
@@ -0,0 +1,43 @@
+{ fetchgit
+, gmp
+, mltonBootstrap
+, url ? "https://github.com/mlton/mlton"
+, rev
+, sha256
+, stdenv
+, version
+, which
+}:
+
+stdenv.mkDerivation {
+  pname = "mlton";
+  inherit version;
+
+  src = fetchgit {
+    inherit url rev sha256;
+  };
+
+  nativeBuildInputs = [ which ];
+
+  buildInputs = [mltonBootstrap gmp];
+
+  # build fails otherwise
+  enableParallelBuilding = false;
+
+  preBuild = ''
+    find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
+    sed -i "s|/tmp|$TMPDIR|" bin/regression
+
+    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..0b283d4f1778
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/4.nix
@@ -0,0 +1,9 @@
+{ callPackage, Foundation, libobjc, stdenv, lib }:
+
+callPackage ./generic.nix ({
+  inherit Foundation libobjc;
+  version = "4.8.1.0";
+  sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq";
+  enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645
+  extraPatches = lib.optionals stdenv.isLinux [ ./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..c49379c670e0
--- /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.34";
+  sha256 = "12vw5dkhmp1vk9l658pil8jiqirkpdsc5z8dm5mpj595yr6d94fd";
+  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..8de3d92ab056
--- /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.12.0.182";
+  srcArchiveSuffix = "tar.xz";
+  sha256 = "sha256-VzZqarTztezxEdSFSAMWFbOhANuHxnn8AG6Mik79lCQ=";
+  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..a3705de4ccb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/generic.nix
@@ -0,0 +1,113 @@
+{ lib, stdenv, fetchurl, bison, pkg-config, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, bash
+, withLLVM ? false, cacert, Foundation, libobjc, python3, version, sha256, autoconf, libtool, automake, cmake, which
+, gnumake42
+, 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}";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    autoconf
+    automake
+    bison
+    cmake
+    libtool
+    perl
+    pkg-config
+    python3
+    which
+    gnumake42
+  ];
+  buildInputs = [
+    glib
+    gettext
+    libgdiplus
+    libX11
+    ncurses
+    zlib
+    bash
+  ] ++ lib.optionals stdenv.isDarwin [ Foundation libobjc ];
+
+  configureFlags = [
+    "--x-includes=${libX11.dev}/include"
+    "--x-libraries=${libX11.out}/lib"
+    "--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"
+  ] ++ lib.optionals withLLVM [
+    "--enable-llvm"
+    "--with-llvm=${llvm}"
+  ];
+
+  configurePhase = ''
+    patchShebangs autogen.sh mcs/build/start-compiler-server.sh
+    ./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"
+  '' + 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 lib; {
+    # Per nixpkgs#151720 the build failures for aarch64-darwin are fixed since 6.12.0.129
+    broken = stdenv.isDarwin && stdenv.isAarch64 && lib.versionOlder version "6.12.0.129";
+    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 = with licenses; [
+      /* runtime, compilers, tools and most class libraries licensed */ mit
+      /* runtime includes some code licensed */ bsd3
+      /* mcs/class/I18N/mklist.sh marked GPLv2 and others just GPL */ gpl2Only
+      /* RabbitMQ.Client class libraries dual licensed */ mpl20 asl20
+      /* mcs/class/System.Core/System/TimeZoneInfo.Android.cs */ asl20
+      /* some documentation */ mspl
+      # https://www.mono-project.com/docs/faq/licensing/
+      # https://github.com/mono/mono/blob/main/LICENSE
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mono/llvm.nix b/nixpkgs/pkgs/development/compilers/mono/llvm.nix
new file mode 100644
index 000000000000..c69a4021677e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/llvm.nix
@@ -0,0 +1,51 @@
+{ 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";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ perl groff 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"
+  ] ++ lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
+
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
+    homepage    = "http://llvm.org/";
+    license     = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ thoughtpolice ];
+    platforms   = 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..44ed1185fafc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mosml/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, gmp, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "mosml";
+  version = "2.10.1";
+
+  buildInputs = [ gmp perl ];
+
+  makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  src = fetchFromGitHub {
+    owner = "kfl";
+    repo = "mosml";
+    rev = "ver-${version}";
+    sha256 = "sha256-GK39WvM7NNhoC5f0Wjy4/5VWT+Rbh2qo+W71hWrbPso=";
+  };
+
+  setSourceRoot = ''export sourceRoot="$(echo */src)"'';
+
+  # MosML needs a specific RPATH entry pointing to $(out)/lib (added
+  # by the build system), which patchelf will remove.
+  dontPatchELF = true;
+
+  meta = with 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..18acd7c3d96f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mozart/binary.nix
@@ -0,0 +1,81 @@
+{ lib, 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 = lib.makeLibraryPath
+    [ stdenv.cc.cc
+      boost
+      gmp
+      tcl-8_5
+      tk-8_5
+    ];
+
+  TK_LIBRARY = "${tk-8_5}/lib/tk8.5";
+
+  nativeBuildInputs = [ 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
+
+    ${lib.optionalString (emacs != null) ''
+      wrapProgram $out/bin/oz --suffix PATH ":" ${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 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.
+    '';
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    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..521ae2a9b22c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mozart/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, fetchurl
+, fetchpatch
+, cmake
+, unzip
+, makeWrapper
+, boost
+, llvmPackages
+, gmp
+, emacs
+, 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";
+  };
+
+  patches = [
+    ./patch-limits.diff
+    (fetchpatch {
+      name = "remove-uses-of-deprecated-boost-apis.patch";
+      url = "https://github.com/mozart/mozart2/commit/4256d3a9122e1cbb01400a1807bdee66088ff274.patch";
+      hash = "sha256-AnOrBnxoCxqis+RdCsq8EKBg//jcNHSOFYUvf7vh+Hc=";
+    })
+  ];
+
+  postConfigure = ''
+    cp ${bootcompiler} bootcompiler/bootcompiler.jar
+  '';
+
+  nativeBuildInputs = [ cmake makeWrapper unzip ];
+
+  cmakeFlags = [
+    "-DBoost_USE_STATIC_LIBS=OFF"
+    "-DMOZART_BOOST_USE_STATIC_LIBS=OFF"
+    # 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"
+  ];
+
+  fixupPhase = ''
+    wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs
+  '';
+
+  buildInputs = [
+    boost
+    gmp
+    emacs
+    jre_headless
+    tcl
+    tk
+  ];
+
+  meta = with lib; {
+    description = "An open source implementation of Oz 3";
+    maintainers = with maintainers; [ layus h7x4 ];
+    license = licenses.bsd2;
+    homepage = "https://mozart.github.io";
+    platforms = platforms.all;
+    # Trace/BPT trap: 5
+    broken = stdenv.isDarwin;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/mozart/patch-limits.diff b/nixpkgs/pkgs/development/compilers/mozart/patch-limits.diff
new file mode 100644
index 000000000000..336f5b3dbbdd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mozart/patch-limits.diff
@@ -0,0 +1,10 @@
+--- mozart2-2.0.1.orig/vm/vm/main/core-forward-decl.hh	2018-09-05 03:16:51.000000000 +0200
++++ mozart2-2.0.1/vm/vm/main/core-forward-decl.hh	2021-08-03 10:31:50.281476430 +0200
+@@ -36,6 +36,7 @@
+ #include <cstdint>
+ #include <ostream>
+ #include <functional>
++#include <limits>
+ #include <memory>
+ #include <cassert>
+ 
diff --git a/nixpkgs/pkgs/development/compilers/mruby/default.nix b/nixpkgs/pkgs/development/compilers/mruby/default.nix
new file mode 100644
index 000000000000..578dbf9c9837
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mruby/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, ruby, rake, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "mruby";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner   = "mruby";
+    repo    = "mruby";
+    rev     = version;
+    sha256  = "sha256-MmrbWeg/G29YBvVrOtceTOZChrQ2kx9+apl7u7BiGjA=";
+  };
+
+  nativeBuildInputs = [ rake ];
+
+  nativeCheckInputs = [ ruby ];
+
+  # Necessary so it uses `gcc` instead of `ld` for linking.
+  # https://github.com/mruby/mruby/blob/e502fd88b988b0a8d9f31b928eb322eae269c45a/tasks/toolchains/gcc.rake#L30
+  preBuild = "unset LD";
+
+  installPhase = ''
+    mkdir $out
+    cp -R include build/host/{bin,lib} $out
+  '';
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "An embeddable implementation of the Ruby language";
+    homepage = "https://mruby.org";
+    maintainers = with maintainers; [ nicknovitski marsam ];
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mrustc/bootstrap.nix b/nixpkgs/pkgs/development/compilers/mrustc/bootstrap.nix
new file mode 100644
index 000000000000..0996702ec625
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mrustc/bootstrap.nix
@@ -0,0 +1,147 @@
+{ lib, stdenv
+, fetchurl
+, mrustc
+, mrustc-minicargo
+, llvm_12
+, llvmPackages_12
+, libffi
+, cmake
+, python3
+, zlib
+, libxml2
+, openssl
+, pkg-config
+, curl
+, which
+, time
+}:
+
+let
+  mrustcTargetVersion = "1.54";
+  rustcVersion = "1.54.0";
+  rustcSrc = fetchurl {
+    url = "https://static.rust-lang.org/dist/rustc-${rustcVersion}-src.tar.gz";
+    sha256 = "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc";
+  };
+  rustcDir = "rustc-${rustcVersion}-src";
+  outputDir = "output-${rustcVersion}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "mrustc-bootstrap";
+  version = "${mrustc.version}_${rustcVersion}";
+
+  inherit (mrustc) src;
+  postUnpack = "tar -xf ${rustcSrc} -C source/";
+
+  # the rust build system complains that nix alters the checksums
+  dontFixLibtool = true;
+
+  patches = [
+    ./patches/0001-dont-download-rustc.patch
+  ];
+
+  postPatch = ''
+    echo "applying patch ./rustc-${rustcVersion}-src.patch"
+    patch -p0 -d ${rustcDir}/ < rustc-${rustcVersion}-src.patch
+  '';
+
+  # rustc unfortunately needs cmake to compile llvm-rt but doesn't
+  # use it for the normal build. This disables cmake in Nix.
+  dontUseCmakeConfigure = true;
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    cmake
+    mrustc
+    mrustc-minicargo
+    pkg-config
+    python3
+    time
+    which
+  ];
+  buildInputs = [
+    # for rustc
+    llvm_12 libffi zlib libxml2
+    # for cargo
+    openssl
+    (curl.override { inherit openssl; })
+  ];
+
+  makeFlags = [
+    # Use shared mrustc/minicargo/llvm instead of rebuilding them
+    "MRUSTC=${mrustc}/bin/mrustc"
+    #"MINICARGO=${mrustc-minicargo}/bin/minicargo"  # FIXME: we need to rebuild minicargo locally so --manifest-overrides is applied
+    "LLVM_CONFIG=${llvm_12.dev}/bin/llvm-config"
+    "RUSTC_TARGET=${stdenv.targetPlatform.rust.rustcTarget}"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    local flagsArray=(
+      PARLEVEL=$NIX_BUILD_CORES
+      ${toString makeFlags}
+    )
+
+    touch ${rustcDir}/dl-version
+    export OUTDIR_SUF=-${rustcVersion}
+    export RUSTC_VERSION=${rustcVersion}
+    export MRUSTC_TARGET_VER=${mrustcTargetVersion}
+    export MRUSTC_PATH=${mrustc}/bin/mrustc
+
+    echo minicargo.mk: libs
+    make -f minicargo.mk "''${flagsArray[@]}" LIBS
+
+    echo test
+    make "''${flagsArray[@]}" test
+
+    # disabled because it expects ./bin/mrustc
+    #echo local_tests
+    #make "''${flagsArray[@]}" local_tests
+
+    echo minicargo.mk: rustc
+    make -f minicargo.mk "''${flagsArray[@]}" ${outputDir}/rustc
+
+    echo minicargo.mk: cargo
+    make -f minicargo.mk "''${flagsArray[@]}" ${outputDir}/cargo
+
+    echo run_rustc
+    make -C run_rustc "''${flagsArray[@]}"
+
+    unset flagsArray
+
+    runHook postBuild
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+    run_rustc/${outputDir}/prefix/bin/hello_world | grep "hello, world"
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin/ $out/lib/
+    cp run_rustc/${outputDir}/prefix/bin/cargo $out/bin/cargo
+    cp run_rustc/${outputDir}/prefix/bin/rustc_binary $out/bin/rustc
+
+    cp -r run_rustc/${outputDir}/prefix/lib/* $out/lib/
+    cp $out/lib/rustlib/${stdenv.targetPlatform.rust.rustcTarget}/lib/*.so $out/lib/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A minimal build of Rust";
+    longDescription = ''
+      A minimal build of Rust, built from source using mrustc.
+      This is useful for bootstrapping the main Rust compiler without
+      an initial binary toolchain download.
+    '';
+    maintainers = with maintainers; [ progval r-burns ];
+    license = with licenses; [ mit asl20 ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mrustc/default.nix b/nixpkgs/pkgs/development/compilers/mrustc/default.nix
new file mode 100644
index 000000000000..eae17cbce91f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mrustc/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv
+, fetchFromGitHub
+, zlib
+}:
+
+let
+  version = "0.10.1";
+  tag = "v${version}";
+  rev = "b6754f574f8846eb842feba4ccbeeecb10bdfacc";
+in
+
+stdenv.mkDerivation rec {
+  pname = "mrustc";
+  inherit version;
+
+  # Always update minicargo.nix and bootstrap.nix in lockstep with this
+  src = fetchFromGitHub {
+    owner = "thepowersgang";
+    repo = "mrustc";
+    rev = tag;
+    hash = "sha256-sYnx5dUTaQbK4ugnSzAJwIUwZKPUhThmNA+WlY+LEWc=";
+  };
+
+  postPatch = ''
+    sed -i 's/\$(shell git show --pretty=%H -s)/${rev}/' Makefile
+    sed -i 's/\$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)/${tag}/' Makefile
+    sed -i 's/\$(shell git diff-index --quiet HEAD; echo $$?)/0/' Makefile
+    sed '1i#include <limits>' -i src/trans/codegen_c.cpp
+  '';
+
+  strictDeps = true;
+  buildInputs = [ zlib ];
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    cp bin/mrustc $out/bin
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Mutabah's Rust Compiler";
+    longDescription = ''
+      In-progress alternative rust compiler, written in C++.
+      Capable of building a fully-working copy of rustc,
+      but not yet suitable for everyday use.
+    '';
+    inherit (src.meta) homepage;
+    license = licenses.mit;
+    maintainers = with maintainers; [ progval r-burns ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mrustc/minicargo.nix b/nixpkgs/pkgs/development/compilers/mrustc/minicargo.nix
new file mode 100644
index 000000000000..76d19d4d96d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mrustc/minicargo.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, makeWrapper
+, mrustc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mrustc-minicargo";
+  inherit (mrustc) src version;
+
+  strictDeps = true;
+  nativeBuildInputs = [ makeWrapper ];
+
+  enableParallelBuilding = true;
+  makefile = "minicargo.mk";
+  makeFlags = [ "bin/minicargo" ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    cp bin/minicargo $out/bin
+
+    # without it, minicargo defaults to "<minicargo_path>/../bin/mrustc"
+    wrapProgram "$out/bin/minicargo" --set MRUSTC_PATH ${mrustc}/bin/mrustc
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A minimalist builder for Rust";
+    longDescription = ''
+      A minimalist builder for Rust, similar to Cargo but written in C++.
+      Designed to work with mrustc to build Rust projects
+      (like the Rust compiler itself).
+    '';
+    inherit (src.meta) homepage;
+    license = licenses.mit;
+    maintainers = with maintainers; [ progval r-burns ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mrustc/patches/0001-dont-download-rustc.patch b/nixpkgs/pkgs/development/compilers/mrustc/patches/0001-dont-download-rustc.patch
new file mode 100644
index 000000000000..7b92958af498
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mrustc/patches/0001-dont-download-rustc.patch
@@ -0,0 +1,14 @@
+The $(RUSTC_SRC_DL) file already exists, but for some reason Make wants to rebuild
+this target when it has $(RUSTC_SRC_TARBALL) as a dependency.
+
+--- a/minicargo.mk	2023-04-06 08:26:18.408817572 +0200
++++ b/minicargo.mk	2023-04-06 08:27:11.553536996 +0200
+@@ -176,7 +176,7 @@
+ 	@echo [CURL] $@
+ 	@rm -f $@
+ 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
+-$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
++$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
+ 	tar -xf $(RUSTC_SRC_TARBALL)
+ 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
+ 	touch $(RUSTC_SRC_DL)
diff --git a/nixpkgs/pkgs/development/compilers/muonlang/default.nix b/nixpkgs/pkgs/development/compilers/muonlang/default.nix
new file mode 100644
index 000000000000..aef02bca970d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/muonlang/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "muon";
+  version = "2019-11-27";
+
+  src = fetchFromGitHub {
+    owner = "nickmqb";
+    repo = pname;
+    rev = "6d3a5054ae75b0e5a0ae633cf8cbc3e2a054f8b3";
+    sha256 = "1sb1i08421jxlx791g8nh4l239syaj730hagkzc159g0z65614zz";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildPhase = ''
+    mkdir -p $out/bin $out/share/mu
+    cp -r lib $out/share/mu
+    ${stdenv.cc.targetPrefix}cc -o $out/bin/mu-unwrapped bootstrap/mu64.c
+  '';
+
+  installPhase = ''
+    makeWrapper $out/bin/mu-unwrapped $out/bin/mu \
+      --add-flags $out/share/mu/lib/core.mu
+  '';
+
+  meta = with lib; {
+    description = "Modern low-level programming language";
+    homepage = "https://github.com/nickmqb/muon";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Br1ght0ne ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/myrddin/default.nix b/nixpkgs/pkgs/development/compilers/myrddin/default.nix
new file mode 100644
index 000000000000..b682b1e0ac54
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/myrddin/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, pkg-config
+, bison
+, binutils
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "myrddin";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    repo = "mc";
+    owner = "oridb";
+    rev = "r${version}";
+    sha256 = "7ImjiG/rIKGPHq3Vh/mftY7pqw/vfOxD3LJeT87HmCk=";
+  };
+
+  nativeBuildInputs = [
+    bison
+    pkg-config
+    makeWrapper
+  ];
+
+  postPatch = ''
+    substituteInPlace mk/c.mk \
+      --replace "-Werror" ""
+  '';
+
+  buildPhase = ''
+    make bootstrap -j$NIX_BUILD_CORES
+    make -j$NIX_BUILD_CORES
+  '';
+
+  postInstall = ''
+    for b in $out/bin/*; do
+      wrapProgram $b --prefix PATH : $out/bin:${lib.makeBinPath [ binutils ]}
+    done
+  '';
+
+  checkPhase = ''
+    make check
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Systems language that is both powerful and fun to use";
+    homepage = "https://myrlang.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ luc65r ];
+    platforms = platforms.all;
+    # darwin: never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/myrddin.x86_64-darwin
+    broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nasm/default.nix b/nixpkgs/pkgs/development/compilers/nasm/default.nix
new file mode 100644
index 000000000000..b9f0e856f65c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nasm/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "nasm";
+  version = "2.16.01";
+
+  src = fetchurl {
+    url = "https://www.nasm.us/pub/nasm/releasebuilds/${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-x3dF9IAjde/u4uxcCta38DfqnIfJKxSaljf/CZ8WJVg=";
+  };
+
+  nativeBuildInputs = [ perl ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  checkPhase = ''
+    make golden
+    make test
+  '';
+
+  meta = with 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..fff5762a38d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/neko/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, boehmgc, zlib, sqlite, pcre, cmake, pkg-config
+, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls_2, openssl, pkgs, gtk2, libpthreadstubs
+}:
+
+stdenv.mkDerivation rec {
+  pname = "neko";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "HaxeFoundation";
+    repo = "neko";
+    rev = "v${lib.replaceStrings [ "." ] [ "-" ] version}";
+    sha256 = "19rc59cx7qqhcqlb0znwbnwbg04c1yq6xmvrwm1xi46k3vxa957g";
+  };
+
+  patches = [
+    # https://github.com/HaxeFoundation/neko/pull/224
+    (fetchpatch {
+      url = "https://github.com/HaxeFoundation/neko/commit/ff5da9b0e96cc0eabc44ad2c10b7a92623ba49ee.patch";
+      sha256 = "sha256-isM7QGPiyXgT2zpIGd+r12vKg7I1rOWYTTWxuECafro=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config git ];
+  buildInputs =
+    [ boehmgc zlib sqlite pcre apacheHttpd apr aprutil
+      libmysqlclient mbedtls_2 openssl libpthreadstubs ]
+      ++ lib.optional stdenv.isLinux gtk2
+      ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
+                                                pkgs.darwin.apple_sdk.frameworks.Carbon];
+  cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
+  };
+
+  installCheckPhase = ''
+    bin/neko bin/test.n
+  '';
+
+  # Called from tools/test.neko line 2
+  # Uncaught exception - Segmentation fault
+  doInstallCheck = !stdenv.isDarwin;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "A high-level dynamically typed programming language";
+    homepage = "https://nekovm.org";
+    license = [
+      # list based on https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE
+      licenses.gpl2Plus    # nekoc, nekoml
+      licenses.lgpl21Plus  # mysql.ndll
+      licenses.bsd3        # regexp.ndll
+      licenses.zlib        # zlib.ndll
+      licenses.asl20       # mod_neko, mod_tora, mbedTLS
+      licenses.mit         # overall, other libs
+      "https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE#L24-L40" # boehm gc
+    ];
+    maintainers = [ maintainers.marcweber maintainers.locallycompact ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch b/nixpkgs/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch
new file mode 100644
index 000000000000..61e05b791cf8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch
@@ -0,0 +1,23 @@
+diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
+index a470179bd..73cfa1a23 100644
+--- a/compiler/nimconf.nim
++++ b/compiler/nimconf.nim
+@@ -225,10 +225,15 @@ proc getUserConfigPath*(filename: RelativeFile): AbsoluteFile =
+ proc getSystemConfigPath*(conf: ConfigRef; filename: RelativeFile): AbsoluteFile =
+   # try standard configuration file (installation did not distribute files
+   # the UNIX way)
+-  let p = getPrefixDir(conf)
+-  result = p / RelativeDir"config" / filename
++  let
++    prefix = getPrefixDir(conf)
++    env = getEnv("NIM_CONFIG_PATH")
++  if env != "":
++    result = env.toAbsoluteDir / filename
++  else:
++    result = prefix / RelativeDir"config" / filename
+   when defined(unix):
+-    if not fileExists(result): result = p / RelativeDir"etc/nim" / filename
++    if not fileExists(result): result = prefix / RelativeDir"etc/nim" / filename
+     if not fileExists(result): result = AbsoluteDir"/etc/nim" / filename
+
+ proc loadConfigs*(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef) =
diff --git a/nixpkgs/pkgs/development/compilers/nim/build-nim-package.nix b/nixpkgs/pkgs/development/compilers/nim/build-nim-package.nix
new file mode 100644
index 000000000000..a22fb45b507b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/build-nim-package.nix
@@ -0,0 +1,135 @@
+{ lib
+, buildPackages
+, callPackage
+, stdenv
+, nim1
+, nim2
+, nim_builder
+, defaultNimVersion ? 2
+, nimOverrides
+, buildNimPackage
+}:
+
+let
+  baseAttrs = {
+    strictDeps = true;
+    enableParallelBuilding = true;
+    doCheck = true;
+    configurePhase = ''
+      runHook preConfigure
+      export NIX_NIM_BUILD_INPUTS=''${pkgsHostTarget[@]} $NIX_NIM_BUILD_INPUTS
+      nim_builder --phase:configure
+      runHook postConfigure
+    '';
+    buildPhase = ''
+      runHook preBuild
+      nim_builder --phase:build
+      runHook postBuild
+    '';
+    checkPhase = ''
+      runHook preCheck
+      nim_builder --phase:check
+      runHook postCheck
+    '';
+    installPhase = ''
+      runHook preInstall
+      nim_builder --phase:install
+      runHook postInstall
+    '';
+    meta = { inherit (nim2.meta) maintainers platforms; };
+  };
+
+  fodFromLockEntry =
+    let
+      methods = {
+        fetchzip = { url, sha256, ... }:
+          buildPackages.fetchzip {
+            name = "source";
+            inherit url sha256;
+          };
+        git = { fetchSubmodules, leaveDotGit, rev, sha256, url, ... }:
+          buildPackages.fetchgit {
+            inherit fetchSubmodules leaveDotGit rev sha256 url;
+          };
+      };
+    in
+    attrs@{ method, ... }:
+    let fod = methods.${method} attrs;
+    in ''--path:"${fod.outPath}/${attrs.srcDir}"'';
+
+  callAnnotations = { packages, ... }@lockAttrs:
+    map (packageName: nimOverrides.${packageName} or (_: [ ]) lockAttrs)
+      packages;
+
+  asFunc = x: if builtins.isFunction x then x else (_: x);
+
+in
+buildNimPackageArgs:
+let
+  composition = finalAttrs:
+    let
+      postPkg = baseAttrs
+        // (asFunc ((asFunc buildNimPackageArgs) finalAttrs)) baseAttrs;
+
+      lockAttrs =
+        lib.attrsets.optionalAttrs (builtins.hasAttr "lockFile" postPkg)
+          (builtins.fromJSON (builtins.readFile postPkg.lockFile));
+
+      lockDepends = lockAttrs.depends or [ ];
+
+      lockFileNimFlags = map fodFromLockEntry lockDepends;
+
+      annotationOverlays = lib.lists.flatten (map callAnnotations lockDepends);
+
+      postLock = builtins.foldl'
+        (prevAttrs: overlay: prevAttrs // (overlay finalAttrs prevAttrs))
+        postPkg
+        annotationOverlays;
+
+      finalOverride =
+        { depsBuildBuild ? [ ]
+        , nativeBuildInputs ? [ ]
+        , nimFlags ? [ ]
+        , requiredNimVersion ? defaultNimVersion
+        , passthru ? { }
+        , ...
+        }:
+        (if requiredNimVersion == 1 then {
+          depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;
+          nativeBuildInputs = [ nim1 ] ++ nativeBuildInputs;
+        } else if requiredNimVersion == 2 then {
+          depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;
+          nativeBuildInputs = [ nim2 ] ++ nativeBuildInputs;
+        } else
+          throw
+            "requiredNimVersion ${toString requiredNimVersion} is not valid") // {
+          nimFlags = lockFileNimFlags ++ nimFlags;
+          passthru = passthru // {
+            # allow overriding the result of buildNimPackageArgs before this composition is applied
+            # this allows overriding the lockFile for packages built using buildNimPackage
+            # this is adapted from mkDerivationExtensible in stdenv.mkDerivation
+            overrideNimAttrs = f0:
+              let
+                f = self: super:
+                  let x = f0 super;
+                  in
+                    if builtins.isFunction x
+                    then f0 self super
+                    else x;
+              in
+              buildNimPackage
+                (self:
+                  let super = (asFunc ((asFunc buildNimPackageArgs) self)) baseAttrs;
+                  in
+                    super // (if builtins.isFunction f0 || f0?__functor then f self super else f0));
+          };
+        };
+
+      attrs = postLock // finalOverride postLock;
+    in
+    lib.trivial.warnIf (builtins.hasAttr "nimBinOnly" attrs)
+      "the nimBinOnly attribute is deprecated for buildNimPackage"
+      attrs;
+
+in
+stdenv.mkDerivation composition
diff --git a/nixpkgs/pkgs/development/compilers/nim/default.nix b/nixpkgs/pkgs/development/compilers/nim/default.nix
new file mode 100644
index 000000000000..1b5f21ddef79
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/default.nix
@@ -0,0 +1,321 @@
+# https://nim-lang.github.io/Nim/packaging.html
+# https://nim-lang.org/docs/nimc.html
+
+{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub
+, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security
+, nim-unwrapped-2, nim-unwrapped-1, nim }:
+
+let
+  parseCpu = platform:
+    with platform;
+    # Derive a Nim CPU identifier
+    if isAarch32 then
+      "arm"
+    else if isAarch64 then
+      "arm64"
+    else if isAlpha then
+      "alpha"
+    else if isAvr then
+      "avr"
+    else if isMips && is32bit then
+      "mips"
+    else if isMips && is64bit then
+      "mips64"
+    else if isMsp430 then
+      "msp430"
+    else if isPower && is32bit then
+      "powerpc"
+    else if isPower && is64bit then
+      "powerpc64"
+    else if isRiscV && is64bit then
+      "riscv64"
+    else if isSparc then
+      "sparc"
+    else if isx86_32 then
+      "i386"
+    else if isx86_64 then
+      "amd64"
+    else
+      abort "no Nim CPU support known for ${config}";
+
+  parseOs = platform:
+    with platform;
+    # Derive a Nim OS identifier
+    if isAndroid then
+      "Android"
+    else if isDarwin then
+      "MacOSX"
+    else if isFreeBSD then
+      "FreeBSD"
+    else if isGenode then
+      "Genode"
+    else if isLinux then
+      "Linux"
+    else if isNetBSD then
+      "NetBSD"
+    else if isNone then
+      "Standalone"
+    else if isOpenBSD then
+      "OpenBSD"
+    else if isWindows then
+      "Windows"
+    else if isiOS then
+      "iOS"
+    else
+      abort "no Nim OS support known for ${config}";
+
+  parsePlatform = p: {
+    cpu = parseCpu p;
+    os = parseOs p;
+  };
+
+  nimHost = parsePlatform stdenv.hostPlatform;
+  nimTarget = parsePlatform stdenv.targetPlatform;
+
+in {
+
+  nim-unwrapped-2 = stdenv.mkDerivation (finalAttrs: {
+    pname = "nim-unwrapped";
+    version = "2.0.2";
+    strictDeps = true;
+
+    src = fetchurl {
+      url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
+      hash = "sha256-ZPUdO/Vt6dDueeLKapzpRFSvmmOhQaaWnOjFmmC4LM8=";
+    };
+
+    buildInputs = [ boehmgc openssl pcre readline sqlite ]
+      ++ lib.optional stdenv.isDarwin Security;
+
+    patches = [
+      ./NIM_CONFIG_DIR.patch
+      # Override compiler configuration via an environmental variable
+
+      ./nixbuild.patch
+      # Load libraries at runtime by absolute path
+
+      ./extra-mangling.patch
+      # Mangle store paths of modules to prevent runtime dependence.
+
+      ./openssl.patch
+      # dlopen is widely used by Python, Ruby, Perl, ... what you're really telling me here is that your OS is fundamentally broken. That might be news for you, but it isn't for me.
+    ];
+
+    configurePhase = let
+      bootstrapCompiler = stdenv.mkDerivation {
+        pname = "nim-bootstrap";
+        inherit (finalAttrs) version src preBuild;
+        enableParallelBuilding = true;
+        installPhase = ''
+          runHook preInstall
+          install -Dt $out/bin bin/nim
+          runHook postInstall
+        '';
+      };
+    in ''
+      runHook preConfigure
+      cp ${bootstrapCompiler}/bin/nim bin/
+      echo 'define:nixbuild' >> config/nim.cfg
+      runHook postConfigure
+    '';
+
+    kochArgs = [
+      "--cpu:${nimHost.cpu}"
+      "--os:${nimHost.os}"
+      "-d:release"
+      "-d:useGnuReadline"
+    ] ++ lib.optional (stdenv.isDarwin || stdenv.isLinux) "-d:nativeStacktrace";
+
+    preBuild = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
+      substituteInPlace makefile \
+        --replace "aarch64" "arm64"
+    '';
+
+    buildPhase = ''
+      runHook preBuild
+      local HOME=$TMPDIR
+      ./bin/nim c --parallelBuild:$NIX_BUILD_CORES koch
+      ./koch boot $kochArgs --parallelBuild:$NIX_BUILD_CORES
+      ./koch toolsNoExternal $kochArgs --parallelBuild:$NIX_BUILD_CORES
+      ./bin/nim js -d:release tools/dochack/dochack.nim
+      runHook postBuild
+    '';
+
+    installPhase = ''
+      runHook preInstall
+      install -Dt $out/bin bin/*
+      ln -sf $out/nim/bin/nim $out/bin/nim
+      ln -sf $out/nim/lib $out/lib
+      ./install.sh $out
+      cp -a tools dist $out/nim/
+      runHook postInstall
+    '';
+
+    meta = with lib; {
+      description = "Statically typed, imperative programming language";
+      homepage = "https://nim-lang.org/";
+      license = licenses.mit;
+      mainProgram = "nim";
+      maintainers = with maintainers; [ ehmry ];
+    };
+  });
+
+  nim-unwrapped-1 = nim-unwrapped-2.overrideAttrs (finalAttrs: prevAttrs: {
+    version = "1.6.18";
+    src = fetchurl {
+      url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
+      hash = "sha256-UCQaxyIpG6ljdT8EWqo1h7c8GqKK4pxXPBWluKYCoss=";
+    };
+
+    patches = [
+      ./NIM_CONFIG_DIR.patch
+      # Override compiler configuration via an environmental variable
+
+      ./nixbuild.patch
+      # Load libraries at runtime by absolute path
+
+      ./extra-mangling.patch
+      # Mangle store paths of modules to prevent runtime dependence.
+    ] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
+  });
+
+} // (let
+  wrapNim = { nim', patches }:
+    let targetPlatformConfig = stdenv.targetPlatform.config;
+    in stdenv.mkDerivation (finalAttrs: {
+        name = "${targetPlatformConfig}-nim-wrapper-${nim'.version}";
+        inherit (nim') version;
+        preferLocalBuild = true;
+        strictDeps = true;
+
+        nativeBuildInputs = [ makeWrapper ];
+
+        # Needed for any nim package that uses the standard library's
+        # 'std/sysrand' module.
+        depsTargetTargetPropagated = lib.optional stdenv.isDarwin Security;
+
+        inherit patches;
+
+        unpackPhase = ''
+          runHook preUnpack
+          tar xf ${nim'.src} nim-$version/config
+          cd nim-$version
+          runHook postUnpack
+        '';
+
+        dontConfigure = true;
+
+        buildPhase =
+          # Configure the Nim compiler to use $CC and $CXX as backends
+          # The compiler is configured by two configuration files, each with
+          # a different DSL. The order of evaluation matters and that order
+          # is not documented, so duplicate the configuration across both files.
+          ''
+            runHook preBuild
+            cat >> config/config.nims << WTF
+
+            switch("os", "${nimTarget.os}")
+            switch("cpu", "${nimTarget.cpu}")
+            switch("define", "nixbuild")
+
+            # Configure the compiler using the $CC set by Nix at build time
+            import strutils
+            let cc = getEnv"CC"
+            if cc.contains("gcc"):
+              switch("cc", "gcc")
+            elif cc.contains("clang"):
+              switch("cc", "clang")
+            WTF
+
+            mv config/nim.cfg config/nim.cfg.old
+            cat > config/nim.cfg << WTF
+            os = "${nimTarget.os}"
+            cpu =  "${nimTarget.cpu}"
+            define:"nixbuild"
+            WTF
+
+            cat >> config/nim.cfg < config/nim.cfg.old
+            rm config/nim.cfg.old
+
+            cat >> config/nim.cfg << WTF
+
+            clang.cpp.exe %= "\$CXX"
+            clang.cpp.linkerexe %= "\$CXX"
+            clang.exe %= "\$CC"
+            clang.linkerexe %= "\$CC"
+            gcc.cpp.exe %= "\$CXX"
+            gcc.cpp.linkerexe %= "\$CXX"
+            gcc.exe %= "\$CC"
+            gcc.linkerexe %= "\$CC"
+            WTF
+
+            runHook postBuild
+          '';
+
+        wrapperArgs = lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) [
+          "--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${
+            placeholder "out"
+          }/bin"
+          # Used by nim-gdb
+
+          "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl pcre ]}"
+          # These libraries may be referred to by the standard library.
+          # This is broken for cross-compilation because the package
+          # set will be shifted back by nativeBuildInputs.
+
+          "--set NIM_CONFIG_PATH ${placeholder "out"}/etc/nim"
+          # Use the custom configuration
+        ];
+
+        installPhase = ''
+          runHook preInstall
+
+          mkdir -p $out/bin $out/etc
+
+          cp -r config $out/etc/nim
+
+          for binpath in ${nim'}/bin/nim?*; do
+            local binname=`basename $binpath`
+            makeWrapper \
+              $binpath $out/bin/${targetPlatformConfig}-$binname \
+              $wrapperArgs
+            ln -s $out/bin/${targetPlatformConfig}-$binname $out/bin/$binname
+          done
+
+          makeWrapper \
+            ${nim'}/nim/bin/nim $out/bin/${targetPlatformConfig}-nim \
+            --set-default CC $(command -v $CC) \
+            --set-default CXX $(command -v $CXX) \
+            $wrapperArgs
+          ln -s $out/bin/${targetPlatformConfig}-nim $out/bin/nim
+
+          makeWrapper \
+            ${nim'}/bin/testament $out/bin/${targetPlatformConfig}-testament \
+            $wrapperArgs
+          ln -s $out/bin/${targetPlatformConfig}-testament $out/bin/testament
+
+        '' + ''
+          runHook postInstall
+        '';
+
+        passthru = { nim = nim'; };
+
+        meta = nim'.meta // {
+          description = nim'.meta.description
+            + " (${targetPlatformConfig} wrapper)";
+          platforms = with lib.platforms; unix ++ genode;
+        };
+      });
+in {
+
+  nim2 = wrapNim {
+    nim' = buildPackages.nim-unwrapped-2;
+    patches = [ ./nim2.cfg.patch ];
+  };
+
+  nim1 = wrapNim {
+    nim' = buildPackages.nim-unwrapped-1;
+    patches = [ ./nim.cfg.patch ];
+  };
+
+})
diff --git a/nixpkgs/pkgs/development/compilers/nim/extra-mangling.patch b/nixpkgs/pkgs/development/compilers/nim/extra-mangling.patch
new file mode 100644
index 000000000000..b68f7033994d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/extra-mangling.patch
@@ -0,0 +1,48 @@
+diff --git a/compiler/modulepaths.nim b/compiler/modulepaths.nim
+index e80ea3fa6..8ecf27a85 100644
+--- a/compiler/modulepaths.nim
++++ b/compiler/modulepaths.nim
+@@ -70,6 +70,13 @@ proc checkModuleName*(conf: ConfigRef; n: PNode; doLocalError=true): FileIndex =
+   else:
+     result = fileInfoIdx(conf, fullPath)
+ 
++proc rot13(result: var string) =
++  for i, c in result:
++    case c
++    of 'a'..'m', 'A'..'M': result[i] = char(c.uint8 + 13)
++    of 'n'..'z', 'N'..'Z': result[i] = char(c.uint8 - 13)
++    else: discard
++
+ proc mangleModuleName*(conf: ConfigRef; path: AbsoluteFile): string =
+   ## Mangle a relative module path to avoid path and symbol collisions.
+   ##
+@@ -78,9 +85,11 @@ proc mangleModuleName*(conf: ConfigRef; path: AbsoluteFile): string =
+   ##
+   ## Example:
+   ## `foo-#head/../bar` becomes `@foo-@hhead@s..@sbar`
+-  "@m" & relativeTo(path, conf.projectPath).string.multiReplace(
++  result = "@m" & relativeTo(path, conf.projectPath).string.multiReplace(
+     {$os.DirSep: "@s", $os.AltSep: "@s", "#": "@h", "@": "@@", ":": "@c"})
++  rot13(result)
+ 
+ proc demangleModuleName*(path: string): string =
+   ## Demangle a relative module path.
+   result = path.multiReplace({"@@": "@", "@h": "#", "@s": "/", "@m": "", "@c": ":"})
++  rot13(result)
+diff --git a/compiler/msgs.nim b/compiler/msgs.nim
+index 3f386cc61..054f7f647 100644
+--- a/compiler/msgs.nim
++++ b/compiler/msgs.nim
+@@ -659,8 +659,10 @@ proc uniqueModuleName*(conf: ConfigRef; fid: FileIndex): string =
+   for i in 0..<trunc:
+     let c = rel[i]
+     case c
+-    of 'a'..'z':
+-      result.add c
++    of 'a'..'m':
++      result.add char(c.uint8 + 13)
++    of 'n'..'z':
++      result.add char(c.uint8 - 13)
+     of {os.DirSep, os.AltSep}:
+       result.add 'Z' # because it looks a bit like '/'
+     of '.':
diff --git a/nixpkgs/pkgs/development/compilers/nim/nim.cfg.patch b/nixpkgs/pkgs/development/compilers/nim/nim.cfg.patch
new file mode 100644
index 000000000000..7195132e52f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/nim.cfg.patch
@@ -0,0 +1,31 @@
+diff --git a/config/nim.cfg b/config/nim.cfg
+index 3b964d124..850ed0ed9 100644
+--- a/config/nim.cfg
++++ b/config/nim.cfg
+@@ -8,26 +8,12 @@
+ # Environment variables can be accessed like so:
+ #  gcc.path %= "$CC_PATH"
+ 
+-cc = gcc
+-
+ # additional options always passed to the compiler:
+ --parallel_build: "0" # 0 to auto-detect number of processors
+ 
+ hint[LineTooLong]=off
+ #hint[XDeclaredButNotUsed]=off
+ 
+-# Examples of how to setup a cross-compiler:
+-
+-# Cross-compiling for Raspberry Pi.
+-# (This compiler is available in gcc-arm-linux-gnueabihf package on Ubuntu)
+-arm.linux.gcc.exe = "arm-linux-gnueabihf-gcc"
+-arm.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
+-
+-# For OpenWRT, you will also need to adjust PATH to point to your toolchain.
+-mips.linux.gcc.exe = "mips-openwrt-linux-gcc"
+-mips.linux.gcc.linkerexe = "mips-openwrt-linux-gcc"
+-
+-
+ path="$lib/deprecated/core"
+ path="$lib/deprecated/pure"
+ path="$lib/pure/collections"
diff --git a/nixpkgs/pkgs/development/compilers/nim/nim2.cfg.patch b/nixpkgs/pkgs/development/compilers/nim/nim2.cfg.patch
new file mode 100644
index 000000000000..ef23d3a84623
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/nim2.cfg.patch
@@ -0,0 +1,41 @@
+diff --git a/config/nim.cfg b/config/nim.cfg
+index 1470de780..8a12f741a 100644
+--- a/config/nim.cfg
++++ b/config/nim.cfg
+@@ -9,8 +9,6 @@
+ # Environment variables can be accessed like so:
+ #  gcc.path %= "$CC_PATH"
+
+-cc = gcc
+-
+ # additional options always passed to the compiler:
+ --parallel_build: "0" # 0 to auto-detect number of processors
+
+@@ -22,27 +20,6 @@ cc = gcc
+
+ threads:on
+
+-# Examples of how to setup a cross-compiler:
+-# Nim can target architectures and OSes different than the local host
+-# Syntax: <arch>.<os>.gcc.exe = "<compiler executable>"
+-#         <arch>.<os>.gcc.linkerexe = "<linker executable>"
+-
+-# ARM e.g. Raspberry Pi 2: gcc-arm-linux-gnueabihf package on Debian/Ubuntu
+-arm.linux.gcc.exe = "arm-linux-gnueabihf-gcc"
+-arm.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
+-# ARM64/aarch64 e.g. Raspberry Pi 3: gcc-aarch64-linux-gnu package on Debian/Ubuntu
+-arm64.linux.gcc.exe = "aarch64-linux-gnu-gcc"
+-arm64.linux.gcc.linkerexe = "aarch64-linux-gnu-gcc"
+-# RISC-V: gcc-riscv64-linux-gnu package on Debian/Ubuntu
+-riscv32.linux.gcc.exe = "riscv64-linux-gnu-gcc"
+-riscv32.linux.gcc.linkerexe = "riscv64-linux-gnu-gcc"
+-riscv64.linux.gcc.exe = "riscv64-linux-gnu-gcc"
+-riscv64.linux.gcc.linkerexe = "riscv64-linux-gnu-gcc"
+-
+-# For OpenWRT, you will also need to adjust PATH to point to your toolchain.
+-mips.linux.gcc.exe = "mips-openwrt-linux-gcc"
+-mips.linux.gcc.linkerexe = "mips-openwrt-linux-gcc"
+-
+
+ path="$lib/deprecated/core"
+ path="$lib/deprecated/pure"
diff --git a/nixpkgs/pkgs/development/compilers/nim/nixbuild.patch b/nixpkgs/pkgs/development/compilers/nim/nixbuild.patch
new file mode 100644
index 000000000000..afadd16602bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/nixbuild.patch
@@ -0,0 +1,40 @@
+diff --git a/lib/pure/dynlib.nim b/lib/pure/dynlib.nim
+index f31ae94dd..debed9c07 100644
+--- a/lib/pure/dynlib.nim
++++ b/lib/pure/dynlib.nim
+@@ -56,6 +56,9 @@
+ 
+ import strutils
+ 
++when defined(nixbuild):
++  import os
++
+ type
+   LibHandle* = pointer ## a handle to a dynamically loaded library
+ 
+@@ -95,6 +98,25 @@ proc libCandidates*(s: string, dest: var seq[string]) =
+       libCandidates(prefix & middle & suffix, dest)
+   else:
+     add(dest, s)
++  when defined(nixbuild):
++    # Nix doesn't have a global library directory so
++    # load libraries using an absolute path if one
++    # can be derived from NIX_LDFLAGS.
++    #
++    # During Nix/NixOS packaging the line "define:nixbuild"
++    # should be appended to the ../../config/nim.cfg file
++    # to enable this behavior by default.
++    #
++    var libDirs = split(getEnv("LD_LIBRARY_PATH"), ':')
++    for flag in split(replace(getEnv("NIX_LDFLAGS"), "\\ ", " ")):
++      if flag.startsWith("-L"):
++        libDirs.add(flag[2..flag.high])
++    for lib in dest:
++      for dir in libDirs:
++        let abs = dir / lib
++        if existsFile(abs):
++          dest = @[abs]
++          return
+ 
+ proc loadLibPattern*(pattern: string, globalSymbols = false): LibHandle =
+   ## loads a library with name matching `pattern`, similar to what `dlimport`
diff --git a/nixpkgs/pkgs/development/compilers/nim/openssl.patch b/nixpkgs/pkgs/development/compilers/nim/openssl.patch
new file mode 100644
index 000000000000..8cbc2a4cf26e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/openssl.patch
@@ -0,0 +1,458 @@
+commit 9d7d15533d52971601b738335c40a4f01353c369
+Author: Emery Hemingway <ehmry@posteo.net>
+Date:   2023-09-30 11:11:05 +0100
+
+    Do not load openssl with dlopen
+
+diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
+index e659746ee..dfb2d3cf2 100644
+--- a/lib/wrappers/openssl.nim
++++ b/lib/wrappers/openssl.nim
+@@ -105,8 +105,11 @@ else:
+ 
+ import dynlib
+ 
+-{.pragma: lcrypto, cdecl, dynlib: DLLUtilName, importc.}
+-{.pragma: lssl, cdecl, dynlib: DLLSSLName, importc.}
++{.passL: "-lcrypto".}
++{.passL: "-lssl".}
++
++{.pragma: lcrypto, cdecl, importc.}
++{.pragma: lssl, cdecl, importc.}
+ 
+ type
+   SslStruct {.final, pure.} = object
+@@ -274,7 +277,7 @@ const
+   BIO_C_DO_STATE_MACHINE = 101
+   BIO_C_GET_SSL = 110
+ 
+-proc TLSv1_method*(): PSSL_METHOD{.cdecl, dynlib: DLLSSLName, importc.}
++proc TLSv1_method*(): PSSL_METHOD{.cdecl, importc.}
+ 
+ # TLS_method(), TLS_server_method(), TLS_client_method() are introduced in 1.1.0
+ # and support SSLv3, TLSv1, TLSv1.1 and TLSv1.2
+@@ -286,26 +289,26 @@ when useStaticLink:
+   # Static linking
+ 
+   when defined(openssl10):
+-    proc SSL_library_init*(): cint {.cdecl, dynlib: DLLSSLName, importc, discardable.}
+-    proc SSL_load_error_strings*() {.cdecl, dynlib: DLLSSLName, importc.}
+-    proc SSLv23_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
+-    proc SSLeay(): culong {.cdecl, dynlib: DLLUtilName, importc.}
++    proc SSL_library_init*(): cint {.cdecl, importc, discardable.}
++    proc SSL_load_error_strings*() {.cdecl, importc.}
++    proc SSLv23_method*(): PSSL_METHOD {.cdecl, importc.}
++    proc SSLeay(): culong {.cdecl, importc.}
+ 
+     proc getOpenSSLVersion*(): culong =
+       SSLeay()
+ 
+-    proc ERR_load_BIO_strings*() {.cdecl, dynlib: DLLUtilName, importc.}
++    proc ERR_load_BIO_strings*() {.cdecl, gimportc.}
+   else:
+-    proc OPENSSL_init_ssl*(opts: uint64, settings: uint8): cint {.cdecl, dynlib: DLLSSLName, importc, discardable.}
++    proc OPENSSL_init_ssl*(opts: uint64, settings: uint8): cint {.cdecl, gimportc, discardable.}
+     proc SSL_library_init*(): cint {.discardable.} =
+       ## Initialize SSL using OPENSSL_init_ssl for OpenSSL >= 1.1.0
+       return OPENSSL_init_ssl(0.uint64, 0.uint8)
+ 
+-    proc TLS_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
++    proc TLS_method*(): PSSL_METHOD {.cdecl, gimportc.}
+     proc SSLv23_method*(): PSSL_METHOD =
+       TLS_method()
+ 
+-    proc OpenSSL_version_num(): culong {.cdecl, dynlib: DLLUtilName, importc.}
++    proc OpenSSL_version_num(): culong {.cdecl, gimportc.}
+ 
+     proc getOpenSSLVersion*(): culong =
+       ## Return OpenSSL version as unsigned long
+@@ -321,19 +324,19 @@ when useStaticLink:
+       discard
+ 
+   when defined(libressl) or defined(openssl10):
+-    proc SSL_state(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc.}
++    proc SSL_state(ssl: SslPtr): cint {.cdecl, gimportc.}
+     proc SSL_in_init*(ssl: SslPtr): cint {.inline.} =
+       SSL_state(ssl) and SSL_ST_INIT
+   else:
+-    proc SSL_in_init*(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-    proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.}
++    proc SSL_in_init*(ssl: SslPtr): cint {.cdecl, gimportc.}
++    proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint {.cdecl, importc.}
+ 
+   template OpenSSL_add_all_algorithms*() = discard
+ 
+-  proc SSLv23_client_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
+-  proc SSLv2_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
+-  proc SSLv3_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
+-  proc CRYPTO_set_mem_functions(a,b,c: pointer){.cdecl, dynlib: DLLUtilName, importc.}
++  proc SSLv23_client_method*(): PSSL_METHOD {.cdecl, importc.}
++  proc SSLv2_method*(): PSSL_METHOD {.cdecl, importc.}
++  proc SSLv3_method*(): PSSL_METHOD {.cdecl, importc.}
++  proc CRYPTO_set_mem_functions(a,b,c: pointer){.cdecl, gimportc.}
+ 
+ else:
+   # Here we're trying to stay compatible between openssl versions. Some
+@@ -472,54 +475,52 @@ else:
+       theProc = cast[typeof(theProc)](sslSymThrows("SSL_CTX_set_ciphersuites"))
+     result = theProc(ctx, str)
+ 
+-proc SSL_new*(context: SslCtx): SslPtr{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_free*(ssl: SslPtr){.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_get_SSL_CTX*(ssl: SslPtr): SslCtx {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_set_SSL_CTX*(ssl: SslPtr, ctx: SslCtx): SslCtx {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_set_session_id_context*(context: SslCtx, sid_ctx: string, sid_ctx_len: int){.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_get0_verified_chain*(ssl: SslPtr): PSTACK {.cdecl, dynlib: DLLSSLName,
++proc SSL_new*(context: SslCtx): SslPtr{.cdecl, importc.}
++proc SSL_free*(ssl: SslPtr){.cdecl, importc.}
++proc SSL_get_SSL_CTX*(ssl: SslPtr): SslCtx {.cdecl, importc.}
++proc SSL_set_SSL_CTX*(ssl: SslPtr, ctx: SslCtx): SslCtx {.cdecl, importc.}
++proc SSL_CTX_set_session_id_context*(context: SslCtx, sid_ctx: string, sid_ctx_len: int){.cdecl, importc.}
++proc SSL_get0_verified_chain*(ssl: SslPtr): PSTACK {.cdecl,
+     importc.}
+ proc SSL_CTX_new*(meth: PSSL_METHOD): SslCtx{.cdecl,
+-    dynlib: DLLSSLName, importc.}
++    importc.}
+ proc SSL_CTX_load_verify_locations*(ctx: SslCtx, CAfile: cstring,
+-    CApath: cstring): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_free*(arg0: SslCtx){.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_set_verify*(s: SslCtx, mode: int, cb: proc (a: int, b: pointer): int {.cdecl.}){.cdecl, dynlib: DLLSSLName, importc.}
++    CApath: cstring): cint{.cdecl, importc.}
++proc SSL_CTX_free*(arg0: SslCtx){.cdecl, importc.}
++proc SSL_CTX_set_verify*(s: SslCtx, mode: int, cb: proc (a: int, b: pointer): int {.cdecl.}){.cdecl, importc.}
+ proc SSL_get_verify_result*(ssl: SslPtr): int{.cdecl,
+-    dynlib: DLLSSLName, importc.}
++    importc.}
+ 
+-proc SSL_CTX_set_cipher_list*(s: SslCtx, ciphers: cstring): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_use_certificate_file*(ctx: SslCtx, filename: cstring, typ: cint): cint{.
+-    stdcall, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_use_certificate_chain_file*(ctx: SslCtx, filename: cstring): cint{.
+-    stdcall, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_set_cipher_list*(s: SslCtx, ciphers: cstring): cint{.cdecl, importc.}
++proc SSL_CTX_use_certificate_file*(ctx: SslCtx, filename: cstring, typ: cint): cint{.stdcall, importc.}
++proc SSL_CTX_use_certificate_chain_file*(ctx: SslCtx, filename: cstring): cint{.stdcall, importc.}
+ proc SSL_CTX_use_PrivateKey_file*(ctx: SslCtx,
+-    filename: cstring, typ: cint): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_check_private_key*(ctx: SslCtx): cint{.cdecl, dynlib: DLLSSLName,
++    filename: cstring, typ: cint): cint{.cdecl, importc.}
++proc SSL_CTX_check_private_key*(ctx: SslCtx): cint{.cdecl,
+     importc.}
+ 
+-proc SSL_CTX_get_ex_new_index*(argl: clong, argp: pointer, new_func: pointer, dup_func: pointer, free_func: pointer): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_set_ex_data*(ssl: SslCtx, idx: cint, arg: pointer): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_get_ex_data*(ssl: SslCtx, idx: cint): pointer {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_get_ex_new_index*(argl: clong, argp: pointer, new_func: pointer, dup_func: pointer, free_func: pointer): cint {.cdecl, importc.}
++proc SSL_CTX_set_ex_data*(ssl: SslCtx, idx: cint, arg: pointer): cint {.cdecl, importc.}
++proc SSL_CTX_get_ex_data*(ssl: SslCtx, idx: cint): pointer {.cdecl, importc.}
+ 
+-proc SSL_set_fd*(ssl: SslPtr, fd: SocketHandle): cint{.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_set_fd*(ssl: SslPtr, fd: SocketHandle): cint{.cdecl, importc.}
+ 
+-proc SSL_shutdown*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_set_shutdown*(ssl: SslPtr, mode: cint) {.cdecl, dynlib: DLLSSLName, importc: "SSL_set_shutdown".}
+-proc SSL_get_shutdown*(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc: "SSL_get_shutdown".}
+-proc SSL_connect*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_read*(ssl: SslPtr, buf: pointer, num: int): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_write*(ssl: SslPtr, buf: cstring, num: int): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_get_error*(s: SslPtr, ret_code: cint): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_accept*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_pending*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_shutdown*(ssl: SslPtr): cint{.cdecl, importc.}
++proc SSL_set_shutdown*(ssl: SslPtr, mode: cint) {.cdecl, importc: "SSL_set_shutdown".}
++proc SSL_get_shutdown*(ssl: SslPtr): cint {.cdecl, importc: "SSL_get_shutdown".}
++proc SSL_connect*(ssl: SslPtr): cint{.cdecl, importc.}
++proc SSL_read*(ssl: SslPtr, buf: pointer, num: int): cint{.cdecl, importc.}
++proc SSL_write*(ssl: SslPtr, buf: cstring, num: int): cint{.cdecl, importc.}
++proc SSL_get_error*(s: SslPtr, ret_code: cint): cint{.cdecl, importc.}
++proc SSL_accept*(ssl: SslPtr): cint{.cdecl, importc.}
++proc SSL_pending*(ssl: SslPtr): cint{.cdecl, importc.}
+ 
+ proc BIO_new_mem_buf*(data: pointer, len: cint): BIO{.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc BIO_new_ssl_connect*(ctx: SslCtx): BIO{.cdecl,
+-    dynlib: DLLSSLName, importc.}
++    importc.}
+ proc BIO_ctrl*(bio: BIO, cmd: cint, larg: int, arg: cstring): int{.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc BIO_get_ssl*(bio: BIO, ssl: ptr SslPtr): int =
+   return BIO_ctrl(bio, BIO_C_GET_SSL, 0, cast[cstring](ssl))
+ proc BIO_set_conn_hostname*(bio: BIO, name: cstring): int =
+@@ -529,30 +530,30 @@ proc BIO_do_handshake*(bio: BIO): int =
+ proc BIO_do_connect*(bio: BIO): int =
+   return BIO_do_handshake(bio)
+ 
+-proc BIO_read*(b: BIO, data: cstring, length: cint): cint{.cdecl, dynlib: DLLUtilName, importc.}
+-proc BIO_write*(b: BIO, data: cstring, length: cint): cint{.cdecl, dynlib: DLLUtilName, importc.}
++proc BIO_read*(b: BIO, data: cstring, length: cint): cint{.cdecl, importc.}
++proc BIO_write*(b: BIO, data: cstring, length: cint): cint{.cdecl, importc.}
+ 
+-proc BIO_free*(b: BIO): cint{.cdecl, dynlib: DLLUtilName, importc.}
++proc BIO_free*(b: BIO): cint{.cdecl, importc.}
+ 
+-proc ERR_print_errors_fp*(fp: File){.cdecl, dynlib: DLLUtilName, importc.}
++proc ERR_print_errors_fp*(fp: File){.cdecl, importc.}
+ 
+ proc ERR_error_string*(e: culong, buf: cstring): cstring{.cdecl,
+-    dynlib: DLLUtilName, importc.}
+-proc ERR_get_error*(): culong{.cdecl, dynlib: DLLUtilName, importc.}
+-proc ERR_peek_last_error*(): culong{.cdecl, dynlib: DLLUtilName, importc.}
++    importc.}
++proc ERR_get_error*(): culong{.cdecl, importc.}
++proc ERR_peek_last_error*(): culong{.cdecl, importc.}
+ 
+-proc OPENSSL_config*(configName: cstring){.cdecl, dynlib: DLLUtilName, importc.}
++proc OPENSSL_config*(configName: cstring){.cdecl, importc.}
+ 
+-proc OPENSSL_sk_num*(stack: PSTACK): int {.cdecl, dynlib: DLLSSLName, importc.}
++proc OPENSSL_sk_num*(stack: PSTACK): int {.cdecl, importc.}
+ 
+ proc OPENSSL_sk_value*(stack: PSTACK, index: int): pointer {.cdecl,
+-    dynlib: DLLSSLName, importc.}
++    importc.}
+ 
+ proc d2i_X509*(px: ptr PX509, i: ptr ptr uint8, len: cint): PX509 {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ 
+ proc i2d_X509*(cert: PX509; o: ptr ptr uint8): cint {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ 
+ proc d2i_X509*(b: string): PX509 =
+   ## decode DER/BER bytestring into X.509 certificate struct
+@@ -591,24 +592,21 @@ else:
+   proc CRYPTO_malloc_init*() =
+     discard
+ 
+-proc SSL_CTX_ctrl*(ctx: SslCtx, cmd: cint, larg: clong, parg: pointer): clong{.
+-  cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_ctrl*(ctx: SslCtx, cmd: cint, larg: clong, parg: pointer): clong{.cdecl, importc.}
+ 
+-proc SSL_CTX_callback_ctrl(ctx: SslCtx, typ: cint, fp: PFunction): int{.
+-  cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_callback_ctrl(ctx: SslCtx, typ: cint, fp: PFunction): int{.cdecl, importc.}
+ 
+ proc SSLCTXSetMode*(ctx: SslCtx, mode: int): int =
+   result = SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, clong mode, nil)
+ 
+-proc SSL_ctrl*(ssl: SslPtr, cmd: cint, larg: int, parg: pointer): int{.
+-  cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_ctrl*(ssl: SslPtr, cmd: cint, larg: int, parg: pointer): int{.cdecl, importc.}
+ 
+ proc SSL_set_tlsext_host_name*(ssl: SslPtr, name: cstring): int =
+   ## Set the SNI server name extension to be used in a client hello.
+   ## Returns 1 if SNI was set, 0 if current SSL configuration doesn't support SNI.
+   result = SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, name)
+ 
+-proc SSL_get_servername*(ssl: SslPtr, typ: cint = TLSEXT_NAMETYPE_host_name): cstring {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_get_servername*(ssl: SslPtr, typ: cint = TLSEXT_NAMETYPE_host_name): cstring {.cdecl, importc.}
+   ## Retrieve the server name requested in the client hello. This can be used
+   ## in the callback set in `SSL_CTX_set_tlsext_servername_callback` to
+   ## implement virtual hosting. May return `nil`.
+@@ -635,16 +633,16 @@ type
+   PskServerCallback* = proc (ssl: SslPtr;
+     identity: cstring; psk: ptr uint8; max_psk_len: cint): cuint {.cdecl.}
+ 
+-proc SSL_CTX_set_psk_client_callback*(ctx: SslCtx; callback: PskClientCallback) {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_set_psk_client_callback*(ctx: SslCtx; callback: PskClientCallback) {.cdecl, importc.}
+   ## Set callback called when OpenSSL needs PSK (for client).
+ 
+-proc SSL_CTX_set_psk_server_callback*(ctx: SslCtx; callback: PskServerCallback) {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_set_psk_server_callback*(ctx: SslCtx; callback: PskServerCallback) {.cdecl, importc.}
+   ## Set callback called when OpenSSL needs PSK (for server).
+ 
+-proc SSL_CTX_use_psk_identity_hint*(ctx: SslCtx; hint: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_use_psk_identity_hint*(ctx: SslCtx; hint: cstring): cint {.cdecl, importc.}
+   ## Set PSK identity hint to use.
+ 
+-proc SSL_get_psk_identity*(ssl: SslPtr): cstring {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_get_psk_identity*(ssl: SslPtr): cstring {.cdecl, importc.}
+   ## Get PSK identity.
+ 
+ proc SSL_CTX_set_ecdh_auto*(ctx: SslCtx, onoff: cint): cint {.inline.} =
+@@ -656,62 +654,62 @@ proc SSL_CTX_set_ecdh_auto*(ctx: SslCtx, onoff: cint): cint {.inline.} =
+   else:
+     result = 1
+ 
+-proc bioNew*(b: PBIO_METHOD): BIO{.cdecl, dynlib: DLLUtilName, importc: "BIO_new".}
+-proc bioFreeAll*(b: BIO){.cdecl, dynlib: DLLUtilName, importc: "BIO_free_all".}
+-proc bioSMem*(): PBIO_METHOD{.cdecl, dynlib: DLLUtilName, importc: "BIO_s_mem".}
+-proc bioCtrlPending*(b: BIO): cint{.cdecl, dynlib: DLLUtilName, importc: "BIO_ctrl_pending".}
++proc bioNew*(b: PBIO_METHOD): BIO{.cdecl, importc: "BIO_new".}
++proc bioFreeAll*(b: BIO){.cdecl, importc: "BIO_free_all".}
++proc bioSMem*(): PBIO_METHOD{.cdecl, importc: "BIO_s_mem".}
++proc bioCtrlPending*(b: BIO): cint{.cdecl, importc: "BIO_ctrl_pending".}
+ proc bioRead*(b: BIO, Buf: cstring, length: cint): cint{.cdecl,
+-    dynlib: DLLUtilName, importc: "BIO_read".}
++    importc: "BIO_read".}
+ proc bioWrite*(b: BIO, Buf: cstring, length: cint): cint{.cdecl,
+-    dynlib: DLLUtilName, importc: "BIO_write".}
++    importc: "BIO_write".}
+ 
+ proc sslSetConnectState*(s: SslPtr) {.cdecl,
+-    dynlib: DLLSSLName, importc: "SSL_set_connect_state".}
++    importc: "SSL_set_connect_state".}
+ proc sslSetAcceptState*(s: SslPtr) {.cdecl,
+-    dynlib: DLLSSLName, importc: "SSL_set_accept_state".}
++    importc: "SSL_set_accept_state".}
+ 
+ proc sslRead*(ssl: SslPtr, buf: cstring, num: cint): cint{.cdecl,
+-      dynlib: DLLSSLName, importc: "SSL_read".}
++      importc: "SSL_read".}
+ proc sslPeek*(ssl: SslPtr, buf: cstring, num: cint): cint{.cdecl,
+-    dynlib: DLLSSLName, importc: "SSL_peek".}
++    importc: "SSL_peek".}
+ proc sslWrite*(ssl: SslPtr, buf: cstring, num: cint): cint{.cdecl,
+-    dynlib: DLLSSLName, importc: "SSL_write".}
++    importc: "SSL_write".}
+ 
+ proc sslSetBio*(ssl: SslPtr, rbio, wbio: BIO) {.cdecl,
+-    dynlib: DLLSSLName, importc: "SSL_set_bio".}
++    importc: "SSL_set_bio".}
+ 
+ proc sslDoHandshake*(ssl: SslPtr): cint {.cdecl,
+-    dynlib: DLLSSLName, importc: "SSL_do_handshake".}
++    importc: "SSL_do_handshake".}
+ 
+ 
+-proc ErrClearError*(){.cdecl, dynlib: DLLUtilName, importc: "ERR_clear_error".}
+-proc ErrFreeStrings*(){.cdecl, dynlib: DLLUtilName, importc: "ERR_free_strings".}
+-proc ErrRemoveState*(pid: cint){.cdecl, dynlib: DLLUtilName, importc: "ERR_remove_state".}
++proc ErrClearError*(){.cdecl, importc: "ERR_clear_error".}
++proc ErrFreeStrings*(){.cdecl, importc: "ERR_free_strings".}
++proc ErrRemoveState*(pid: cint){.cdecl, importc: "ERR_remove_state".}
+ 
+ proc PEM_read_bio_RSA_PUBKEY*(bp: BIO, x: ptr PRSA, pw: pem_password_cb, u: pointer): PRSA {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc PEM_read_RSA_PUBKEY*(fp: pointer; x: ptr PRSA; cb: pem_password_cb, u: pointer): PRSA {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc RSA_verify*(kind: cint, origMsg: pointer, origMsgLen: cuint, signature: pointer,
+-    signatureLen: cuint, rsa: PRSA): cint {.cdecl, dynlib: DLLUtilName, importc.}
++    signatureLen: cuint, rsa: PRSA): cint {.cdecl, importc.}
+ proc PEM_read_RSAPrivateKey*(fp: pointer; x: ptr PRSA; cb: pem_password_cb, u: pointer): PRSA {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc PEM_read_RSAPublicKey*(fp: pointer; x: ptr PRSA; cb: pem_password_cb, u: pointer): PRSA {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc PEM_read_bio_RSAPublicKey*(bp: BIO, x: ptr PRSA, cb: pem_password_cb, u: pointer): PRSA {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc PEM_read_bio_RSAPrivateKey*(bp: BIO, x: ptr PRSA, cb: pem_password_cb, u: pointer): PRSA {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc RSA_private_encrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc RSA_public_encrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc RSA_private_decrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
+-    dynlib: DLLUtilName, importc.}
++    importc.}
+ proc RSA_public_decrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
+-    dynlib: DLLUtilName, importc.}
+-proc RSA_free*(rsa: PRSA) {.cdecl, dynlib: DLLUtilName, importc.}
+-proc RSA_size*(rsa: PRSA): cint {.cdecl, dynlib: DLLUtilName, importc.}
++    importc.}
++proc RSA_free*(rsa: PRSA) {.cdecl, importc.}
++proc RSA_size*(rsa: PRSA): cint {.cdecl, importc.}
+ 
+ # sha types
+ proc EVP_md_null*(): EVP_MD   {.lcrypto.}
+@@ -753,9 +751,9 @@ when defined(macosx) or defined(windows):
+   proc EVP_MD_CTX_cleanup*(ctx: EVP_MD_CTX): cint {.lcrypto.}
+ else:
+   # some times you will need this instead:
+-  proc EVP_MD_CTX_create*(): EVP_MD_CTX {.cdecl, importc: "EVP_MD_CTX_new", dynlib: DLLUtilName.}
+-  proc EVP_MD_CTX_destroy*(ctx: EVP_MD_CTX) {.cdecl, importc: "EVP_MD_CTX_free", dynlib: DLLUtilName.}
+-  proc EVP_MD_CTX_cleanup*(ctx: EVP_MD_CTX): cint {.cdecl, importc: "EVP_MD_CTX_cleanup", dynlib: DLLUtilName.}
++  proc EVP_MD_CTX_create*(): EVP_MD_CTX {.cdecl, importc: "EVP_MD_CTX_new".}
++  proc EVP_MD_CTX_destroy*(ctx: EVP_MD_CTX) {.cdecl, importc: "EVP_MD_CTX_free".}
++  proc EVP_MD_CTX_cleanup*(ctx: EVP_MD_CTX): cint {.cdecl, importc: "EVP_MD_CTX_cleanup".}
+ 
+ # <openssl/md5.h>
+ type
+@@ -770,7 +768,7 @@ type
+     data: array[MD5_LBLOCK, MD5_LONG]
+     num: cuint
+ 
+-{.push callconv:cdecl, dynlib:DLLUtilName.}
++{.push callconv:cdecl.}
+ proc md5_Init*(c: var MD5_CTX): cint{.importc: "MD5_Init".}
+ proc md5_Update*(c: var MD5_CTX; data: pointer; len: csize_t): cint{.importc: "MD5_Update".}
+ proc md5_Final*(md: cstring; c: var MD5_CTX): cint{.importc: "MD5_Final".}
+@@ -835,11 +833,11 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
+   # SSL_get_peer_certificate removed in 3.0
+   # SSL_get1_peer_certificate added in 3.0
+   when useOpenssl3:
+-    proc SSL_get1_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
++    proc SSL_get1_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, importc.}
+     proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
+       SSL_get1_peer_certificate(ssl)
+   elif useStaticLink:
+-    proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
++    proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, importc.}
+   else:
+     proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
+       let methodSym = sslSymNullable("SSL_get_peer_certificate", "SSL_get1_peer_certificate")
+@@ -848,26 +846,24 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
+       let method2Proc = cast[proc(ssl: SslCtx): PX509 {.cdecl, gcsafe, raises: [].}](methodSym)
+       return method2Proc(ssl)
+ 
+-  proc X509_get_subject_name*(a: PX509): PX509_NAME{.cdecl, dynlib: DLLSSLName, importc.}
++  proc X509_get_subject_name*(a: PX509): PX509_NAME{.cdecl, importc.}
+ 
+-  proc X509_get_issuer_name*(a: PX509): PX509_NAME{.cdecl, dynlib: DLLUtilName, importc.}
++  proc X509_get_issuer_name*(a: PX509): PX509_NAME{.cdecl, importc.}
+ 
+-  proc X509_NAME_oneline*(a: PX509_NAME, buf: cstring, size: cint): cstring {.
+-    cdecl, dynlib:DLLSSLName, importc.}
++  proc X509_NAME_oneline*(a: PX509_NAME, buf: cstring, size: cint): cstring {.cdecl, importc.}
+ 
+-  proc X509_NAME_get_text_by_NID*(subject:cstring, NID: cint, buf: cstring, size: cint): cint{.
+-    cdecl, dynlib:DLLSSLName, importc.}
++  proc X509_NAME_get_text_by_NID*(subject:cstring, NID: cint, buf: cstring, size: cint): cint{.cdecl, importc.}
+ 
+-  proc X509_check_host*(cert: PX509, name: cstring, namelen: cint, flags:cuint, peername: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.}
++  proc X509_check_host*(cert: PX509, name: cstring, namelen: cint, flags:cuint, peername: cstring): cint {.cdecl, importc.}
+ 
+-  proc X509_free*(cert: PX509) {.cdecl, dynlib: DLLSSLName, importc.}
++  proc X509_free*(cert: PX509) {.cdecl, importc.}
+ 
+   # Certificates store
+ 
+   type PX509_STORE* = SslPtr
+   type PX509_OBJECT* = SslPtr
+ 
+-  {.push callconv:cdecl, dynlib:DLLUtilName, importc.}
++  {.push callconv:cdecl, importc.}
+ 
+   proc X509_OBJECT_new*(): PX509_OBJECT
+   proc X509_OBJECT_free*(a: PX509_OBJECT)
+@@ -897,12 +893,12 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
+ # Available in at least OpenSSL 1.1.1 and later, not sure if earlier
+ # --Iced Quinn
+ 
+-proc SSL_CTX_set_alpn_protos*(ctx: SslCtx; protos: cstring; protos_len: cuint): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_set_alpn_protos*(ssl: SslPtr; protos: cstring; protos_len: cuint): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_set_alpn_select_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_get0_alpn_selected*(ssl: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_set_next_protos_advertised_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: ptr cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_CTX_set_next_proto_select_cb*(ctx: SslCtx; cb: proc(s: SslPtr; out_proto: cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_select_next_proto*(out_proto: ptr cstring; outlen: cstring; server: cstring; server_len: cuint; client: cstring; client_len: cuint): cint {.cdecl, dynlib: DLLSSLName, importc.}
+-proc SSL_get0_next_proto_negotiated*(s: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, dynlib: DLLSSLName, importc.}
++proc SSL_CTX_set_alpn_protos*(ctx: SslCtx; protos: cstring; protos_len: cuint): cint {.cdecl, importc.}
++proc SSL_set_alpn_protos*(ssl: SslPtr; protos: cstring; protos_len: cuint): cint {.cdecl, importc.}
++proc SSL_CTX_set_alpn_select_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer): cint {.cdecl, importc.}
++proc SSL_get0_alpn_selected*(ssl: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, importc.}
++proc SSL_CTX_set_next_protos_advertised_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: ptr cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, importc.}
++proc SSL_CTX_set_next_proto_select_cb*(ctx: SslCtx; cb: proc(s: SslPtr; out_proto: cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, importc.}
++proc SSL_select_next_proto*(out_proto: ptr cstring; outlen: cstring; server: cstring; server_len: cuint; client: cstring; client_len: cuint): cint {.cdecl, importc.}
++proc SSL_get0_next_proto_negotiated*(s: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, importc.}
+ 
diff --git a/nixpkgs/pkgs/development/compilers/nim/toLocation.patch b/nixpkgs/pkgs/development/compilers/nim/toLocation.patch
new file mode 100644
index 000000000000..a3db46044049
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/toLocation.patch
@@ -0,0 +1,16 @@
+diff --git a/lib/std/private/miscdollars.nim b/lib/std/private/miscdollars.nim
+index 840fedf54..6c3436308 100644
+--- a/lib/std/private/miscdollars.nim
++++ b/lib/std/private/miscdollars.nim
+@@ -6,9 +6,8 @@ template toLocation*(result: var string, file: string | cstring, line: int, col:
+   # it can be done in a single place.
+   result.add file
+   if line > 0:
+-    result.add "("
++    result.add ":"
+     addInt(result, line)
+     if col > 0:
+-      result.add ", "
++      result.add ":"
+       addInt(result, col)
+-    result.add ")"
diff --git a/nixpkgs/pkgs/development/compilers/nqc/default.nix b/nixpkgs/pkgs/development/compilers/nqc/default.nix
new file mode 100644
index 000000000000..a532b7df8580
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nqc/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "nqc";
+  version = "3.1.r6";
+
+  src = fetchurl {
+    url = "https://bricxcc.sourceforge.net/nqc/release/nqc-${version}.tgz";
+    sha256 = "sha256-v9XmVPY5r3pYjP3vTSK9Xvz/9UexClbOvr3ljvK/52Y=";
+  };
+
+  sourceRoot = ".";
+
+  patches = [
+    ./nqc-unistd.patch
+    (fetchpatch {
+      url = "https://sourceforge.net/p/bricxcc/patches/_discuss/thread/00b427dc/b84b/attachment/nqc-01-Linux_usb_and_tcp.diff";
+      sha256 = "sha256-UZmmhhhfLAUus36TOBhiDQ8KUeEdYhGHVFwqKqDIqII=";
+    })
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  dontConfigure = true;
+
+  meta = with lib; {
+    homepage = "https://bricxcc.sourceforge.net/nqc/";
+    description = "A programming language for several LEGO MINDSTORMS products including the RCX, CyberMaster, and Scout";
+    platforms = platforms.linux;
+    license = licenses.mpl10;
+    maintainers = with maintainers; [ christophcharles ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nqc/nqc-unistd.patch b/nixpkgs/pkgs/development/compilers/nqc/nqc-unistd.patch
new file mode 100644
index 000000000000..7abf37f93ca7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nqc/nqc-unistd.patch
@@ -0,0 +1,11 @@
+diff -ruN nqc-3.1.r6-old/compiler/lexer.cpp nqc-3.1.r6-new/compiler/lexer.cpp
+--- nqc-3.1.r6-old/compiler/lexer.cpp	2007-06-06 20:19:10.000000000 +0200
++++ nqc-3.1.r6-new/compiler/lexer.cpp	2022-10-13 07:57:08.247213954 +0200
+@@ -11,6 +11,7 @@
+ #define YY_FLEX_MINOR_VERSION 5

+ 

+ #include <stdio.h>

++#include <unistd.h>

+ 

+ #if defined(__MWERKS__) && !__MACH__ && !YY_NEVER_INTERACTIVE

+ #include <unix.h>

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..d6d4fdd44810
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nvidia-cg-toolkit/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl }:
+
+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.cc.libc}/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..f2eadee57937
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/obliv-c/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, libgcrypt, fetchFromGitHub, ocamlPackages, perl }:
+stdenv.mkDerivation rec {
+  pname = "obliv-c";
+
+  version = "0.0pre20210621";
+
+  strictDeps = true;
+  nativeBuildInputs = [ perl ]
+  ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ]);
+  buildInputs = [ ocamlPackages.num ];
+  propagatedBuildInputs = [ libgcrypt ];
+  src = fetchFromGitHub {
+    owner = "samee";
+    repo = "obliv-c";
+    rev = "e02e5c590523ef4dae06e167a7fa00037bb3fdaf";
+    sha256 = "sha256:02vyr4689f4dmwqqs0q1mrack9h3g8jz3pj8zqiz987dk0r5mz7a";
+  };
+
+  hardeningDisable = [ "fortify" ];
+
+  patches = [ ./ignore-complex-float128.patch ];
+
+  # https://github.com/samee/obliv-c/issues/76#issuecomment-438958209
+  env.OCAMLBUILD = "ocamlbuild -package num -ocamlopt 'ocamlopt -dontlink num' -ocamlc 'ocamlc -dontlink num'";
+
+  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 = {
+    description = "A GCC wrapper that makes it easy to embed secure computation protocols inside regular C programs";
+    license = lib.licenses.bsd3;
+    maintainers = [lib.maintainers.raskin];
+    platforms = 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/4.00.1.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix
new file mode 100644
index 000000000000..e4a4ed0f9580
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix
@@ -0,0 +1,79 @@
+{ lib, stdenv, fetchurl, fetchpatch, ncurses, libX11 }:
+
+let
+   useX11 = !stdenv.isAarch32 && !stdenv.isMips;
+   useNativeCompilers = !stdenv.isMips;
+   inherit (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";
+  };
+
+  # Compatibility with Glibc 2.34
+  patches = [ (fetchpatch {
+    url = "https://github.com/ocaml/ocaml/commit/60b0cdaf2519d881947af4175ac4c6ff68901be3.patch";
+    sha256 = "sha256:07g9q9sjk4xsbqix7jxggfp36v15pmqw4bms80g5car0hfbszirn";
+  })];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  prefixKey = "-prefix ";
+  configureFlags = [ "-no-tk" ] ++ optionals useX11 [ "-x11lib" libX11 ];
+  buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
+  buildInputs = [ ncurses ] ++ optionals useX11 [ libX11 ];
+  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 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..70f7e9afa1de
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.01.0.nix
@@ -0,0 +1,19 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "01";
+  patch_version = "0";
+  patches = [
+    ./fix-clang-build-on-osx.diff
+
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/d111407bf4ff71171598d30825c8e59ed5f75fd6.patch";
+      sha256 = "sha256:08mpy7lsiwv8m5qrqc4xzyiv2hri5713gz2qs1nfz02hz1bd79mc"; }
+  ];
+  sha256 = "03d7ida94s1gpr3gadf4jyhmh5rrszd5s4m4z59daaib25rvfyv7";
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..2e3445b20c7a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.02.nix
@@ -0,0 +1,22 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "02";
+  patch_version = "3";
+  patches = [
+    ./ocamlbuild.patch
+
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/9de2b77472aee18a94b41cff70caee27fb901225.patch";
+      sha256 = "sha256:12sw512kpwk0xf2g6j0h5vqgd8xcmgrvgyilx6fxbd6bnfv1yib9"; }
+    # Compatibility with Binutils 2.29
+    { url = "https://github.com/ocaml/ocaml/commit/bcc7a767279ff70518b3f4219cc0b9bffec7dd43.patch";
+      sha256 = "sha256-z3xrqN6bh/EW9dkPg6Hz8mT79DFm26yGRoPbE+RMYi0="; }
+  ];
+  sha256 = "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3";
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..94c171560a33
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.03.nix
@@ -0,0 +1,21 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "03";
+  patch_version = "0";
+  sha256 = "09p3iwwi55r6rbrpyp8f0wmkb0ppcgw67yxw6yfky60524wayp39";
+
+  patches = [
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/a8b2cc3b40f5269ce8525164ec2a63b35722b22b.patch";
+      sha256 = "sha256:1rrknmrk86xrj2k3hznnjk1gwnliyqh125zabg1hvy6dlvml9b0x"; }
+    # Compatibility with Binutils 2.29
+    { url = "https://github.com/ocaml/ocaml/commit/c204f07bfb20174f9e1c9ff586fb7b2f42b8bf18.patch";
+      sha256 = "sha256-AAXyMZ7ujO67SGz+tGXKZkVcINAwvccHlFHmKnUt848="; }
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..68c40855ca52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.04.nix
@@ -0,0 +1,24 @@
+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;
+
+  patches = [
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/6bcff7e6ce1a43e088469278eb3a9341e6a2ca5b.patch";
+      sha256 = "sha256:1hd45f7mwwrrym2y4dbcwklpv0g94avbz7qrn81l7w8mrrj3bngi"; }
+    # Compatibility with Binutils 2.29
+    { url = "https://github.com/ocaml/ocaml/commit/db11f141a0e35c7fbaec419a33c4c39d199e2635.patch";
+      sha256 = "sha256-oIwmbXOCzDGyASpbQ7hd7SCs4YHjd9hBBksJ74V3GiY="; }
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..5f1130f339cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.05.nix
@@ -0,0 +1,24 @@
+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;
+
+  patches = [
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/50c2d1275e537906ea144bd557fde31e0bf16e5f.patch";
+      sha256 = "sha256:0ck9b2dpgg5k2p9ndbgniql24h35pn1bbpxjvk69j715lswzy4mh"; }
+    # Compatibility with Binutils 2.29
+    { url = "https://github.com/ocaml/ocaml/commit/b00000c6679804731692362b0baac27fa3fddfd5.patch";
+      sha256 = "sha256-CuEXGK3EsOevyUrc9TmSZo9DVBwjunQX7mKnDVHFpkY="; }
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..903679b1b082
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.06.nix
@@ -0,0 +1,21 @@
+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;
+
+  patches = [
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/137a4ad167f25fe1bee792977ed89f30d19bcd74.patch";
+      sha256 = "sha256:0izsf6rm3677vbbx0snkmn9pkfcsayrdwz3ipiml5wjiaysnchjz"; }
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..833e7fb27961
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.07.nix
@@ -0,0 +1,21 @@
+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;
+
+  patches = [
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/00b8c4d503732343d5d01761ad09650fe50ff3a0.patch";
+      sha256 = "sha256:02cfya5ff5szx0fsl5x8ax76jyrla9zmf3qxavf3adhwq5ssrfcv"; }
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
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..d5d11ead1f8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.08.nix
@@ -0,0 +1,24 @@
+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" ];
+
+  patches = [
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/17df117b4939486d3285031900587afce5262c8c.patch";
+      sha256 = "sha256:1b3jc6sj2k23yvfwrv6nc1f4x2n2biqbhbbp74aqb6iyqyjsq35n"; }
+  ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.09.1-Werror.patch b/nixpkgs/pkgs/development/compilers/ocaml/4.09.1-Werror.patch
new file mode 100644
index 000000000000..153c8a06e34e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.09.1-Werror.patch
@@ -0,0 +1,16 @@
+The 4.09.1 tarball appears to have been acidentally generated as a
+development tarball, which causes configure to enable -Werror.  This
+means newer compilers will make the build fail.
+
+diff a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -12360,7 +12360,7 @@ case $ocaml_cv_cc_vendor in #(
+   msvc-*) :
+     outputobj=-Fo; CPP="cl -nologo -EP"; gcc_warnings="" ;; #(
+   *) :
+-    outputobj='-o $(EMPTY)'; case 4.09.1+dev1-2020-03-13 in #(
++    outputobj='-o $(EMPTY)'; case 4.09.1 in #(
+   *+dev*) :
+     gcc_warnings="-Wall -Werror" ;; #(
+   *) :
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..2d0672093905
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.09.nix
@@ -0,0 +1,16 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "09";
+  patch_version = "1";
+  sha256 = "1aq5505lpa39garky2icgfv4c7ylpx3j623cz9bsz5c466d2kqls";
+
+  # Breaks build with Clang
+  hardeningDisable = [ "strictoverflow" ];
+
+  patches = [
+    ./4.09.1-Werror.patch
+    # Compatibility with Glibc 2.34
+    { url = "https://github.com/ocaml/ocaml/commit/8eed2e441222588dc385a98ae8bd6f5820eb0223.patch";
+      sha256 = "sha256:1b3jc6sj2k23yvfwrv6nc1f4x2n2biqbhbbp74aqb6iyqyjsq35n"; }
+  ];
+}
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..48d01a5a8c8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.10.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "10";
+  patch_version = "2";
+  sha256 = "sha256-locUYQeCgtXbAiB32JveJchfteN2YStE+MN9ToTwAOM=";
+  patches = [
+    ./glibc-2.34-for-ocaml-4.10-and-11.patch
+  ];
+}
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..6a2e4f61f80e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.11.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "11";
+  patch_version = "2";
+  sha256 = "1m3wrgkkv3f77wvcymjm0i2srxzmx62y6jln3i0a2px07ng08l9z";
+  patches = [
+    ./glibc-2.34-for-ocaml-4.10-and-11.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.12.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.12.nix
new file mode 100644
index 000000000000..2066d0d5ad31
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.12.nix
@@ -0,0 +1,11 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "12";
+  patch_version = "1";
+  sha256 = "1jbjjnmqq6ymsy81x188i256bz4z5jrz1pws8g1qf59c32ganjkf";
+  patches = [
+    { url = "https://src.fedoraproject.org/rpms/ocaml/raw/129153b85109944bf0b2922949f77ef8f32b39a1/f/0004-Dynamically-allocate-the-alternate-signal-stack-1026.patch";
+      sha256 = "sha256-FdQ1HkMKHU9QvgLPUBvMdPiEa7w7IL3+1F3SLv63Gog=";
+    }
+  ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix
new file mode 100644
index 000000000000..4bfa949fa885
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "13";
+  patch_version = "1";
+  sha256 = "sha256:1s7xwqidpjwfhnpfma4nb93gxfr7g9jfn03s1j03iyavmpgph7ck";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.14.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.14.nix
new file mode 100644
index 000000000000..8ce7967853e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.14.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "14";
+  patch_version = "1";
+  sha256 = "sha256-wSeXTQJCV2z0cGGyCqnIbRe+DWqpaH9uyYNd5nvnu28";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/5.0.nix b/nixpkgs/pkgs/development/compilers/ocaml/5.0.nix
new file mode 100644
index 000000000000..390bb151b715
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/5.0.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "5";
+  minor_version = "0";
+  patch_version = "0";
+  sha256 = "sha256-yxfwpTTdSz/sk9ARsL4bpcYIfaAzz3iehaNLlkHsxl8=";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/5.1.nix b/nixpkgs/pkgs/development/compilers/ocaml/5.1.nix
new file mode 100644
index 000000000000..90efd1050206
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/5.1.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "5";
+  minor_version = "1";
+  patch_version = "1";
+  sha256 = "sha256-jX6Yv9o76UBgK3o53PkSotL96reR7UDmKgmkzWfd7vE=";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/Makefile.nixpkgs b/nixpkgs/pkgs/development/compilers/ocaml/Makefile.nixpkgs
new file mode 100644
index 000000000000..2d6457852fc9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/Makefile.nixpkgs
@@ -0,0 +1,16 @@
+# ocaml build system does not allow for parallel building of some
+# top-level targets like 'world', 'bootstrap', 'world.opt' as
+# then spawn '$(MAKE) all' subprocesses that conflict among each
+# other. But we would still like to run each target in parallel
+# individually. This file defines such entry points.
+
+# Re-export all existing phases to make 'make install' work as is.
+include Makefile
+
+nixpkgs_world:
+	$(MAKE) world
+
+nixpkgs_world_bootstrap_world_opt:
+	$(MAKE) world
+	$(MAKE) bootstrap
+	$(MAKE) world.opt
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..36ea949d1ece
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/ber-metaocaml.nix
@@ -0,0 +1,104 @@
+{ lib, stdenv, fetchurl
+, ncurses
+, libX11, xorgproto, buildEnv
+, fetchpatch
+, useX11 ? stdenv.hostPlatform.isx86
+}:
+
+let
+   x11deps = [ libX11 xorgproto ];
+   inherit (lib) optionals;
+
+   baseOcamlBranch  = "4.11";
+   baseOcamlVersion = "${baseOcamlBranch}.1";
+   metaocamlPatch   = "111";
+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 = "sha256-3Yi2OFvZLgrZInMuKMxoyHd4QXcOoAPCC9FS9dtEFc4=";
+  };
+
+  metaocaml = fetchurl {
+    url = "http://okmij.org/ftp/ML/ber-metaocaml-${metaocamlPatch}.tar.gz";
+    sha256 = "sha256-hDb0w0ZCm0hCz8jktZKmr/7gPSfBoKPT/cc7sPjt0yE=";
+  };
+
+  x11env = buildEnv { name = "x11env"; paths = x11deps; };
+  x11lib = "${x11env}/lib";
+  x11inc = "${x11env}/include";
+
+  prefixKey = "-prefix ";
+  configureFlags = optionals useX11 [ "--enable-flambda" ];
+
+  dontStrip = true;
+  buildInputs = [ ncurses ] ++ optionals useX11 x11deps;
+
+  patches = [
+    # glibc 2.34 changed SIGSTKSZ from a #define'd integer to an
+    # expression involving a function call.  This broke all code that
+    # used SIGSTKSZ as the size of a statically-allocated array.  This
+    # patch is also applied by the ocaml/4.07.nix expression.
+    (fetchpatch {
+      url = "https://github.com/ocaml/ocaml/commit/dd28ac0cf4365bd0ea1bcc374cbc5e95a6f39bea.patch";
+      sha256 = "sha256-OmyovAu+8sgg3n5YD29Cytx3u/9PO2ofMsmrwiKUxks=";
+    })
+  ];
+
+  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 lib; {
+    description     = "Multi-Stage Programming extension for OCaml";
+    homepage        = "https://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..85b26848f4e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/builder.sh
@@ -0,0 +1,9 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+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/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..af07074eba1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/generic.nix
@@ -0,0 +1,163 @@
+{ minor_version, major_version, patch_version, patches ? []
+, ...}@args:
+let
+  versionNoPatch = "${toString major_version}.${toString minor_version}";
+  version = "${versionNoPatch}.${toString patch_version}";
+  safeX11 = stdenv: !(stdenv.isAarch32 || stdenv.isMips || stdenv.hostPlatform.isStatic);
+in
+
+{ lib, stdenv, fetchurl, ncurses, buildEnv, libunwind, fetchpatch
+, libX11, xorgproto, useX11 ? safeX11 stdenv && lib.versionOlder version "4.09"
+, aflSupport ? false
+, flambdaSupport ? false
+, spaceTimeSupport ? false
+, unsafeStringSupport ? false
+, framePointerSupport ? false
+}:
+
+assert useX11 -> safeX11 stdenv;
+assert aflSupport -> lib.versionAtLeast version "4.05";
+assert flambdaSupport -> lib.versionAtLeast version "4.03";
+assert spaceTimeSupport -> lib.versionAtLeast version "4.04" && lib.versionOlder version "4.12";
+assert unsafeStringSupport -> lib.versionAtLeast version "4.06" && lib.versionOlder version "5.0";
+assert framePointerSupport -> lib.versionAtLeast version "4.01";
+
+let
+  src = args.src or (fetchurl {
+    url = args.url or "http://caml.inria.fr/pub/distrib/ocaml-${versionNoPatch}/ocaml-${version}.tar.xz";
+    inherit (args) sha256;
+  });
+in
+
+let
+  useNativeCompilers = !stdenv.isMips;
+  inherit (lib) optional optionals optionalString strings concatStrings;
+  pname = concatStrings [ "ocaml"
+    (optionalString aflSupport "+afl")
+    (optionalString spaceTimeSupport "+spacetime")
+    (optionalString flambdaSupport "+flambda")
+    (optionalString framePointerSupport "+fp")
+  ];
+in
+
+let
+  x11env = buildEnv { name = "x11env"; paths = [libX11 xorgproto]; };
+  x11lib = x11env + "/lib";
+  x11inc = x11env + "/include";
+
+  fetchpatch' = x: if builtins.isAttrs x then fetchpatch x else x;
+in
+
+stdenv.mkDerivation (args // {
+
+  inherit pname version src;
+
+  patches = map fetchpatch' patches;
+
+  strictDeps = true;
+
+  prefixKey = "-prefix ";
+  configureFlags =
+    let flags = new: old:
+      if 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")
+  ++ optional spaceTimeSupport (flags "--enable-spacetime" "-spacetime")
+  ++ optional framePointerSupport (flags "--enable-frame-pointers" "-with-frame-pointers")
+  ++ optionals unsafeStringSupport [
+    "--disable-force-safe-string"
+    "DEFAULT_STRING=unsafe"
+  ]
+  ++ optional (stdenv.hostPlatform.isStatic && (lib.versionOlder version "4.08")) "-no-shared-libs"
+  ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && lib.versionOlder version "4.08") [
+    "-host ${stdenv.hostPlatform.config}"
+    "-target ${stdenv.targetPlatform.config}"
+  ];
+  dontAddStaticConfigureFlags = lib.versionOlder version "4.08";
+
+  # on aarch64-darwin using --host and --target causes the build to invoke
+  # `aarch64-apple-darwin-clang` while using assembler. However, such binary
+  # does not exist. So, disable these configure flags on `aarch64-darwin`.
+  # See #144785 for details.
+  configurePlatforms = lib.optionals (lib.versionAtLeast version "4.08" && !(stdenv.isDarwin && stdenv.isAarch64)) [ "host" "target" ];
+  # x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
+  hardeningDisable = lib.optional (lib.versionAtLeast version "4.09" && stdenv.hostPlatform.isMusl) "pie"
+    ++ lib.optional (lib.versionAtLeast version "5.0" && stdenv.cc.isClang) "strictoverflow"
+    ++ lib.optionals (args ? hardeningDisable) args.hardeningDisable;
+
+  # Older versions have some race:
+  #  cp: cannot stat 'boot/ocamlrun': No such file or directory
+  #  make[2]: *** [Makefile:199: backup] Error 1
+  enableParallelBuilding = lib.versionAtLeast version "4.08";
+
+  # Workaround missing dependencies for install parallelism:
+  #  install: target '...-ocaml-4.14.0/lib/ocaml/threads': No such file or directory
+  #  make[1]: *** [Makefile:140: installopt] Error 1
+  enableParallelInstalling = false;
+
+  # Workaround lack of parallelism support among top-level targets:
+  # we place nixpkgs-specific targets to a separate file and set
+  # sequential order among them as a single rule.
+  makefile = ./Makefile.nixpkgs;
+  buildFlags = if useNativeCompilers
+    then ["nixpkgs_world_bootstrap_world_opt"]
+    else ["nixpkgs_world"];
+  buildInputs = optional (lib.versionOlder version "4.07") ncurses
+    ++ optionals useX11 [ libX11 xorgproto ];
+  propagatedBuildInputs = optional spaceTimeSupport libunwind;
+  installTargets = [ "install" ] ++ optional useNativeCompilers "installopt";
+  preConfigure = optionalString (lib.versionOlder version "4.04") ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '' + optionalString (stdenv.isDarwin) ''
+    # Do what upstream does by default now: https://github.com/ocaml/ocaml/pull/10176
+    # This is required for aarch64-darwin, everything else works as is.
+    AS="${stdenv.cc}/bin/cc -c" ASPP="${stdenv.cc}/bin/cc -c"
+  '' + optionalString (lib.versionOlder version "4.08" && stdenv.hostPlatform.isStatic) ''
+    configureFlagsArray+=("-cc" "$CC" "-as" "$AS" "-partialld" "$LD -r")
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  passthru = {
+    nativeCompilers = useNativeCompilers;
+  };
+
+  meta = with lib; {
+    homepage = "https://ocaml.org/";
+    branch = versionNoPatch;
+    license = with licenses; [
+      qpl /* compiler */
+      lgpl2 /* library */
+    ];
+    description = "OCaml is an industrial-strength programming language supporting functional, imperative and object-oriented styles";
+
+    longDescription = ''
+      OCaml is a general purpose programming language with an emphasis on expressiveness and safety. Developed for more than 20 years at Inria by a group of leading researchers, it has an advanced type system that helps catch your mistakes without getting in your way. It's used in environments where a single mistake can cost millions and speed matters, is supported by an active community, and has a rich set of libraries and development tools. It's widely used in teaching for its power and simplicity.
+
+      Strengths:
+      * A powerful type system, equipped with parametric polymorphism and type inference. For instance, the type of a collection can be parameterized by the type of its elements. This allows defining some operations over a collection independently of the type of its elements: sorting an array is one example. Furthermore, type inference allows defining such operations without having to explicitly provide the type of their parameters and result.
+      * User-definable algebraic data types and pattern-matching. New algebraic data types can be defined as combinations of records and sums. Functions that operate over such data structures can then be defined by pattern matching, a generalized form of the well-known switch statement, which offers a clean and elegant way of simultaneously examining and naming data.
+      * Automatic memory management, thanks to a fast, unobtrusive, incremental garbage collector.
+      * Separate compilation of standalone applications. Portable bytecode compilers allow creating stand-alone applications out of Caml Light or OCaml programs. A foreign function interface allows OCaml code to interoperate with C code when necessary. Interactive use of OCaml is also supported via a “read-evaluate-print” loop.
+
+      In addition, OCaml features:
+      * A sophisticated module system, which allows organizing modules hierarchically and parameterizing a module over a number of other modules.
+      * An expressive object-oriented layer, featuring multiple inheritance, parametric and virtual classes.
+      * Efficient native code compilers. In addition to its bytecode compiler, OCaml offers a compiler that produces efficient machine code for many architectures.
+
+      Learn more at: https://ocaml.org/learn/description.html
+    '';
+
+    platforms = with platforms; linux ++ darwin;
+    broken = stdenv.isAarch64 && lib.versionOlder version (if stdenv.isDarwin then "4.10" else "4.02");
+  };
+
+})
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/glibc-2.34-for-ocaml-4.10-and-11.patch b/nixpkgs/pkgs/development/compilers/ocaml/glibc-2.34-for-ocaml-4.10-and-11.patch
new file mode 100644
index 000000000000..4ff9e6fddba5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/glibc-2.34-for-ocaml-4.10-and-11.patch
@@ -0,0 +1,37 @@
+From dfb5e954a04f59b0456cc4c0ddf3acaf22e0ff07 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones@redhat.com>
+Date: Feb 28 2021 20:45:47 +0000
+Subject: Workaround for glibc non-constant SIGSTKSZ
+
+
+https://github.com/ocaml/ocaml/issues/10250
+
+Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
+
+---
+
+diff --git a/runtime/signals_nat.c b/runtime/signals_nat.c
+index 8b64ab4..7f0a975 100644
+--- a/runtime/signals_nat.c
++++ b/runtime/signals_nat.c
+@@ -181,7 +181,19 @@ DECLARE_SIGNAL_HANDLER(trap_handler)
+ #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined"
+ #endif
+ 
++#ifndef __GLIBC__
+ static char sig_alt_stack[SIGSTKSZ];
++#else
++/* glibc 2.34 has non-constant SIGSTKSZ */
++static char *sig_alt_stack;
++
++static void allocate_sig_alt_stack(void) __attribute__((constructor));
++static void
++allocate_sig_alt_stack(void)
++{
++  sig_alt_stack = malloc(SIGSTKSZ);
++}
++#endif
+ 
+ /* Code compiled with ocamlopt never accesses more than
+    EXTRA_STACK bytes below the stack pointer. */
+
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/odin/default.nix b/nixpkgs/pkgs/development/compilers/odin/default.nix
new file mode 100644
index 000000000000..e6691e2436a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/odin/default.nix
@@ -0,0 +1,79 @@
+{ lib
+, fetchFromGitHub
+, llvmPackages_13
+, makeBinaryWrapper
+, libiconv
+, MacOSX-SDK
+, which
+}:
+
+let
+  llvmPackages = llvmPackages_13;
+  inherit (llvmPackages) stdenv;
+in stdenv.mkDerivation rec {
+  pname = "odin";
+  version = "dev-2024-02";
+
+  src = fetchFromGitHub {
+    owner = "odin-lang";
+    repo = "Odin";
+    rev = version;
+    hash = "sha256-v9A0+kgREXALhnvFYWtE0+H4L7CYnyje+d2W5+/ZvHA=";
+  };
+
+  nativeBuildInputs = [
+    makeBinaryWrapper which
+  ];
+
+  buildInputs = lib.optional stdenv.isDarwin libiconv;
+
+  LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config";
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    sed -i src/main.cpp \
+      -e 's|-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk|-syslibroot ${MacOSX-SDK}|'
+  '' + ''
+    sed -i build_odin.sh \
+      -e 's/^GIT_SHA=.*$/GIT_SHA=/' \
+      -e 's/LLVM-C/LLVM/' \
+      -e 's/framework System/lSystem/'
+    patchShebangs build_odin.sh
+  '';
+
+  dontConfigure = true;
+
+  buildFlags = [
+    "release"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp odin $out/bin/odin
+
+    mkdir -p $out/share
+    cp -r base $out/share/base
+    cp -r core $out/share/core
+    cp -r vendor $out/share/vendor
+
+    wrapProgram $out/bin/odin \
+      --prefix PATH : ${lib.makeBinPath (with llvmPackages; [
+        bintools
+        llvm
+        clang
+        lld
+      ])} \
+      --set-default ODIN_ROOT $out/share
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A fast, concise, readable, pragmatic and open sourced programming language";
+    homepage = "https://odin-lang.org/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ luc65r astavie znaniye ];
+    platforms = platforms.x86_64 ++ [ "aarch64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/open-watcom/bin.nix b/nixpkgs/pkgs/development/compilers/open-watcom/bin.nix
new file mode 100644
index 000000000000..daf7ea497693
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/open-watcom/bin.nix
@@ -0,0 +1,125 @@
+{ lib, 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 = "${passthru.prettyName}-unwrapped";
+  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
+  '';
+
+  passthru.prettyName = "open-watcom-bin";
+
+  meta = with lib; {
+    description = "A project to maintain and enhance the Watcom C, C++, and Fortran cross compilers and tools";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    homepage = "http://www.openwatcom.org/";
+    license = licenses.watcom;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.blitz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix b/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix
new file mode 100644
index 000000000000..80ee2ee5e45d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix
@@ -0,0 +1,133 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, unstableGitUpdater
+, dosbox
+
+# Docs cause an immense increase in build time, up to 2 additional hours
+, withDocs ? false
+, ghostscript
+, withGUI ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "${passthru.prettyName}-unwrapped";
+  # nixpkgs-update: no auto update
+  version = "unstable-2023-11-24";
+
+  src = fetchFromGitHub {
+    owner = "open-watcom";
+    repo = "open-watcom-v2";
+    rev = "7976a5c7ca4e856907ccd378c17c71578ad51cb7";
+    hash = "sha256-u9ljy4dZRoXKyUqdolxZijpc99TuhKPPlL6xlV3xJXA=";
+  };
+
+  postPatch = ''
+    patchShebangs *.sh
+
+    for dateSource in bld/wipfc/configure; do
+      substituteInPlace $dateSource \
+        --replace '`date ' '`date -ud "@$SOURCE_DATE_EPOCH" '
+    done
+
+    substituteInPlace bld/watcom/h/banner.h \
+      --replace '__DATE__' "\"$(date -ud "@$SOURCE_DATE_EPOCH" +'%b %d %Y')\"" \
+      --replace '__TIME__' "\"$(date -ud "@$SOURCE_DATE_EPOCH" +'%T')\""
+
+    substituteInPlace build/makeinit \
+      --replace '$+$(%__CYEAR__)$-' "$(date -ud "@$SOURCE_DATE_EPOCH" +'%Y')"
+  '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
+    substituteInPlace build/mif/local.mif \
+      --replace '-static' ""
+  '';
+
+  nativeBuildInputs = [
+    dosbox
+  ] ++ lib.optionals withDocs [
+    ghostscript
+  ];
+
+  # Work around https://github.com/NixOS/nixpkgs/issues/166205
+  env.NIX_LDFLAGS = lib.optionalString (stdenv.cc.isClang && stdenv.cc.libcxx != null) "-l${stdenv.cc.libcxx.cxxabi.libName}";
+
+  configurePhase = ''
+    runHook preConfigure
+
+    export OWROOT=$(realpath $PWD)
+    export OWTOOLS=${if stdenv.cc.isClang then "CLANG" else "GCC"}
+    export OWDOCBUILD=${if withDocs then "1" else "0"}
+    export OWGHOSTSCRIPTPATH=${lib.optionalString withDocs "${ghostscript}/bin"}
+    export OWGUINOBUILD=${if withGUI then "0" else "1"}
+    export OWNOBUILD=
+    export OWDISTRBUILD=0
+    export OWDOSBOX=${dosbox}/bin/dosbox
+    export OWVERBOSE=0
+    export OWRELROOT=$out
+
+    source cmnvars.sh
+
+    runHook postConfigure
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    ./build.sh build
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    ./build.sh cprel
+
+    runHook postInstall
+  '';
+
+  # Stripping breaks many tools
+  dontStrip = true;
+
+  passthru = {
+    prettyName = "open-watcom-v2";
+    updateScript = unstableGitUpdater {
+      url = "https://github.com/open-watcom/open-watcom-v2.git";
+    };
+  };
+
+  meta = with lib; {
+    description = "The v2 fork of the Open Watcom suite of compilers and tools";
+    longDescription = ''
+      A fork of Open Watcom: A C/C++/Fortran compiler and assembler suite
+      targeting a multitude of architectures (x86, IA-32, Alpha AXP, MIPS,
+      PowerPC) and operating systems (DOS, OS/2, Windows, Linux).
+
+      Main differences from Open Watcom 1.9:
+
+      - New two-phase build system - Open Watcom can be built by the host's
+        native C/C++ compiler or by itself
+      - Code generator properly initializes pointers by DLL symbol addresses
+      - DOS tools now support long file names (LFN) if appropriate LFN driver
+        is loaded by DOS
+      - Open Watcom is ported to 64-bit hosts (Win64, Linux x64)
+      - Librarian supports x64 CPU object modules and libraries
+      - RDOS 32-bit C run-time compact memory model libraries are fixed
+      - Resource compiler and Resource editors support Win64 executables
+      - Open Watcom text editor is now self-contained, it can be used as
+        standalone tool without any requirements for any additional files or
+        configuration
+      - Broken C++ compiler pre-compiled header template support is fixed
+      - Many C++ compiler crashes are fixed
+      - Debugger has no length limit for any used environment variable
+    '' + lib.optionalString (!withDocs) ''
+
+      The documentation has been excluded from this build for build time reasons. It can be found here:
+      https://github.com/open-watcom/open-watcom-v2/wiki/Open-Watcom-Documentation
+    '';
+    homepage = "https://open-watcom.github.io";
+    license = licenses.watcom;
+    platforms = with platforms; windows ++ unix;
+    badPlatforms = platforms.riscv ++ [ "powerpc64-linux" "powerpc64le-linux" "mips64el-linux" ];
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/open-watcom/wrapper.nix b/nixpkgs/pkgs/development/compilers/open-watcom/wrapper.nix
new file mode 100644
index 000000000000..95752b2c2fe4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/open-watcom/wrapper.nix
@@ -0,0 +1,143 @@
+# Arguments that this derivation gets when it is created with `callPackage`
+{ stdenv
+, lib
+, symlinkJoin
+, makeWrapper
+, runCommand
+, file
+}:
+
+open-watcom:
+
+let
+  wrapper =
+    {}:
+    let
+      archToBindir = with stdenv.hostPlatform; if isx86 then
+        "bin"
+      else if isAarch then
+        "arm"
+      # we don't support running on AXP
+      # don't know what MIPS, PPC bindirs are called
+      else throw "Don't know where ${system} binaries are located!";
+
+      binDirs = with stdenv.hostPlatform; if isWindows then [
+        (lib.optionalString is64bit "${archToBindir}nt64")
+        "${archToBindir}nt"
+        (lib.optionalString is32bit "${archToBindir}w")
+      ] else if (isDarwin) then [
+        (lib.optionalString is64bit "${archToBindir}o64")
+        # modern Darwin cannot execute 32-bit code anymore
+        (lib.optionalString is32bit "${archToBindir}o")
+      ] else [
+        (lib.optionalString is64bit "${archToBindir}l64")
+        "${archToBindir}l"
+      ];
+      # TODO
+      # This works good enough as-is, but should really only be targetPlatform-specific
+      # but we don't support targeting DOS, OS/2, 16-bit Windows etc Nixpkgs-wide so this needs extra logic
+      includeDirs = with stdenv.hostPlatform; [
+        "h"
+      ]
+      ++ lib.optional isWindows "h/nt"
+      ++ lib.optional isLinux "lh";
+      listToDirs = list: lib.strings.concatMapStringsSep ":" (dir: "${placeholder "out"}/${dir}") list;
+      name = "${open-watcom.passthru.prettyName}-${open-watcom.version}";
+    in
+    symlinkJoin {
+      inherit name;
+
+      paths = [ open-watcom ];
+
+      nativeBuildInputs = [ makeWrapper ];
+
+      postBuild = ''
+        mkdir $out/bin
+
+        for binDir in ${lib.strings.concatStringsSep " " binDirs}; do
+          for exe in $(find ${open-watcom}/$binDir \
+          -type f -executable \
+          ${lib.optionalString stdenv.hostPlatform.isLinux "-not -iname '*.so' -not -iname '*.exe'"} \
+          ); do
+            if [ ! -f $out/bin/$(basename $exe) ]; then
+              makeWrapper $exe $out/bin/$(basename $exe) \
+                --set WATCOM ${open-watcom} \
+                --prefix PATH : ${listToDirs binDirs} \
+                --set EDPATH ${open-watcom}/eddat \
+                --set INCLUDE ${listToDirs includeDirs}
+            fi
+          done
+        done
+      '';
+
+      passthru = {
+        unwrapped = open-watcom;
+        tests = let
+          wrapped = wrapper { };
+        in {
+          simple = runCommand "${name}-test-simple" { nativeBuildInputs = [ wrapped ]; } ''
+            cat <<EOF >test.c
+            #include <stdio.h>
+            int main() {
+              printf ("Testing OpenWatcom C89 compiler.\n");
+              return 0;
+            }
+            EOF
+            cat test.c
+            wcl386 -fe=test_c test.c
+            # Only test execution if hostPlatform is targetable
+            ${lib.optionalString (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch) "./test_c"}
+
+            cat <<EOF >test.cpp
+            #include <string>
+            #include <iostream>
+            int main() {
+              std::cout << "Testing OpenWatcom C++ library implementation." << std::endl;
+              watcom::istring HELLO ("HELLO");
+              if (HELLO != "hello") {
+                return 1;
+              }
+              if (HELLO.find ("ello") != 1) {
+                return 2;
+              }
+              return 0;
+            }
+            EOF
+            cat test.cpp
+            wcl386 -fe=test_cpp test.cpp
+            # Only test execution if hostPlatform is targetable
+            ${lib.optionalString (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch) "./test_cpp"}
+            touch $out
+          '';
+          cross = runCommand "${name}-test-cross" { nativeBuildInputs = [ wrapped file ]; } ''
+            cat <<EOF >test.c
+            #include <stdio.h>
+            int main() {
+              printf ("Testing OpenWatcom cross-compilation.\n");
+              return 0;
+            }
+            EOF
+            cat test.c
+
+            echo "Test compiling"
+            wcl386 -bcl=linux -fe=linux test.c
+            wcl386 -bcl=nt -fe=nt test.c
+            wcl386 -bcl=dos4g -fe=dos4g test.c
+            wcl -bcl=windows -fe=windows test.c
+            wcl -bcl=dos -fe=dos test.c
+
+            echo "Test file format"
+            file ./linux | grep "32-bit" | grep "Linux"
+            file ./nt.exe | grep "PE32" | grep "Windows"
+            file ./dos4g.exe | grep "MS-DOS" | grep "LE executable"
+            file ./windows.exe | grep "MS-DOS" | grep "Windows 3.x"
+            file ./dos.exe | grep "MS-DOS" | grep -v "LE" | grep -v "Windows 3.x"
+            touch $out
+          '';
+        };
+      };
+
+      inherit (open-watcom) meta;
+    };
+in
+lib.makeOverridable wrapper
diff --git a/nixpkgs/pkgs/development/compilers/opendylan/bin.nix b/nixpkgs/pkgs/development/compilers/opendylan/bin.nix
new file mode 100644
index 000000000000..6e404f37ae9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opendylan/bin.nix
@@ -0,0 +1,43 @@
+# Binaries provided by Open Dylan to be used to bootstrap from source.
+# The binaries can also be used as is.
+{lib, stdenv, fetchurl, patchelf, boehmgc, gcc, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "opendylan";
+  version = "2013.2";
+
+  src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
+      url = "https://opendylan.org/downloads/opendylan/${version}/opendylan-${version}-x86_64-linux.tar.bz2";
+      sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
+    }
+    else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
+      url = "https://opendylan.org/downloads/opendylan/${version}/opendylan-${version}-x86-linux.tar.bz2";
+      sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
+    }
+    else throw "platform ${stdenv.hostPlatform.system} not supported.";
+
+  nativeBuildInputs = [ patchelf boehmgc 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 = lib.licenses.mit;
+    platforms = 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..fa0f98ea7fd2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opendylan/default.nix
@@ -0,0 +1,44 @@
+# Build Open Dylan from source using the binary builds to bootstrap.
+{lib, stdenv, fetchFromGitHub, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }:
+
+stdenv.mkDerivation {
+  pname = "opendylan";
+  version = "2016.1pre";
+
+  src = fetchFromGitHub {
+    owner = "dylan-lang";
+    repo = "opendylan";
+    rev = "cd9a8395586d33cc43a8611c1dc0513e69ee82dd";
+    sha256 = "sha256-i1wr4mBUbZhL8ENFGz8gV/mMzSJsj1AdJLd4WU9tIQM=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ makeWrapper autoconf automake ];
+  buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
+    opendylan-bootstrap boehmgc perl
+  ];
+
+  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 = lib.licenses.mit;
+    platforms = lib.platforms.linux;
+    broken = true; # last successful build 2020-12-11
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/11.nix b/nixpkgs/pkgs/development/compilers/openjdk/11.nix
new file mode 100644
index 000000000000..e9b8961d5e59
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/11.nix
@@ -0,0 +1,171 @@
+{ stdenv, lib, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk11-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "11";
+  minor = "0";
+  update = "19";
+  build = "7";
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk11-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}.${minor}.${update}+${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${major}u";
+      rev = "jdk-${version}";
+      sha256 = "sha256-mp8toB1dWcwOtMqNFd7UwRg8pLJckovqD/LD5p9zUoA=";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+      ./fix-library-path-jdk11.patch
+
+      # Fix build for gnumake-4.4.1:
+      #   https://github.com/openjdk/jdk/pull/12992
+      (fetchpatch {
+        name = "gnumake-4.4.1";
+        url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch";
+        hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg=";
+      })
+    ] ++ 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=${openjdk-bootstrap.home}"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--with-harfbuzz=system"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+      "--disable-warnings-as-errors"
+    ] ++ 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;
+
+    # Workaround for
+    # `cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]`
+    # when building jtreg
+    env.NIX_CFLAGS_COMPILE = "-Wformat";
+
+    NIX_LDFLAGS = toString (lib.optionals (!headless) [
+      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    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
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    meta = import ./meta.nix lib version;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+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..ab0696e172c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/12.nix
@@ -0,0 +1,172 @@
+{ stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk11-bootstrap, fetchpatch
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "12";
+  update = ".0.2";
+  build = "ga";
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk11-bootstrap.override { gtkSupport = !headless; };
+
+  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 = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+      # -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";
+      })
+      # Fix gnumake 4.3 incompatibility
+      (fetchpatch {
+        url = "https://github.com/openjdk/panama-foreign/commit/af5c725b8109ce83fc04ef0f8bf6aaf0b50c0441.patch";
+        sha256 = "0ja84kih5wkjn58pml53s59qnavb1z92dc88cbgw7vcyqwc1gs0h";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk10.patch
+    ];
+
+    prePatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--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;
+
+    env.NIX_CFLAGS_COMPILE = toString [ "-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"
+    ];
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "all" ];
+
+    postBuild = ''
+      cd build/linux*
+      make images
+      cd -
+    '';
+
+    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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    meta = import ./meta.nix lib version;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+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..5d5d9f774771
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/13.nix
@@ -0,0 +1,177 @@
+{ stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk13-bootstrap, fetchpatch
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "13";
+  update = ".0.2";
+  build = "-ga";
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk13-bootstrap.override { gtkSupport = !headless; };
+
+  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 = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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";
+      })
+      # Fix gnumake 4.3 incompatibility
+      (fetchpatch {
+        url = "https://github.com/openjdk/panama-foreign/commit/af5c725b8109ce83fc04ef0f8bf6aaf0b50c0441.patch";
+        sha256 = "0ja84kih5wkjn58pml53s59qnavb1z92dc88cbgw7vcyqwc1gs0h";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    prePatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--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;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "all" ];
+
+    postBuild = ''
+      cd build/linux*
+      make images
+      cd -
+    '';
+
+    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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    meta = (import ./meta.nix lib version) // { broken = true; };
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/14.nix b/nixpkgs/pkgs/development/compilers/openjdk/14.nix
new file mode 100644
index 000000000000..348fd3996c9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/14.nix
@@ -0,0 +1,173 @@
+{ stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk14-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "14";
+  update = ".0.2";
+  build = "-ga";
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk14-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}${build}";
+
+    src = fetchurl {
+      url = "https://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
+      sha256 = "1s1pc6ihzf0awp4hbaqfxmbica0hnrg8nr7s0yd2hfn7nan8xmf3";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--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;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "all" ];
+
+    postBuild = ''
+      cd build/linux*
+      make images
+      cd -
+    '';
+
+    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
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    meta = (import ./meta.nix lib version) // { broken = true; };
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/15.nix b/nixpkgs/pkgs/development/compilers/openjdk/15.nix
new file mode 100644
index 000000000000..2447b0783ca4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/15.nix
@@ -0,0 +1,176 @@
+{ stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk15-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    major = "15";
+    update = ".0.1";
+    build = "-ga";
+    __toString = self: "${self.major}${self.update}${self.build}";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk15-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    inherit version;
+
+    src = fetchurl {
+      url = "https://hg.openjdk.java.net/jdk-updates/jdk${version.major}u/archive/jdk-${version}.tar.gz";
+      sha256 = "1h8n5figc9q0k9p8b0qggyhvqagvxanfih1lj5j492c74cd1mx1l";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip zip file which ];
+    buildInputs = [
+      cpio perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "all" ];
+
+    postBuild = ''
+      cd build/linux*
+      make images
+      cd -
+    '';
+
+    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
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "major" version;
+    meta = import ./meta.nix lib version.major;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/16.nix b/nixpkgs/pkgs/development/compilers/openjdk/16.nix
new file mode 100644
index 000000000000..4b0874a03a41
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/16.nix
@@ -0,0 +1,180 @@
+{ stdenv, lib, fetchurl, fetchFromGitHub, bash, pkg-config, autoconf, cpio
+, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib
+, libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst
+, libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk16-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    feature = "16";
+    interim = "0";
+    build = "36";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk16-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${version.feature}+${version.build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${version.feature}u";
+      rev = "jdk-${version.feature}+${version.build}";
+      sha256 = "165nr15dqfcxzsl5z95g4iklln4rlfkgdigdma576mx8813ldi44";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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";
+      })
+      ./fix-glibc-2.34.patch
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    prePatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-build=${version.build}"
+      "--with-version-opt=nixos"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "all" ];
+
+    postBuild = ''
+      cd build/linux*
+      make images
+      cd -
+    '';
+
+    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
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "feature" version;
+    meta = import ./meta.nix lib version.feature;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/17.nix b/nixpkgs/pkgs/development/compilers/openjdk/17.nix
new file mode 100644
index 000000000000..d2c71683c9bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/17.nix
@@ -0,0 +1,194 @@
+{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio
+, file, which, unzip, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib
+, libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst
+, libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk17-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    feature = "17";
+    interim = ".0.7";
+    build = "7";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk17-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${version.feature}${version.interim}+${version.build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${version.feature}u";
+      rev = "jdk-${version.feature}${version.interim}+${version.build}";
+      sha256 = "sha256-S6QOB4Tbi+K1yjvvywTfvwFI2eX8AiqIx5c3zfxcskc=";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+      ./ignore-LegalNoticeFilePlugin-jdk17.patch
+      ./fix-library-path-jdk17.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";
+      })
+
+      # Patch borrowed from Alpine to fix build errors with musl libc and recent gcc.
+      # This is applied anywhere to prevent patchrot.
+      (fetchurl {
+        url = "https://git.alpinelinux.org/aports/plain/community/openjdk17/FixNullPtrCast.patch?id=41e78a067953e0b13d062d632bae6c4f8028d91c";
+        sha256 = "sha256-LzmSew51+DyqqGyyMw2fbXeBluCiCYsS1nCjt9hX6zo=";
+      })
+
+      # Fix build for gnumake-4.4.1:
+      #   https://github.com/openjdk/jdk/pull/12992
+      (fetchpatch {
+        name = "gnumake-4.4.1";
+        url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch";
+        hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg=";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    postPatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-build=${version.build}"
+      "--with-version-opt=nixos"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--with-harfbuzz=system"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "images" ];
+
+    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
+
+      # IDEs use the provided src.zip to navigate the Java codebase (https://github.com/NixOS/nixpkgs/pull/95081)
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "feature" version;
+    meta = import ./meta.nix lib version.feature;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/18.nix b/nixpkgs/pkgs/development/compilers/openjdk/18.nix
new file mode 100644
index 000000000000..2c496721be07
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/18.nix
@@ -0,0 +1,190 @@
+{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio
+, file, which, unzip, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib
+, libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst
+, libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk18-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    feature = "18";
+    build = "36";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk18-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${version.feature}+${version.build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${version.feature}u";
+      rev = "jdk-${version.feature}+${version.build}";
+      sha256 = "sha256-yGPC8VA983Ml6Fv/oiEgRrcVe4oe+Q4oCHbzOmFbZq8=";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+      ./ignore-LegalNoticeFilePlugin-jdk18.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";
+      })
+
+      # Patch borrowed from Alpine to fix build errors with musl libc and recent gcc.
+      # This is applied anywhere to prevent patchrot.
+      (fetchpatch {
+        url = "https://git.alpinelinux.org/aports/plain/testing/openjdk18/FixNullPtrCast.patch?id=b93d1fc37fcf106144958d957bb97c7db67bd41f";
+        hash = "sha256-nvO8RcmKwMcPdzq28mZ4If1XJ6FQ76CYWqRIozPCk5U=";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    postPatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-build=${version.build}"
+      "--with-version-opt=nixos"
+      "--with-version-pre="
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-freetype=system"
+      "--with-harfbuzz=system"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "images" ];
+
+    postBuild = ''
+      cd build/linux*
+      make images
+      cd -
+    '';
+
+    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
+
+      # IDEs use the provided src.zip to navigate the Java codebase (https://github.com/NixOS/nixpkgs/pull/95081)
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "feature" version;
+    meta = import ./meta.nix lib version.feature;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/19.nix b/nixpkgs/pkgs/development/compilers/openjdk/19.nix
new file mode 100644
index 000000000000..51fd0d8eb533
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/19.nix
@@ -0,0 +1,194 @@
+{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio
+, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib
+, libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst
+, libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk19-bootstrap
+, ensureNewerSourcesForZipFilesHook
+, setJavaClassPath
+# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
+# which should be fixable, this is a no-rebuild workaround for GHC.
+, headless ? stdenv.targetPlatform.isGhcjs
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    feature = "19";
+    interim = ".0.2";
+    build = "7";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk19-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${version.feature}${version.interim}+${version.build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${version.feature}u";
+      rev = "jdk-${version.feature}${version.interim}+${version.build}";
+      hash = "sha256-pBEHmBtIgG4Czou4C/zpBBYZEDImvXiLoA5CjOzpeyI=";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+      ./ignore-LegalNoticeFilePlugin-jdk18.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";
+      })
+
+      # Patch borrowed from Alpine to fix build errors with musl libc and recent gcc.
+      # This is applied anywhere to prevent patchrot.
+      (fetchpatch {
+        url = "https://git.alpinelinux.org/aports/plain/testing/openjdk19/FixNullPtrCast.patch?id=93dc07f97ff716b647c5f57c6224901ea06da560";
+        hash = "sha256-H4X3Yip5bCpXMH7MSu9BgXIOYRVUBMZPZW8EvZSWI5k=";
+      })
+
+      # Fix build for gnumake-4.4.1:
+      #   https://github.com/openjdk/jdk/pull/12992
+      (fetchpatch {
+        name = "gnumake-4.4.1";
+        url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch";
+        hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg=";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    postPatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-build=${version.build}"
+      "--with-version-opt=nixos"
+      "--with-version-pre="
+      "--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 headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "images" ];
+
+    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
+
+      # IDEs use the provided src.zip to navigate the Java codebase (https://github.com/NixOS/nixpkgs/pull/95081)
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "feature" version;
+    meta = import ./meta.nix lib version.feature;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/20.nix b/nixpkgs/pkgs/development/compilers/openjdk/20.nix
new file mode 100644
index 000000000000..2be834a27b58
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/20.nix
@@ -0,0 +1,194 @@
+{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio
+, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib
+, libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst
+, libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk20-bootstrap
+, ensureNewerSourcesForZipFilesHook
+, setJavaClassPath
+# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
+# which should be fixable, this is a no-rebuild workaround for GHC.
+, headless ? stdenv.targetPlatform.isGhcjs
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    feature = "20";
+    interim = "";
+    build = "36";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk20-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${version.feature}${version.interim}+${version.build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${version.feature}u";
+      rev = "jdk-${version.feature}${version.interim}+${version.build}";
+      hash = "sha256-fXoSO8nq5qpUYbCtbrRr2C46XRdYX77Pxmk7GfmlZV4=";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-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
+      ./ignore-LegalNoticeFilePlugin-jdk18.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";
+      })
+
+      # Patch borrowed from Alpine to fix build errors with musl libc and recent gcc.
+      # This is applied anywhere to prevent patchrot.
+      (fetchpatch {
+        url = "https://git.alpinelinux.org/aports/plain/testing/openjdk19/FixNullPtrCast.patch?id=93dc07f97ff716b647c5f57c6224901ea06da560";
+        hash = "sha256-H4X3Yip5bCpXMH7MSu9BgXIOYRVUBMZPZW8EvZSWI5k=";
+      })
+
+      # Fix build for gnumake-4.4.1:
+      #   https://github.com/openjdk/jdk/pull/12992
+      (fetchpatch {
+        name = "gnumake-4.4.1";
+        url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch";
+        hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg=";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    postPatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-build=${version.build}"
+      "--with-version-opt=nixos"
+      "--with-version-pre="
+      "--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 headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "images" ];
+
+    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
+
+      # IDEs use the provided src.zip to navigate the Java codebase (https://github.com/NixOS/nixpkgs/pull/95081)
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "feature" version;
+    meta = import ./meta.nix lib version.feature;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/21.nix b/nixpkgs/pkgs/development/compilers/openjdk/21.nix
new file mode 100644
index 000000000000..623ac281acf7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/21.nix
@@ -0,0 +1,188 @@
+{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio
+, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib
+, libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst
+, libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk21-bootstrap
+, ensureNewerSourcesForZipFilesHook
+, setJavaClassPath
+# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
+# which should be fixable, this is a no-rebuild workaround for GHC.
+, headless ? stdenv.targetPlatform.isGhcjs
+, enableJavaFX ? false, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  version = {
+    feature = "21";
+    interim = "";
+    build = "35";
+  };
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk21-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${version.feature}${version.interim}+${version.build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk${version.feature}u";
+      rev = "jdk-${version.feature}${version.interim}+${version.build}";
+      hash = "sha256-fA8nRWBuTL87S8mwapmNfCPPQoI2aKHjbHJ6PDN3khs=";
+    };
+
+    nativeBuildInputs = [ pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-bootstrap
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk3 gnome_vfs GConf glib
+    ];
+
+    patches = [
+      ./fix-java-home-jdk21.patch
+      ./read-truststore-from-env-jdk10.patch
+      ./currency-date-range-jdk10.patch
+      ./increase-javadoc-heap-jdk13.patch
+      ./ignore-LegalNoticeFilePlugin-jdk18.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";
+      })
+
+      # Fix build for gnumake-4.4.1:
+      #   https://github.com/openjdk/jdk/pull/12992
+      (fetchpatch {
+        name = "gnumake-4.4.1";
+        url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch";
+        hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg=";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    postPatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    # JDK's build system attempts to specifically detect
+    # and special-case WSL, and we don't want it to do that,
+    # so pass the correct platform names explicitly
+    configurePlatforms = ["build" "host"];
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
+      "--with-version-build=${version.build}"
+      "--with-version-opt=nixos"
+      "--with-version-pre="
+      "--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;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    buildFlags = [ "images" ];
+
+    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
+
+      # IDEs use the provided src.zip to navigate the Java codebase (https://github.com/NixOS/nixpkgs/pull/95081)
+      ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
+
+      # 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 $(getAllOutputNames); do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $(getAllOutputNames); 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 = [ openjdk-bootstrap ];
+
+    pos = builtins.unsafeGetAttrPos "feature" version;
+    meta = import ./meta.nix lib version.feature;
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+      inherit gtk3;
+    };
+  };
+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..aebfceeccb78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/8.nix
@@ -0,0 +1,226 @@
+{ stdenv, lib, fetchFromGitHub, pkg-config, lndir, bash, cpio, file, which, unzip, zip
+, cups, freetype, alsa-lib, 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";
+    powerpc64le-linux = "ppc64le";
+  }.${stdenv.system} or (throw "Unsupported platform ${stdenv.system}");
+
+  update = "362";
+  build = "ga";
+
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk8-bootstrap.override { gtkSupport = !headless; };
+
+  openjdk8 = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "8u${update}-${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jdk8u";
+      rev = "jdk${version}";
+      sha256 = "sha256-C5dQwfIIpIrLeO3JWERyFCQHUSgG8gARuc3qXAeLkJ4=";
+    };
+    outputs = [ "out" "jre" ];
+
+    nativeBuildInputs = [ pkg-config lndir unzip ];
+    buildInputs = [
+      cpio file which zip perl zlib cups freetype alsa-lib
+      libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-bootstrap
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk2 gnome_vfs GConf glib
+    ];
+
+    patches = [
+      ./fix-java-home-jdk8.patch
+      ./read-truststore-from-env-jdk8.patch
+      ./currency-date-range-jdk8.patch
+      ./fix-library-path-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=${openjdk-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;
+
+    env.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"
+    ]);
+
+    # -j flag is explicitly rejected by the build system:
+    #     Error: 'make -jN' is not supported, use 'make JOBS=N'
+    # Note: it does not make build sequential. Build system
+    # still runs in parallel.
+    enableParallelBuilding = false;
+
+    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 $(getAllOutputNames); 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 $(getAllOutputNames); 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 ];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
+      mainProgram = "java";
+    };
+
+    passthru = {
+      inherit architecture;
+      home = "${openjdk8}/lib/openjdk";
+      inherit gtk2;
+    };
+  };
+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/fix-glibc-2.34.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch
new file mode 100644
index 000000000000..7bf8b2b16744
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch
@@ -0,0 +1,24 @@
+Taken from https://build.opensuse.org/package/view_file/Java:Factory/java-15-openjdk/openjdk-glibc234.patch
+
+--- openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c	2021-04-09 11:36:58.000000000 +0200
++++ openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c	2021-08-26 15:42:52.326232581 +0200
+@@ -67,8 +67,17 @@
+   longjmp(context, 1);
+ }
+ 
++static char* altstack = NULL;
++
+ void set_signal_handler() {
+-  static char altstack[SIGSTKSZ];
++  if (altstack == NULL) {
++    // Dynamically allocated in case SIGSTKSZ is not constant
++    altstack = malloc(SIGSTKSZ);
++    if (altstack == NULL) {
++      fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n");
++      exit(7);
++    }
++  }
+ 
+   stack_t ss = {
+     .ss_size = SIGSTKSZ,
+
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-jdk21.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk21.patch
new file mode 100644
index 000000000000..ede201ed1ada
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk21.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 = nullptr;
+   if (ret && dli_fname[0] != '\0') {
+-    rp = os::Posix::realpath(dli_fname, buf, buflen);
+-  }
+-  if (rp == nullptr) {
+-    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/fix-library-path-jdk11.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk11.patch
new file mode 100644
index 000000000000..ce30edb7f1d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk11.patch
@@ -0,0 +1,55 @@
+From 83f97773ea99fe2191a49e551ea43d51c9a765cd Mon Sep 17 00:00:00 2001
+Subject: [PATCH] strip some hard-coded default paths for libs and extensions
+
+---
+ src/hotspot/os/linux/os_linux.cpp | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 476b1c2175..2695ed2301 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -417,20 +417,20 @@ void os::init_system_properties_values() {
+   //        ...
+   //        7: The default directories, normally /lib and /usr/lib.
+ #if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
+-  #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
++  #define DEFAULT_LIBPATH ""
+ #else
+ #if defined(AARCH64)
+   // Use 32-bit locations first for AARCH64 (a 64-bit architecture), since some systems
+   // might not adhere to the FHS and it would be a change in behaviour if we used
+   // DEFAULT_LIBPATH of other 64-bit architectures which prefer the 64-bit paths.
+-  #define DEFAULT_LIBPATH "/lib:/usr/lib:/usr/lib64:/lib64"
++  #define DEFAULT_LIBPATH ""
+ #else
+-  #define DEFAULT_LIBPATH "/lib:/usr/lib"
++  #define DEFAULT_LIBPATH ""
+ #endif // AARCH64
+ #endif
+ 
+ // Base path of extensions installed on the system.
+-#define SYS_EXT_DIR     "/usr/java/packages"
++#define SYS_EXT_DIR     ""
+ #define EXTENSIONS_DIR  "/lib/ext"
+ 
+   // Buffer that fits several sprintfs.
+@@ -490,13 +490,13 @@ void os::init_system_properties_values() {
+                                                      strlen(v) + 1 +
+                                                      sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1,
+                                                      mtInternal);
+-    sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon);
++    sprintf(ld_library_path, "%s", v);
+     Arguments::set_library_path(ld_library_path);
+     FREE_C_HEAP_ARRAY(char, ld_library_path);
+   }
+ 
+   // Extensions directories.
+-  sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
++  sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home());
+   Arguments::set_ext_dirs(buf);
+ 
+   FREE_C_HEAP_ARRAY(char, buf);
+--
+2.35.1
+
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk17.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk17.patch
new file mode 100644
index 000000000000..4c38aca2b48a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk17.patch
@@ -0,0 +1,60 @@
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -412,18 +412,8 @@ void os::init_system_properties_values() {
+   //        1: ...
+   //        ...
+   //        7: The default directories, normally /lib and /usr/lib.
+-#ifndef OVERRIDE_LIBPATH
+-  #if defined(_LP64)
+-    #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
+-  #else
+-    #define DEFAULT_LIBPATH "/lib:/usr/lib"
+-  #endif
+-#else
+-  #define DEFAULT_LIBPATH OVERRIDE_LIBPATH
+-#endif
+ 
+ // Base path of extensions installed on the system.
+-#define SYS_EXT_DIR     "/usr/java/packages"
+ #define EXTENSIONS_DIR  "/lib/ext"
+ 
+   // Buffer that fits several sprintfs.
+@@ -431,7 +421,7 @@ void os::init_system_properties_values() {
+   // by the nulls included by the sizeof operator.
+   const size_t bufsize =
+     MAX2((size_t)MAXPATHLEN,  // For dll_dir & friends.
+-         (size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR)); // extensions dir
++         (size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(EXTENSIONS_DIR)); // extensions dir
+   char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
+ 
+   // sysclasspath, java_home, dll_dir
+@@ -478,26 +468,22 @@ void os::init_system_properties_values() {
+     // should always exist (until the legacy problem cited above is
+     // addressed).
+     const char *v = ::getenv("LD_LIBRARY_PATH");
+-    const char *v_colon = ":";
+-    if (v == NULL) { v = ""; v_colon = ""; }
++    if (v == NULL) { v = ""; }
+     // That's +1 for the colon and +1 for the trailing '\0'.
+     char *ld_library_path = NEW_C_HEAP_ARRAY(char,
+-                                             strlen(v) + 1 +
+-                                             sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1,
++                                             strlen(v) + 1,
+                                              mtInternal);
+-    sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon);
++    sprintf(ld_library_path, "%s", v);
+     Arguments::set_library_path(ld_library_path);
+     FREE_C_HEAP_ARRAY(char, ld_library_path);
+   }
+ 
+   // Extensions directories.
+-  sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
++  sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home());
+   Arguments::set_ext_dirs(buf);
+ 
+   FREE_C_HEAP_ARRAY(char, buf);
+ 
+-#undef DEFAULT_LIBPATH
+-#undef SYS_EXT_DIR
+ #undef EXTENSIONS_DIR
+ }
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch
new file mode 100644
index 000000000000..3780e95ea5b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch
@@ -0,0 +1,37 @@
+diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
+index c477851c1b..ff5e28d95b 100644
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -368,13 +368,13 @@ void os::init_system_properties_values() {
+ //        ...
+ //        7: The default directories, normally /lib and /usr/lib.
+ #if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390))
+-#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
++#define DEFAULT_LIBPATH ""
+ #else
+-#define DEFAULT_LIBPATH "/lib:/usr/lib"
++#define DEFAULT_LIBPATH ""
+ #endif
+ 
+ // Base path of extensions installed on the system.
+-#define SYS_EXT_DIR     "/usr/java/packages"
++#define SYS_EXT_DIR     ""
+ #define EXTENSIONS_DIR  "/lib/ext"
+ #define ENDORSED_DIR    "/lib/endorsed"
+ 
+@@ -437,13 +437,13 @@ void os::init_system_properties_values() {
+                                                      strlen(v) + 1 +
+                                                      sizeof(SYS_EXT_DIR) + sizeof("/lib/") + strlen(cpu_arch) + sizeof(DEFAULT_LIBPATH) + 1,
+                                                      mtInternal);
+-    sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch);
++    sprintf(ld_library_path, "%s", v);
+     Arguments::set_library_path(ld_library_path);
+     FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal);
+   }
+ 
+   // Extensions directories.
+-  sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
++  sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home());
+   Arguments::set_ext_dirs(buf);
+ 
+   // Endorsed standards default directory.
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/ignore-LegalNoticeFilePlugin-jdk17.patch b/nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk17.patch
new file mode 100644
index 000000000000..3bb610ee35c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk17.patch
@@ -0,0 +1,21 @@
+--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java
++++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java
+@@ -112,18 +112,6 @@
+             .filter(e -> Arrays.equals(e.contentBytes(), entry.contentBytes()))
+             .findFirst();
+         if (!otarget.isPresent()) {
+-            if (errorIfNotSameContent) {
+-                // all legal notices of the same file name are expected
+-                // to contain the same content
+-                Optional<ResourcePoolEntry> ores =
+-                    entries.stream().filter(e -> e.linkedTarget() == null)
+-                           .findAny();
+-
+-                if (ores.isPresent()) {
+-                    throw new PluginException(ores.get().path() + " " +
+-                        entry.path() + " contain different content");
+-                }
+-            }
+             entries.add(entry);
+         } else {
+             entries.add(ResourcePoolEntry.createSymLink(entry.path(),
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk18.patch b/nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk18.patch
new file mode 100644
index 000000000000..cda93580efb1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk18.patch
@@ -0,0 +1,21 @@
+--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java
++++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java
+@@ -112,18 +112,6 @@
+             .filter(e -> Arrays.equals(e.contentBytes(), entry.contentBytes()))
+             .findFirst();
+         if (otarget.isEmpty()) {
+-            if (errorIfNotSameContent) {
+-                // all legal notices of the same file name are expected
+-                // to contain the same content
+-                Optional<ResourcePoolEntry> ores =
+-                    entries.stream().filter(e -> e.linkedTarget() == null)
+-                           .findAny();
+-
+-                if (ores.isPresent()) {
+-                    throw new PluginException(ores.get().path() + " " +
+-                        entry.path() + " contain different content");
+-                }
+-            }
+             entries.add(entry);
+         } else {
+             entries.add(ResourcePoolEntry.createSymLink(entry.path(),
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/jre.nix b/nixpkgs/pkgs/development/compilers/openjdk/jre.nix
new file mode 100644
index 000000000000..02f6da928cdd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/jre.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, jdk
+, lib
+, callPackage
+, modules ? [ "java.base" ]
+}:
+
+let
+  jre = stdenv.mkDerivation {
+    pname = "${jdk.pname}-minimal-jre";
+    version = jdk.version;
+
+    buildInputs = [ jdk ];
+
+    dontUnpack = true;
+
+    # Strip more heavily than the default '-S', since if you're
+    # using this derivation you probably care about this.
+    stripDebugFlags = [ "--strip-unneeded" ];
+
+    buildPhase = ''
+      runHook preBuild
+
+      jlink --module-path ${jdk}/lib/openjdk/jmods --add-modules ${lib.concatStringsSep "," modules} --output $out
+
+      runHook postBuild
+    '';
+
+    dontInstall = true;
+
+    passthru = {
+      home = "${jre}";
+      tests = [
+        (callPackage ./tests/test_jre_minimal.nix {})
+        (callPackage ./tests/test_jre_minimal_with_logging.nix {})
+      ];
+    };
+  };
+in jre
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/meta.nix b/nixpkgs/pkgs/development/compilers/openjdk/meta.nix
new file mode 100644
index 000000000000..74383ddef783
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/meta.nix
@@ -0,0 +1,11 @@
+lib: version: with lib; {
+  homepage = "https://openjdk.java.net/";
+  license = licenses.gpl2Only;
+  description = "The open-source Java Development Kit";
+  maintainers = with maintainers; [ edwtjo ];
+  platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" "powerpc64le-linux" ];
+  mainProgram = "java";
+  knownVulnerabilities = optionals (builtins.elem (versions.major version) [ "12" "13" "14" "15" "16" "18" ]) [
+    "This OpenJDK version has reached its end of life."
+  ];
+}
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..6d550538b081
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix
@@ -0,0 +1,120 @@
+{ stdenv, lib, fetchFromGitHub, writeText, gradle_7, pkg-config, perl, cmake
+, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg_4-headless, python3, ruby, icu68
+, openjdk11-bootstrap
+, withMedia ? true
+, withWebKit ? false
+}:
+
+let
+  major = "11";
+  update = ".0.18";
+  build = "1";
+  repover = "${major}${update}+${build}";
+  gradle_ = (gradle_7.override {
+    java = openjdk11-bootstrap;
+  });
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}-${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx${major}u";
+      rev = repover;
+      sha256 = "sha256-46DjIzcBHkmp5vnhYnLu78CG72bIBRM4A6mgk2OLOko=";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless icu68 ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    postPatch = ''
+      substituteInPlace buildSrc/linux.gradle \
+        --replace ', "-Werror=implicit-function-declaration"' ""
+    '';
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk11-bootstrap.home}
+    '' + args.gradleProperties or "");
+
+    buildPhase = ''
+      runHook preBuild
+
+      export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
+      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";
+    outputHash = "sha256-syceJMUEknBDCHK8eGs6rUU3IQn+HnQfURfCrDxYPa9=";
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = ${lib.boolToString withMedia}
+    COMPILE_WEBKIT = ${lib.boolToString withWebKit}
+  '';
+
+  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
+  '';
+
+  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
+
+    # Remove licenses, otherwise they may conflict with the ones included in the openjdk
+    rm -rf $out/modules_legal/*
+  '';
+
+  disallowedReferences = [ openjdk11-bootstrap ];
+
+  passthru.deps = deps;
+
+  # Uses a lot of RAM, OOMs otherwise
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  meta = with lib; {
+    homepage = "http://openjdk.java.net/projects/openjfx/";
+    license = licenses.gpl2;
+    description = "The next-generation Java client toolkit";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/15.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/15.nix
new file mode 100644
index 000000000000..1fb48f460d2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/15.nix
@@ -0,0 +1,129 @@
+{ stdenv, lib, fetchFromGitHub, writeText, openjdk11_headless, gradle_6
+, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib
+, ffmpeg_4-headless, python3, ruby
+, withMedia ? true
+, withWebKit ? false
+}:
+
+let
+  major = "15";
+  update = ".0.1";
+  build = "+1";
+  repover = "${major}${update}${build}";
+  gradle_ = (gradle_6.override {
+    java = openjdk11_headless;
+  });
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx";
+      rev = repover;
+      sha256 = "019glq8rhn6amy3n5jc17vi2wpf1pxpmmywvyz1ga8n09w7xscq1";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk11_headless.home}
+    '' + args.gradleProperties or "");
+
+    env.NIX_CFLAGS_COMPILE = toString [
+      #avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
+      "-DGLIB_DISABLE_DEPRECATION_WARNINGS"
+
+      # gstreamer workaround for -fno-common toolchains:
+      #   ld: gsttypefindelement.o:(.bss._gst_disable_registry_cache+0x0): multiple definition of
+      #     `_gst_disable_registry_cache'; gst.o:(.bss._gst_disable_registry_cache+0x0): first defined here
+      "-fcommon"
+    ];
+
+    buildPhase = ''
+      runHook preBuild
+
+      export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
+      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";
+    outputHash = "sha256-fGLTMM9s/Vn7eMzn6OQR3tL0cGbAYc7c4J4/aW3JvkI=";
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = ${lib.boolToString withMedia}
+    COMPILE_WEBKIT = ${lib.boolToString withWebKit}
+  '';
+
+  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
+  # -fcommon: gstreamer workaround for -fno-common toolchains:
+  #   ld: gsttypefindelement.o:(.bss._gst_disable_registry_cache+0x0): multiple definition of
+  #     `_gst_disable_registry_cache'; gst.o:(.bss._gst_disable_registry_cache+0x0): first defined here
+  env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS -fcommon";
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    export openjdkOutPath='${openjdk11_headless.outPath}'
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk11_headless ];
+
+  passthru.deps = deps;
+
+  meta = with lib; {
+    homepage = "http://openjdk.java.net/projects/openjfx/";
+    license = licenses.gpl2;
+    description = "The next-generation Java client toolkit";
+    maintainers = with maintainers; [ abbradar ];
+    knownVulnerabilities = [
+      "This OpenJFX version has reached its end of life."
+    ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/17.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/17.nix
new file mode 100644
index 000000000000..58444abd3f17
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/17.nix
@@ -0,0 +1,130 @@
+{ stdenv, lib, fetchFromGitHub, writeText, openjdk17_headless, gradle_7
+, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib
+, ffmpeg_4-headless, python3, ruby, icu71, fetchurl, runCommand
+, withMedia ? true
+, withWebKit ? false
+}:
+
+let
+  major = "17";
+  update = ".0.6";
+  build = "+3";
+  repover = "${major}${update}${build}";
+  gradle_ = (gradle_7.override {
+    java = openjdk17_headless;
+  });
+
+  dashed-icu-version = lib.concatStringsSep "-" (lib.splitVersion (lib.getVersion icu71));
+  underscored-icu-version = lib.concatStringsSep "_" (lib.splitVersion (lib.getVersion icu71));
+  icu-data = fetchurl {
+    url = "https://github.com/unicode-org/icu/releases/download/release-${dashed-icu-version}/icu4c-${underscored-icu-version}-data-bin-l.zip";
+    hash = "sha256-pVWIy0BkICsthA5mxhR9SJQHleMNnaEcGl/AaLi5qZM=";
+  };
+
+  fakeRepository = runCommand "icu-data-repository" {} ''
+    mkdir -p $out/download/release-${dashed-icu-version}
+    cp ${icu-data} $out/download/release-${dashed-icu-version}/icu4c-${underscored-icu-version}-data-bin-l.zip
+  '';
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx${major}u";
+      rev = repover;
+      sha256 = "sha256-9VfXk2EfMebMyVKPohPRP2QXRFf8XemUtfY0JtBCHyw=";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless icu71 ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    postPatch = ''
+      # Add missing includes for gcc-13 for webkit build:
+      sed -e '1i #include <cstdio>' \
+        -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \
+           modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h
+    '';
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk17_headless.home}
+    '' + args.gradleProperties or "");
+
+    buildPhase = ''
+      runHook preBuild
+
+      export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
+      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";
+    outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo=";
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = ${lib.boolToString withMedia}
+    COMPILE_WEBKIT = ${lib.boolToString withWebKit}
+    ${lib.optionalString withWebKit "icuRepositoryURL = file://${fakeRepository}"}
+  '';
+
+  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
+  '';
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    export openjdkOutPath='${openjdk17_headless.outPath}'
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk17_headless ];
+
+  passthru.deps = deps;
+
+  meta = with lib; {
+    homepage = "http://openjdk.java.net/projects/openjfx/";
+    license = licenses.gpl2;
+    description = "The next-generation Java client toolkit";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/19.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/19.nix
new file mode 100644
index 000000000000..802a0eb9b457
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/19.nix
@@ -0,0 +1,127 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, writeText, openjdk17_headless
+, openjdk19_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst
+, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby, icu68
+, withMedia ? true
+, withWebKit ? false
+}:
+
+let
+  major = "19";
+  update = ".0.2.1";
+  build = "+1";
+  repover = "${major}${update}${build}";
+  gradle_ = (gradle_7.override {
+    # note: gradle does not yet support running on 19
+    java = openjdk17_headless;
+  });
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx";
+      rev = repover;
+      hash = "sha256-A08GhCGpzWlUG1+f6mcjvkJmMNaOReacQKPEmNpUvLs=";
+    };
+
+    patches = [
+      # 8295962: Reference to State in Task.java is ambiguous when building with JDK 19
+      (fetchpatch {
+        url = "https://github.com/openjdk/jfx/pull/933/commits/cfaee2a52350eff39dd4352484c892716076d3de.patch";
+        hash = "sha256-hzJMenhvtmHs/6BJj8GfaLp14myV8VCXCLLC8n32yEw=";
+      })
+      # ditto
+      (fetchpatch {
+        url = "https://github.com/openjdk/jfx/pull/933/commits/bd46ce12df0a93a56fe0d58d3653d08e58409b7f.patch";
+        hash = "sha256-o9908uw9vYvULmAh/lbfyHhgxz6jpgPq2fcAltWsYoU=";
+      })
+    ];
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 icu68 ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk19_headless.home}
+    '' + args.gradleProperties or "");
+
+    buildPhase = ''
+      runHook preBuild
+
+      export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
+      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";
+    # suspiciously the same as for openjfx 17 ...
+    # could they really not have changed any of their dependencies?
+    # or did we miss changing another upstream hash when copy-pasting?
+    outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo=";
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = ${lib.boolToString withMedia}
+    COMPILE_WEBKIT = ${lib.boolToString withWebKit}
+  '';
+
+  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
+  '';
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    export openjdkOutPath='${openjdk19_headless.outPath}'
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk17_headless openjdk19_headless ];
+
+  passthru.deps = deps;
+
+  meta = with lib; {
+    homepage = "https://openjdk.org/projects/openjfx/";
+    license = licenses.gpl2Classpath;
+    description = "The next-generation Java client toolkit";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/20.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/20.nix
new file mode 100644
index 000000000000..d570db3b9aee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/20.nix
@@ -0,0 +1,114 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, writeText, openjdk17_headless
+, openjdk19_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst
+, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby, icu68
+, withMedia ? true
+, withWebKit ? false
+}:
+
+let
+  major = "20";
+  update = "";
+  build = "+19";
+  repover = "${major}${update}${build}";
+  gradle_ = (gradle_7.override {
+    # note: gradle does not yet support running on 19
+    java = openjdk17_headless;
+  });
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx";
+      rev = repover;
+      hash = "sha256-QPPJyl6+XU+m5xqYOFtQKJNNrovqy7ngNE/e7kiEJVU=";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 icu68 ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk19_headless.home}
+    '' + args.gradleProperties or "");
+
+    buildPhase = ''
+      runHook preBuild
+
+      export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
+      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";
+    # suspiciously the same as for openjfx 17 ...
+    # could they really not have changed any of their dependencies?
+    # or did we miss changing another upstream hash when copy-pasting?
+    outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo=";
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = ${lib.boolToString withMedia}
+    COMPILE_WEBKIT = ${lib.boolToString withWebKit}
+  '';
+
+  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
+  '';
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    export openjdkOutPath='${openjdk19_headless.outPath}'
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk17_headless openjdk19_headless ];
+
+  passthru.deps = deps;
+
+  meta = with lib; {
+    homepage = "https://openjdk.org/projects/openjfx/";
+    license = licenses.gpl2Classpath;
+    description = "The next-generation Java client toolkit";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/21.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/21.nix
new file mode 100644
index 000000000000..2f0d83f9f251
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/21.nix
@@ -0,0 +1,114 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, writeText, openjdk17_headless
+, openjdk19_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst
+, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby, icu68
+, withMedia ? true
+, withWebKit ? false
+}:
+
+let
+  major = "21";
+  update = "";
+  build = "-ga";
+  repover = "${major}${update}${build}";
+  gradle_ = (gradle_7.override {
+    # note: gradle does not yet support running on 19
+    java = openjdk17_headless;
+  });
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx";
+      rev = repover;
+      hash = "sha256-deNAGfnA6gwcAa64l0AWdkX+vJd3ZOfIgAifSl+/m+s=";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 icu68 ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk19_headless.home}
+    '' + args.gradleProperties or "");
+
+    buildPhase = ''
+      runHook preBuild
+
+      export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
+      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";
+    # suspiciously the same as for openjfx 17 ...
+    # could they really not have changed any of their dependencies?
+    # or did we miss changing another upstream hash when copy-pasting?
+    outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo=";
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = ${lib.boolToString withMedia}
+    COMPILE_WEBKIT = ${lib.boolToString withWebKit}
+  '';
+
+  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
+  '';
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    export openjdkOutPath='${openjdk19_headless.outPath}'
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk17_headless openjdk19_headless ];
+
+  passthru.deps = deps;
+
+  meta = with lib; {
+    homepage = "https://openjdk.org/projects/openjfx/";
+    license = licenses.gpl2Classpath;
+    description = "The next-generation Java client toolkit";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.unix;
+  };
+}
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/openjdk/tests/hello-logging.nix b/nixpkgs/pkgs/development/compilers/openjdk/tests/hello-logging.nix
new file mode 100644
index 000000000000..71f3a5543f7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/tests/hello-logging.nix
@@ -0,0 +1,47 @@
+{ jdk
+, jre
+, pkgs
+}:
+
+/* 'Hello world' Java application derivation for use in tests */
+let
+  source = pkgs.writeTextDir "src/Hello.java" ''
+    import java.util.logging.Logger;
+    import java.util.logging.Level;
+
+    class Hello {
+      static Logger logger = Logger.getLogger(Hello.class.getName());
+
+      public static void main(String[] args) {
+        logger.log(Level.INFO, "Hello, world!");
+      }
+    }
+  '';
+in
+  pkgs.stdenv.mkDerivation {
+    pname = "hello";
+    version = "1.0.0";
+
+    src = source;
+
+    buildPhase = ''
+      runHook preBuildPhase
+      ${jdk}/bin/javac src/Hello.java
+      runHook postBuildPhase
+    '';
+    installPhase = ''
+      runHook preInstallPhase
+
+      mkdir -p $out/lib
+      cp src/Hello.class $out/lib
+
+      mkdir -p $out/bin
+      cat >$out/bin/hello <<EOF;
+      #!/usr/bin/env sh
+      ${jre}/bin/java -cp $out/lib Hello
+      EOF
+      chmod a+x $out/bin/hello
+
+      runHook postInstallPhase
+    '';
+  }
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/tests/hello.nix b/nixpkgs/pkgs/development/compilers/openjdk/tests/hello.nix
new file mode 100644
index 000000000000..bc5be4a9e9a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/tests/hello.nix
@@ -0,0 +1,42 @@
+{ jdk
+, jre
+, pkgs
+}:
+
+/* 'Hello world' Java application derivation for use in tests */
+let
+  source = pkgs.writeTextDir "src/Hello.java" ''
+    class Hello {
+      public static void main(String[] args) {
+        System.out.println("Hello, world!");
+      }
+    }
+  '';
+in
+  pkgs.stdenv.mkDerivation {
+    pname = "hello";
+    version = "1.0.0";
+
+    src = source;
+
+    buildPhase = ''
+      runHook preBuildPhase
+      ${jdk}/bin/javac src/Hello.java
+      runHook postBuildPhase
+    '';
+    installPhase = ''
+      runHook preInstallPhase
+
+      mkdir -p $out/lib
+      cp src/Hello.class $out/lib
+
+      mkdir -p $out/bin
+      cat >$out/bin/hello <<EOF;
+      #!/usr/bin/env sh
+      ${jre}/bin/java -cp $out/lib Hello
+      EOF
+      chmod a+x $out/bin/hello
+
+      runHook postInstallPhase
+    '';
+  }
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix b/nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix
new file mode 100644
index 000000000000..ed7b839cd22b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix
@@ -0,0 +1,16 @@
+{ runCommand
+, callPackage
+, jdk
+, jre_minimal
+}:
+
+let
+  hello = callPackage ./hello.nix {
+    jdk = jdk;
+    jre = jre_minimal;
+  };
+in
+  runCommand "test" {} ''
+    ${hello}/bin/hello | grep "Hello, world!"
+    touch $out
+  ''
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix b/nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix
new file mode 100644
index 000000000000..b9c417d3949c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix
@@ -0,0 +1,21 @@
+{ runCommand
+, callPackage
+, jdk
+, jre_minimal
+}:
+
+let
+  hello-logging = callPackage ./hello-logging.nix {
+    jdk = jdk;
+    jre = jre_minimal.override {
+      modules = [
+        "java.base"
+        "java.logging"
+      ];
+    };
+  };
+in
+  runCommand "test" {} ''
+    ${hello-logging}/bin/hello &>/dev/stdout | grep "Hello, world!"
+    touch $out
+  ''
diff --git a/nixpkgs/pkgs/development/compilers/opensmalltalk-vm/default.nix b/nixpkgs/pkgs/development/compilers/opensmalltalk-vm/default.nix
new file mode 100644
index 000000000000..a049e3e8abec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opensmalltalk-vm/default.nix
@@ -0,0 +1,186 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchurl
+, alsa-lib
+, coreutils
+, file
+, freetype
+, gnugrep
+, libpulseaudio
+, libtool
+, libuuid
+, openssl
+, pango
+, pkg-config
+, xorg
+}:
+let
+  buildVM =
+    {
+      # VM-specific information, manually extracted from building/<platformDir>/<vmName>/build/mvm
+      platformDir
+    , vmName
+    , scriptName
+    , configureFlagsArray
+    , configureFlags
+    }:
+    let
+      src = fetchFromGitHub {
+        owner = "OpenSmalltalk";
+        repo = "opensmalltalk-vm";
+        rev = "202206021410";
+        hash = "sha256-QqElPiJuqD5svFjWrLz1zL0Tf+pHxQ2fPvkVRn2lyBI=";
+      };
+    in
+    stdenv.mkDerivation {
+      pname =
+        let vmNameNoDots = builtins.replaceStrings [ "." ] [ "-" ] vmName;
+        in "opensmalltalk-vm-${platformDir}-${vmNameNoDots}";
+      version = src.rev;
+
+      inherit src;
+
+      postPatch =
+        ''
+          vmVersionFiles=$(sed -n 's/^versionfiles="\(.*\)"/\1/p' ./scripts/updateSCCSVersions)
+          for vmVersionFile in $vmVersionFiles; do
+            substituteInPlace "$vmVersionFile" \
+              --replace "\$Date\$" "\$Date: Thu Jan 1 00:00:00 1970 +0000 \$" \
+              --replace "\$URL\$" "\$URL: ${src.url} \$" \
+              --replace "\$Rev\$" "\$Rev: ${src.rev} \$" \
+              --replace "\$CommitHash\$" "\$CommitHash: 000000000000 \$"
+          done
+          patchShebangs --build ./building/${platformDir} scripts
+          substituteInPlace ./platforms/unix/config/mkmf \
+            --replace "/bin/rm" "rm"
+          substituteInPlace ./platforms/unix/config/configure \
+            --replace "/usr/bin/file" "file" \
+            --replace "/usr/bin/pkg-config" "pkg-config" \
+        '';
+
+      preConfigure = ''
+        cd building/${platformDir}/${vmName}/build
+        # Exits with non-zero code if the check fails, counterintuitively
+        ../../../../scripts/checkSCCSversion && exit 1
+        cp ../plugins.int ../plugins.ext .
+        configureFlagsArray=${configureFlagsArray}
+      '';
+
+      configureScript = "../../../../platforms/unix/config/configure";
+
+      configureFlags = [ "--with-scriptname=${scriptName}" ] ++ configureFlags;
+
+      buildFlags = [ "all" ];
+
+      enableParallelBuilding = true;
+
+      nativeBuildInputs = [
+        file
+        pkg-config
+      ];
+
+      buildInputs = [
+        alsa-lib
+        freetype
+        libpulseaudio
+        libtool
+        libuuid
+        openssl
+        pango
+        xorg.libX11
+        xorg.libXrandr
+      ];
+
+      postInstall = ''
+        rm "$out/squeak"
+        cd "$out/bin"
+        BIN="$(find ../lib -type f -name squeak)"
+        for f in $(find . -type f); do
+          rm "$f"
+          ln -s "$BIN" "$f"
+        done
+      '';
+
+      meta = {
+        description = "The cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.";
+        mainProgram = scriptName;
+        homepage = "https://opensmalltalk.org/";
+        license = with lib.licenses; [ mit ];
+        maintainers = with lib.maintainers; [ jakewaksbaum ];
+        platforms = [ stdenv.targetPlatform.system ];
+      };
+    };
+
+  vmsByPlatform = {
+    "aarch64-linux" = {
+      "squeak-cog-spur" = buildVM {
+        platformDir = "linux64ARMv8";
+        vmName = "squeak.cog.spur";
+        scriptName = "squeak";
+        configureFlagsArray = ''(
+          CFLAGS="-DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1"
+          LIBS="-lrt"
+        )'';
+        configureFlags = [
+          "--with-vmversion=5.0"
+          "--with-src=src/spur64.cog"
+          "--without-npsqueak"
+          "--enable-fast-bitblt"
+        ];
+      };
+
+      "squeak-stack-spur" = buildVM {
+        platformDir = "linux64ARMv8";
+        vmName = "squeak.stack.spur";
+        scriptName = "squeak";
+        configureFlagsArray = ''(
+          CFLAGS="-DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -D__ARM_ARCH_ISA_A64 -DARM64 -D__arm__ -D__arm64__ -D__aarch64__"
+        )'';
+        configureFlags = [
+          "--with-vmversion=5.0"
+          "--with-src=src/spur64.stack"
+          "--disable-cogit"
+          "--without-npsqueak"
+        ];
+      };
+    };
+
+    "x86_64-linux" = {
+      "newspeak-cog-spur" = buildVM {
+        platformDir = "linux64x64";
+        vmName = "newspeak.cog.spur";
+        scriptName = "newspeak";
+        configureFlagsArray = ''(
+          CFLAGS="-DNDEBUG -DDEBUGVM=0"
+        )'';
+        configureFlags = [
+          "--with-vmversion=5.0"
+          "--with-src=src/spur64.cog.newspeak"
+          "--without-vm-display-fbdev"
+          "--without-npsqueak"
+        ];
+      };
+
+      "squeak-cog-spur" = buildVM {
+        platformDir = "linux64x64";
+        vmName = "squeak.cog.spur";
+        scriptName = "squeak";
+        configureFlagsArray = ''(
+          CFLAGS="-DNDEBUG -DDEBUGVM=0 -DCOGMTVM=0"
+        )'';
+        configureFlags = [
+          "--with-vmversion=5.0"
+          "--with-src=src/spur64.cog"
+          "--without-npsqueak"
+        ];
+      };
+    };
+  };
+
+  platform = stdenv.targetPlatform.system;
+in
+  vmsByPlatform.${platform} or (throw (
+    "Unsupported platform ${platform}: only the following platforms are supported: " +
+    builtins.toString (builtins.attrNames vmsByPlatform)
+  ))
diff --git a/nixpkgs/pkgs/development/compilers/openspin/default.nix b/nixpkgs/pkgs/development/compilers/openspin/default.nix
new file mode 100644
index 000000000000..abf5623b5821
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openspin/default.nix
@@ -0,0 +1,26 @@
+{ lib, 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 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/opensycl/default.nix b/nixpkgs/pkgs/development/compilers/opensycl/default.nix
new file mode 100644
index 000000000000..c406d4c9d5c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opensycl/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, fetchFromGitHub
+, llvmPackages_15
+, lld_15
+, python3
+, cmake
+, boost
+, libxml2
+, libffi
+, makeWrapper
+, config
+, rocmPackages
+, rocmSupport ? config.rocmSupport
+}:
+let
+  inherit (llvmPackages_15) stdenv;
+in
+stdenv.mkDerivation rec {
+  pname = "OpenSYCL";
+  version = "0.9.4";
+
+  src = fetchFromGitHub {
+    owner = "OpenSYCL";
+    repo = "OpenSYCL";
+    rev = "v${version}";
+    sha256 = "sha256-5YkuUOAnvoAD5xDKxKMPq0B7+1pb6hVisPAhs0Za1ls=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    makeWrapper
+  ];
+
+  buildInputs = [
+    libxml2
+    libffi
+    boost
+    llvmPackages_15.openmp
+    llvmPackages_15.libclang.dev
+    llvmPackages_15.llvm
+  ] ++ lib.optionals rocmSupport [
+    rocmPackages.clr
+    rocmPackages.rocm-runtime
+  ];
+
+  # opensycl makes use of clangs internal headers. Its cmake does not successfully discover them automatically on nixos, so we supply the path manually
+  cmakeFlags = [
+    "-DCLANG_INCLUDE_PATH=${llvmPackages_15.libclang.dev}/include"
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/syclcc-clang \
+      --prefix PATH : ${lib.makeBinPath [ python3 lld_15 ]} \
+      --add-flags "-L${llvmPackages_15.openmp}/lib" \
+      --add-flags "-I${llvmPackages_15.openmp.dev}/include" \
+  '' + lib.optionalString rocmSupport ''
+    --add-flags "--rocm-device-lib-path=${rocmPackages.rocm-device-libs}/amdgcn/bitcode"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/OpenSYCL/OpenSYCL";
+    description = "Multi-backend implementation of SYCL for CPUs and GPUs";
+    maintainers = with maintainers; [ yboettcher ];
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ophis/default.nix b/nixpkgs/pkgs/development/compilers/ophis/default.nix
new file mode 100644
index 000000000000..2ddfa849b664
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ophis/default.nix
@@ -0,0 +1,29 @@
+{ lib, buildPythonApplication, fetchFromGitHub }:
+
+buildPythonApplication rec {
+  pname = "ophis";
+  version = "unstable-2019-04-13";
+
+  src = fetchFromGitHub {
+    owner = "michaelcmartin";
+    repo = "Ophis";
+    rev = "99f074da278d4ec80689c0e22e20c5552ea12512";
+    sha256 = "2x8vwLTSngqQqmVrVh/mM4peATgaRqOSwrfm5XCkg/g=";
+  };
+
+  sourceRoot = "${src.name}/src";
+
+  meta = with lib; {
+    homepage = "http://michaelcmartin.github.io/Ophis/";
+    description = "A cross-assembler for the 6502 series of microprocessors";
+    longDescription = ''
+      Ophis is an assembler for the 6502 microprocessor - the famous chip used
+      in the vast majority of the classic 8-bit computers and consoles. Its
+      primary design goals are code readability and output flexibility - Ophis
+      has successfully been used to create programs for the Nintendo
+      Entertainment System, the Atari 2600, and the Commodore 64.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+  };
+}
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..40681faae8ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -0,0 +1,190 @@
+{ productVersion
+, patchVersion
+, sha256
+, jceName
+, sha256JCE
+}:
+
+{ swingSupport ? true
+, lib, stdenv
+, requireFile
+, makeWrapper
+, unzip
+, file
+, xorg ? null
+, installjdk ? true
+, pluginSupport ? true
+, installjce ? false
+, config
+, glib
+, libxml2
+, ffmpeg
+, libxslt
+, libGL
+, freetype
+, fontconfig
+, gtk2
+, pango
+, cairo
+, alsa-lib
+, 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" + lib.optionalString pluginSupport "-with-plugin";
+  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-aarch64";
+      }.${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 makeWrapper ]
+    ++ lib.optional installjce unzip;
+
+  # 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:+:}${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 ffmpeg libxslt libGL xorg.libXxf86vm alsa-lib fontconfig freetype pango gtk2 cairo gdk-pixbuf atk] ++
+    lib.optionals swingSupport [xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc];
+
+  rpath = 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 lib; {
+    license = licenses.unfree;
+    platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" "aarch64-linux" ]; # some inherit jre.meta.platforms
+    mainProgram = "java";
+  };
+
+}; in result
diff --git a/nixpkgs/pkgs/development/compilers/oraclejdk/jdk11-linux.nix b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk11-linux.nix
new file mode 100644
index 000000000000..a232b796a068
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk11-linux.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv
+, requireFile
+, xorg
+, zlib
+, freetype
+, alsa-lib
+, setJavaClassPath
+}:
+
+let result = stdenv.mkDerivation rec {
+  pname = "oraclejdk";
+  version = "11.0.10";
+
+  src = requireFile {
+    name = "jdk-${version}_linux-x64_bin.tar.gz";
+    url = "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html";
+    sha256 = "94bd34f85ee38d3ef59e5289ec7450b9443b924c55625661fffe66b03f2c8de2";
+  };
+
+  installPhase = ''
+    mv ../$sourceRoot $out
+
+    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="$out/lib/jli:$out/lib/server:$out/lib:${lib.strings.makeLibraryPath [ zlib xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXrender freetype alsa-lib]}"
+
+    for f in $(find $out -name "*.so") $(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 -name "*.so") $(find $out -type f -perm -0100); do
+      if ldd "$f" | fgrep 'not found'; then echo "in file $f"; fi
+    done
+  '';
+
+  passthru.jre = result;
+  passthru.home = result;
+
+  dontStrip = true; # See: https://github.com/NixOS/patchelf/issues/10
+
+  meta = with lib; {
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+  };
+}; 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..206df75b9ebf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk8-linux.nix
@@ -0,0 +1,10 @@
+import ./jdk-linux-base.nix {
+  productVersion = "8";
+  patchVersion = "281";
+  sha256.i686-linux = "/yEY5O6MYNyjS5YSGZtgydb8th6jHQLNvI9tNPIh3+0=";
+  sha256.x86_64-linux = "hejH2nJIx0UPsQVWeniEHQlzWXhQd2wkpSf+sC7z5YY=";
+  sha256.armv7l-linux = "oXbW8hZxesDqwV79ANB4SdnS71O51ZApKbQhqq4i/EM=";
+  sha256.aarch64-linux = "oFH3TeIzVsFk6IZcDEHVDVJC7dSbGcwhdUH/WUXSNDM=";
+  jceName = "jce_policy-8.zip";
+  sha256JCE = "19n5wadargg3v8x76r7ayag6p2xz1bwhrgdzjs9f4i6fvxz9jr4w";
+}
diff --git a/nixpkgs/pkgs/development/compilers/orc/default.nix b/nixpkgs/pkgs/development/compilers/orc/default.nix
new file mode 100644
index 000000000000..dd1ce9d14672
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/orc/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, file
+, docbook_xsl
+, gtk-doc ? null
+, buildDevDoc ? gtk-doc != null
+
+# for passthru.tests
+, gnuradio
+, gst_all_1
+, qt6
+, vips
+
+}: let
+  inherit (lib) optional optionals;
+in stdenv.mkDerivation rec {
+  pname = "orc";
+  version = "0.4.34";
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/orc/${pname}-${version}.tar.xz";
+    sha256 = "sha256-j0ers/CXFx5E64B63Nq9hg+6Lv/TfY08T71fNByt1B8=";
+  };
+
+  postPatch = lib.optionalString stdenv.isAarch32 ''
+    # https://gitlab.freedesktop.org/gstreamer/orc/-/issues/20
+    sed -i '/exec_opcodes_sys/d' testsuite/meson.build
+  '' + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+    # This benchmark times out on Hydra.nixos.org
+    sed -i '/memcpy_speed/d' testsuite/meson.build
+  '';
+
+  outputs = [ "out" "dev" ]
+     ++ optional buildDevDoc "devdoc"
+  ;
+  outputBin = "dev"; # compilation tools
+
+  mesonFlags =
+    optionals (!buildDevDoc) [ "-Dgtk_doc=disabled" ]
+  ;
+
+  nativeBuildInputs = [ meson ninja ]
+    ++ optionals buildDevDoc [ gtk-doc file docbook_xsl ]
+  ;
+
+  # https://gitlab.freedesktop.org/gstreamer/orc/-/issues/41
+  doCheck = !(stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12");
+
+  passthru.tests = {
+    inherit (gst_all_1) gst-plugins-good gst-plugins-bad gst-plugins-ugly;
+    inherit gnuradio vips;
+    qt6-qtmultimedia = qt6.qtmultimedia;
+  };
+
+  meta = with lib; {
+    description = "The Oil Runtime Compiler";
+    homepage = "https://gstreamer.freedesktop.org/projects/orc.html";
+    changelog = "https://cgit.freedesktop.org/gstreamer/orc/plain/RELEASE?h=${version}";
+    # 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..0d66b81b6ad1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/osl/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, clang
+, libclang
+, libxml2
+, zlib
+, openexr
+, openimageio
+, llvm
+, boost
+, flex
+, bison
+, partio
+, pugixml
+, util-linux
+, python3
+}:
+
+let
+
+  boost_static = boost.override { enableStatic = true; };
+
+in stdenv.mkDerivation rec {
+  pname = "openshadinglanguage";
+  version = "1.13.6.1";
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "OpenShadingLanguage";
+    rev = "v${version}";
+    hash = "sha256-NSnM5/SyVkfZ4SyzRzVJc5O1t4/s2ax0koevRZsQ9q8=";
+  };
+
+  cmakeFlags = [
+    "-DBoost_ROOT=${boost}"
+    "-DUSE_BOOST_WAVE=ON"
+    "-DENABLE_RTTI=ON"
+
+    # Build system implies llvm-config and llvm-as are in the same directory.
+    # Override defaults.
+    "-DLLVM_DIRECTORY=${llvm}"
+    "-DLLVM_CONFIG=${llvm.dev}/bin/llvm-config"
+    "-DLLVM_BC_GENERATOR=${clang}/bin/clang++"
+
+    # Set C++11 to C++14 required for LLVM10+
+    "-DCMAKE_CXX_STANDARD=14"
+  ];
+
+  preConfigure = "patchShebangs src/liboslexec/serialize-bc.bash ";
+
+  nativeBuildInputs = [
+    bison
+    clang
+    cmake
+    flex
+  ];
+
+  buildInputs = [
+    boost_static
+    libclang
+    llvm
+    openexr
+    openimageio
+    partio
+    pugixml
+    python3.pkgs.pybind11
+    util-linux # needed just for hexdump
+    zlib
+  ] ++ lib.optionals stdenv.isDarwin [
+    libxml2
+  ];
+
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/*.pc \
+      --replace '=''${exec_prefix}//' '=/'
+  '';
+
+  meta = with lib; {
+    description = "Advanced shading language for production GI renderers";
+    homepage = "https://opensource.imageworks.com/osl.html";
+    maintainers = with maintainers; [ hodapp ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
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..7631ca8b083c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/owl-lisp/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitLab, which }:
+
+stdenv.mkDerivation rec {
+  pname = "owl-lisp";
+  version = "0.2.2";
+
+  src = fetchFromGitLab {
+    owner  = "owl-lisp";
+    repo   = "owl";
+    rev    = "v${version}";
+    sha256 = "sha256-GfvOkYLo8fgAvGuUa59hDy+sWJSwyntwqMO8TAK/lUo=";
+  };
+
+  nativeBuildInputs = [ which ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  # tests are run as part of the compilation process
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A functional Scheme for world domination";
+    homepage    = "https://gitlab.com/owl-lisp/owl";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/p4c/default.nix b/nixpkgs/pkgs/development/compilers/p4c/default.nix
new file mode 100644
index 000000000000..54d2875d1bc3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/p4c/default.nix
@@ -0,0 +1,100 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, boehmgc
+, bison
+, flex
+, protobuf
+, gmp
+, boost
+, python3
+, doxygen
+, graphviz
+, libbpf
+, libllvm
+, enableDocumentation ? true
+, enableBPF ? true
+, enableDPDK ? true
+, enableBMV2 ? true
+, enableGraphBackend ? true
+, enableP4Tests ? true
+, enableGTests ? true
+, enableMultithreading ? false
+}:
+let
+  toCMakeBoolean = v: if v then "ON" else "OFF";
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "p4c";
+  version = "1.2.4.1";
+
+  src = fetchFromGitHub {
+    owner = "p4lang";
+    repo = "p4c";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-Whdryz1Gt0ymE7cj+mI95lW3Io9yBvLqcWa04gu5zEw=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # Fix gcc-13 build:
+    #   https://github.com/p4lang/p4c/pull/4084
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/p4lang/p4c/commit/6756816100b7c51e3bf717ec55114a8e8575ba1d.patch";
+      hash = "sha256-wWM1qjgQCNMPdrhQF38jzFgODUsAcaHTajdbV7L3y8o=";
+    })
+  ];
+
+  postFetch = ''
+    rm -rf backends/ebpf/runtime/contrib/libbpf
+    rm -rf control-plane/p4runtime
+  '';
+
+  cmakeFlags = [
+    "-DENABLE_BMV2=${toCMakeBoolean enableBMV2}"
+    "-DENABLE_EBPF=${toCMakeBoolean enableBPF}"
+    "-DENABLE_UBPF=${toCMakeBoolean enableBPF}"
+    "-DENABLE_DPDK=${toCMakeBoolean enableDPDK}"
+    "-DENABLE_P4C_GRAPHS=${toCMakeBoolean enableGraphBackend}"
+    "-DENABLE_P4TEST=${toCMakeBoolean enableP4Tests}"
+    "-DENABLE_DOCS=${toCMakeBoolean enableDocumentation}"
+    "-DENABLE_GC=ON"
+    "-DENABLE_GTESTS=${toCMakeBoolean enableGTests}"
+    "-DENABLE_PROTOBUF_STATIC=OFF"  # static protobuf has been removed since 3.21.6
+    "-DENABLE_MULTITHREAD=${toCMakeBoolean enableMultithreading}"
+    "-DENABLE_GMP=ON"
+  ];
+
+  checkTarget = "check";
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    bison
+    flex
+    cmake
+  ]
+  ++ lib.optionals enableDocumentation [ doxygen graphviz ]
+  ++ lib.optionals enableBPF [ libllvm libbpf ];
+
+  buildInputs = [
+    protobuf
+    boost
+    boehmgc
+    gmp
+    flex
+    python3
+  ];
+
+  meta = {
+    changelog = "https://github.com/p4lang/p4c/releases";
+    description = "Reference compiler for the P4 programming language";
+    homepage = "https://github.com/p4lang/p4c";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ raitobezarius govanify ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/paco/default.nix b/nixpkgs/pkgs/development/compilers/paco/default.nix
new file mode 100644
index 000000000000..d8014dd8e51b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/paco/default.nix
@@ -0,0 +1,34 @@
+{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
+
+buildGoModule rec {
+  pname = "paco";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "pacolang";
+    repo = "paco";
+    rev = "v${version}";
+    hash = "sha256-sCU7cjmsUTrhf/7Lm3wBPKwk80SAhCfc4lrCBggspw8=";
+  };
+
+  vendorHash = "sha256-J0TKp1df5IWq3Irlzf1lvhWlXnP//MsVqs9M8TtEraw=";
+
+  patches = [
+    # Set correct package path in go.mod
+    (fetchpatch {
+      url = "https://github.com/pacolang/paco/pull/1/commits/886f0407e94418d34c7e062c6857834aea3c99ac.patch";
+      hash = "sha256-HRNJSyWz1OY+kCV+eaRJbaDXkH4n1NaMpFxCuEhocK4=";
+    })
+  ];
+
+  subPackages = [ "." ];
+
+  ldflags = [ "-s" "-w" ];
+
+  meta = with lib; {
+    description = "A simple compiled programming language";
+    homepage = "https://github.com/pacolang/paco";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hugolgst ];
+  };
+}
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..acf658024b01
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pakcs/curry-frontend.nix
@@ -0,0 +1,28 @@
+{ mkDerivation, base, binary, bytestring, Cabal, containers
+, directory, extra, file-embed, filepath, lib, mtl, network-uri
+, parsec, pretty, process, set-extra, template-haskell, time
+, transformers
+}:
+mkDerivation {
+  pname = "curry-frontend";
+  version = "2.1.0";
+  src = ./.;
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    base binary bytestring containers directory extra file-embed
+    filepath mtl network-uri parsec pretty process set-extra
+    template-haskell time transformers
+  ];
+  executableHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base bytestring Cabal containers directory extra file-embed
+    filepath mtl network-uri pretty process set-extra template-haskell
+    transformers
+  ];
+  homepage = "http://curry-language.org";
+  description = "Compile the functional logic language Curry to several intermediate formats";
+  license = lib.licenses.bsd3;
+  mainProgram = "curry-frontend";
+}
diff --git a/nixpkgs/pkgs/development/compilers/pakcs/default.nix b/nixpkgs/pkgs/development/compilers/pakcs/default.nix
new file mode 100644
index 000000000000..42b2e208c1d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pakcs/default.nix
@@ -0,0 +1,95 @@
+{ lib, stdenv, fetchurl, makeWrapper
+, haskellPackages, haskell
+, which, swiProlog, rlwrap, tk
+, curl, git, unzip, gnutar, coreutils, sqlite }:
+
+let
+  pname = "pakcs";
+  version = "3.6.0";
+
+  # Don't switch to "Current release" without a reason, because its
+  # source updates without version bump. Prefer last from "Older releases" instead.
+  src = fetchurl {
+    url = "https://www.informatik.uni-kiel.de/~pakcs/download/pakcs-${version}-src.tar.gz";
+    hash = "sha256-1r6jEY3eEGESKcAepiziVbxpIvQLtCS6l0trBU3SGGo=";
+  };
+
+  curry-frontend = (haskellPackages.override {
+    overrides = self: super: {
+      curry-frontend = haskell.lib.compose.overrideCabal (drv: {
+        inherit src;
+        postUnpack = "sourceRoot+=/frontend";
+      }) (super.callPackage ./curry-frontend.nix { });
+    };
+  }).curry-frontend;
+
+in stdenv.mkDerivation {
+  inherit pname version 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 = ''
+    for file in examples/test.sh             \
+                currytools/optimize/Makefile \
+                testsuite/test.sh            \
+                scripts/cleancurry.sh        \
+                scripts/compile-all-libs.sh; do
+        substituteInPlace $file --replace "/bin/rm" "rm"
+    done
+  '' ;
+
+  preBuild = ''
+    mkdir -p $out/pakcs
+    cp -r * $out/pakcs
+    cd $out/pakcs
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    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 ":" "${lib.makeBinPath [ curl git unzip gnutar coreutils sqlite ]}"
+
+    runHook postInstall
+  '';
+
+  meta = with 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; [ t4ccer ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/passerine/default.nix b/nixpkgs/pkgs/development/compilers/passerine/default.nix
new file mode 100644
index 000000000000..e5f88e586746
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/passerine/default.nix
@@ -0,0 +1,22 @@
+{ lib, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "passerine";
+  version = "0.9.3";
+
+  src = fetchFromGitHub {
+    owner = "vrtbl";
+    repo = "passerine";
+    rev = "v${version}";
+    hash = "sha256-TrbcULIJ9+DgQ4QsLYD5okxHoIusGJDw1PqJQwq1zu0=";
+  };
+
+  cargoHash = "sha256-A+sOT0rloAktDdVXe2HEPK25euh9T7c0rXybZmZpqC0=";
+
+  meta = with lib; {
+    description = "A small extensible programming language designed for concise expression with little code";
+    homepage = "https://www.passerine.io/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ siraben ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/pforth/default.nix b/nixpkgs/pkgs/development/compilers/pforth/default.nix
new file mode 100644
index 000000000000..aadc72c174e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pforth/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, buildPackages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pforth";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "philburk";
+    repo = "pforth";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-vEjFeHSJl+yAtatYJEnu+r9hmOr/kZOgIbSUXR/c8WU=";
+  };
+
+  # We build the dictionary in a cross-compile compatible way.
+  # For that, we perform steps, that the Makefile would otherwise do.
+  buildPhase = ''
+    runHook preBuild
+    make -C platforms/unix pfdicapp
+    pushd fth/
+    ${stdenv.hostPlatform.emulator buildPackages} ../platforms/unix/pforth -i system.fth
+    ${stdenv.hostPlatform.emulator buildPackages} ../platforms/unix/pforth -d pforth.dic <<< "include savedicd.fth sdad bye"
+    mv pforth.dic pfdicdat.h ../platforms/unix/
+    popd
+    make -C platforms/unix pforthapp
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm755 platforms/unix/pforth_standalone $out/bin/pforth
+    mkdir -p $out/share/pforth
+    cp -r fth/* $out/share/pforth/
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "https://www.softsynth.com/pforth/";
+    description = "Portable Portable ANS-like Forth written in ANSI 'C'";
+    changelog = "https://github.com/philburk/pforth/blob/v${finalAttrs.version}/RELEASES.md";
+    license = lib.licenses.bsd0;
+    maintainers = with lib.maintainers; [ AndersonTorres yrashk ];
+    platforms = lib.platforms.unix;
+  };
+})
+# TODO: option for install the non-standalone executable
diff --git a/nixpkgs/pkgs/development/compilers/picat/default.nix b/nixpkgs/pkgs/development/compilers/picat/default.nix
new file mode 100644
index 000000000000..76d1ebdb4102
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/picat/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, zlib }:
+
+let
+  ARCH = {
+    i686-linux    = "linux32";
+    x86_64-linux  = "linux64";
+    aarch64-linux = "linux64";
+  }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+in
+stdenv.mkDerivation {
+  pname = "picat";
+  version = "3.3p3";
+
+  src = fetchurl {
+    url = "http://picat-lang.org/download/picat333_src.tar.gz";
+    hash = "sha256-LMmAHCGKgon/wNbrXTUH9hiHyGVwwSDpB1236xawzXs=";
+  };
+
+  buildInputs = [ zlib ];
+
+  inherit ARCH;
+
+  hardeningDisable = [ "format" ];
+  enableParallelBuilding = true;
+
+  buildPhase = "cd emu && make -j $NIX_BUILD_CORES -f Makefile.$ARCH";
+  installPhase = "mkdir -p $out/bin && cp picat $out/bin/picat";
+
+  meta = with lib; {
+    description = "Logic-based programming langage";
+    homepage    = "http://picat-lang.org/";
+    license     = licenses.mpl20;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ earldouglas thoughtpolice ];
+  };
+}
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..bcd52380701a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/5.6.nix
@@ -0,0 +1,42 @@
+{lib, stdenv, fetchurl, autoreconfHook, fetchpatch }:
+
+let
+  version = "5.6";
+in
+
+stdenv.mkDerivation {
+  pname = "polyml";
+  inherit version;
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.ac --replace stdc++ c++
+  '';
+
+  patches = [
+    # glibc 2.34 compat
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch";
+      sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby";
+    })
+  ];
+
+  nativeBuildInputs = 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 = lib.licenses.lgpl21;
+    platforms = with lib.platforms; linux;
+    maintainers = [ #Add your name here!
+      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..f48377e0e0ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/5.7.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, gmp, libffi, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "polyml";
+  version = "5.7.1";
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.ac --replace stdc++ c++
+  '';
+
+  patches = [
+    ./5.7-new-libffi-FFI_SYSV.patch
+
+    # glibc 2.34 compat
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch";
+      sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby";
+    })
+  ];
+
+  buildInputs = [ libffi gmp ];
+
+  nativeBuildInputs = 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 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 ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/polyml/default.nix b/nixpkgs/pkgs/development/compilers/polyml/default.nix
new file mode 100644
index 000000000000..c82a88bb2793
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gmp
+, libffi
+}:
+
+stdenv.mkDerivation rec {
+  pname = "polyml";
+  version = "5.9.1";
+
+  src = fetchFromGitHub {
+    owner = "polyml";
+    repo = "polyml";
+    rev = "v${version}";
+    sha256 = "sha256-72wm8dt+Id59A5058mVE5P9TkXW5/LZRthZoxUustVA=";
+  };
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.ac --replace stdc++ c++
+  '';
+
+  buildInputs = [ libffi gmp ];
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook;
+
+  configureFlags = [
+    "--enable-shared"
+    "--with-system-libffi"
+    "--with-gmp"
+  ];
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+    make check
+    runHook postCheck
+  '';
+
+  meta = with 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..c7008ec22a8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/default.nix
@@ -0,0 +1,115 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, coreutils
+, libxml2
+, lto ? !stdenv.isDarwin
+, makeWrapper
+, openssl
+, pcre2
+, pony-corral
+, python3
+, substituteAll
+, which
+, z3
+, darwin
+}:
+
+stdenv.mkDerivation (rec {
+  pname = "ponyc";
+  version = "0.54.0";
+
+  src = fetchFromGitHub {
+    owner = "ponylang";
+    repo = pname;
+    rev = version;
+    hash = "sha256-qFPubqGfK0WCun6QA1OveyDJj7Wf6SQpky7pEb7qsf4=";
+    fetchSubmodules = true;
+  };
+
+  ponygbenchmark = fetchFromGitHub {
+    owner = "google";
+    repo = "benchmark";
+    rev = "v1.8.0";
+    hash = "sha256-pUW9YVaujs/y00/SiPqDgK4wvVsaM7QUp/65k0t7Yr0=";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper which python3 ]
+    ++ lib.optionals (stdenv.isDarwin) [ darwin.cctools ];
+  buildInputs = [ libxml2 z3 ];
+
+  # Sandbox disallows network access, so disabling problematic networking tests
+  patches = [
+    ./disable-tests.patch
+    (substituteAll {
+      src = ./make-safe-for-sandbox.patch;
+      googletest = fetchFromGitHub {
+        owner = "google";
+        repo = "googletest";
+        # GoogleTest follows Abseil Live at Head philosophy, use latest commit from main branch as often as possible.
+        rev = "1a727c27aa36c602b24bf170a301aec8686b88e8"; # unstable-2023-03-07
+        hash = "sha256-/FWBSxZESwj/QvdNK5BI2EfonT64DP1eGBZR4O8uJww=";
+      };
+    })
+  ] ++ lib.optionals stdenv.isDarwin [
+    (substituteAll {
+      src = ./fix-darwin-build.patch;
+      libSystem = darwin.Libsystem;
+    })
+  ];
+
+  postUnpack = ''
+    mkdir -p source/build/build_libs/gbenchmark-prefix/src
+    cp -r "$ponygbenchmark"/ source/build/build_libs/gbenchmark-prefix/src/benchmark
+    chmod -R u+w source/build/build_libs/gbenchmark-prefix/src/benchmark
+  '';
+
+  dontConfigure = true;
+
+  postPatch = ''
+    substituteInPlace packages/process/_test.pony \
+        --replace '"/bin/' '"${coreutils}/bin/' \
+        --replace '=/bin' "${coreutils}/bin"
+    substituteInPlace src/libponyc/pkg/package.c \
+        --replace "/usr/local/lib" "" \
+        --replace "/opt/local/lib" ""
+  '';
+
+  preBuild = ''
+    make libs build_flags=-j$NIX_BUILD_CORES
+    make configure build_flags=-j$NIX_BUILD_CORES
+  '';
+
+  makeFlags = [
+    "PONYC_VERSION=${version}"
+    "prefix=${placeholder "out"}"
+  ] ++ lib.optionals stdenv.isDarwin ([ "bits=64" ] ++ lib.optional (!lto) "lto=no");
+
+  env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=redundant-move" "-Wno-error=implicit-fallthrough" ];
+
+  # make: *** [Makefile:222: test-full-programs-release] Killed: 9
+  doCheck = !stdenv.isDarwin;
+
+  installPhase = "make config=release prefix=$out "
+    + lib.optionalString stdenv.isDarwin ("bits=64 " + (lib.optionalString (!lto) "lto=no "))
+    + '' install
+    wrapProgram $out/bin/ponyc \
+      --prefix PATH ":" "${stdenv.cc}/bin" \
+      --set-default CC "$CC" \
+      --prefix PONYPATH : "${lib.makeLibraryPath [ pcre2 openssl (placeholder "out") ]}"
+  '';
+
+  # Stripping breaks linking for ponyc
+  dontStrip = true;
+
+  passthru.tests.pony-corral = pony-corral;
+
+  meta = with 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; [ kamilchm patternspandemic redvers ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-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..b3d83483a5f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/disable-tests.patch
@@ -0,0 +1,16 @@
+diff --git a/packages/net/_test.pony b/packages/net/_test.pony
+index 9044dfb1..f0ea10f7 100644
+--- a/packages/net/_test.pony
++++ b/packages/net/_test.pony
+@@ -26,11 +26,6 @@ actor \nodoc\ Main is TestList
+       test(_TestTCPThrottle)
+     end
+ 
+-    // Tests below exclude osx and are listed alphabetically
+-    ifdef not osx then
+-      test(_TestBroadcast)
+-    end
+-
+ class \nodoc\ _TestPing is UDPNotify
+   let _h: TestHelper
+   let _ip: NetAddress
diff --git a/nixpkgs/pkgs/development/compilers/ponyc/fix-darwin-build.patch b/nixpkgs/pkgs/development/compilers/ponyc/fix-darwin-build.patch
new file mode 100644
index 000000000000..2570145da8de
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/fix-darwin-build.patch
@@ -0,0 +1,22 @@
+diff --git a/src/libponyc/codegen/genexe.c b/src/libponyc/codegen/genexe.c
+index 42a68251..b37958ab 100644
+--- a/src/libponyc/codegen/genexe.c
++++ b/src/libponyc/codegen/genexe.c
+@@ -296,13 +296,13 @@ static bool link_exe(compile_t* c, ast_t* program,
+ 
+   snprintf(ld_cmd, ld_len,
+ #if defined(PLATFORM_IS_ARM)
+-    "%s -execute -arch %.*s "
++    "%s -execute "
+ #else
+-    "%s -execute -no_pie -arch %.*s "
++    "%s -execute -no_pie "
+ #endif
+     "-o %s %s %s %s "
+-    "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem %s",
+-           linker, (int)arch_len, c->opt->triple, file_exe, file_o,
++    "-L@libSystem@/lib -lSystem %s",
++           linker, file_exe, file_o,
+            lib_args, ponyrt, sanitizer_arg
+     );
+ 
diff --git a/nixpkgs/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch b/nixpkgs/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
new file mode 100644
index 000000000000..098b61c18867
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/make-safe-for-sandbox.patch
@@ -0,0 +1,116 @@
+From e26ae067644ea780f050fb900bd850027bb86456 Mon Sep 17 00:00:00 2001
+From: superherointj <5861043+superherointj@users.noreply.github.com>
+Date: Tue, 7 Mar 2023 14:59:31 -0300
+Subject: [PATCH] make-safe-for-sandbox.patch
+
+---
+ lib/CMakeLists.txt | 80 ++--------------------------------------------
+ 1 file changed, 2 insertions(+), 78 deletions(-)
+
+diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 129e26e6..d25bdf9d 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -32,14 +32,14 @@ endif()
+ 
+ set(PONYC_GBENCHMARK_URL https://github.com/google/benchmark/archive/v1.7.1.tar.gz)
+ ExternalProject_Add(gbenchmark
+-    URL ${PONYC_GBENCHMARK_URL}
++    SOURCE_DIR gbenchmark-prefix/src/benchmark
+     CMAKE_ARGS -DCMAKE_BUILD_TYPE=${PONYC_LIBS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DBENCHMARK_ENABLE_WERROR=OFF -DCMAKE_CXX_FLAGS=${PONY_PIC_FLAG} --no-warn-unused-cli
+ )
+ 
+ set(PONYC_GOOGLETEST_URL https://github.com/google/googletest/archive/release-1.12.1.tar.gz)
+ 
+ ExternalProject_Add(googletest
+-    URL ${PONYC_GOOGLETEST_URL}
++    URL @googletest@
+     CMAKE_ARGS -DCMAKE_BUILD_TYPE=${PONYC_LIBS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_FLAGS=${PONY_PIC_FLAG} -Dgtest_force_shared_crt=ON --no-warn-unused-cli
+ )
+ 
+@@ -52,82 +52,6 @@ install(TARGETS blake2
+     COMPONENT library
+ )
+ 
+-find_package(Git)
+-
+-set(LLVM_DESIRED_HASH "1f9140064dfbfb0bbda8e51306ea51080b2f7aac")
+-set(PATCHES_DESIRED_HASH "3e16c097794cb669a8f6a0bd7600b440205ac5c29a6135750c2e83263eb16a95")
+-
+-if(GIT_FOUND)
+-    if(EXISTS "${PROJECT_SOURCE_DIR}/../.git")
+-        # Update submodules as needed
+-        option(GIT_SUBMODULE "Check submodules during build" ON)
+-        if(GIT_SUBMODULE)
+-            message(STATUS "Updating submodules...")
+-            execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --depth 1
+-                            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-                            RESULT_VARIABLE git_submod_result)
+-            #message("git_submod_result ${git_submod_result}")
+-            if(NOT git_submod_result EQUAL "0")
+-                message(FATAL_ERROR "git submodule update --init --recursive --depth 1 failed with ${git_submod_result}, please checkout submodules")
+-            endif()
+-
+-            # we check to make sure the submodule hash matches
+-            # the reason the submodule hash is in this file is to be able to use this file as a key for caching the libs in CI
+-            execute_process(COMMAND ${GIT_EXECUTABLE} submodule status
+-                            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-                            OUTPUT_VARIABLE git_submod_output)
+-            #message("git_submod_output ${git_submod_output}")
+-            string(FIND "${git_submod_output}" "${LLVM_DESIRED_HASH}" LLVM_SUBMOD_POS)
+-            if(LLVM_SUBMOD_POS EQUAL "-1")
+-                message(FATAL_ERROR "Expecting the lib/llvm/src submodule to be at hash '${LLVM_DESIRED_HASH}'; found '${git_submod_output}'; update the LLVM_DESIRED_HASH variable in lib/CMakeLists.txt if you've updated the submodule.")
+-            endif()
+-        endif()
+-    endif()
+-
+-    # Apply patches
+-    message("Applying patches...")
+-    file(GLOB PONY_LLVM_PATCHES "${PROJECT_SOURCE_DIR}/llvm/patches/*.diff")
+-
+-    # check to see if the patch hashes match
+-    message("Checking patches ${PONY_LLVM_PATCHES}")
+-    set(PATCHES_ACTUAL_HASH "needed_if_no_patches")
+-    foreach (PATCH ${PONY_LLVM_PATCHES})
+-        file(STRINGS ${PATCH} patch_file NEWLINE_CONSUME)
+-        string(REPLACE "\n" " " patch_file ${patch_file})
+-        string(SHA256 patch_file_hash ${patch_file})
+-        # message("${PATCH}: '${patch_file_hash}'")
+-        string(CONCAT PATCHES_ACTUAL_HASH ${PATCHES_ACTUAL_HASH} ${patch_file_hash})
+-        # message("concat is '${PATCHES_ACTUAL_HASH}'")
+-    endforeach()
+-    string(SHA256 PATCHES_ACTUAL_HASH ${PATCHES_ACTUAL_HASH})
+-    # message("Desired hash ${PATCHES_DESIRED_HASH}")
+-    # message("Actual hash  ${PATCHES_ACTUAL_HASH}")
+-    if(NOT PATCHES_ACTUAL_HASH MATCHES "${PATCHES_DESIRED_HASH}")
+-        message(FATAL_ERROR "Patch hash actual '${PATCHES_ACTUAL_HASH}' does not match desired '${PATCHES_DESIRED_HASH}'")
+-    endif()
+-
+-    foreach (PATCH ${PONY_LLVM_PATCHES})
+-        message("  Checking ${PATCH}")
+-        execute_process(COMMAND ${GIT_EXECUTABLE} apply --check -p 1 --ignore-whitespace --whitespace=nowarn ${PATCH}
+-                        WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/llvm/src"
+-                        ERROR_VARIABLE _err_out
+-                        RESULT_VARIABLE git_apply_check_result)
+-        if(git_apply_check_result EQUAL "0")
+-            message("    Applying ${PATCH}")
+-            execute_process(COMMAND ${GIT_EXECUTABLE} apply -p 1 --ignore-whitespace --whitespace=nowarn ${PATCH}
+-                            WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/llvm/src"
+-                            RESULT_VARIABLE git_apply_result)
+-            if(NOT git_apply_result EQUAL "0")
+-                message(FATAL_ERROR "Unable to apply ${PATCH}")
+-            endif()
+-        else()
+-            message("    Already applied ${PATCH}")
+-        endif()
+-    endforeach()
+-else()
+-    message(FATAL_ERROR "Git not found!")
+-endif()
+-
+ message("Building targets: ${LLVM_TARGETS_TO_BUILD}")
+ 
+ set(LLVM_ENABLE_BINDINGS OFF CACHE BOOL "ponyc specific override of LLVM cache entry")
+-- 
+2.39.2
+
diff --git a/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix b/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix
new file mode 100644
index 000000000000..81bf2b0aebc5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, ponyc
+, nix-update-script
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "corral";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "ponylang";
+    repo = "corral";
+    rev = finalAttrs.version;
+    hash = "sha256-+pHg5BFHlScC1suad0/3RqKAnxoEVZNUNj1EDLvbsfA=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ ponyc ];
+
+  installFlags = [ "prefix=${placeholder "out"}" "install" ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "Corral is a dependency management tool for ponylang (ponyc)";
+    homepage = "https://www.ponylang.io";
+    changelog = "https://github.com/ponylang/corral/blob/${finalAttrs.version}/CHANGELOG.md";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ redvers ];
+    inherit (ponyc.meta) platforms;
+  };
+})
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..d291b1f3cfee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/psc-package/default.nix
@@ -0,0 +1,59 @@
+# 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
+
+    installShellCompletion --cmd psc-package \
+      --bash <($PSC_PACKAGE --bash-completion-script $PSC_PACKAGE) \
+      --fish <($PSC_PACKAGE --fish-completion-script $PSC_PACKAGE) \
+      --zsh <($PSC_PACKAGE --zsh-completion-script $PSC_PACKAGE)
+  '';
+
+  meta = with lib; {
+    description = "A package manager for PureScript based on package sets";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    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..35fdf3d369b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix
@@ -0,0 +1,74 @@
+{ stdenv, pkgs, fetchurl, zlib, gmp, 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 :
+    lib.optionalString (!stdenv.isDarwin) ''
+          chmod u+w $PURS
+          patchelf --interpreter ${dynamic-linker} --set-rpath ${libPath} $PURS
+          chmod u-w $PURS
+        '';
+
+in stdenv.mkDerivation rec {
+  pname = "purescript";
+  version = "0.15.14";
+
+  # These hashes can be updated automatically by running the ./update.sh script.
+  src =
+    if stdenv.isDarwin
+    then
+      (if stdenv.isAarch64
+      then
+      fetchurl {
+        url = "https://github.com/${pname}/${pname}/releases/download/v${version}/macos-arm64.tar.gz";
+        sha256 = "1sc8ygiha980wbg60bkinvvpdn4bdasq9zffanbxck8msdwxc4zx";
+      }
+      else
+      fetchurl {
+        url = "https://github.com/${pname}/${pname}/releases/download/v${version}/macos.tar.gz";
+        sha256 = "01973wiybblfbgjbqrhr8435y6jk6c94i667nr3zxkxy4np3lv3q";
+      })
+    else
+    fetchurl {
+      url = "https://github.com/${pname}/${pname}/releases/download/v${version}/linux64.tar.gz";
+      sha256 = "0i717gb4d21m0pi1k90g5diq3yja1pwlw6ripv0d70jdnd9gsdl9";
+    };
+
+
+  buildInputs = [ zlib gmp ];
+  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/share/bash-completion/completions
+    $PURS --bash-completion-script $PURS > $out/share/bash-completion/completions/purs-completion.bash
+  '';
+
+  passthru = {
+    updateScript = ./update.sh;
+    tests = {
+      minimal-module = pkgs.callPackage ./test-minimal-module {};
+    };
+  };
+
+  meta = with lib; {
+    description = "A strongly-typed functional programming language that compiles to JavaScript";
+    homepage = "https://www.purescript.org/";
+    license = licenses.bsd3;
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ justinwoo mbbx6spp cdepillabout ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    mainProgram = "purs";
+    changelog = "https://github.com/purescript/purescript/releases/tag/v${version}";
+  };
+}
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..3f53065d2571
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.js
@@ -0,0 +1,8 @@
+"use strict"
+
+export const 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..9bc694cd73f3
--- /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 'import {main} from "./output/Main/index.js"; main()' > node.mjs
+
+  ${nodejs}/bin/node node.mjs | grep "hello world" || (echo "did not output hello world"; exit 1)
+
+  touch $out
+''
diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/update.sh b/nixpkgs/pkgs/development/compilers/purescript/purescript/update.sh
new file mode 100755
index 000000000000..259fb8aa5610
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/update.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl gnused jq -I nixpkgs=.
+#
+# This script will update the purescript derivation to the latest version.
+
+set -eo pipefail
+
+# This is the directory of this update.sh script.
+script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+purescript_derivation_file="${script_dir}/default.nix"
+
+# This is the current revision of PureScript in Nixpkgs.
+old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$purescript_derivation_file")"
+
+# This is the latest release version of PureScript on GitHub.
+new_version=$(curl --silent "https://api.github.com/repos/purescript/purescript/releases/latest" | jq '.tag_name' --raw-output | sed -e 's/v//')
+
+echo "Updating purescript from old version v${old_version} to new version v${new_version}."
+echo
+
+echo "Fetching both old and new release tarballs for Darwin and Linux in order to confirm hashes."
+echo
+old_linux_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${old_version}/linux64.tar.gz")"
+echo "v${old_version} linux tarball hash (current version): $old_linux_version_hash"
+new_linux_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/linux64.tar.gz")"
+echo "v${new_version} linux tarball hash: $new_linux_version_hash"
+old_darwin_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${old_version}/macos.tar.gz")"
+echo "v${old_version} darwin tarball hash (current version): $old_darwin_version_hash"
+new_darwin_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/macos.tar.gz")"
+echo "v${new_version} darwin tarball hash: $new_darwin_version_hash"
+old_darwin_arm_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${old_version}/macos-arm64.tar.gz")"
+echo "v${old_version} darwin arm tarball hash (current version): $old_darwin_arm_version_hash"
+new_darwin_arm_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/macos-arm64.tar.gz")"
+echo "v${new_version} darwin arm tarball hash: $new_darwin_arm_version_hash"
+echo
+
+echo "Replacing version and hashes in ${purescript_derivation_file}."
+sed -i -e "s/${old_linux_version_hash}/${new_linux_version_hash}/" "$purescript_derivation_file"
+sed -i -e "s/${old_darwin_version_hash}/${new_darwin_version_hash}/" "$purescript_derivation_file"
+sed -i -e "s/${old_darwin_arm_version_hash}/${new_darwin_arm_version_hash}/" "$purescript_derivation_file"
+sed -i -e "s/${old_version}/${new_version}/" "$purescript_derivation_file"
+echo
+
+echo "Finished.  Make sure you run the following commands to confirm PureScript builds correctly:"
+echo ' - `nix build -L -f ./. purescript`'
+echo ' - `nix build -L -f ./. purescript.passthru.tests.minimal-module`'
+echo ' - `sudo nix build -L -f ./. spago.passthru.tests --option sandbox relaxed`'
diff --git a/nixpkgs/pkgs/development/compilers/qbe/default.nix b/nixpkgs/pkgs/development/compilers/qbe/default.nix
new file mode 100644
index 000000000000..ee075ec04056
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/qbe/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv
+, fetchzip
+, callPackage
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qbe";
+  version = "1.1";
+
+  src = fetchzip {
+    url = "https://c9x.me/compile/release/qbe-${version}.tar.xz";
+    sha256 = "sha256-yFZ3cpp7eLjf7ythKFTY1YEJYyfeg2en4/D8+9oM1B4=";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  doCheck = true;
+
+  passthru = {
+    tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix {};
+  };
+
+  meta = with 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/qbe/test-can-run-hello-world.nix b/nixpkgs/pkgs/development/compilers/qbe/test-can-run-hello-world.nix
new file mode 100644
index 000000000000..5192bb881f34
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/qbe/test-can-run-hello-world.nix
@@ -0,0 +1,32 @@
+{ stdenv
+, writeText
+, qbe
+}:
+
+# The hello world program available at https://c9x.me/compile/
+let helloWorld = writeText "hello-world.ssa" ''
+  function w $add(w %a, w %b) {        # Define a function add
+  @start
+    %c =w add %a, %b                   # Adds the 2 arguments
+    ret %c                             # Return the result
+  }
+  export function w $main() {          # Main function
+  @start
+    %r =w call $add(w 1, w 1)          # Call add(1, 1)
+    call $printf(l $fmt, w %r, ...)    # Show the result
+    ret 0
+  }
+  data $fmt = { b "One and one make %d!\n", b 0 }
+'';
+
+in stdenv.mkDerivation {
+  name = "qbe-test-can-run-hello-world";
+  meta.timeout = 10;
+  buildCommand = ''
+    ${qbe}/bin/qbe -o asm.s ${helloWorld}
+    cc -o out asm.s
+    ./out | grep 'One and one make 2!'
+    touch $out
+  '';
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/rasm/default.nix b/nixpkgs/pkgs/development/compilers/rasm/default.nix
new file mode 100644
index 000000000000..0f617d0f6618
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rasm/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "rasm";
+  version = "0.117";
+
+  src = fetchurl {
+    url = "http://www.roudoudou.com/export/cpc/rasm/${pname}_v0117_src.zip";
+    sha256 = "1hwily4cfays59qm7qd1ax48i7cpbxhs5l9mfpyn7m2lxsfqrl3z";
+  };
+
+  sourceRoot = ".";
+
+  nativeBuildInputs = [ unzip ];
+
+  buildPhase = ''
+      # according to official documentation
+      ${stdenv.cc.targetPrefix}cc rasm_v*.c -O2 -lm -o rasm
+  '';
+
+  installPhase = ''
+    install -Dt $out/bin rasm
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.roudoudou.com/rasm/";
+    description = "Z80 assembler";
+    # use -n option to display all licenses
+    license = licenses.mit; # expat version
+    maintainers = [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/reason/default.nix b/nixpkgs/pkgs/development/compilers/reason/default.nix
new file mode 100644
index 000000000000..12e58b6739ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/default.nix
@@ -0,0 +1,65 @@
+{ lib, callPackage, stdenv, makeWrapper, fetchurl, ocaml, findlib, dune_3
+, ncurses
+, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppxlib, utop, cppo, ppx_derivers
+, dune-build-info
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ocaml${ocaml.version}-reason";
+  version = "3.10.0";
+
+  src = fetchurl {
+    url = "https://github.com/reasonml/reason/releases/download/${version}/reason-${version}.tbz";
+    hash = "sha256-F+rUwoZK9yc/VtCtYsRWS+Lq3nbT2oex04HtW0T0Zss=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    makeWrapper
+    menhir
+    ocaml
+    menhir
+    cppo
+    dune_3
+    findlib
+  ];
+
+  buildInputs = [
+    dune-build-info
+    fix
+    menhirSdk
+    ppxlib
+    utop
+  ] ++ lib.optional (lib.versionOlder ocaml.version "4.07") ncurses;
+
+  propagatedBuildInputs = [
+    menhirLib
+    merlin-extend
+    ppx_derivers
+  ];
+
+  buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
+
+  installPhase = ''
+    runHook preInstall
+    dune install --prefix=$out --libdir=$OCAMLFIND_DESTDIR
+    wrapProgram $out/bin/rtop \
+      --prefix PATH : "${utop}/bin" \
+      --prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH" \
+      --prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
+    runHook postInstall
+  '';
+
+  passthru.tests = {
+    hello = callPackage ./tests/hello { };
+  };
+
+  meta = with lib; {
+    homepage = "https://reasonml.github.io/";
+    downloadPage = "https://github.com/reasonml/reason";
+    description = "Facebook's friendly syntax to OCaml";
+    license = licenses.mit;
+    inherit (ocaml.meta) platforms;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/reason/tests/hello/default.nix b/nixpkgs/pkgs/development/compilers/reason/tests/hello/default.nix
new file mode 100644
index 000000000000..3def42ec08f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/tests/hello/default.nix
@@ -0,0 +1,26 @@
+{ buildDunePackage, ppxlib, reason }:
+
+buildDunePackage rec {
+  pname = "helloreason";
+  version = "0.0.1";
+
+  src = ./.;
+
+  nativeBuildInputs = [
+    reason
+  ];
+
+  buildInputs = [
+    ppxlib
+    reason
+  ];
+
+  doCheck = true;
+
+  doInstallCheck = true;
+  postInstallCheck = ''
+    $out/bin/${pname} | grep -q "Hello From Reason" > /dev/null
+  '';
+
+  meta.timeout = 60;
+}
diff --git a/nixpkgs/pkgs/development/compilers/reason/tests/hello/dune b/nixpkgs/pkgs/development/compilers/reason/tests/hello/dune
new file mode 100644
index 000000000000..578a56dc6de4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/tests/hello/dune
@@ -0,0 +1,4 @@
+(executable
+ (name helloreason)
+ (public_name helloreason)
+ (libraries reason))
diff --git a/nixpkgs/pkgs/development/compilers/reason/tests/hello/dune-project b/nixpkgs/pkgs/development/compilers/reason/tests/hello/dune-project
new file mode 100644
index 000000000000..2f602c3083f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/tests/hello/dune-project
@@ -0,0 +1 @@
+(lang dune 3.10)
diff --git a/nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.opam b/nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.opam
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.opam
diff --git a/nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.re b/nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.re
new file mode 100644
index 000000000000..795bd314dcfb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/tests/hello/helloreason.re
@@ -0,0 +1,6 @@
+let sayHello = () => {
+  let fromWhom = "From Reason";
+  print_endline("Hello " ++ fromWhom);
+};
+
+sayHello();
diff --git a/nixpkgs/pkgs/development/compilers/rgbds/default.nix b/nixpkgs/pkgs/development/compilers/rgbds/default.nix
new file mode 100644
index 000000000000..7cec0eb0ddbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rgbds/default.nix
@@ -0,0 +1,34 @@
+{lib, stdenv, fetchFromGitHub, bison, flex, pkg-config, libpng}:
+
+stdenv.mkDerivation rec {
+  pname = "rgbds";
+  version = "0.6.1";
+  src = fetchFromGitHub {
+    owner = "gbdev";
+    repo = "rgbds";
+    rev = "v${version}";
+    sha256 = "sha256-3mx4yymrOQnP5aJCzPWl5G96WBxt1ixU6tdzhhOsF04=";
+  };
+  nativeBuildInputs = [ bison flex pkg-config ];
+  buildInputs = [ libpng ];
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto";
+  installFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    homepage = "https://rgbds.gbdev.io/";
+    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 NieDzejkob ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rml/default.nix b/nixpkgs/pkgs/development/compilers/rml/default.nix
new file mode 100644
index 000000000000..b2870cfb93d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rml/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, ocamlPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rml";
+  version = "1.09.07";
+
+  src = fetchFromGitHub {
+    owner = "reactiveml";
+    repo = pname;
+    rev = "${pname}-${version}-2021-07-26";
+    hash = "sha256-UFqXQBeIQMSV4O439j9s06p1hh7xA98Tu79FsjK9PIY=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = with ocamlPackages; [
+    ocaml
+  ];
+
+  buildInputs = with ocamlPackages; [
+    num
+  ];
+
+  prefixKey = "-prefix ";
+
+  meta = with lib; {
+    description = "ReactiveML: a programming language for implementing interactive systems";
+    homepage = "https://rml.lri.fr";
+    license = with licenses; [ qpl lgpl21Plus ];
+    maintainers = with maintainers; [ wegank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/roslyn/default.nix b/nixpkgs/pkgs/development/compilers/roslyn/default.nix
new file mode 100644
index 000000000000..6ab2799f46c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/roslyn/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, fetchFromGitHub
+, mono
+, buildDotnetModule
+, dotnetCorePackages
+, unzip
+}:
+
+buildDotnetModule rec {
+  pname = "roslyn";
+  version = "4.2.0";
+
+  src = fetchFromGitHub {
+    owner = "dotnet";
+    repo = "roslyn";
+    rev = "v${version}";
+    hash = "sha256-4iXabFp0LqJ8TXOrqeD+oTAocg6ZTIfijfX3s3fMJuI=";
+  };
+
+  dotnet-sdk = dotnetCorePackages.sdk_6_0;
+
+  projectFile = [ "src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj" ];
+
+  nugetDeps = ./deps.nix;
+
+  dontDotnetFixup = true;
+
+  nativeBuildInputs = [ unzip ];
+
+  postPatch = ''
+    sed -i 's/latestPatch/latestFeature/' global.json
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    dotnet msbuild -v:m -t:pack \
+      -p:Configuration=Release \
+      -p:RepositoryUrl="${meta.homepage}" \
+      -p:RepositoryCommit="v${version}" \
+      src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    pkg="$out/lib/dotnet/microsoft.net.compilers.toolset/${version}"
+    mkdir -p "$out/bin" "$pkg"
+
+    unzip -q artifacts/packages/Release/Shipping/Microsoft.Net.Compilers.Toolset.${version}-dev.nupkg \
+      -d "$pkg"
+    # nupkg has 0 permissions for a bunch of things
+    chmod -R +rw "$pkg"
+
+    makeWrapper ${mono}/bin/mono $out/bin/csc \
+      --add-flags "$pkg/tasks/net472/csc.exe"
+    makeWrapper ${mono}/bin/mono $out/bin/vbc \
+      --add-flags "$pkg/tasks/net472/vbc.exe"
+  '';
+
+  meta = with lib; {
+    description = ".NET C# and Visual Basic compiler";
+    homepage = "https://github.com/dotnet/roslyn";
+    mainProgram = "csc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ corngood ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/roslyn/deps.nix b/nixpkgs/pkgs/development/compilers/roslyn/deps.nix
new file mode 100644
index 000000000000..9362f8aab133
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/roslyn/deps.nix
@@ -0,0 +1,175 @@
+# This file was automatically generated by passthru.fetch-deps.
+# Please dont edit it manually, your changes might get overwritten!
+
+{ fetchNuGet }: [
+  (fetchNuGet { pname = "dotnet-format"; version = "6.2.315104"; sha256 = "0b802r9xbxibds3dj57ywzl377kyi2h4cmy1iajp82kqbd4707cl"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/dotnet-format/6.2.315104/dotnet-format.6.2.315104.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "3.1.10"; sha256 = "0xn4zh7shvijqlr03fqsmps6gz856isd9bg9rk4z2c4599ggal77"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.aspnetcore.app.ref/3.1.10/microsoft.aspnetcore.app.ref.3.1.10.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "3.1.32"; sha256 = "00ha2sl4gvqv68mbrsizd6ngqy0vv6vamngzjxr338k1w7a276dx"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.linux-arm64/3.1.32/microsoft.aspnetcore.app.runtime.linux-arm64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "3.1.32"; sha256 = "0ywz63q8vrdp25ix2j9b7h2jp5grc68hqfl64c6lqk26q9xwhp9r"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.linux-x64/3.1.32/microsoft.aspnetcore.app.runtime.linux-x64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "3.1.32"; sha256 = "1crk54a1wvj76s9gnh46pi7wk8ryympm9xh2jq4s4rpp329fqgic"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.osx-x64/3.1.32/microsoft.aspnetcore.app.runtime.osx-x64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Build.Framework"; version = "16.5.0"; sha256 = "1xgr02r7s9i6s70n237hss4yi9zicssia3zd2ny6s8vyxb7jpdyb"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.build.framework/16.5.0/microsoft.build.framework.16.5.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Build.Tasks.Core"; version = "16.5.0"; sha256 = "08mpdcnjbjpsggfzb3plpmjg1jhx2j4zslm8m2p3icnrpw8swxz4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.build.tasks.core/16.5.0/microsoft.build.tasks.core.16.5.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Build.Tasks.Git"; version = "1.2.0-beta-22167-02"; sha256 = "1zb5vhlc9kzqbw22hg84hakhqms0aa7ghy585229hsf278rfh2sy"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.build.tasks.git/1.2.0-beta-22167-02/microsoft.build.tasks.git.1.2.0-beta-22167-02.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Build.Utilities.Core"; version = "16.5.0"; sha256 = "127l700qqky1nfrljncrpk7y4f0qi0811kpk2j87659nnv81bxs7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.build.utilities.core/16.5.0/microsoft.build.utilities.core.16.5.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.Analyzers"; version = "3.3.3"; sha256 = "09m4cpry8ivm9ga1abrxmvw16sslxhy2k5sl14zckhqb1j164im6"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.codeanalysis.analyzers/3.3.3/microsoft.codeanalysis.analyzers.3.3.3.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.BannedApiAnalyzers"; version = "3.3.4-beta1.22160.2"; sha256 = "1g95w9jbwg74f04dif3wbdbcigrx5rwv1ng4g102970l1lbx898b"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49e5305d-d845-4a14-9d69-6f5dbfb9570c/nuget/v3/flat2/microsoft.codeanalysis.bannedapianalyzers/3.3.4-beta1.22160.2/microsoft.codeanalysis.bannedapianalyzers.3.3.4-beta1.22160.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.Common"; version = "3.8.0"; sha256 = "12n7rvr39bzkf2maw7zplw8rwpxpxss4ich3bb2pw770rx4nyvyw"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.codeanalysis.common/3.8.0/microsoft.codeanalysis.common.3.8.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.NetAnalyzers"; version = "6.0.0-rc1.21366.2"; sha256 = "18svr40y7c0gv68hv9g9fzd9f8hm7bqwygrwvax3i8cajbfwmzp4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/6.0.0-rc1.21366.2/microsoft.codeanalysis.netanalyzers.6.0.0-rc1.21366.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers"; version = "3.3.4-beta1.22160.2"; sha256 = "01jaajr4qmc70dwixzrxyh638wkf5s33hm0km4lwrw4n5j1xivp1"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/e31c6eea-0277-49f3-8194-142be67a9f72/nuget/v3/flat2/microsoft.codeanalysis.performancesensitiveanalyzers/3.3.4-beta1.22160.2/microsoft.codeanalysis.performancesensitiveanalyzers.3.3.4-beta1.22160.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.PublicApiAnalyzers"; version = "3.3.4-beta1.22160.2"; sha256 = "0ih091ls51x5k9q998g14pfy4r3g1ygvzihj1gkrl79wydn7b0n3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49e5305d-d845-4a14-9d69-6f5dbfb9570c/nuget/v3/flat2/microsoft.codeanalysis.publicapianalyzers/3.3.4-beta1.22160.2/microsoft.codeanalysis.publicapianalyzers.3.3.4-beta1.22160.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.7.0"; sha256 = "0gd67zlw554j098kabg887b5a6pq9kzavpa3jjy5w53ccjzjfy8j"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.csharp/4.7.0/microsoft.csharp.4.7.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.DiaSymReader.Native"; version = "17.0.0-beta1.21524.1"; sha256 = "0gash3xgzvcb78w2xqv003l0cld199zpfilnjbagwbr5ikdh6f3s"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.diasymreader.native/17.0.0-beta1.21524.1/microsoft.diasymreader.native.17.0.0-beta1.21524.1.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.DotNet.Arcade.Sdk"; version = "7.0.0-beta.22171.2"; sha256 = "15y26skavivkwhnpfa984if3cnpnllbbwbdsjiyfdcalp32fhmjq"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.arcade.sdk/7.0.0-beta.22171.2/microsoft.dotnet.arcade.sdk.7.0.0-beta.22171.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.DotNet.XliffTasks"; version = "1.0.0-beta.22169.1"; sha256 = "12fcin3d4m0lawla9fflz9f2qispzgvzf1mwkpscmlk5lnvb0riw"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.xlifftasks/1.0.0-beta.22169.1/microsoft.dotnet.xlifftasks.1.0.0-beta.22169.1.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Net.Compilers.Toolset"; version = "4.2.0-1.final"; sha256 = "02zas22hj29gv2w7h74q786i0cvxffgwqai21ri0zj41nb2hwhyq"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.net.compilers.toolset/4.2.0-1.final/microsoft.net.compilers.toolset.4.2.0-1.final.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "3.1.32"; sha256 = "1zygp70xrk5zggs3q4a6yc6jfdwzcsjjsapqpwn6qyx35m69b72p"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.host.linux-arm64/3.1.32/microsoft.netcore.app.host.linux-arm64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "3.1.32"; sha256 = "08sar3s7j6z1q5prjmz2jrbsq5ms81mrsi1c1zbfrkplkfjpld3a"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.host.linux-x64/3.1.32/microsoft.netcore.app.host.linux-x64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "3.1.32"; sha256 = "186gjn8sbhp4z6pq8fw4g8nqk9dwyaplwvdz2y3fbbvg36lggsh0"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.host.osx-x64/3.1.32/microsoft.netcore.app.host.osx-x64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "3.1.0"; sha256 = "08svsiilx9spvjamcnjswv0dlpdrgryhr3asdz7cvnl914gjzq4y"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.ref/3.1.0/microsoft.netcore.app.ref.3.1.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "3.1.32"; sha256 = "13pcn74z1swz73s72zjl07f118j35wacnzgk7kbjqn83nwgqdgvq"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.runtime.linux-arm64/3.1.32/microsoft.netcore.app.runtime.linux-arm64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "3.1.32"; sha256 = "0mmc57dl8plrspdxwb7209wz29vhiwqds4nfbdfws7zg35yy70c7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.runtime.linux-x64/3.1.32/microsoft.netcore.app.runtime.linux-x64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "3.1.32"; sha256 = "06bk39zcv27cwshjsxfg5d6wzkkzdhfk08sipdc7mr1s8pk7ihi1"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.app.runtime.osx-x64/3.1.32/microsoft.netcore.app.runtime.osx-x64.3.1.32.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.platforms/1.0.1/microsoft.netcore.platforms.1.0.1.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.platforms/1.1.0/microsoft.netcore.platforms.1.1.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.1"; sha256 = "164wycgng4mi9zqi2pnsf1pq6gccbqvw6ib916mqizgjmd8f44pj"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.platforms/1.1.1/microsoft.netcore.platforms.1.1.1.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "5.0.0"; sha256 = "0mwpwdflidzgzfx2dlpkvvnkgkr2ayaf0s80737h4wa35gaj11rc"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.platforms/5.0.0/microsoft.netcore.platforms.5.0.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.targets/1.0.1/microsoft.netcore.targets.1.0.1.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netcore.targets/1.1.0/microsoft.netcore.targets.1.1.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies"; version = "1.0.2"; sha256 = "0i42rn8xmvhn08799manpym06kpw89qy9080myyy2ngy565pqh0a"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netframework.referenceassemblies/1.0.2/microsoft.netframework.referenceassemblies.1.0.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net472"; version = "1.0.2"; sha256 = "1dny43jksy6dm9zrkdm8j80gb25w6wdvjlxnphj7ngf0fbg3dd2c"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.netframework.referenceassemblies.net472/1.0.2/microsoft.netframework.referenceassemblies.net472.1.0.2.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.SourceLink.AzureRepos.Git"; version = "1.2.0-beta-22167-02"; sha256 = "1mqzajvp0xa8smhilrakp9nr18r2lbqgn0jb79443srvjf93f6sl"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.sourcelink.azurerepos.git/1.2.0-beta-22167-02/microsoft.sourcelink.azurerepos.git.1.2.0-beta-22167-02.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.SourceLink.Common"; version = "1.2.0-beta-22167-02"; sha256 = "1s4x6syw1vfs0wrlyjvf5n7xiqgqnyv9cmmnaxzmx41f7zydirj6"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.sourcelink.common/1.2.0-beta-22167-02/microsoft.sourcelink.common.1.2.0-beta-22167-02.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.SourceLink.GitHub"; version = "1.2.0-beta-22167-02"; sha256 = "0zwc5sxvcz26rcyirrbd55cnz1v7s0njlj91jk3rdjxw6aw2bgnr"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.sourcelink.github/1.2.0-beta-22167-02/microsoft.sourcelink.github.1.2.0-beta-22167-02.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.VisualStudio.Setup.Configuration.Interop"; version = "1.16.30"; sha256 = "14022lx03vdcqlvbbdmbsxg5pqfx1rfq2jywxlyaz9v68cvsb0g4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.visualstudio.setup.configuration.interop/1.16.30/microsoft.visualstudio.setup.configuration.interop.1.16.30.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.VisualStudio.Threading.Analyzers"; version = "17.2.20-alpha"; sha256 = "199690hc75yb01npwjwb7mdch0syrczcxyx6mphm1hn2cm108qax"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.visualstudio.threading.analyzers/17.2.20-alpha/microsoft.visualstudio.threading.analyzers.17.2.20-alpha.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.win32.primitives/4.3.0/microsoft.win32.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "4.3.0"; sha256 = "1gxyzxam8163vk1kb6xzxjj4iwspjsz9zhgn1w9rjzciphaz0ig7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.win32.registry/4.3.0/microsoft.win32.registry.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/netstandard.library/2.0.3/netstandard.library.2.0.3.nupkg"; })
+  (fetchNuGet { pname = "PowerShell"; version = "7.0.0"; sha256 = "13jhnbh12rcmdrkmlxq45ard03lmfq7bg14xg7k108jlpnpsr1la"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/powershell/7.0.0/powershell.7.0.0.nupkg"; })
+  (fetchNuGet { pname = "RichCodeNav.EnvVarDump"; version = "0.1.1643-alpha"; sha256 = "1pp1608xizvv0h9q01bqy7isd3yzb3lxb2yp27j4k25xsvw460vg"; url = "https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/richcodenav.envvardump/0.1.1643-alpha/richcodenav.envvardump.0.1.1643-alpha.nupkg"; })
+  (fetchNuGet { pname = "Roslyn.Diagnostics.Analyzers"; version = "3.3.4-beta1.22160.2"; sha256 = "0rr7q46vc5lbywm3mf4ld1kjkg9w7fbmkkyka0bi8idrfib7kn0i"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49e5305d-d845-4a14-9d69-6f5dbfb9570c/nuget/v3/flat2/roslyn.diagnostics.analyzers/3.3.4-beta1.22160.2/roslyn.diagnostics.analyzers.3.3.4-beta1.22160.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Collections"; version = "4.3.0"; sha256 = "0bv5qgm6vr47ynxqbnkc7i797fdi8gbjjxii173syrx14nmrkwg0"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.collections/4.3.0/runtime.any.system.collections.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "00j6nv2xgmd3bi347k00m7wr542wjlig53rmj28pmw7ddcn97jbn"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.diagnostics.tracing/4.3.0/runtime.any.system.diagnostics.tracing.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Globalization"; version = "4.3.0"; sha256 = "1daqf33hssad94lamzg01y49xwndy2q97i2lrb7mgn28656qia1x"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.globalization/4.3.0/runtime.any.system.globalization.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1ghhhk5psqxcg6w88sxkqrc35bxcz27zbqm2y5p5298pv3v7g201"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.globalization.calendars/4.3.0/runtime.any.system.globalization.calendars.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.IO"; version = "4.3.0"; sha256 = "0l8xz8zn46w4d10bcn3l4yyn4vhb3lrj2zw8llvz7jk14k4zps5x"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.io/4.3.0/runtime.any.system.io.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection"; version = "4.3.0"; sha256 = "02c9h3y35pylc0zfq3wcsvc5nqci95nrkq0mszifc0sjx7xrzkly"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.reflection/4.3.0/runtime.any.system.reflection.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection.Primitives"; version = "4.3.0"; sha256 = "0x1mm8c6iy8rlxm8w9vqw7gb7s1ljadrn049fmf70cyh42vdfhrf"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.reflection.primitives/4.3.0/runtime.any.system.reflection.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "03kickal0iiby82wa5flar18kyv82s9s6d4xhk5h4bi5kfcyfjzl"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.resources.resourcemanager/4.3.0/runtime.any.system.resources.resourcemanager.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.3.0"; sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.runtime/4.3.0/runtime.any.system.runtime.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime.Handles"; version = "4.3.0"; sha256 = "0bh5bi25nk9w9xi8z23ws45q5yia6k7dg3i4axhfqlnj145l011x"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.runtime.handles/4.3.0/runtime.any.system.runtime.handles.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "0c3g3g3jmhlhw4klrc86ka9fjbl7i59ds1fadsb2l8nqf8z3kb19"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.runtime.interopservices/4.3.0/runtime.any.system.runtime.interopservices.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Text.Encoding"; version = "4.3.0"; sha256 = "0aqqi1v4wx51h51mk956y783wzags13wa7mgqyclacmsmpv02ps3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.text.encoding/4.3.0/runtime.any.system.text.encoding.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "0lqhgqi0i8194ryqq6v2gqx0fb86db2gqknbm0aq31wb378j7ip8"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.text.encoding.extensions/4.3.0/runtime.any.system.text.encoding.extensions.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.any.System.Threading.Tasks"; version = "4.3.0"; sha256 = "03mnvkhskbzxddz4hm113zsch1jyzh2cs450dk3rgfjp8crlw1va"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.any.system.threading.tasks/4.3.0/runtime.any.system.threading.tasks.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0rwpqngkqiapqc5c2cpkj7idhngrgss5qpnqg0yh40mbyflcxf8i"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1n06gxwlinhs0w7s8a94r1q3lwqzvynxwd3mp10ws9bg6gck8n4r"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0404wqrc7f2yc0wxv71y3nnybvqx8v4j9d47hlscxy759a525mc3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.native.system/4.3.0/runtime.native.system.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.native.system.net.http/4.3.0/runtime.native.system.net.http.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.native.system.security.cryptography.apple/4.3.0/runtime.native.system.security.cryptography.apple.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.native.system.security.cryptography.openssl/4.3.0/runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0zy5r25jppz48i2bkg8b9lfig24xixg6nm3xyr1379zdnqnpm8f6"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.native.system.security.cryptography.openssl/4.3.2/runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "096ch4n4s8k82xga80lfmpimpzahd2ip1mgwdqgar0ywbbl6x438"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1dm8fifl7rf1gy7lnwln78ch4rw54g0pl5g1c189vawavll7p6rj"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple/4.3.0/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1m9z1k9kzva9n9kwinqxl97x2vgl79qhqjlv17k9s2ymcyv2bwr6"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1cpx56mcfxz7cpn57wvj18sjisvzq8b5vd9rw16ihd2i6mcp3wa1"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "15gsm1a8jdmgmf8j5v1slfz8ks124nfdhk2vxs2rw3asrxalg8hi"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0q0n5q1r1wnqmr5i5idsrd9ywl33k0js4pngkwq9p368mbxp8x1w"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.2/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg"; })
+  (fetchNuGet { pname = "runtime.unix.Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0y61k9zbxhdi0glg154v30kkq7f8646nif8lnnxbvkjpakggd5id"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.unix.microsoft.win32.primitives/4.3.0/runtime.unix.microsoft.win32.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.unix.System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "1lps7fbnw34bnh3lm31gs5c0g0dh7548wfmb8zz62v0zqz71msj5"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.unix.system.diagnostics.debug/4.3.0/runtime.unix.system.diagnostics.debug.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.unix.System.IO.FileSystem"; version = "4.3.0"; sha256 = "14nbkhvs7sji5r1saj2x8daz82rnf9kx28d3v2qss34qbr32dzix"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.unix.system.io.filesystem/4.3.0/runtime.unix.system.io.filesystem.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.unix.System.Net.Primitives"; version = "4.3.0"; sha256 = "0bdnglg59pzx9394sy4ic66kmxhqp8q8bvmykdxcbs5mm0ipwwm4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.unix.system.net.primitives/4.3.0/runtime.unix.system.net.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.3.0"; sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.unix.system.private.uri/4.3.0/runtime.unix.system.private.uri.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "runtime.unix.System.Runtime.Extensions"; version = "4.3.0"; sha256 = "0pnxxmm8whx38dp6yvwgmh22smknxmqs5n513fc7m4wxvs1bvi4p"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/runtime.unix.system.runtime.extensions/4.3.0/runtime.unix.system.runtime.extensions.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.buffers/4.3.0/system.buffers.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Buffers"; version = "4.5.1"; sha256 = "04kb1mdrlcixj9zh1xdi5as0k0qi8byr5mi3p3jcxx72qz93s2y3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.buffers/4.5.1/system.buffers.4.5.1.nupkg"; })
+  (fetchNuGet { pname = "System.CodeDom"; version = "4.4.0"; sha256 = "1zgbafm5p380r50ap5iddp11kzhr9khrf2pnai6k593wjar74p1g"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.codedom/4.4.0/system.codedom.4.4.0.nupkg"; })
+  (fetchNuGet { pname = "System.Collections"; version = "4.0.11"; sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections/4.0.11/system.collections.4.0.11.nupkg"; })
+  (fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections/4.3.0/system.collections.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.0.12"; sha256 = "07y08kvrzpak873pmyxs129g1ch8l27zmg51pcyj2jvq03n0r0fc"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections.concurrent/4.0.12/system.collections.concurrent.4.0.12.nupkg"; })
+  (fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections.concurrent/4.3.0/system.collections.concurrent.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Collections.Immutable"; version = "1.5.0"; sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections.immutable/1.5.0/system.collections.immutable.1.5.0.nupkg"; })
+  (fetchNuGet { pname = "System.Collections.Immutable"; version = "5.0.0"; sha256 = "1kvcllagxz2q92g81zkz81djkn2lid25ayjfgjalncyc68i15p0r"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections.immutable/5.0.0/system.collections.immutable.5.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.0.11"; sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.diagnostics.debug/4.0.11/system.diagnostics.debug.4.0.11.nupkg"; })
+  (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.diagnostics.debug/4.3.0/system.diagnostics.debug.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.diagnostics.diagnosticsource/4.3.0/system.diagnostics.diagnosticsource.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.1.0"; sha256 = "1d2r76v1x610x61ahfpigda89gd13qydz6vbwzhpqlyvq8jj6394"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.diagnostics.tracing/4.1.0/system.diagnostics.tracing.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.diagnostics.tracing/4.3.0/system.diagnostics.tracing.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Globalization"; version = "4.0.11"; sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.globalization/4.0.11/system.globalization.4.0.11.nupkg"; })
+  (fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.globalization/4.3.0/system.globalization.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.globalization.calendars/4.3.0/system.globalization.calendars.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.globalization.extensions/4.3.0/system.globalization.extensions.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.IO"; version = "4.1.0"; sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.io/4.1.0/system.io.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.io/4.3.0/system.io.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.io.filesystem/4.3.0/system.io.filesystem.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.io.filesystem.primitives/4.3.0/system.io.filesystem.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.IO.Pipes.AccessControl"; version = "5.0.0"; sha256 = "0jl5b95cy8biivi1kdn2wi0gy2m1a0gyj8fy88djybrg2705c8fz"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.io.pipes.accesscontrol/5.0.0/system.io.pipes.accesscontrol.5.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Linq"; version = "4.1.0"; sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.linq/4.1.0/system.linq.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.linq/4.3.0/system.linq.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Linq.Parallel"; version = "4.0.1"; sha256 = "0i33x9f4h3yq26yvv6xnq4b0v51rl5z8v1bm7vk972h5lvf4apad"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.linq.parallel/4.0.1/system.linq.parallel.4.0.1.nupkg"; })
+  (fetchNuGet { pname = "System.Memory"; version = "4.5.4"; sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.memory/4.5.4/system.memory.4.5.4.nupkg"; })
+  (fetchNuGet { pname = "System.Net.Http"; version = "4.3.4"; sha256 = "0kdp31b8819v88l719j6my0yas6myv9d1viql3qz5577mv819jhl"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.net.http/4.3.4/system.net.http.4.3.4.nupkg"; })
+  (fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.net.primitives/4.3.0/system.net.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.4.0"; sha256 = "0rdvma399070b0i46c4qq1h2yvjj3k013sqzkilz4bz5cwmx1rba"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.numerics.vectors/4.4.0/system.numerics.vectors.4.4.0.nupkg"; })
+  (fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.5.0"; sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.numerics.vectors/4.5.0/system.numerics.vectors.4.5.0.nupkg"; })
+  (fetchNuGet { pname = "System.Private.Uri"; version = "4.3.0"; sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.private.uri/4.3.0/system.private.uri.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection"; version = "4.1.0"; sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection/4.1.0/system.reflection.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection/4.3.0/system.reflection.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection.Metadata"; version = "1.6.0"; sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection.metadata/1.6.0/system.reflection.metadata.1.6.0.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection.Metadata"; version = "5.0.0"; sha256 = "17qsl5nanlqk9iz0l5wijdn6ka632fs1m1fvx18dfgswm258r3ss"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection.metadata/5.0.0/system.reflection.metadata.5.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.0.1"; sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection.primitives/4.0.1/system.reflection.primitives.4.0.1.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection.primitives/4.3.0/system.reflection.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.1.0"; sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.reflection.typeextensions/4.1.0/system.reflection.typeextensions.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Resources.Extensions"; version = "4.6.0"; sha256 = "0inch9jgchgmsg3xjivbhh9mpin40mhdd8dgf4i1p3g42i0hzc0j"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.resources.extensions/4.6.0/system.resources.extensions.4.6.0.nupkg"; })
+  (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.0.1"; sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.resources.resourcemanager/4.0.1/system.resources.resourcemanager.4.0.1.nupkg"; })
+  (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.resources.resourcemanager/4.3.0/system.resources.resourcemanager.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Resources.Writer"; version = "4.0.0"; sha256 = "07hp218kjdcvpl27djspnixgnacbp9apma61zz3wsca9fx5g3lmv"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.resources.writer/4.0.0/system.resources.writer.4.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime/4.1.0/system.runtime.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime/4.3.0/system.runtime.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.7.1"; sha256 = "119br3pd85lq8zcgh4f60jzmv1g976q1kdgi3hvqdlhfbw6siz2j"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.compilerservices.unsafe/4.7.1/system.runtime.compilerservices.unsafe.4.7.1.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "6.0.0"; sha256 = "0qm741kh4rh57wky16sq4m0v05fxmkjjr87krycf5vp9f0zbahbc"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.1.0"; sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.extensions/4.1.0/system.runtime.extensions.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.extensions/4.3.0/system.runtime.extensions.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.0.1"; sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.handles/4.0.1/system.runtime.handles.4.0.1.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.handles/4.3.0/system.runtime.handles.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.1.0"; sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.interopservices/4.1.0/system.runtime.interopservices.4.1.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.interopservices/4.3.0/system.runtime.interopservices.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Loader"; version = "4.3.0"; sha256 = "07fgipa93g1xxgf7193a6vw677mpzgr0z0cfswbvqqb364cva8dk"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.loader/4.3.0/system.runtime.loader.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.numerics/4.3.0/system.runtime.numerics.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Runtime.Serialization.Primitives"; version = "4.1.1"; sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.runtime.serialization.primitives/4.1.1/system.runtime.serialization.primitives.4.1.1.nupkg"; })
+  (fetchNuGet { pname = "System.Security.AccessControl"; version = "5.0.0"; sha256 = "17n3lrrl6vahkqmhlpn3w20afgz09n7i6rv0r3qypngwi7wqdr5r"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.accesscontrol/5.0.0/system.security.accesscontrol.5.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.algorithms/4.3.0/system.security.cryptography.algorithms.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.cng/4.3.0/system.security.cryptography.cng.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.csp/4.3.0/system.security.cryptography.csp.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.encoding/4.3.0/system.security.cryptography.encoding.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.openssl/4.3.0/system.security.cryptography.openssl.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.primitives/4.3.0/system.security.cryptography.primitives.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.cryptography.x509certificates/4.3.0/system.security.cryptography.x509certificates.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Security.Principal.Windows"; version = "5.0.0"; sha256 = "1mpk7xj76lxgz97a5yg93wi8lj0l8p157a5d50mmjy3gbz1904q8"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.security.principal.windows/5.0.0/system.security.principal.windows.5.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Text.Encoding"; version = "4.0.11"; sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.encoding/4.0.11/system.text.encoding.4.0.11.nupkg"; })
+  (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.encoding/4.3.0/system.text.encoding.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.0.1"; sha256 = "00wpm3b9y0k996rm9whxprngm8l500ajmzgy2ip9pgwk0icp06y3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.encoding.codepages/4.0.1/system.text.encoding.codepages.4.0.1.nupkg"; })
+  (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.5.1"; sha256 = "1z21qyfs6sg76rp68qdx0c9iy57naan89pg7p6i3qpj8kyzn921w"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.encoding.codepages/4.5.1/system.text.encoding.codepages.4.5.1.nupkg"; })
+  (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "6.0.0"; sha256 = "0gm2kiz2ndm9xyzxgi0jhazgwslcs427waxgfa30m7yqll1kcrww"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.encoding.codepages/6.0.0/system.text.encoding.codepages.6.0.0.nupkg"; })
+  (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.text.encoding.extensions/4.3.0/system.text.encoding.extensions.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Threading"; version = "4.0.11"; sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading/4.0.11/system.threading.4.0.11.nupkg"; })
+  (fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading/4.3.0/system.threading.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading.tasks/4.0.11/system.threading.tasks.4.0.11.nupkg"; })
+  (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading.tasks/4.3.0/system.threading.tasks.4.3.0.nupkg"; })
+  (fetchNuGet { pname = "System.Threading.Tasks.Dataflow"; version = "4.9.0"; sha256 = "1g6s9pjg4z8iy98df60y9a01imdqy59zd767vz74rrng78jl2dk5"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading.tasks.dataflow/4.9.0/system.threading.tasks.dataflow.4.9.0.nupkg"; })
+  (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.4"; sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading.tasks.extensions/4.5.4/system.threading.tasks.extensions.4.5.4.nupkg"; })
+  (fetchNuGet { pname = "System.Threading.Thread"; version = "4.0.0"; sha256 = "1gxxm5fl36pjjpnx1k688dcw8m9l7nmf802nxis6swdaw8k54jzc"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.threading.thread/4.0.0/system.threading.thread.4.0.0.nupkg"; })
+]
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_46.nix b/nixpkgs/pkgs/development/compilers/rust/1_46.nix
new file mode 100644
index 000000000000..c999b346ee6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/1_46.nix
@@ -0,0 +1,45 @@
+# 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.
+#    Check the version number in the src/llvm-project git submodule in:
+#    https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
+# 3. Firefox and Thunderbird should still build on x86_64-linux.
+
+{ stdenv, lib
+, buildPackages
+, newScope, callPackage
+, CoreFoundation, Security
+, llvmPackages
+, pkgsBuildTarget, pkgsBuildBuild
+, makeRustPlatform
+} @ args:
+
+import ./default.nix {
+  rustcVersion = "1.46.0";
+  rustcSha256 = "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid";
+
+  # Note: the version MUST be one version prior to the version we're
+  # building
+  bootstrapVersion = "1.45.2";
+
+  # fetch hashes by running `print-hashes.sh 1.45.2`
+  bootstrapHashes = {
+    i686-unknown-linux-gnu = "5b2050dde23152750de89f7e59acaab6bf088d0beb5854c69c9a545fd254b936";
+    x86_64-unknown-linux-gnu = "860feed955726a4d96ffe40758a110053326b9ae11c9e1ee059e9c6222f25643";
+    arm-unknown-linux-gnueabihf = "ddb5f59bbdef84e0b7c83049461e003ed031dd881a4622365c3d475102535c60";
+    armv7-unknown-linux-gnueabihf = "7a556581f87602705f9c89b04cce621cfbba9050b6fbe478166e91d164567531";
+    aarch64-unknown-linux-gnu = "151fad66442d28a4e4786753d1afb559c4a3d359081c64769273a31c2f0f4d30";
+    x86_64-apple-darwin = "6e8067624ede10aa23081d62e0086c6f42f7228cc0d00fb5ff24d4dac65249d6";
+  };
+
+  selectRustPackage = pkgs: pkgs.rust_1_46;
+
+  rustcPatches = [
+  ];
+}
+
+(builtins.removeAttrs args [ "fetchpatch" ])
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_47.nix b/nixpkgs/pkgs/development/compilers/rust/1_47.nix
new file mode 100644
index 000000000000..e5cbae193bf1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/1_47.nix
@@ -0,0 +1,45 @@
+# 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.
+#    Check the version number in the src/llvm-project git submodule in:
+#    https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
+# 3. Firefox and Thunderbird should still build on x86_64-linux.
+
+{ stdenv, lib
+, buildPackages
+, newScope, callPackage
+, CoreFoundation, Security
+, llvmPackages
+, pkgsBuildTarget, pkgsBuildBuild
+, makeRustPlatform
+} @ args:
+
+import ./default.nix {
+  rustcVersion = "1.47.0";
+  rustcSha256 = "sha256-MYXfBkxHR/LIubuMRGjt1Y/0rW0HiAyHmsGxc7do2B0=";
+
+  # Note: the version MUST be one version prior to the version we're
+  # building
+  bootstrapVersion = "1.46.0";
+
+  # fetch hashes by running `print-hashes.sh 1.45.2`
+  bootstrapHashes = {
+    i686-unknown-linux-gnu = "6ebd7e04dc18a36d08b9731cdb42d5caf8460e1eb41b75f3a8596c39f5e71206";
+    x86_64-unknown-linux-gnu = "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa2fbdcf5";
+    arm-unknown-linux-gnueabihf = "bb8af68565321f54608e918597083eb016ed0f9f4f3cc23f7cc5f467b934ce7f";
+    armv7-unknown-linux-gnueabihf = "7c0640879d7f2c38db60352e3c0f09e3fc6fa3bac6ca8f22cbccb1eb5e950121";
+    aarch64-unknown-linux-gnu = "f0c6d630f3dedb3db69d69ed9f833aa6b472363096f5164f1068c7001ca42aeb";
+    x86_64-apple-darwin = "82d61582a3772932432a99789c3b3bd4abe6baca339e355048ca9efb9ea5b4db";
+  };
+
+  selectRustPackage = pkgs: pkgs.rust_1_47;
+
+  rustcPatches = [
+  ];
+}
+
+(builtins.removeAttrs args [ "fetchpatch" ])
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_75.nix b/nixpkgs/pkgs/development/compilers/rust/1_75.nix
new file mode 100644
index 000000000000..2ca1e2d294bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/1_75.nix
@@ -0,0 +1,59 @@
+# 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.
+#    Check the version number in the src/llvm-project git submodule in:
+#    https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
+# 3. Firefox and Thunderbird should still build on x86_64-linux.
+
+{ stdenv, lib
+, newScope, callPackage
+, CoreFoundation, Security, SystemConfiguration
+, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost, pkgsTargetTarget
+, makeRustPlatform
+, wrapRustcWith
+, llvmPackages_17, llvm_17
+} @ args:
+
+import ./default.nix {
+  rustcVersion = "1.75.0";
+  rustcSha256 = "sha256-W3OfRbydNB4tHFcNZdI3VZHiLC0j71uKN3EaA4arwIg=";
+
+  llvmSharedForBuild = pkgsBuildBuild.llvmPackages_17.libllvm.override { enableSharedLibraries = true; };
+  llvmSharedForHost = pkgsBuildHost.llvmPackages_17.libllvm.override { enableSharedLibraries = true; };
+  llvmSharedForTarget = pkgsBuildTarget.llvmPackages_17.libllvm.override { enableSharedLibraries = true; };
+
+  # For use at runtime
+  llvmShared = llvm_17.override { enableSharedLibraries = true; };
+
+  # Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
+  llvmPackages = llvmPackages_17;
+
+  # Note: the version MUST be one version prior to the version we're
+  # building
+  bootstrapVersion = "1.74.1";
+
+  # fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
+  bootstrapHashes = {
+    i686-unknown-linux-gnu = "b883b98372c91bc6aa9dc6ebb2b4e02e7dacbbc2ac1ebe55923dc37134df70a4";
+    x86_64-unknown-linux-gnu = "d206888a2a9d55113940151ba16117ce2456d7de021bab18cfcb06dc48d3157c";
+    x86_64-unknown-linux-musl = "5af3115a1f16431630f288821bd7f3be8cf7e08a7611b3c3bce3976774aa6cd2";
+    arm-unknown-linux-gnueabihf = "1dd7d835af4afe9adb7f785046c907090ace66f1c975cfe9e8886847310d8ec9";
+    armv7-unknown-linux-gnueabihf = "a5038ae004bf86eed64ef67329f7ba047bb4d188663bfd260320d53a2fed33c4";
+    aarch64-unknown-linux-gnu = "0dbdfce647f3c7d9ff00a7aa5d6dbbd7010486f803a9749cff46189f5ecb438c";
+    aarch64-unknown-linux-musl = "02674b8e4311780464313c5773d43606fbf6880d5c4512930d59b6d5d369f0de";
+    x86_64-apple-darwin = "54e1ef01d73f6031fbee36bbecd9af4209eb682dea478696e8282ca64d5792e5";
+    aarch64-apple-darwin = "af6a982cbed85807fb8e5c4ba85b8a76162b58945f4787e0a7dec32e901e8b3b";
+    powerpc64le-unknown-linux-gnu = "bb1c9f0ab1016a2817afe8f72c03f8f1787fe44d0f9999669e0c1957a08e6213";
+    riscv64gc-unknown-linux-gnu = "86561a8d630f634fdd7cb5899d40027103c907d9763a32770b7e2fd57dbd8473";
+  };
+
+  selectRustPackage = pkgs: pkgs.rust_1_75;
+
+  rustcPatches = [ ];
+}
+
+(builtins.removeAttrs args [ "llvmPackages_17" "llvm_17"])
diff --git a/nixpkgs/pkgs/development/compilers/rust/binary.nix b/nixpkgs/pkgs/development/compilers/rust/binary.nix
new file mode 100644
index 000000000000..c546e278e7fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/binary.nix
@@ -0,0 +1,100 @@
+{ lib, stdenv, makeWrapper, wrapRustc, bash, curl, darwin, zlib
+, autoPatchelfHook, gcc
+, version
+, src
+, platform
+, versionType
+}:
+
+let
+  inherit (lib) optionalString;
+  inherit (darwin.apple_sdk.frameworks) Security;
+
+  bootstrapping = versionType == "bootstrap";
+
+  installComponents
+    = "rustc,rust-std-${platform}"
+    + (optionalString bootstrapping ",cargo")
+    ;
+in
+
+rec {
+  rustc-unwrapped = stdenv.mkDerivation {
+    pname = "rustc-${versionType}";
+
+    inherit version;
+    inherit src;
+
+    meta = with lib; {
+      homepage = "https://www.rust-lang.org/";
+      sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+      description = "A safe, concurrent, practical language";
+      maintainers = with maintainers; [ qknight ];
+      license = [ licenses.mit licenses.asl20 ];
+    };
+
+    nativeBuildInputs = lib.optional (!stdenv.isDarwin) autoPatchelfHook;
+    buildInputs = [ bash ]
+      ++ lib.optionals (!stdenv.isDarwin) [ gcc.cc.lib zlib ]
+      ++ lib.optional stdenv.isDarwin Security;
+
+    postPatch = ''
+      patchShebangs .
+    '';
+
+    installPhase = ''
+      ./install.sh --prefix=$out \
+        --components=${installComponents}
+
+      # 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
+    '';
+
+    # The strip tool in cctools 973.0.1 and up appears to break rlibs in the
+    # binaries. The lib.rmeta object inside the ar archive should contain an
+    # .rmeta section, but it is removed. Luckily, this doesn't appear to be an
+    # issue for Rust builds produced by Nix.
+    dontStrip = true;
+
+    setupHooks = ./setup-hook.sh;
+  };
+
+  rustc = wrapRustc rustc-unwrapped;
+
+  cargo = stdenv.mkDerivation {
+    pname = "cargo-${versionType}";
+
+    inherit version;
+    inherit src;
+
+    meta = with lib; {
+      homepage = "https://doc.rust-lang.org/cargo/";
+      sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+      description = "The Rust package manager";
+      maintainers = with maintainers; [ qknight ];
+      license = [ licenses.mit licenses.asl20 ];
+    };
+
+    nativeBuildInputs = [ makeWrapper ]
+      ++ lib.optional (!stdenv.isDarwin) autoPatchelfHook;
+    buildInputs = [ bash ]
+      ++ lib.optional (!stdenv.isDarwin) gcc.cc.lib
+      ++ lib.optional stdenv.isDarwin Security;
+
+    postPatch = ''
+      patchShebangs .
+    '';
+
+    installPhase = ''
+      patchShebangs ./install.sh
+      ./install.sh --prefix=$out \
+        --components=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..97ac69270252
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/bootstrap.nix
@@ -0,0 +1,14 @@
+{ stdenv, fetchurl, callPackage, version, hashes }:
+
+let
+  platform = stdenv.hostPlatform.rust.rustcTarget;
+
+  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-auditable-cargo-wrapper.nix b/nixpkgs/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix
new file mode 100644
index 000000000000..6e982aee01a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/cargo-auditable-cargo-wrapper.nix
@@ -0,0 +1,24 @@
+{ lib, runCommand, makeBinaryWrapper, rust-audit-info, cargo, cargo-auditable }:
+
+if cargo-auditable.meta.broken then
+  cargo
+else
+runCommand "auditable-${cargo.name}" {
+  nativeBuildInputs = [ makeBinaryWrapper ];
+
+  passthru.tests = runCommand "rust-audit-info-test" {
+    nativeBuildInputs = [ rust-audit-info ];
+  } ''
+    rust-audit-info ${lib.getBin rust-audit-info}/bin/rust-audit-info > $out
+  '';
+
+  meta = cargo-auditable.meta // {
+    mainProgram = "cargo";
+  };
+} ''
+  mkdir -p $out/bin
+  makeWrapper ${cargo}/bin/cargo $out/bin/cargo \
+    --set CARGO_AUDITABLE_IGNORE_UNSUPPORTED 1 \
+    --prefix PATH : ${lib.makeBinPath [ cargo cargo-auditable ]} \
+    --add-flags auditable
+''
diff --git a/nixpkgs/pkgs/development/compilers/rust/cargo-auditable.nix b/nixpkgs/pkgs/development/compilers/rust/cargo-auditable.nix
new file mode 100644
index 000000000000..b86ed5d7d4e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/cargo-auditable.nix
@@ -0,0 +1,56 @@
+{ lib, buildPackages, fetchFromGitHub, makeRustPlatform, installShellFiles, stdenv }:
+
+let
+  args = rec {
+    pname = "cargo-auditable";
+    version = "0.6.1";
+
+    src = fetchFromGitHub {
+      owner = "rust-secure-code";
+      repo = pname;
+      rev = "v${version}";
+      sha256 = "sha256-MKMPLv8jeST0l4tq+MMPC18qfZMmBixdj6Ng19YKepU=";
+    };
+
+    cargoSha256 = "sha256-6/f7pNaTL+U6bI6jMakU/lfwYYxN/EM3WkKZcydsyLk=";
+
+    # Cargo.lock is outdated
+    preConfigure = ''
+      cargo update --offline
+    '';
+
+    meta = with lib; {
+      description = "A tool to make production Rust binaries auditable";
+      homepage = "https://github.com/rust-secure-code/cargo-auditable";
+      changelog = "https://github.com/rust-secure-code/cargo-auditable/blob/v${version}/cargo-auditable/CHANGELOG.md";
+      license = with licenses; [ mit /* or */ asl20 ];
+      maintainers = with maintainers; [ figsoda ];
+      broken = stdenv.hostPlatform != stdenv.buildPlatform;
+    };
+  };
+
+  rustPlatform = makeRustPlatform {
+    inherit (buildPackages) rustc;
+    cargo = buildPackages.cargo.override {
+      auditable = false;
+    };
+  };
+
+  bootstrap = rustPlatform.buildRustPackage (args // {
+    auditable = false;
+  });
+in
+
+rustPlatform.buildRustPackage.override { cargo-auditable = bootstrap; } (args // {
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  postInstall = ''
+    installManPage cargo-auditable/cargo-auditable.1
+  '';
+
+  passthru = {
+    inherit 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..1377cfad6c6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/cargo.nix
@@ -0,0 +1,120 @@
+{ lib, stdenv, pkgsBuildHost, pkgsHostHost
+, file, curl, pkg-config, python3, openssl, cmake, zlib
+, installShellFiles, makeWrapper, rustPlatform, rustc
+, CoreFoundation, Security
+, auditable ? !cargo-auditable.meta.broken
+, cargo-auditable
+, pkgsBuildBuild
+}:
+
+rustPlatform.buildRustPackage.override {
+  cargo-auditable = cargo-auditable.bootstrap;
+} ({
+  pname = "cargo";
+  inherit (rustc.unwrapped) version src;
+
+  # the rust source tarball already has all the dependencies vendored, no need to fetch them again
+  cargoVendorDir = "vendor";
+  buildAndTestSubdir = "src/tools/cargo";
+
+  inherit auditable;
+
+  passthru = {
+    rustc = rustc;
+    inherit (rustc.unwrapped) tests;
+  };
+
+  # Upstream rustc still assumes that musl = static[1].  The fix for
+  # this is to disable crt-static by default for non-static musl
+  # targets.
+  #
+  # For every package apart from Cargo, we can fix this by just
+  # patching rustc to not have crt-static by default.  But Cargo is
+  # built with the upstream bootstrap binary for rustc, which we can't
+  # easily patch.  This means we need to find another way to make sure
+  # crt-static is not used during the build of pkgsMusl.cargo.
+  #
+  # By default, Cargo doesn't apply RUSTFLAGS when building build.rs
+  # if --target is passed, so the only good way to set -crt-static for
+  # build.rs files used in the Cargo build is to use the unstable
+  # -Zhost-config Cargo feature.  This allows us to specify flags that
+  # should be passed to rustc when building for the build platform.
+  # We also need to use -Ztarget-applies-to-host, because using
+  # -Zhost-config requires it.
+  #
+  # When doing this, we also have to specify the linker, or cargo
+  # won't pass a -C linker= argument to rustc.  This will make rustc
+  # try to use its default value of "cc", which won't be available
+  # when cross-compiling.
+  #
+  # [1]: https://github.com/rust-lang/compiler-team/issues/422
+  postPatch = lib.optionalString (with stdenv.buildPlatform; isMusl && !isStatic) ''
+    mkdir -p .cargo
+    cat <<EOF >> .cargo/config
+    [host]
+    rustflags = "-C target-feature=-crt-static"
+    linker = "${pkgsBuildHost.stdenv.cc}/bin/${pkgsBuildHost.stdenv.cc.targetPrefix}cc"
+    [unstable]
+    host-config = true
+    target-applies-to-host = true
+    EOF
+  '';
+
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  nativeBuildInputs = [
+    pkg-config cmake installShellFiles makeWrapper
+    (lib.getDev pkgsHostHost.curl)
+    zlib
+  ];
+  buildInputs = [ file curl python3 openssl zlib ]
+    ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
+
+  # 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 = ''
+    wrapProgram "$out/bin/cargo" --suffix PATH : "${rustc}/bin"
+
+    installManPage src/tools/cargo/src/etc/man/*
+
+    installShellCompletion --bash --name cargo \
+      src/tools/cargo/src/etc/cargo.bashcomp.sh
+
+    installShellCompletion --zsh src/tools/cargo/src/etc/_cargo
+  '';
+
+  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;
+
+  doInstallCheck = !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isElf;
+  installCheckPhase = ''
+    runHook preInstallCheck
+    readelf -a $out/bin/.cargo-wrapped | grep -F 'Shared library: [libcurl.so'
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://crates.io";
+    description = "Downloads your Rust project's dependencies and builds your project";
+    maintainers = teams.rust.members;
+    license = [ licenses.mit licenses.asl20 ];
+    platforms = platforms.unix;
+    # https://github.com/alexcrichton/nghttp2-rs/issues/2
+    broken = stdenv.hostPlatform.isx86 && stdenv.buildPlatform != stdenv.hostPlatform;
+  };
+}
+// lib.optionalAttrs (stdenv.buildPlatform.rust.rustcTarget != stdenv.hostPlatform.rust.rustcTarget) {
+  HOST_PKG_CONFIG_PATH="${pkgsBuildBuild.pkg-config}/bin/pkg-config";
+})
diff --git a/nixpkgs/pkgs/development/compilers/rust/cargo_cross.nix b/nixpkgs/pkgs/development/compilers/rust/cargo_cross.nix
new file mode 100644
index 000000000000..ba7651e63bdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/cargo_cross.nix
@@ -0,0 +1,14 @@
+{ runCommand, stdenv, lib, pkgsBuildBuild, makeShellWrapper, rustc, ... }:
+
+runCommand "${stdenv.targetPlatform.config}-cargo-${lib.getVersion pkgsBuildBuild.cargo}" {
+  # Use depsBuildBuild or it tries to use target-runtimeShell
+  depsBuildBuild = [ makeShellWrapper ];
+
+  inherit (pkgsBuildBuild.cargo) meta;
+} ''
+  mkdir -p $out/bin
+  ln -s ${pkgsBuildBuild.cargo}/share $out/share
+
+  makeWrapper "${pkgsBuildBuild.cargo}/bin/cargo" "$out/bin/cargo" \
+    --prefix PATH : "${rustc}/bin"
+ ''
diff --git a/nixpkgs/pkgs/development/compilers/rust/clippy.nix b/nixpkgs/pkgs/development/compilers/rust/clippy.nix
new file mode 100644
index 000000000000..d9506a4aed30
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/clippy.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, rustPlatform, rustc, Security, patchelf }:
+
+rustPlatform.buildRustPackage {
+  pname = "clippy";
+  inherit (rustc) version src;
+
+  separateDebugInfo = true;
+
+  # 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.llvm ]
+    ++ 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;
+
+  # Clippy uses the rustc_driver and std private libraries, and Rust's build process forces them to have
+  # an install name of `@rpath/...` [0] [1] instead of the standard on macOS, which is an absolute path
+  # to itself.
+  #
+  # [0]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/src/bootstrap/builder.rs#L1543
+  # [1]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/compiler/rustc_codegen_ssa/src/back/linker.rs#L323-L331
+  preFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/clippy-driver"
+    install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/cargo-clippy"
+  '';
+
+  meta = with lib; {
+    homepage = "https://rust-lang.github.io/rust-clippy/";
+    description = "A bunch of lints to catch common mistakes and improve your Rust code";
+    mainProgram = "cargo-clippy";
+    maintainers = with maintainers; [ basvandijk ] ++ teams.rust.members;
+    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..31501e668c89
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/default.nix
@@ -0,0 +1,106 @@
+{ rustcVersion
+, rustcSha256
+, enableRustcDev ? true
+, bootstrapVersion
+, bootstrapHashes
+, selectRustPackage
+, rustcPatches ? []
+, llvmShared
+, llvmSharedForBuild
+, llvmSharedForHost
+, llvmSharedForTarget
+, llvmPackages # Exposed through rustc for LTO in Firefox
+}:
+{ stdenv, lib
+, newScope, callPackage
+, CoreFoundation, Security, SystemConfiguration
+, pkgsBuildBuild
+, pkgsBuildHost
+, pkgsBuildTarget
+, pkgsTargetTarget
+, makeRustPlatform
+, wrapRustcWith
+}:
+
+let
+  # Use `import` to make sure no packages sneak in here.
+  lib' = import ../../../build-support/rust/lib {
+    inherit lib stdenv pkgsBuildHost pkgsBuildTarget pkgsTargetTarget;
+  };
+  # Allow faster cross compiler generation by reusing Build artifacts
+  fastCross = (stdenv.buildPlatform == stdenv.hostPlatform) && (stdenv.hostPlatform != stdenv.targetPlatform);
+in
+{
+  lib = lib';
+
+  # Backwards compat before `lib` was factored out.
+  inherit (lib') toTargetArch toTargetOs toRustTarget toRustTargetSpec IsNoStdTarget toRustTargetForUseInEnvVars envVars;
+
+  # This just contains tools for now. But it would conceivably contain
+  # libraries too, say if we picked some default/recommended versions to build
+  # by Hydra.
+  #
+  # 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 = if fastCross
+      then pkgsBuildBuild.rustPackages
+      else
+        self.buildRustPackages.overrideScope (_: _:
+        lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)
+          (selectRustPackage pkgsBuildHost).packages.prebuilt);
+      bootRustPlatform = makeRustPlatform bootstrapRustPackages;
+    in {
+      # Packages suitable for build-time, e.g. `build.rs`-type stuff.
+      buildRustPackages = (selectRustPackage pkgsBuildHost).packages.stable // { __attrsFailEvaluation = true; };
+      # Analogous to stdenv
+      rustPlatform = makeRustPlatform self.buildRustPackages;
+      rustc-unwrapped = self.callPackage ./rustc.nix ({
+        version = rustcVersion;
+        sha256 = rustcSha256;
+        inherit enableRustcDev;
+        inherit llvmShared llvmSharedForBuild llvmSharedForHost llvmSharedForTarget llvmPackages fastCross;
+
+        patches = rustcPatches;
+
+        # Use boot package set to break cycle
+        inherit (bootstrapRustPackages) cargo rustc rustfmt;
+      });
+      rustc = wrapRustcWith {
+        inherit (self) rustc-unwrapped;
+        sysroot = if fastCross then self.rustc-unwrapped else null;
+      };
+      rustfmt = self.callPackage ./rustfmt.nix {
+        inherit Security;
+        inherit (self.buildRustPackages) rustc;
+      };
+      cargo = if (!fastCross) then self.callPackage ./cargo.nix {
+        # Use boot package set to break cycle
+        rustPlatform = bootRustPlatform;
+        inherit CoreFoundation Security;
+      } else self.callPackage ./cargo_cross.nix {};
+      cargo-auditable = self.callPackage ./cargo-auditable.nix { };
+      cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { };
+      clippy = self.callPackage ./clippy.nix {
+        # We want to use self, not buildRustPackages, so that
+        # buildPackages.clippy uses the cross compiler and supports
+        # linting for the target platform.
+        rustPlatform = makeRustPlatform self;
+        inherit Security;
+      };
+    });
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix b/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
new file mode 100644
index 000000000000..e22cb6d594af
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
@@ -0,0 +1,40 @@
+{ lib, buildPackages, callPackage, cargo-auditable, stdenv, runCommand }@prev:
+
+{ rustc
+, cargo
+, cargo-auditable ? prev.cargo-auditable
+, stdenv ? prev.stdenv
+, ...
+}:
+
+rec {
+  rust = {
+    rustc = lib.warn "rustPlatform.rust.rustc is deprecated. Use rustc instead." rustc;
+    cargo = lib.warn "rustPlatform.rust.cargo is deprecated. Use cargo instead." cargo;
+  };
+
+  fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {
+    git = buildPackages.gitMinimal;
+    inherit cargo;
+  };
+
+  buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
+    inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook
+      fetchCargoTarball importCargoLock rustc cargo cargo-auditable;
+  };
+
+  importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix { inherit cargo; };
+
+  rustcSrc = callPackage ./rust-src.nix {
+    inherit runCommand rustc;
+  };
+
+  rustLibSrc = callPackage ./rust-lib-src.nix {
+    inherit runCommand rustc;
+  };
+
+  # Hooks
+  inherit (callPackage ../../../build-support/rust/hooks {
+    inherit stdenv cargo rustc;
+  }) cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook maturinBuildHook bindgenHook;
+}
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..ebf8d900bb3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/print-hashes.sh
@@ -0,0 +1,43 @@
+#!/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
+  x86_64-unknown-linux-musl
+  arm-unknown-linux-gnueabihf
+  armv7-unknown-linux-gnueabihf
+  aarch64-unknown-linux-gnu
+  aarch64-unknown-linux-musl
+  x86_64-apple-darwin
+  aarch64-apple-darwin
+  powerpc64le-unknown-linux-gnu
+  riscv64gc-unknown-linux-gnu
+)
+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/rust-lib-src.nix b/nixpkgs/pkgs/development/compilers/rust/rust-lib-src.nix
new file mode 100644
index 000000000000..aa914338639d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rust-lib-src.nix
@@ -0,0 +1,6 @@
+{ runCommand, rustc }:
+
+runCommand "rust-lib-src" { } ''
+  tar --strip-components=1 -xzf ${rustc.src}
+  mv library $out
+''
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..69bdb37ac2fd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rust-src.nix
@@ -0,0 +1,21 @@
+{ lib, runCommand, rustc, minimalContent ? true }:
+
+runCommand "rust-src" { } ''
+  tar -xzf ${rustc.src}
+  mv rustc-${rustc.version}-src $out
+  rm -rf $out/{${lib.concatStringsSep "," ([
+    "ci"
+    "doc"
+    "etc"
+    "grammar"
+    "llvm-project"
+    "llvm-emscripten"
+    "rtstartup"
+    "rustllvm"
+    "test"
+    "vendor"
+  ] ++ lib.optionals minimalContent [
+    "tools"
+    "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..6e0afa1b8f57
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rustc.nix
@@ -0,0 +1,301 @@
+{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, targetPackages
+, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackages
+, fetchurl, file, python3
+, darwin, cargo, cmake, rustc, rustfmt
+, pkg-config, openssl, xz
+, libiconv
+, which, libffi
+, withBundledLLVM ? false
+, enableRustcDev ? true
+, version
+, sha256
+, patches ? []
+, fd
+, ripgrep
+, wezterm
+, firefox
+, thunderbird
+# This only builds std for target and reuses the rustc from build.
+, fastCross
+, lndir
+, makeWrapper
+}:
+
+let
+  inherit (lib) optionals optional optionalString concatStringsSep;
+  inherit (darwin.apple_sdk.frameworks) Security;
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "${targetPackages.stdenv.cc.targetPrefix}rustc";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
+    inherit sha256;
+    # See https://nixos.org/manual/nixpkgs/stable/#using-git-bisect-on-the-rust-compiler
+    passthru.isReleaseTarball = true;
+  };
+
+  __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" ];
+
+  # The Rust pkg-config crate does not support prefixed pkg-config executables[1],
+  # but it does support checking these idiosyncratic PKG_CONFIG_${TRIPLE}
+  # environment variables.
+  # [1]: https://github.com/rust-lang/pkg-config-rs/issues/53
+  "PKG_CONFIG_${builtins.replaceStrings ["-"] ["_"] stdenv.buildPlatform.rust.rustcTarget}" =
+    "${pkgsBuildHost.stdenv.cc.targetPrefix}pkg-config";
+
+  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++ -lc++abi"
+    ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib");
+
+  # Increase codegen units to introduce parallelism within the compiler.
+  RUSTFLAGS = "-Ccodegen-units=10";
+
+  RUSTDOCFLAGS = "-A rustdoc::broken-intra-doc-links";
+
+  # 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
+    prefixForStdenv = stdenv: "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}";
+    ccPrefixForStdenv = stdenv: "${prefixForStdenv stdenv}${if (stdenv.cc.isClang or false) then "clang" else "cc"}";
+    cxxPrefixForStdenv = stdenv: "${prefixForStdenv stdenv}${if (stdenv.cc.isClang or false) then "clang++" else "c++"}";
+    setBuild  = "--set=target.${stdenv.buildPlatform.rust.rustcTarget}";
+    setHost   = "--set=target.${stdenv.hostPlatform.rust.rustcTarget}";
+    setTarget = "--set=target.${stdenv.targetPlatform.rust.rustcTarget}";
+    ccForBuild  = ccPrefixForStdenv pkgsBuildBuild.targetPackages.stdenv;
+    cxxForBuild  = cxxPrefixForStdenv pkgsBuildBuild.targetPackages.stdenv;
+    ccForHost  = ccPrefixForStdenv pkgsBuildHost.targetPackages.stdenv;
+    cxxForHost  = cxxPrefixForStdenv pkgsBuildHost.targetPackages.stdenv;
+    ccForTarget  = ccPrefixForStdenv pkgsBuildTarget.targetPackages.stdenv;
+    cxxForTarget  = cxxPrefixForStdenv pkgsBuildTarget.targetPackages.stdenv;
+  in [
+    "--sysconfdir=${placeholder "out"}/etc"
+    "--release-channel=stable"
+    "--set=build.rustc=${rustc}/bin/rustc"
+    "--set=build.cargo=${cargo}/bin/cargo"
+  ] ++ lib.optionals (!(finalAttrs.src.passthru.isReleaseTarball or false)) [
+    # release tarballs vendor the rustfmt source; when
+    # git-bisect'ing from upstream's git repo we must prevent
+    # attempts to download the missing source tarball
+    "--set=build.rustfmt=${rustfmt}/bin/rustfmt"
+  ] ++ [
+    "--tools=rustc,rust-analyzer-proc-macro-srv"
+    "--enable-rpath"
+    "--enable-vendor"
+    "--build=${stdenv.buildPlatform.rust.rustcTargetSpec}"
+    "--host=${stdenv.hostPlatform.rust.rustcTargetSpec}"
+    # std is built for all platforms in --target.
+    "--target=${concatStringsSep "," ([
+      stdenv.targetPlatform.rust.rustcTargetSpec
+
+    # Other targets that don't need any extra dependencies to build.
+    ] ++ optionals (!fastCross) [
+      "wasm32-unknown-unknown"
+
+    # (build!=target): When cross-building a compiler we need to add
+    # the build platform as well so rustc can compile build.rs
+    # scripts.
+    ] ++ optionals (stdenv.buildPlatform != stdenv.targetPlatform && !fastCross) [
+      stdenv.buildPlatform.rust.rustcTargetSpec
+
+    # (host!=target): When building a cross-targeting compiler we
+    # need to add the host platform as well so rustc can compile
+    # build.rs scripts.
+    ] ++ optionals (stdenv.hostPlatform != stdenv.targetPlatform && !fastCross) [
+      stdenv.hostPlatform.rust.rustcTargetSpec
+    ])}"
+
+    "${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}"
+
+    "${setBuild}.crt-static=${lib.boolToString stdenv.buildPlatform.isStatic}"
+    "${setHost}.crt-static=${lib.boolToString stdenv.hostPlatform.isStatic}"
+    "${setTarget}.crt-static=${lib.boolToString stdenv.targetPlatform.isStatic}"
+  ] ++ optionals (!withBundledLLVM) [
+    "--enable-llvm-link-shared"
+    "${setBuild}.llvm-config=${llvmSharedForBuild.dev}/bin/llvm-config"
+    "${setHost}.llvm-config=${llvmSharedForHost.dev}/bin/llvm-config"
+    "${setTarget}.llvm-config=${llvmSharedForTarget.dev}/bin/llvm-config"
+  ] ++ optionals (stdenv.isLinux && !stdenv.targetPlatform.isRedox) [
+    "--enable-profiler" # build libprofiler_builtins
+  ] ++ optionals stdenv.buildPlatform.isMusl [
+    "${setBuild}.musl-root=${pkgsBuildBuild.targetPackages.stdenv.cc.libc}"
+  ] ++ optionals stdenv.hostPlatform.isMusl [
+    "${setHost}.musl-root=${pkgsBuildHost.targetPackages.stdenv.cc.libc}"
+  ] ++ optionals stdenv.targetPlatform.isMusl [
+    "${setTarget}.musl-root=${pkgsBuildTarget.targetPackages.stdenv.cc.libc}"
+  ] ++ optionals stdenv.targetPlatform.rust.isNoStdTarget [
+    "--disable-docs"
+  ] ++ optionals (stdenv.isDarwin && stdenv.isx86_64) [
+    # https://github.com/rust-lang/rust/issues/92173
+    "--set rust.jemalloc"
+  ];
+
+  # if we already have a rust compiler for build just compile the target std
+  # library and reuse compiler
+  buildPhase = if fastCross then "
+    runHook preBuild
+
+    mkdir -p build/${stdenv.hostPlatform.rust.rustcTargetSpec}/stage0-{std,rustc}/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/
+    ln -s ${rustc.unwrapped}/lib/rustlib/${stdenv.hostPlatform.rust.rustcTargetSpec}/libstd-*.so build/${stdenv.hostPlatform.rust.rustcTargetSpec}/stage0-std/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/libstd.so
+    ln -s ${rustc.unwrapped}/lib/rustlib/${stdenv.hostPlatform.rust.rustcTargetSpec}/librustc_driver-*.so build/${stdenv.hostPlatform.rust.rustcTargetSpec}/stage0-rustc/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/librustc.so
+    ln -s ${rustc.unwrapped}/bin/rustc build/${stdenv.hostPlatform.rust.rustcTargetSpec}/stage0-rustc/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/rustc-main
+    touch build/${stdenv.hostPlatform.rust.rustcTargetSpec}/stage0-std/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/.libstd.stamp
+    touch build/${stdenv.hostPlatform.rust.rustcTargetSpec}/stage0-rustc/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/.librustc.stamp
+    python ./x.py --keep-stage=0 --stage=1 build library
+
+    runHook postBuild
+  " else null;
+
+  installPhase = if fastCross then ''
+    runHook preInstall
+
+    python ./x.py --keep-stage=0 --stage=1 install library/std
+    mkdir -v $out/bin $doc $man
+    ln -s ${rustc.unwrapped}/bin/rustc $out/bin
+    makeWrapper ${rustc.unwrapped}/bin/rustdoc $out/bin/rustdoc --add-flags "--sysroot $out"
+    ln -s ${rustc.unwrapped}/lib/rustlib/{manifest-rust-std-,}${stdenv.hostPlatform.rust.rustcTargetSpec} $out/lib/rustlib/
+    echo rust-std-${stdenv.hostPlatform.rust.rustcTargetSpec} >> $out/lib/rustlib/components
+    lndir ${rustc.doc} $doc
+    lndir ${rustc.man} $man
+
+    runHook postInstall
+  '' else null;
+
+  # the rust build system complains that nix alters the checksums
+  dontFixLibtool = true;
+
+  inherit patches;
+
+  postPatch = ''
+    patchShebangs src/etc
+
+    ${optionalString (!withBundledLLVM) "rm -rf src/llvm"}
+
+    # Useful debugging parameter
+    # export VERBOSE=1
+  '' + lib.optionalString (stdenv.targetPlatform.isMusl && !stdenv.targetPlatform.isStatic) ''
+    # Upstream rustc still assumes that musl = static[1].  The fix for
+    # this is to disable crt-static by default for non-static musl
+    # targets.
+    #
+    # Even though Cargo will build build.rs files for the build platform,
+    # cross-compiling _from_ musl appears to work fine, so we only need
+    # to do this when rustc's target platform is dynamically linked musl.
+    #
+    # [1]: https://github.com/rust-lang/compiler-team/issues/422
+    substituteInPlace compiler/rustc_target/src/spec/base/linux_musl.rs \
+        --replace "base.crt_static_default = true" "base.crt_static_default = false"
+  '' + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+    # See https://github.com/jemalloc/jemalloc/issues/1997
+    # Using a value of 48 should work on both emulated and native x86_64-darwin.
+    export JEMALLOC_SYS_WITH_LG_VADDR=48
+  '' + lib.optionalString (!(finalAttrs.src.passthru.isReleaseTarball or false)) ''
+    mkdir .cargo
+    cat > .cargo/config <<\EOF
+    [source.crates-io]
+    replace-with = "vendored-sources"
+    [source.vendored-sources]
+    directory = "vendor"
+    EOF
+  '';
+
+  # rustc unfortunately needs cmake to compile llvm-rt but doesn't
+  # use it for the normal build. This disables cmake in Nix.
+  dontUseCmakeConfigure = true;
+
+  depsBuildBuild = [ pkgsBuildHost.stdenv.cc pkg-config ];
+
+  nativeBuildInputs = [
+    file python3 rustc cmake
+    which libffi removeReferencesTo pkg-config xz
+  ]
+    ++ optionals fastCross [ lndir makeWrapper ];
+
+  buildInputs = [ openssl ]
+    ++ optionals stdenv.isDarwin [ libiconv Security ]
+    ++ optional (!withBundledLLVM) llvmShared;
+
+  outputs = [ "out" "man" "doc" ];
+  setOutputFlags = false;
+
+  postInstall = lib.optionalString (enableRustcDev && !fastCross) ''
+    # 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/
+    rm $out/lib/rustlib/install.log
+    for m in $out/lib/rustlib/manifest-rust*
+    do
+      sort --output=$m < $m
+    done
+
+  '' + ''
+    # 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} '{}' '+'
+
+    # remove uninstall script that doesn't really make sense for Nix.
+    rm $out/lib/rustlib/uninstall.sh
+  '';
+
+  configurePlatforms = [];
+
+  enableParallelBuilding = true;
+
+  setupHooks = ./setup-hook.sh;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  passthru = {
+    llvm = llvmShared;
+    inherit llvmPackages;
+    tests = {
+      inherit fd ripgrep wezterm;
+    } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit firefox thunderbird; };
+  };
+
+  meta = with lib; {
+    homepage = "https://www.rust-lang.org/";
+    description = "A safe, concurrent, practical language";
+    maintainers = with maintainers; [ havvy ] ++ teams.rust.members;
+    license = [ licenses.mit licenses.asl20 ];
+    platforms = [
+      # Platforms with host tools from
+      # https://doc.rust-lang.org/nightly/rustc/platform-support.html
+      "x86_64-darwin" "i686-darwin" "aarch64-darwin"
+      "i686-freebsd13" "x86_64-freebsd13"
+      "x86_64-solaris"
+      "aarch64-linux" "armv6l-linux" "armv7l-linux" "i686-linux"
+      "loongarch64-linux" "powerpc64-linux" "powerpc64le-linux"
+      "riscv64-linux" "s390x-linux" "x86_64-linux"
+      "aarch64-netbsd" "armv7l-netbsd" "i686-netbsd" "powerpc-netbsd"
+      "x86_64-netbsd"
+      "i686-openbsd" "x86_64-openbsd"
+      "i686-windows" "x86_64-windows"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/rust/rustfmt.nix b/nixpkgs/pkgs/development/compilers/rust/rustfmt.nix
new file mode 100644
index 000000000000..9cc8df5a9e90
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rustfmt.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, rustPlatform, rustc, Security, asNightly ? false }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rustfmt" + lib.optionalString asNightly "-nightly";
+  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/rustfmt";
+
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  buildInputs = [
+    rustc.llvm
+  ] ++ lib.optional stdenv.isDarwin Security;
+
+  # rustfmt uses the rustc_driver and std private libraries, and Rust's build process forces them to have
+  # an install name of `@rpath/...` [0] [1] instead of the standard on macOS, which is an absolute path
+  # to itself.
+  #
+  # [0]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/src/bootstrap/builder.rs#L1543
+  # [1]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/compiler/rustc_codegen_ssa/src/back/linker.rs#L323-L331
+  preFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/rustfmt"
+    install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/git-rustfmt"
+  '';
+
+  # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
+  RUSTC_BOOTSTRAP = 1;
+
+  # As of rustc 1.45.0, these env vars are required to build rustfmt (due to
+  # https://github.com/rust-lang/rust/pull/72001)
+  CFG_RELEASE = rustc.version;
+  CFG_RELEASE_CHANNEL = if asNightly then "nightly" else "stable";
+
+  meta = with 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 ];
+    mainProgram = "rustfmt";
+    maintainers = with maintainers; [ globin basvandijk ];
+  };
+}
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..941ac1bcb2c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sagittarius-scheme/default.nix
@@ -0,0 +1,61 @@
+{ lib, stdenv
+, fetchurl
+, cmake
+, pkg-config
+, libffi
+, boehmgc
+, openssl
+, zlib
+, odbcSupport ? !stdenv.isDarwin
+, 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.10";
+  src = fetchurl {
+    url = "https://bitbucket.org/ktakashi/${pname}/downloads/sagittarius-${version}.tar.gz";
+    sha256 = "sha256-F2GaaYVnDAGYDlQZBGhdPDO8lbeVgn+ta6LSK0L0zNA=";
+  };
+  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 = [ pkg-config cmake ];
+
+  buildInputs = [ libffi boehmgc openssl zlib ] ++ lib.optional odbcSupport libiodbc;
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=int-conversion";
+
+  meta = with lib; {
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+    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/bootstrap.nix b/nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix
new file mode 100644
index 000000000000..e23557c5a62f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, makeWrapper, cfg }:
+
+stdenv.mkDerivation rec {
+  pname = "sbcl-bootstrap";
+  inherit (cfg) version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
+    inherit (cfg) sha256;
+  };
+
+  nativeBuildInputs = [ 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 = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/default.nix b/nixpkgs/pkgs/development/compilers/sbcl/default.nix
new file mode 100644
index 000000000000..2f18dcc78d4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/default.nix
@@ -0,0 +1,201 @@
+{ lib, stdenv, callPackage, clisp, fetchurl, fetchpatch, writeText, zstd
+, threadSupport ? (stdenv.hostPlatform.isx86 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
+, linkableRuntime ? stdenv.hostPlatform.isx86
+, 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
+, coreCompression ? lib.versionAtLeast version "2.2.6"
+, markRegionGC ? lib.versionAtLeast version "2.4.0"
+, texinfo
+, version
+}:
+
+let
+  versionMap = {
+    # Only kept around for BCLM. Remove once unneeded there.
+    "2.1.9" = {
+      sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y";
+    };
+
+    "2.4.0" = {
+      sha256 = "sha256-g9i3TwjSJUxZuXkLwfZp4JCZRXuIRyDs7L9F9LRtF3Y=";
+    };
+    "2.4.1" = {
+      sha256 = "sha256-2k+UhvrUE9OversbCSaTJf20v/fnuI8hld3udDJjz34=";
+    };
+  };
+  # Collection of pre-built SBCL binaries for platforms that need them for
+  # bootstrapping. Ideally these are to be avoided.  If CLISP (or any other
+  # non-binary-distributed Lisp) can run on any of these systems, that entry
+  # should be removed from this list.
+  bootstrapBinaries = rec {
+    # This build segfaults using CLISP.
+    x86_64-darwin = {
+      version = "2.2.9";
+      system = "x86-64-darwin";
+      sha256 = "sha256-b1BLkoLIOELAYBYA9eBmMgm1OxMxJewzNP96C9ADfKY=";
+    };
+    i686-linux = {
+      version = "1.2.7";
+      system = "x86-linux";
+      sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
+    };
+    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";
+    };
+  };
+  sbclBootstrap = callPackage ./bootstrap.nix {
+    cfg = bootstrapBinaries.${stdenv.hostPlatform.system};
+  };
+  bootstrapLisp =
+    if (builtins.hasAttr stdenv.hostPlatform.system bootstrapBinaries)
+    then "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
+    else "${clisp}/bin/clisp -E UTF-8 --silent -norc";
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "sbcl";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
+    inherit (versionMap.${version}) sha256;
+  };
+
+  nativeBuildInputs = [ texinfo ];
+  buildInputs = lib.optionals coreCompression [ zstd ];
+
+  patches = lib.optionals (version == "2.4.0") [
+    ./fix-2.4.0-aarch64-darwin.patch
+  ];
+
+  postPatch = ''
+    echo '"${version}.nixos"' > version.lisp-expr
+
+    # 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
+  ''
+  + (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 lib;
+    optional threadSupport "sb-thread" ++
+    optional linkableRuntime "sb-linkable-runtime" ++
+    optional coreCompression "sb-core-compression" ++
+    optional stdenv.isAarch32 "arm" ++
+    optional markRegionGC "mark-region-gc";
+
+  disableFeatures = with lib;
+    optional (!threadSupport) "sb-thread" ++
+    optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals (lib.versionOlder version "2.1.10") [
+    # Workaround build failure on -fno-common toolchains like upstream
+    # clang-13. Without the change build fails as:
+    #   duplicate symbol '_static_code_space_free_pointer' in: alloc.o traceroot.o
+    # Should be fixed past 2.1.10 release.
+    "-fcommon"
+  ]
+    # Fails to find `O_LARGEFILE` otherwise.
+    ++ [ "-D_GNU_SOURCE" ]);
+
+  buildPhase = ''
+    runHook preBuild
+
+    sh make.sh --prefix=$out --xc-host="${bootstrapLisp}" ${
+                  lib.concatStringsSep " "
+                    (builtins.map (x: "--with-${x}") enableFeatures ++
+                     builtins.map (x: "--without-${x}") disableFeatures)
+                } ${lib.optionalString (stdenv.hostPlatform.system == "aarch64-darwin") "--arch=arm64"}
+    (cd doc/manual ; make info)
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    INSTALL_ROOT=$out sh install.sh
+
+    runHook postInstall
+  ''
+  + 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 = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
+    addEnvHooks "$targetOffset" _setSbclHome
+    _setSbclHome() {
+      export SBCL_HOME='@out@/lib/sbcl/'
+    }
+  '');
+
+  meta = with lib; {
+    description = "Lisp compiler";
+    homepage = "https://sbcl.org";
+    license = licenses.publicDomain; # and FreeBSD
+    maintainers = lib.teams.lisp.members;
+    platforms = attrNames bootstrapBinaries ++ [
+      # These aren’t bootstrapped using the binary distribution but compiled
+      # using a separate (lisp) host
+      "x86_64-linux"
+      "aarch64-darwin"
+      "aarch64-linux"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/fix-2.4.0-aarch64-darwin.patch b/nixpkgs/pkgs/development/compilers/sbcl/fix-2.4.0-aarch64-darwin.patch
new file mode 100644
index 000000000000..cd344f0cbd19
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/fix-2.4.0-aarch64-darwin.patch
@@ -0,0 +1,39 @@
+From aed233638604b46c9a0c51e08d096d47303375ca Mon Sep 17 00:00:00 2001
+From: Douglas Katzman <dougk@google.com>
+Date: Tue, 2 Jan 2024 09:20:48 -0500
+Subject: [PATCH] Fix multiple def error
+
+reported by Hraban Luyat
+---
+ src/runtime/gc-common.c | 1 +
+ src/runtime/gc.h        | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c
+index 51963b8ff..07536f628 100644
+--- a/src/runtime/gc-common.c
++++ b/src/runtime/gc-common.c
+@@ -2999,6 +2999,7 @@ void recompute_gen_bytes_allocated() {
+ #endif
+ 
+ #ifdef LISP_FEATURE_DARWIN_JIT
++_Atomic(char) *page_execp;
+ #include "sys_mmap.inc"
+ #include <errno.h>
+ /* darwin-jit has another reason to remap besides just zeroing, namely,
+diff --git a/src/runtime/gc.h b/src/runtime/gc.h
+index 804e6fce2..5fdc215c2 100644
+--- a/src/runtime/gc.h
++++ b/src/runtime/gc.h
+@@ -151,7 +151,7 @@ extern void prepare_pages(bool commit, page_index_t start, page_index_t end,
+  * squeeze a bit into the 'type' field of the page table, but it's clearer to
+  * have this externally so that page type 0 remains as "free" */
+ #ifdef LISP_FEATURE_DARWIN_JIT
+-_Atomic(char) *page_execp;
++extern _Atomic(char) *page_execp;
+ static inline void set_page_executable(page_index_t i, bool val) { page_execp[i] = val; }
+ #endif
+ 
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/compilers/scala-runners/default.nix b/nixpkgs/pkgs/development/compilers/scala-runners/default.nix
new file mode 100644
index 000000000000..57756b423d55
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala-runners/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub, coursier }:
+
+stdenv.mkDerivation rec {
+  pname = "scala-runners";
+  version = "unstable-2021-07-28";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "dwijnand";
+    rev = "9bf096ca81f4974d7327e291eac291e22b344a8f";
+    sha256 = "032fds5nr102h1lc81n9jc60jmxzivi4md4hcjrlqn076hfhj4ax";
+  };
+
+  dontBuild = true;
+  installPhase = ''
+    mkdir -p $out/bin $out/lib
+    sed -ie "s| cs | ${coursier}/bin/cs |" scala-runner
+    cp scala-runner $out/lib
+    ln -s $out/lib/scala-runner $out/bin/scala
+    ln -s $out/lib/scala-runner $out/bin/scalac
+    ln -s $out/lib/scala-runner $out/bin/scalap
+    ln -s $out/lib/scala-runner $out/bin/scaladoc
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/dwijnand/scala-runners";
+    description = "An alternative implementation of the Scala distribution's runners";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ hrhino ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/2.x.nix b/nixpkgs/pkgs/development/compilers/scala/2.x.nix
new file mode 100644
index 000000000000..6268fea658dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/2.x.nix
@@ -0,0 +1,119 @@
+{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript
+, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }:
+
+let
+  repo = "git@github.com:scala/scala.git";
+
+  versionMap = {
+    "2.10" = {
+      version = "2.10.7";
+      sha256 = "koMRmRb2u3cU4HaihAzPItWIGbNVIo7RWRrm92kp8RE=";
+      pname = "scala_2_10";
+    };
+
+    "2.11" = {
+      version = "2.11.12";
+      sha256 = "sR19M2mcpPYLw7K2hY/ZU+PeK4UiyUP0zaS2dDFhlqg=";
+      pname = "scala_2_11";
+    };
+
+    "2.12" = {
+      version = "2.12.18";
+      sha256 = "naIJCET+YPrbXln39F9aU3DBdnjcn7PYMmhDxETOA5g=";
+      pname = "scala_2_12";
+    };
+
+    "2.13" = {
+      version = "2.13.12";
+      sha256 = "r+fm+1njyIRX6Z9wGHMOUvuifI0V49cVT3KWggbKhxk=";
+      pname = "scala_2_13";
+    };
+  };
+
+in with versionMap.${majorVersion};
+
+stdenv.mkDerivation rec {
+  inherit version;
+
+  name = "scala-${version}";
+
+  src = fetchurl {
+    inherit sha256;
+    url = "https://www.scala-lang.org/files/archive/scala-${version}.tgz";
+  };
+
+  propagatedBuildInputs = [ jre ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+    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
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/scalac -version 2>&1 | grep '^Scala compiler version ${version}'
+
+    echo 'println("foo"*3)' | $out/bin/scala 2>/dev/null | grep "foofoofoo"
+  '';
+
+  passthru = {
+    updateScript = writeScript "update.sh" ''
+      #!${stdenv.shell}
+      set -o errexit
+      PATH=${
+        lib.makeBinPath [
+          common-updater-scripts
+          coreutils
+          git
+          gnused
+          nix
+          nixfmt
+        ]
+      }
+      versionSelect='v${lib.versions.major version}.${lib.versions.minor version}.*'
+      oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
+      latestTag="$(git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags ${repo} "$versionSelect" | tail --lines=1 | cut --delimiter='/' --fields=3 | sed 's|^v||g')"
+      if [ "$oldVersion" != "$latestTag" ]; then
+        nixpkgs="$(git rev-parse --show-toplevel)"
+        default_nix="$nixpkgs/pkgs/development/compilers/scala/2.x.nix"
+        update-source-version ${pname} "$latestTag" --version-key=version --print-changes
+        nixfmt "$default_nix"
+      else
+        echo "${pname} is already up-to-date"
+      fi
+    '';
+  };
+
+  meta = with lib; {
+    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 = licenses.bsd3;
+    platforms = platforms.all;
+    branch = versions.majorMinor version;
+    maintainers = with maintainers; [ nequissimus kashw2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/bare.nix b/nixpkgs/pkgs/development/compilers/scala/bare.nix
new file mode 100644
index 000000000000..09180e54a5a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/bare.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl, makeWrapper, jre, ncurses }:
+
+stdenv.mkDerivation rec {
+  version = "3.3.1";
+  pname = "scala-bare";
+
+  src = fetchurl {
+    url = "https://github.com/lampepfl/dotty/releases/download/${version}/scala3-${version}.tar.gz";
+    hash = "sha256-EcDqD3HEOvD7GzVd3kFL/vAaYMFyk2deI6RNAlJpzRU=";
+  };
+
+  propagatedBuildInputs = [ jre ncurses.dev ] ;
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out
+    mv * $out
+  '';
+
+  # Use preFixup instead of fixupPhase
+  # because we want the default fixupPhase as well
+  preFixup = ''
+        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 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 = with maintainers; [ karolchmist virusdave kashw2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/default.nix b/nixpkgs/pkgs/development/compilers/scala/default.nix
new file mode 100644
index 000000000000..2ad68ffec3b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, makeWrapper, jre, callPackage }:
+
+let
+  bare = callPackage ./bare.nix {
+    inherit stdenv fetchurl makeWrapper jre;
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "scala";
+  inherit (bare) version;
+
+  dontUnpack = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    ln -s ${bare}/bin/scalac $out/bin/scalac
+    ln -s ${bare}/bin/scaladoc $out/bin/scaladoc
+    ln -s ${bare}/bin/scala $out/bin/scala
+    ln -s ${bare}/bin/common $out/bin/common
+  '';
+
+  inherit (bare) meta;
+} // { inherit bare; }
diff --git a/nixpkgs/pkgs/development/compilers/scryer-prolog/Cargo.lock b/nixpkgs/pkgs/development/compilers/scryer-prolog/Cargo.lock
new file mode 100644
index 000000000000..315f61a73402
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scryer-prolog/Cargo.lock
@@ -0,0 +1,3058 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "aho-corasick"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
+
+[[package]]
+name = "assert_cmd"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c98233c6673d8601ab23e77eb38f999c51100d46c5703b17288c57fddf3a1ffe"
+dependencies = [
+ "bstr",
+ "doc-comment",
+ "predicates",
+ "predicates-core",
+ "predicates-tree",
+ "wait-timeout",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "backtrace"
+version = "0.3.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "base64"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
+
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "base64"
+version = "0.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2"
+
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
+
+[[package]]
+name = "bitvec"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
+dependencies = [
+ "funty",
+ "radium",
+ "tap",
+ "wyz",
+]
+
+[[package]]
+name = "blake2"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330"
+dependencies = [
+ "byte-tools",
+ "crypto-mac",
+ "digest 0.8.1",
+ "opaque-debug",
+]
+
+[[package]]
+name = "blake2"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
+dependencies = [
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
+dependencies = [
+ "block-padding",
+ "byte-tools",
+ "byteorder",
+ "generic-array 0.12.4",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array 0.14.7",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
+dependencies = [
+ "byte-tools",
+]
+
+[[package]]
+name = "bstr"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
+dependencies = [
+ "lazy_static",
+ "memchr",
+ "regex-automata 0.1.10",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
+
+[[package]]
+name = "byte-tools"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "bytes"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+
+[[package]]
+name = "cc"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-targets",
+]
+
+[[package]]
+name = "clipboard-win"
+version = "4.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362"
+dependencies = [
+ "error-code",
+ "str-buf",
+ "winapi",
+]
+
+[[package]]
+name = "console_error_panic_hook"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "console_log"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be8aed40e4edbf4d3b4431ab260b63fdc40f5780a4766824329ea0f1eefe3c0f"
+dependencies = [
+ "log",
+ "web-sys",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+
+[[package]]
+name = "cpu-time"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crossterm"
+version = "0.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ebde6a9dd5e331cd6c6f48253254d117642c31653baa475e394657c59c1f7d"
+dependencies = [
+ "bitflags 1.3.2",
+ "crossterm_winapi",
+ "libc",
+ "mio 0.7.14",
+ "parking_lot 0.11.2",
+ "signal-hook",
+ "signal-hook-mio",
+ "winapi",
+]
+
+[[package]]
+name = "crossterm_winapi"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a6966607622438301997d3dac0d2f6e9a90c68bb6bc1785ea98456ab93c0507"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "crrl"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b083214486dae00f49a2f21f32fc8bbc333d6048601bc89203a8ab92bfa691f0"
+dependencies = [
+ "blake2 0.10.6",
+ "rand_core",
+ "sha2",
+ "sha3 0.10.8",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array 0.14.7",
+ "typenum",
+]
+
+[[package]]
+name = "crypto-mac"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
+dependencies = [
+ "generic-array 0.12.4",
+ "subtle 1.0.0",
+]
+
+[[package]]
+name = "ctrlc"
+version = "3.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf"
+dependencies = [
+ "nix 0.27.1",
+ "windows-sys",
+]
+
+[[package]]
+name = "dashmap"
+version = "5.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
+dependencies = [
+ "cfg-if",
+ "hashbrown 0.14.0",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core 0.9.8",
+]
+
+[[package]]
+name = "dashu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b669b1473cc6b33aba72ab3ddfe1055ff8fc28accd85130c412c2cd922a7c4e"
+dependencies = [
+ "dashu-base",
+ "dashu-float",
+ "dashu-int",
+ "dashu-macros",
+ "dashu-ratio",
+]
+
+[[package]]
+name = "dashu-base"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e183fc153511989674ede304b5592c74683393ca09cf20391898c28d6ba04264"
+
+[[package]]
+name = "dashu-float"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7696675af30ae057b1629d27b153bbafb06461826b7d0ef1858d06b801f355f"
+dependencies = [
+ "dashu-base",
+ "dashu-int",
+ "num-modular",
+ "num-order",
+ "static_assertions",
+]
+
+[[package]]
+name = "dashu-int"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc257a884b3e8c9a1a577ff7226dcb4d6bda0ff96dfa76975e2c9d7205e3b8ea"
+dependencies = [
+ "cfg-if",
+ "dashu-base",
+ "num-modular",
+ "num-order",
+ "static_assertions",
+]
+
+[[package]]
+name = "dashu-macros"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e496c319e615b86b21d6b0ea9e2f96a4f5fb2eb4178293b04a51ffc30a6c3f54"
+dependencies = [
+ "dashu-base",
+ "dashu-float",
+ "dashu-int",
+ "dashu-ratio",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "dashu-ratio"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f0f73f0ad6cbc94f52306455603e307b065af83bc61101968d53b6870127a05"
+dependencies = [
+ "dashu-base",
+ "dashu-float",
+ "dashu-int",
+ "num-modular",
+ "num-order",
+]
+
+[[package]]
+name = "derive_deref"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcdbcee2d9941369faba772587a565f4f534e42cb8d17e5295871de730163b2b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "difflib"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
+
+[[package]]
+name = "digest"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
+dependencies = [
+ "generic-array 0.12.4",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer 0.10.4",
+ "crypto-common",
+ "subtle 2.5.0",
+]
+
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "divrem"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc9f8914dcb99891bdfee82536bbff8d9aa612b0dbe83872afbc66902bdec0b9"
+
+[[package]]
+name = "doc-comment"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+
+[[package]]
+name = "either"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "endian-type"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
+
+[[package]]
+name = "errno"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "error-code"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21"
+dependencies = [
+ "libc",
+ "str-buf",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
+
+[[package]]
+name = "fd-lock"
+version = "3.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5"
+dependencies = [
+ "cfg-if",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "funty"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
+
+[[package]]
+name = "futf"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+
+[[package]]
+name = "futures-task"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+
+[[package]]
+name = "futures-util"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd"
+dependencies = [
+ "typenum",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gimli"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
+
+[[package]]
+name = "git-version"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6b0decc02f4636b9ccad390dcbe77b722a77efedfa393caf8379a51d5c61899"
+dependencies = [
+ "git-version-macro",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "git-version-macro"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f"
+dependencies = [
+ "proc-macro-hack",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
+
+[[package]]
+name = "headers"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270"
+dependencies = [
+ "base64 0.21.4",
+ "bytes",
+ "headers-core",
+ "http",
+ "httpdate",
+ "mime",
+ "sha1",
+]
+
+[[package]]
+name = "headers-core"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
+dependencies = [
+ "http",
+]
+
+[[package]]
+name = "heck"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
+
+[[package]]
+name = "home"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "hostname"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+dependencies = [
+ "libc",
+ "match_cfg",
+ "winapi",
+]
+
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "http"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "hyper"
+version = "0.14.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2 0.4.9",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "idna"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6"
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+
+[[package]]
+name = "js-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "keccak"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940"
+dependencies = [
+ "cpufeatures",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "lexical"
+version = "5.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f404a90a744e32e8be729034fc33b90cf2a56418fbf594d69aa3c0214ad414e5"
+dependencies = [
+ "cfg-if",
+ "lexical-core",
+]
+
+[[package]]
+name = "lexical-core"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
+dependencies = [
+ "arrayvec",
+ "bitflags 1.3.2",
+ "cfg-if",
+ "ryu",
+ "static_assertions",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.148"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
+
+[[package]]
+name = "libffi"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce826c243048e3d5cec441799724de52e2d42f820468431fc3fceee2341871e2"
+dependencies = [
+ "libc",
+ "libffi-sys",
+]
+
+[[package]]
+name = "libffi-sys"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f36115160c57e8529781b4183c2bb51fdc1f6d6d1ed345591d84be7703befb3c"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"
+
+[[package]]
+name = "lock_api"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
+[[package]]
+name = "maplit"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
+
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
+[[package]]
+name = "markup5ever_rcdom"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9521dd6750f8e80ee6c53d65e2e4656d7de37064f3a7a5d2d11d05df93839c2"
+dependencies = [
+ "html5ever",
+ "markup5ever",
+ "tendril",
+ "xml5ever",
+]
+
+[[package]]
+name = "match_cfg"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
+
+[[package]]
+name = "memchr"
+version = "2.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mime_guess"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "mio"
+version = "0.7.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
+dependencies = [
+ "libc",
+ "log",
+ "miow",
+ "ntapi",
+ "winapi",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys",
+]
+
+[[package]]
+name = "miow"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "modular-bitfield"
+version = "0.11.2"
+source = "git+https://github.com/mthom/modular-bitfield#213535c684af277563678179d8496f11b84a283f"
+dependencies = [
+ "modular-bitfield-impl",
+ "static_assertions",
+]
+
+[[package]]
+name = "modular-bitfield-impl"
+version = "0.11.2"
+source = "git+https://github.com/mthom/modular-bitfield#213535c684af277563678179d8496f11b84a283f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "multer"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2"
+dependencies = [
+ "bytes",
+ "encoding_rs",
+ "futures-util",
+ "http",
+ "httparse",
+ "log",
+ "memchr",
+ "mime",
+ "spin 0.9.8",
+ "version_check",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
+
+[[package]]
+name = "nibble_vec"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
+dependencies = [
+ "smallvec",
+]
+
+[[package]]
+name = "nix"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "nix"
+version = "0.27.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
+dependencies = [
+ "bitflags 2.4.0",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "ntapi"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "num-modular"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f"
+
+[[package]]
+name = "num-order"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "537b596b97c40fcf8056d153049eb22f481c17ebce72a513ec9286e4986d1bb6"
+dependencies = [
+ "num-modular",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.32.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+
+[[package]]
+name = "opaque-debug"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
+
+[[package]]
+name = "openssl"
+version = "0.10.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c"
+dependencies = [
+ "bitflags 2.4.0",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.93"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "ordered-float"
+version = "2.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
+dependencies = [
+ "instant",
+ "lock_api",
+ "parking_lot_core 0.8.6",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core 0.9.8",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
+dependencies = [
+ "cfg-if",
+ "instant",
+ "libc",
+ "redox_syscall 0.2.16",
+ "smallvec",
+ "winapi",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.3.5",
+ "smallvec",
+ "windows-targets",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
+
+[[package]]
+name = "phf"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2ac8b67553a7ca9457ce0e526948cad581819238f4a9d1ea74545851fa24f37"
+dependencies = [
+ "phf_macros",
+ "phf_shared 0.9.0",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d43f3220d96e0080cc9ea234978ccd80d904eafb17be31bb0f76daaea6493082"
+dependencies = [
+ "phf_shared 0.9.0",
+ "rand",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b706f5936eb50ed880ae3009395b43ed19db5bff2ebd459c95e7bf013a89ab86"
+dependencies = [
+ "phf_generator 0.9.1",
+ "phf_shared 0.9.0",
+ "proc-macro-hack",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a68318426de33640f02be62b4ae8eb1261be2efbc337b60c54d845bf4484e0d9"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "predicates"
+version = "2.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd"
+dependencies = [
+ "difflib",
+ "itertools",
+ "predicates-core",
+]
+
+[[package]]
+name = "predicates-core"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
+
+[[package]]
+name = "predicates-tree"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
+dependencies = [
+ "predicates-core",
+ "termtree",
+]
+
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.67"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "radium"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
+
+[[package]]
+name = "radix_trie"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
+dependencies = [
+ "endian-type",
+ "nibble_vec",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+dependencies = [
+ "getrandom",
+ "redox_syscall 0.2.16",
+ "thiserror",
+]
+
+[[package]]
+name = "ref_thread_local"
+version = "0.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d813022b2e00774a48eaf43caaa3c20b45f040ba8cbf398e2e8911a06668dbe6"
+
+[[package]]
+name = "regex"
+version = "1.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata 0.3.3",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+
+[[package]]
+name = "regex-automata"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
+
+[[package]]
+name = "reqwest"
+version = "0.11.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
+dependencies = [
+ "base64 0.21.4",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-native-tls",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "winreg",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin 0.5.2",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "ring-wasi"
+version = "0.16.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db1418b2535ed5e71a9fc73d3fede8596792fd7cb4b4a0f8ecf412cfddaaedd4"
+dependencies = [
+ "cc",
+ "getrandom",
+ "libc",
+ "once_cell",
+ "spin 0.5.2",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "ripemd160"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad5112e0dbbb87577bfbc56c42450235e3012ce336e29c5befd7807bd626da4a"
+dependencies = [
+ "block-buffer 0.7.3",
+ "digest 0.8.1",
+ "opaque-debug",
+]
+
+[[package]]
+name = "roxmltree"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5001f134077069d87f77c8b9452b690df2445f7a43f1c7ca4a1af8dd505789d"
+dependencies = [
+ "xmlparser",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustix"
+version = "0.38.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f"
+dependencies = [
+ "bitflags 2.4.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rustls"
+version = "0.20.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99"
+dependencies = [
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
+dependencies = [
+ "base64 0.21.4",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+
+[[package]]
+name = "rustyline"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "994eca4bca05c87e86e15d90fc7a91d1be64b4482b38cb2d27474568fe7c9db9"
+dependencies = [
+ "bitflags 2.4.0",
+ "cfg-if",
+ "clipboard-win",
+ "fd-lock",
+ "home",
+ "libc",
+ "log",
+ "memchr",
+ "nix 0.26.4",
+ "radix_trie",
+ "scopeguard",
+ "unicode-segmentation",
+ "unicode-width",
+ "utf8parse",
+ "winapi",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "scryer-prolog"
+version = "0.9.3"
+dependencies = [
+ "assert_cmd",
+ "base64 0.12.3",
+ "bit-set",
+ "bitvec",
+ "blake2 0.8.1",
+ "bytes",
+ "chrono",
+ "console_error_panic_hook",
+ "console_log",
+ "cpu-time",
+ "crossterm",
+ "crrl",
+ "ctrlc",
+ "dashu",
+ "derive_deref",
+ "dirs-next",
+ "divrem",
+ "futures",
+ "fxhash",
+ "getrandom",
+ "git-version",
+ "hostname",
+ "indexmap",
+ "lazy_static",
+ "lexical",
+ "libc",
+ "libffi",
+ "libloading",
+ "maplit",
+ "modular-bitfield",
+ "native-tls",
+ "num-order",
+ "ordered-float",
+ "phf 0.9.0",
+ "predicates-core",
+ "proc-macro2",
+ "quote",
+ "rand",
+ "ref_thread_local",
+ "regex",
+ "reqwest",
+ "ring",
+ "ring-wasi",
+ "ripemd160",
+ "roxmltree",
+ "rustyline",
+ "ryu",
+ "select",
+ "serde-wasm-bindgen",
+ "serial_test",
+ "sha3 0.8.2",
+ "smallvec",
+ "static_assertions",
+ "strum",
+ "strum_macros",
+ "syn 2.0.37",
+ "to-syn-value",
+ "to-syn-value_derive",
+ "tokio",
+ "walkdir",
+ "warp",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "select"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f9da09dc3f4dfdb6374cbffff7a2cffcec316874d4429899eefdc97b3b94dcd"
+dependencies = [
+ "bit-set",
+ "html5ever",
+ "markup5ever_rcdom",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.188"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde-wasm-bindgen"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e"
+dependencies = [
+ "js-sys",
+ "serde",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.188"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serial_test"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d"
+dependencies = [
+ "dashmap",
+ "futures",
+ "lazy_static",
+ "log",
+ "parking_lot 0.12.1",
+ "serial_test_derive",
+]
+
+[[package]]
+name = "serial_test_derive"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha3"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf"
+dependencies = [
+ "block-buffer 0.7.3",
+ "byte-tools",
+ "digest 0.8.1",
+ "keccak",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha3"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
+dependencies = [
+ "digest 0.10.7",
+ "keccak",
+]
+
+[[package]]
+name = "signal-hook"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-mio"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
+dependencies = [
+ "libc",
+ "mio 0.7.14",
+ "signal-hook",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "siphasher"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
+
+[[package]]
+name = "socket2"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "socket2"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "str-buf"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
+
+[[package]]
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot 0.12.1",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "strum"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb"
+
+[[package]]
+name = "strum_macros"
+version = "0.23.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "subtle"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
+
+[[package]]
+name = "subtle"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tap"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
+
+[[package]]
+name = "tempfile"
+version = "3.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "redox_syscall 0.3.5",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "tendril"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
+[[package]]
+name = "termtree"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
+
+[[package]]
+name = "thiserror"
+version = "1.0.48"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.48"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+
+[[package]]
+name = "to-syn-value"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfcc684f2ceaec3b4e8689657c9e0944b07bf5e34563e0bd758c4d42c05c82ed"
+dependencies = [
+ "syn 2.0.37",
+ "to-syn-value_derive",
+]
+
+[[package]]
+name = "to-syn-value_derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3dfffda778de8443144ff3b042ddf14e8bc5445f0fd9fe937c3d252535dc9212"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "tokio"
+version = "1.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio 0.8.8",
+ "num_cpus",
+ "parking_lot 0.12.1",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2 0.5.4",
+ "tokio-macros",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.23.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
+dependencies = [
+ "rustls",
+ "tokio",
+ "webpki",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-tungstenite"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd"
+dependencies = [
+ "futures-util",
+ "log",
+ "tokio",
+ "tungstenite",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "tower-service"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
+
+[[package]]
+name = "tracing"
+version = "0.1.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
+dependencies = [
+ "cfg-if",
+ "log",
+ "pin-project-lite",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
+
+[[package]]
+name = "tungstenite"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788"
+dependencies = [
+ "base64 0.13.1",
+ "byteorder",
+ "bytes",
+ "http",
+ "httparse",
+ "log",
+ "rand",
+ "sha1",
+ "thiserror",
+ "url",
+ "utf-8",
+]
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "unicase"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
+dependencies = [
+ "version_check",
+]
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "url"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+]
+
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "wait-timeout"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "walkdir"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "warp"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba431ef570df1287f7f8b07e376491ad54f84d26ac473489427231e1718e1f69"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "headers",
+ "http",
+ "hyper",
+ "log",
+ "mime",
+ "mime_guess",
+ "multer",
+ "percent-encoding",
+ "pin-project",
+ "rustls-pemfile",
+ "scoped-tls",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-rustls",
+ "tokio-stream",
+ "tokio-tungstenite",
+ "tokio-util",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+
+[[package]]
+name = "web-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "winreg"
+version = "0.50.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
+dependencies = [
+ "cfg-if",
+ "windows-sys",
+]
+
+[[package]]
+name = "wyz"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
+dependencies = [
+ "tap",
+]
+
+[[package]]
+name = "xml5ever"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4034e1d05af98b51ad7214527730626f019682d797ba38b51689212118d8e650"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+]
+
+[[package]]
+name = "xmlparser"
+version = "0.13.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
diff --git a/nixpkgs/pkgs/development/compilers/scryer-prolog/default.nix b/nixpkgs/pkgs/development/compilers/scryer-prolog/default.nix
new file mode 100644
index 000000000000..45d7ea21749b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scryer-prolog/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, openssl
+, gmp
+, libmpc
+, mpfr
+, stdenv
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "scryer-prolog";
+  version = "0.9.3";
+
+  src = fetchFromGitHub {
+    owner = "mthom";
+    repo = "scryer-prolog";
+    rev = "v${version}";
+    hash = "sha256-0J69Zl+ONvR6T+xf2YeShwn3/JWOHyFHLpNFwmEaIOI=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "cargo-lock-version-bump.patch";
+      url = "https://github.com/mthom/scryer-prolog/commit/d6fe5b5aaddb9886a8a34841a65cb28c317c2913.patch";
+      hash = "sha256-xkGsjVV/FcyZXGkI84FlqcRIuDM7isCCWZ1sbKql7es=";
+    })
+  ];
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "modular-bitfield-0.11.2" = "sha256-vcx+xt5owZVWOlKwudAr0EB1zlLLL5pVfWokw034BQI=";
+    };
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl gmp libmpc mpfr ];
+
+  CARGO_FEATURE_USE_SYSTEM_LIBS = true;
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "A modern Prolog implementation written mostly in Rust";
+    homepage = "https://github.com/mthom/scryer-prolog";
+    license = with licenses; [ bsd3 ];
+    maintainers = with maintainers; [ malbarbo wkral ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/semeru-bin/generate-sources.py b/nixpkgs/pkgs/development/compilers/semeru-bin/generate-sources.py
new file mode 100755
index 000000000000..da23559955d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/semeru-bin/generate-sources.py
@@ -0,0 +1,85 @@
+#!/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
+
+feature_versions = (8, 11, 16, 17)
+oses = ("mac", "linux")
+types = ("jre", "jdk")
+impls = ("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.status_code), file=sys.stderr)
+        sys.exit(1)
+    return resp.text.strip().split(" ")[0]
+
+def generate_sources(releases, feature_version, out):
+    latest_version = None
+    for release in releases:
+        if release["prerelease"]: continue
+        if not re.search("_openj9-", release["name"]): continue
+
+        for asset in release["assets"]:
+            match = re.match("ibm-semeru-open-(?P<image_type>[a-z]*)_(?P<architecture>[a-z0-9]*)_(?P<os>[a-z]*)_(?:(?P<major1>[0-9]*)u(?P<security1>[0-9]*)b(?P<build1>[0-9]*)|(?P<major2>[0-9]*)\\.(?P<minor2>[0-9]*)\\.(?P<security2>[0-9]*)_(?P<build2>[0-9]*))_(?P<jvm_impl>[a-z0-9]*)-[0-9]*\\.[0-9]*\\.[0-9]\\.tar\\.gz$", asset["name"])
+
+            if not match: continue
+            if match["os"] not in oses: continue
+            if match["image_type"] not in types: continue
+            if match["jvm_impl"] not in impls: continue
+            if match["architecture"] not in arch_to_nixos: continue
+
+            version = ".".join([
+                match["major1"] or match["major2"],
+                match["minor2"] or "0",
+                match["security1"] or match["security2"]
+            ])
+            build = match["build1"] or match["build2"]
+
+            if latest_version and latest_version != (version, build): continue
+            latest_version = (version, build)
+
+            arch_map = (
+                out
+                .setdefault(match["jvm_impl"], {})
+                .setdefault(match["os"], {})
+                .setdefault(match["image_type"], {})
+                .setdefault(feature_version, {
+                    "packageType": match["image_type"],
+                    "vmType": match["jvm_impl"],
+                })
+            )
+
+            for nixos_arch in arch_to_nixos[match["architecture"]]:
+                arch_map[nixos_arch] = {
+                    "url": asset["browser_download_url"],
+                    "sha256": get_sha256(asset["browser_download_url"] + ".sha256.txt"),
+                    "version": version,
+                    "build": build,
+                }
+
+    return out
+
+
+out = {}
+for feature_version in feature_versions:
+    resp = requests.get(f"https://api.github.com/repos/ibmruntimes/semeru{feature_version}-binaries/releases")
+
+    if resp.status_code != 200:
+        print("error: could not fetch data for release {} (code {}) {}".format(feature_version, resp.status_code, resp.content), file=sys.stderr)
+        sys.exit(1)
+    generate_sources(resp.json(), f"openjdk{feature_version}", out)
+
+with open("sources.json", "w") as f:
+    json.dump(out, f, indent=2, sort_keys=True)
+    f.write('\n')
diff --git a/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin-base.nix b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin-base.nix
new file mode 100644
index 000000000000..ccbc7d871e8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin-base.nix
@@ -0,0 +1,5 @@
+args:
+import ../temurin-bin/jdk-darwin-base.nix ({
+  name-prefix = "semeru";
+  brand-name = "IBM Semeru Runtime";
+} // args)
diff --git a/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin.nix b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin.nix
new file mode 100644
index 000000000000..f58fec3a84c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-darwin.nix
@@ -0,0 +1,16 @@
+{ lib, callPackage }:
+
+let
+  sources = (lib.importJSON ./sources.json).openj9.mac;
+  common = opts: callPackage (import ./jdk-darwin-base.nix opts) {};
+in
+{
+  jdk-8 = common { sourcePerArch = sources.jdk.openjdk8; };
+  jre-8 = common { sourcePerArch = sources.jre.openjdk8; };
+  jdk-11 = common { sourcePerArch = sources.jdk.openjdk11; };
+  jre-11 = common { sourcePerArch = sources.jre.openjdk11; };
+  jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; };
+  jre-16 = common { sourcePerArch = sources.jre.openjdk16; };
+  jdk-17 = common { sourcePerArch = sources.jdk.openjdk17; };
+  jre-17 = common { sourcePerArch = sources.jre.openjdk17; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux-base.nix b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux-base.nix
new file mode 100644
index 000000000000..41879ea88681
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux-base.nix
@@ -0,0 +1,5 @@
+args:
+import ../temurin-bin/jdk-linux-base.nix ({
+  name-prefix = "semeru";
+  brand-name = "IBM Semeru Runtime";
+} // args)
diff --git a/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux.nix b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux.nix
new file mode 100644
index 000000000000..c80dd991bf04
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/semeru-bin/jdk-linux.nix
@@ -0,0 +1,16 @@
+{ lib, callPackage }:
+
+let
+  sources = (lib.importJSON ./sources.json).openj9.linux;
+  common = opts: callPackage (import ./jdk-linux-base.nix opts) {};
+in
+{
+  jdk-8 = common { sourcePerArch = sources.jdk.openjdk8; };
+  jre-8 = common { sourcePerArch = sources.jre.openjdk8; };
+  jdk-11 = common { sourcePerArch = sources.jdk.openjdk11; };
+  jre-11 = common { sourcePerArch = sources.jre.openjdk11; };
+  jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; };
+  jre-16 = common { sourcePerArch = sources.jre.openjdk16; };
+  jdk-17 = common { sourcePerArch = sources.jdk.openjdk17; };
+  jre-17 = common { sourcePerArch = sources.jre.openjdk17; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/semeru-bin/sources.json b/nixpkgs/pkgs/development/compilers/semeru-bin/sources.json
new file mode 100644
index 000000000000..5e04fa90af74
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/semeru-bin/sources.json
@@ -0,0 +1,248 @@
+{
+  "openj9": {
+    "linux": {
+      "jdk": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "488739171f84e3949df6ccb1c40eaf1b73541748b123d88780329648d6b383d0",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jdk_aarch64_linux_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          },
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "eeca01d4e245a001d01663c5c20a8d50ef3d572b47a9b3689a5154f2a37bf005",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jdk_x64_linux_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          }
+        },
+        "openjdk16": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "022cda1210331488c3db3d0d1282ea74467397fdabc34cb482cdfe81c45f6a15",
+            "url": "https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz",
+            "version": "16.0.2"
+          },
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "1349eb9a1d9af491a1984d66a80126730357c4a5c4fcbe7112a2c832f6c0886e",
+            "url": "https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "18d291411ee4a956018b4dcefe436971e73694128782617f1b44beca991956c5",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jdk_aarch64_linux_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          },
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "78ae15d9e01fce3a473f4d6a90c331fb766211b950931088c2a85590f178ad39",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jdk_x64_linux_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          }
+        },
+        "openjdk8": {
+          "aarch64": {
+            "build": "01",
+            "sha256": "6b89e648899709459b7c7dbe0a5b1ea480a88da84c6163f01255d638dbdd051b",
+            "url": "https://github.com/ibmruntimes/semeru8-binaries/releases/download/8u345-b01_openj9-0.33.0/ibm-semeru-open-jdk_aarch64_linux_8u345b01_openj9-0.33.0.tar.gz",
+            "version": "8.0.345"
+          },
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "01",
+            "sha256": "82c8232a5cb420246457d65a5014602feb8b288079cdae896e22a2eb6e390b58",
+            "url": "https://github.com/ibmruntimes/semeru8-binaries/releases/download/8u345-b01_openj9-0.33.0/ibm-semeru-open-jdk_x64_linux_8u345b01_openj9-0.33.0.tar.gz",
+            "version": "8.0.345"
+          }
+        }
+      },
+      "jre": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "49dc05a3e9f3f99c5f8fa466261aa3e33a753694c67cabfa7d3f682e5a2e3685",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jre_aarch64_linux_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          },
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "ba09711193b8b8664478f3f949b5320232f65c1bdf61f32a885d84de73c02767",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jre_x64_linux_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          }
+        },
+        "openjdk16": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "575dc3827077fc661fd1103effaa13ccd0f1606d01a33643956ed2eb1ece9763",
+            "url": "https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jre_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz",
+            "version": "16.0.2"
+          },
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "b077cd0b35d3ed1927c22e5b498264ecff67297992809056187b42662edfc536",
+            "url": "https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jre_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "6c40c1e0d7ee0509c44465e9f26dd970904137a95fd751e6447b1d6a9ef5092a",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jre_aarch64_linux_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          },
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "b2c176f8aa8cc7138d4c22ce9298d8f49597e1d8e3fdd33125898e5ee0182c93",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jre_x64_linux_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          }
+        },
+        "openjdk8": {
+          "aarch64": {
+            "build": "01",
+            "sha256": "03caff41622e84a6e7fa66a225414a9b6eefb38dd215f830cae0bc4bbfc55b5c",
+            "url": "https://github.com/ibmruntimes/semeru8-binaries/releases/download/8u345-b01_openj9-0.33.0/ibm-semeru-open-jre_aarch64_linux_8u345b01_openj9-0.33.0.tar.gz",
+            "version": "8.0.345"
+          },
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "01",
+            "sha256": "0d4fe62716b9da2ccce324b5b46d57e8d47e5dfb5d128f87e16135ee9bc36cdc",
+            "url": "https://github.com/ibmruntimes/semeru8-binaries/releases/download/8u345-b01_openj9-0.33.0/ibm-semeru-open-jre_x64_linux_8u345b01_openj9-0.33.0.tar.gz",
+            "version": "8.0.345"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "9881b292142a129f6f5c6b21608b090f8f94625052b4f7d0ce5bd982c054ca2e",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jdk_aarch64_mac_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          },
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "8638735d2cae3efff212f898728685380355bb0a298076e9e46244d0bf3d4a64",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jdk_x64_mac_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          }
+        },
+        "openjdk16": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "89e807261145243a358a2a626f64340944c03622f34eaa35429053e2085d7aef",
+            "url": "https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_mac_16.0.2_7_openj9-0.27.0.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "bf22628b54115dff9939b94751531544ab735b7cbbc8d6ddfe83d1b04df3a532",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jdk_aarch64_mac_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          },
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "a935f20564e347a9292955c04eb57e51efdb1853ae7f0b4fe759b22c9fe248be",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jdk_x64_mac_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          }
+        },
+        "openjdk8": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "01",
+            "sha256": "c69086950c006b17484a70ef7bc85e92d121be15e69e282e1446fd238d42b6b4",
+            "url": "https://github.com/ibmruntimes/semeru8-binaries/releases/download/8u345-b01_openj9-0.33.0/ibm-semeru-open-jdk_x64_mac_8u345b01_openj9-0.33.0.tar.gz",
+            "version": "8.0.345"
+          }
+        }
+      },
+      "jre": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "39802020896476342dc11486e3cbdf10f6311c172abeb4a1e2931b472da4417e",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jre_aarch64_mac_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          },
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "92f87a3c2fb5fe60d3d51020ff95b9c234b2ae2677b79aebbe749dda717c9cdd",
+            "url": "https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.16%2B8_openj9-0.33.0/ibm-semeru-open-jre_x64_mac_11.0.16_8_openj9-0.33.0.tar.gz",
+            "version": "11.0.16"
+          }
+        },
+        "openjdk16": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "7",
+            "sha256": "2cb8007de405d0c8f160549309bcfc1adc82e304eb372e86ce0e0a214239438f",
+            "url": "https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jre_x64_mac_16.0.2_7_openj9-0.27.0.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "4057c94cd46b814cc5a4d683d5f0b95dbd0b9e13e8c2e11155561ad0d8bec85b",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jre_aarch64_mac_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          },
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "8e957d2eb47eaca64516ac669272c6e5186155ed8ee4d6a77e0d4b7811cd7bb6",
+            "url": "https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.4%2B8_openj9-0.33.0/ibm-semeru-open-jre_x64_mac_17.0.4_8_openj9-0.33.0.tar.gz",
+            "version": "17.0.4"
+          }
+        },
+        "openjdk8": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "01",
+            "sha256": "019e08dea8fbd54517dacbeac791d85717902800dd8bba77fbca1dfc6b0abd9e",
+            "url": "https://github.com/ibmruntimes/semeru8-binaries/releases/download/8u345-b01_openj9-0.33.0/ibm-semeru-open-jre_x64_mac_8u345b01_openj9-0.33.0.tar.gz",
+            "version": "8.0.345"
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/nixpkgs/pkgs/development/compilers/serpent/default.nix b/nixpkgs/pkgs/development/compilers/serpent/default.nix
new file mode 100644
index 000000000000..227e8037eaee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/serpent/default.nix
@@ -0,0 +1,42 @@
+{ lib, 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";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace 'g++' '${stdenv.cc.targetPrefix}c++'
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv serpent $out/bin
+  '';
+
+  meta = with 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; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/shaderc/default.nix b/nixpkgs/pkgs/development/compilers/shaderc/default.nix
new file mode 100644
index 000000000000..898238224793
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/shaderc/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchFromGitHub, cmake, python3, autoSignDarwinBinariesHook, cctools }:
+# 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 = "a91631b260cba3f22858d6c6827511e636c2458a";
+    hash = "sha256-7kIIU45pe+IF7lGltpIKSvQBmcXR+TWFvmx7ztMNrpc=";
+  };
+  spirv-tools = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-Tools";
+    rev = "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc";
+    hash = "sha256-RzGvoDt1Qc+f6mZsfs99MxX4YB3yFc5FP92Yx/WGrsI=";
+  };
+  spirv-headers = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-Headers";
+    rev = "1c6bb2743599e6eb6f37b2969acc0aef812e32e3";
+    hash = "sha256-/I9dJlBE0kvFvqooKuqMETtOE72Jmva3zIGnq0o4+aE=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "shaderc";
+  version = "2023.8";
+
+  outputs = [ "out" "lib" "bin" "dev" "static" ];
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "shaderc";
+    rev = "v${version}";
+    hash = "sha256-c8mJ361DY2VlSFZ4/RCrV+nqB9HblbOdfMkI4cM1QzM=";
+  };
+
+  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
+    patchShebangs --build utils/
+  '';
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ lib.optionals stdenv.isDarwin [ cctools ]
+    ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ];
+
+  postInstall = ''
+    moveToOutput "lib/*.a" $static
+  '';
+
+  cmakeFlags = [ "-DSHADERC_SKIP_TESTS=ON" ];
+
+  # Fix the paths in .pc, even though it's unclear if all these .pc are really useful.
+  postFixup = ''
+    substituteInPlace "$dev"/lib/pkgconfig/*.pc \
+      --replace '=''${prefix}//' '=/' \
+      --replace "$dev/$dev/" "$dev/"
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A collection of tools, libraries and tests for shader compilation";
+    platforms = platforms.all;
+    license = [ licenses.asl20 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/silice/default.nix b/nixpkgs/pkgs/development/compilers/silice/default.nix
new file mode 100644
index 000000000000..287862b5f2b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/silice/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchFromGitHub, lib
+, cmake, pkg-config, openjdk
+, libuuid, python3
+, silice, yosys, nextpnr, verilator
+, dfu-util, icestorm, trellis
+}:
+
+stdenv.mkDerivation rec {
+  pname = "silice";
+  version = "unstable-2022-08-05";
+
+  src = fetchFromGitHub {
+    owner = "sylefeb";
+    repo = pname;
+    rev = "e26662ac757151e5dd8c60c45291b44906b1299f";
+    sha256 = "sha256-Q1JdgDlEErutZh0OfxYy5C4aVijFKlf6Hm5Iv+1jsj4=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    openjdk
+  ];
+  buildInputs = [
+    libuuid
+  ];
+  propagatedBuildInputs = [
+    (python3.withPackages (p: with p; [ edalize ]))
+  ];
+
+  postPatch = ''
+    patchShebangs antlr/antlr.sh
+    # use nixpkgs version
+    rm -r python/pybind11
+  '';
+
+  installPhase = ''
+    make install
+    mkdir -p $out
+    cp -ar ../{bin,frameworks,lib} $out/
+  '';
+
+  passthru.tests =
+    let
+      testProject = project: stdenv.mkDerivation {
+        name = "${silice.name}-test-${project}";
+        nativeBuildInputs = [
+          silice
+          yosys
+          nextpnr
+          verilator
+          dfu-util
+          icestorm
+          trellis
+        ];
+        src = "${src}/projects";
+        sourceRoot = "projects/${project}";
+        buildPhase = ''
+          targets=$(cut -d " " -f 2 configs | tr -d '\r')
+          for target in $targets ; do
+            make $target ARGS="--no_program"
+          done
+        '';
+        installPhase = ''
+          mkdir $out
+          for target in $targets ; do
+            cp -r BUILD_$target $out/
+          done
+        '';
+      };
+    in {
+      # a selection of test projects that build with the FPGA tools in
+      # nixpkgs
+      audio_sdcard_streamer = testProject "audio_sdcard_streamer";
+      bram_interface = testProject "bram_interface";
+      blinky = testProject "blinky";
+      pipeline_sort = testProject "pipeline_sort";
+    };
+
+  meta = with lib; {
+    description = "Open source language that simplifies prototyping and writing algorithms on FPGA architectures";
+    homepage = "https://github.com/sylefeb/Silice";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.astro ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/sjasmplus/default.nix b/nixpkgs/pkgs/development/compilers/sjasmplus/default.nix
new file mode 100644
index 000000000000..6ef3d11c712f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sjasmplus/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "sjasmplus";
+  version = "1.18.3";
+
+  src = fetchFromGitHub {
+    owner = "z00m128";
+    repo = "sjasmplus";
+    rev = "v${version}";
+    sha256 = "sha256-+FvNYfJ5I91RfuJTiOPhj5KW8HoOq8OgnnpFEgefSGc=";
+  };
+
+  buildFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    install -D sjasmplus $out/bin/sjasmplus
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://z00m128.github.io/sjasmplus/";
+    description = "A Z80 assembly language cross compiler. It is based on the SjASM source code by Sjoerd Mastijn";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ electrified ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix b/nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix
new file mode 100644
index 000000000000..6aba529a8fce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix
@@ -0,0 +1,49 @@
+# This derivation should be redundant, now that regular smlnj works on Darwin,
+# and is preserved only for pre-existing direct usage. New use cases should
+# just use the regular smlnj derivation.
+
+{ lib, 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";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cpio rsync ];
+
+  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     = lib.licenses.free;
+    platforms   = lib.platforms.darwin;
+    maintainers = [ lib.maintainers.jwiegley ];
+    mainProgram = "sml";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/smlnj/default.nix b/nixpkgs/pkgs/development/compilers/smlnj/default.nix
new file mode 100644
index 000000000000..26efb81e1686
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/smlnj/default.nix
@@ -0,0 +1,94 @@
+{ lib, stdenv, fetchurl, Libsystem }:
+let
+  version = "110.95";
+  baseurl = "http://smlnj.cs.uchicago.edu/dist/working/${version}";
+
+  arch = if stdenv.is64bit
+    then "64"
+    else "32";
+
+  boot32 = { url = "${baseurl}/boot.x86-unix.tgz";
+             sha256 = "07bcrvjphyin1ygjbymcqhd1mbfk4hff82wmxcllh77lr28l5dxf"; };
+  boot64 = { url = "${baseurl}/boot.amd64-unix.tgz";
+             sha256 = "1zn96a83kb6bn6228yfjsvb58m2qxw9k4j3qz0p9c8za479w4ch6"; };
+
+  bootBinary = if stdenv.is64bit
+               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}
+  '' + lib.optionalString stdenv.isDarwin ''
+    # Locate standard headers like <unistd.h>
+    substituteInPlace base/runtime/config/gen-posix-names.sh \
+      --replace "\$SDK_PATH/usr" "${Libsystem}"
+  '';
+
+  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 lib; {
+    description = "Standard ML of New Jersey, a compiler";
+    homepage    = "http://smlnj.org";
+    license     = licenses.bsd3;
+    platforms   = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ thoughtpolice ];
+    mainProgram = "sml";
+    # never built on x86_64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isx86_64;
+  };
+}
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..0603706164ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/solc/default.nix
@@ -0,0 +1,134 @@
+{ lib, gccStdenv, fetchzip
+, pkgs
+, boost
+, cmake
+, coreutils
+, fetchpatch
+, jq
+, ncurses
+, python3
+, z3Support ? true
+, z3_4_11 ? null
+, cvc4Support ? gccStdenv.isLinux
+, cvc4 ? null
+, cln ? null
+, gmp ? null
+}:
+
+# compiling source/libsmtutil/CVC4Interface.cpp breaks on clang on Darwin,
+# general commandline tests fail at abiencoderv2_no_warning/ on clang on NixOS
+let z3 = z3_4_11; in
+
+assert z3Support -> z3 != null && lib.versionAtLeast z3.version "4.11.0";
+assert cvc4Support -> cvc4 != null && cln != null && gmp != null;
+
+let
+  jsoncppVersion = "1.9.3";
+  jsoncppUrl = "https://github.com/open-source-parsers/jsoncpp/archive/${jsoncppVersion}.tar.gz";
+  jsoncpp = fetchzip {
+    url = jsoncppUrl;
+    sha256 = "1vbhi503rgwarf275ajfdb8vpdcbn1f7917wjkf8jghqwb1c24lq";
+  };
+
+  range3Version = "0.12.0";
+  range3Url = "https://github.com/ericniebler/range-v3/archive/${range3Version}.tar.gz";
+  range3 = fetchzip {
+    url = range3Url;
+    sha256 = "sha256-bRSX91+ROqG1C3nB9HSQaKgLzOHEFy9mrD2WW3PRBWU=";
+  };
+
+  fmtlibVersion = "8.0.1";
+  fmtlibUrl = "https://github.com/fmtlib/fmt/archive/${fmtlibVersion}.tar.gz";
+  fmtlib = fetchzip {
+    url = fmtlibUrl;
+    sha256 = "1mnvxqsan034d2jiqnw2yvkljl7lwvhakmj5bscwp1fpkn655bbw";
+  };
+
+  pname = "solc";
+  version = "0.8.21";
+  meta = with lib; {
+    description = "Compiler for Ethereum smart contract language Solidity";
+    homepage = "https://github.com/ethereum/solidity";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ dbrock akru lionello sifmelcara ];
+  };
+
+  solc = if gccStdenv.isLinux then gccStdenv.mkDerivation rec {
+    inherit pname version meta;
+
+    # 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 = "sha256-6EeRmxAmb1nCQ2FTNtWfQ7HCH0g9nJXC3jnhV0KEOwk=";
+    };
+
+    postPatch = ''
+      substituteInPlace cmake/jsoncpp.cmake \
+        --replace "${jsoncppUrl}" ${jsoncpp}
+      substituteInPlace cmake/range-v3.cmake \
+        --replace "${range3Url}" ${range3}
+      substituteInPlace cmake/fmtlib.cmake \
+        --replace "${fmtlibUrl}" ${fmtlib}
+    '';
+
+    cmakeFlags = [
+      "-DBoost_USE_STATIC_LIBS=OFF"
+
+    ] ++ (if z3Support then [
+      "-DSTRICT_Z3_VERSION=OFF"
+    ] else [
+      "-DUSE_Z3=OFF"
+    ]) ++ lib.optionals (!cvc4Support) [
+      "-DUSE_CVC4=OFF"
+    ];
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ boost ]
+      ++ lib.optionals z3Support [ z3 ]
+      ++ lib.optionals cvc4Support [ cvc4 cln gmp ];
+    nativeCheckInputs = [ jq ncurses (python3.withPackages (ps: with ps; [ colorama deepdiff devtools docopt docutils requests sphinx tabulate z3-solver ])) ]; # contextlib2 glob2 textwrap3 traceback2 urllib3
+
+    # tests take 60+ minutes to complete, only run as part of passthru tests
+    doCheck = false;
+
+    checkPhase = ''
+      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 ./test/*.py; do
+        patchShebangs "$i"
+      done
+      ## TODO: reenable tests below after adding evmone and hera and their dependencies to nixpkgs
+      #TERM=xterm ./scripts/tests.sh ${lib.optionalString z3Support "--no-smt"}
+      popd
+    '';
+
+    doInstallCheck = true;
+    installCheckPhase = ''
+      $out/bin/solc --version > /dev/null
+    '';
+
+    passthru.tests = {
+      solcWithTests = solc.overrideAttrs (attrs: { doCheck = true; });
+    };
+  } else gccStdenv.mkDerivation rec {
+    inherit pname version meta;
+
+    src = pkgs.fetchurl {
+      url = "https://github.com/ethereum/solidity/releases/download/v${version}/solc-macos";
+      sha256 = "sha256-GdBldJ+wjL/097RShKxVhTBjhl9q6GIeTe+l2Ti5pQI=";
+    };
+    dontUnpack = true;
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p $out/bin
+      cp ${src} $out/bin/solc
+      chmod +x $out/bin/solc
+
+      runHook postInstall
+    '';
+  };
+in
+  solc
diff --git a/nixpkgs/pkgs/development/compilers/souffle/default.nix b/nixpkgs/pkgs/development/compilers/souffle/default.nix
new file mode 100644
index 000000000000..68ceb1a7d7f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/souffle/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, bash-completion, perl, ncurses, zlib, sqlite, libffi
+, mcpp, cmake, bison, flex, doxygen, graphviz
+, makeWrapper
+}:
+
+
+let
+  toolsPath = lib.makeBinPath [ mcpp ];
+in
+stdenv.mkDerivation rec {
+  pname = "souffle";
+  version = "2.4.1";
+
+  src = fetchFromGitHub {
+    owner  = "souffle-lang";
+    repo   = "souffle";
+    rev    = version;
+    sha256 = "sha256-U3/1iNOLFzuXiBsVDAc5AXnK4F982Uifp18jjFNUv2o=";
+  };
+
+  patches = [
+    ./threads.patch
+  ];
+
+  hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ];
+
+  nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ];
+  buildInputs = [ bash-completion 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 ];
+
+  cmakeFlags = [ "-DSOUFFLE_GIT=OFF" ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=unused-but-set-variable";
+  };
+
+  postInstall = ''
+    wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
+  '';
+
+  outputs = [ "out" ];
+
+  meta = with 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/souffle/threads.patch b/nixpkgs/pkgs/development/compilers/souffle/threads.patch
new file mode 100644
index 000000000000..cf23baa1550d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/souffle/threads.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 73d5c3c84..e4b0dbfd1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -104,13 +104,6 @@ option(SOUFFLE_CUSTOM_GETOPTLONG "Enable/Disable custom getopt_long implementati
+ cmake_dependent_option(SOUFFLE_USE_LIBCPP "Link to libc++ instead of libstdc++" ON
+     "CMAKE_CXX_COMPILER_ID STREQUAL Clang" OFF)
+ 
+-# Using Clang? Likely want to use `lld` too.
+-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
+-    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld")
+-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
+-endif()
+-
+ # Add aditional modules to CMake
+ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
+ 
+@@ -247,7 +240,11 @@ endif()
+ # pthreads
+ # --------------------------------------------------
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+-find_package(Threads REQUIRED)
++set(CMAKE_THREAD_LIBS_INIT "-lpthread")
++set(CMAKE_HAVE_THREADS_LIBRARY 1)
++set(CMAKE_USE_WIN32_THREADS_INIT 0)
++set(CMAKE_USE_PTHREADS_INIT 1)
++set(THREADS_PREFER_PTHREAD_FLAG ON)
+ 
+ # --------------------------------------------------
+ # OpenMP
diff --git a/nixpkgs/pkgs/development/compilers/spasm-ng/default.nix b/nixpkgs/pkgs/development/compilers/spasm-ng/default.nix
new file mode 100644
index 000000000000..bd31719731e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/spasm-ng/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, gcc, gmp, openssl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "spasm-ng";
+
+  version = "unstable-2020-08-03";
+
+  src = fetchFromGitHub {
+    owner = "alberthdev";
+    repo = "spasm-ng";
+    rev = "221898beff2442f459b80ab89c8e1035db97868e";
+    sha256 = "0xspxmp2fir604b4xsk4hi1gjv61rnq2ypppr7cj981jlhicmvjj";
+  };
+
+  nativeBuildInputs = [ gcc ];
+
+  buildInputs = [ gmp openssl zlib ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    install -Dm755 spasm -t $out/bin
+  '';
+
+  meta = with lib; {
+    homepage    = "https://github.com/alberthdev/spasm-ng";
+    description = "Z80 assembler with extra features to support development for TI calculators";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ siraben ];
+    platforms   = platforms.unix;
+  };
+}
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..88119d002808
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/spirv-llvm-translator/default.nix
@@ -0,0 +1,109 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, lit
+, llvm
+, spirv-headers
+, spirv-tools
+, disable-warnings-if-gcc13
+}:
+
+let
+  llvmMajor = lib.versions.major llvm.version;
+  isROCm = lib.hasPrefix "rocm" llvm.pname;
+
+  # ROCm, if actively updated will always be at the latest version
+  branch =
+    if llvmMajor == "17" || isROCm then rec {
+      version = "17.0.0";
+      rev = "v${version}";
+      hash = "sha256-Rzm5Py9IPFtS9G7kME+uSwZ/0gPGW6MlL35ZWk4LfHM=";
+    } else if llvmMajor == "16" then rec {
+      version = "16.0.0";
+      rev = "v${version}";
+      hash = "sha256-EUabcYqSjXshbPmcs1DRLvCSL1nd9rEdpqELBrItCW8=";
+    } else if llvmMajor == "15" then rec {
+      version = "15.0.0";
+      rev = "v${version}";
+      hash = "sha256-OsDohXRxovtEXaWiRGp8gJ0dXmoALyO+ZimeSO8aPVI=";
+    } else if llvmMajor == "14" then {
+      version = "14.0.0+unstable-2024-01-23";
+      rev = "582a3024c0c2d624a40fa2731d74b2c9ca3b94ab";
+      hash = "sha256-1IRX+5Xh8Fj+/1DIZQrN8ijb2y7H39Y3u+IdbqjQgCc=";
+    } else if llvmMajor == "11" then {
+      version = "11.0.0+unstable-2022-05-04";
+      rev = "4ef524240833abfeee1c5b9fff6b1bd53f4806b3"; # 267 commits ahead of v11.0.0
+      hash = "sha256-NoIoa20+2sH41rEnr8lsMhtfesrtdPINiXtUnxYVm8s=";
+    } else throw "Incompatible LLVM version.";
+in
+disable-warnings-if-gcc13 (stdenv.mkDerivation {
+  pname = "SPIRV-LLVM-Translator";
+  inherit (branch) version;
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-LLVM-Translator";
+    inherit (branch) rev hash;
+  };
+
+  patches = lib.optionals (lib.versionAtLeast llvmMajor "15") [
+    # Fixes build after spirv-headers breaking change
+    (fetchpatch {
+      url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch";
+      excludes = ["spirv-headers-tag.conf"];
+      hash = "sha256-17JJG8eCFVphElY5fVT/79hj0bByWxo8mVp1ZNjQk/M=";
+    })
+  ] ++ lib.optionals (llvmMajor == "16") [
+    # Fixes builds that link against external LLVM dynamic library
+    (fetchpatch {
+      url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/f3b9b604d7eda18d0d1029d94a6eebd33aa3a3fe.patch";
+      hash = "sha256-opDjyZcy7O4wcSfm/A51NCIiDyIvbcmbv9ns1njdJbc=";
+    })
+  ] ++ lib.optionals (llvmMajor == "14") [
+    (fetchpatch {
+      # tries to install llvm-spirv into llvm nix store path
+      url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch";
+      revert = true;
+      hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config cmake ]
+    ++ (if isROCm then [ llvm ] else [ llvm.dev ]);
+
+  buildInputs = [ spirv-headers spirv-tools ]
+    ++ lib.optionals (!isROCm) [ llvm ];
+
+  nativeCheckInputs = [ lit ];
+
+  cmakeFlags = [
+    "-DLLVM_INCLUDE_TESTS=ON"
+    "-DLLVM_DIR=${(if isROCm then llvm else llvm.dev)}"
+    "-DBUILD_SHARED_LIBS=YES"
+    "-DLLVM_SPIRV_BUILD_EXTERNAL=YES"
+    # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ] ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}";
+
+  # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist
+  doCheck = false;
+
+  makeFlags = [ "all" "llvm-spirv" ];
+
+  postInstall = ''
+    install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv
+  '' + lib.optionalString stdenv.isDarwin ''
+    install_name_tool $out/bin/llvm-spirv \
+      -change @rpath/libLLVMSPIRVLib.dylib $out/lib/libLLVMSPIRVLib.dylib
+  '';
+
+  meta = with 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.unix;
+    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..0494539c4435
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/squeak/default.nix
@@ -0,0 +1,234 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchurl
+, fetchzip
+, autoconf
+, automake
+, autoreconfHook
+, dos2unix
+, file
+, perl
+, pkg-config
+, alsa-lib
+, coreutils
+, freetype
+, glib
+, glibc
+, gnugrep
+, libGL
+, libpulseaudio
+, libtool
+, libuuid
+, openssl
+, pango
+, xorg
+, squeakImageHash ? null
+, squeakSourcesHash ? null
+, squeakSourcesVersion ? null
+, squeakVersion ? null
+, squeakVmCommitHash ? null
+, squeakVmCommitHashHash ? null
+, squeakVmVersion ? null
+} @ args:
+
+let
+  inherit (builtins) elemAt toString;
+
+  nullableOr = o: default: if o == null then default else o;
+
+  bits = stdenv.hostPlatform.parsed.cpu.bits;
+
+  squeakVersion = nullableOr args.squeakVersion or null "5.3-19459";
+  squeakVersionSplit = builtins.split "-" squeakVersion;
+  squeakVersionBase = elemAt squeakVersionSplit 0;
+  squeakVersionBaseSplit = lib.splitVersion squeakVersionBase;
+  squeakVersionMajor = elemAt squeakVersionBaseSplit 0;
+  squeakVersionMinor = elemAt squeakVersionBaseSplit 1;
+
+  squeakImageVersion = elemAt squeakVersionSplit 2;
+
+  squeakSourcesVersion = nullableOr args.squeakSourcesVersion or null "50";
+
+  squeakVmVersion = nullableOr args.squeakVmVersion or null "5.0-202003021730";
+  squeakVmVersionSplit = builtins.split "-" squeakVmVersion;
+  squeakVmVersionBase = elemAt squeakVmVersionSplit 0;
+  squeakVmVersionBaseSplit = lib.splitVersion squeakVmVersionBase;
+  squeakVmVersionMajor = elemAt squeakVmVersionBaseSplit 0;
+  squeakVmVersionMinor = elemAt squeakVmVersionBaseSplit 1;
+  squeakVmVersionRelease = elemAt squeakVmVersionSplit 2;
+
+  squeakVmCommitHash = nullableOr args.squeakVmCommitHash or null (fetchurl {
+    url = "https://api.github.com/repos/OpenSmalltalk/opensmalltalk-vm/commits/${squeakVmVersionRelease}";
+    curlOpts = "--header Accept:application/vnd.github.v3.sha";
+    hash = nullableOr args.squeakVmCommitHashHash or null
+      "sha256-quwmhpJlb2fp0fI9b03fBxSR44j1xmHPW20wkSqTOhQ=";
+  });
+in stdenv.mkDerivation {
+  pname = "squeak";
+  version = squeakVersion;
+
+  vmVersionRelease = squeakVmVersionRelease; # "202003021730"
+  vmHash = squeakVmCommitHash;
+
+  vmSrcUrl = "https://github.com/OpenSmalltalk/opensmalltalk-vm.git";
+  src = fetchFromGitHub {
+    owner = "OpenSmalltalk";
+    repo = "opensmalltalk-vm";
+    rev = squeakVmVersionRelease;
+    hash = nullableOr args.squeakVmHash or null
+      "sha256-rNJn5ya+7ggC21MpwSrl2ByJDjVycONKHADboH7dQLM=";
+  };
+  imageSrc = let
+    squeakImageName = "Squeak${squeakVersionBase}-${squeakImageVersion}-${toString bits}bit";
+  in fetchzip {
+    url = "https://files.squeak.org/${squeakVersionBase}/${squeakImageName}/${squeakImageName}.zip";
+    name = "source";
+    stripRoot = false;
+    hash = nullableOr args.squeakImageHash or null
+      "sha256-wDuRyc/DNqG1D4DzyBkUvrzFkBlXBtbpnANZlRV/Fas=";
+  };
+  sourcesSrc = fetchurl {
+    url = "https://files.squeak.org/sources_files/SqueakV${squeakSourcesVersion}.sources.gz";
+    hash = nullableOr args.squeakSourcesHash or null
+      "sha256-ZViZ1VgI32LwLTEyw7utp8oaAK3UmCNJnHqsGm1IKYE=";
+  };
+
+  vmBuild = "linux64x64";
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    autoreconfHook
+    dos2unix
+    file
+    perl
+    pkg-config
+  ];
+  buildInputs = [
+    alsa-lib
+    coreutils
+    freetype
+    glib
+    glibc
+    gnugrep
+    libGL
+    libpulseaudio
+    libtool
+    libuuid
+    openssl
+    pango
+    xorg.libX11
+  ];
+
+  postUnpack = ''
+    for file in "$imageSrc"/*.{image,changes}; do
+      gzip -c "$file" > "$sourceRoot/''${file##"$imageSrc"/}.gz"
+    done
+  '';
+
+  prePatch = ''
+    dos2unix platforms/unix/plugins/*/{Makefile.inc,acinclude.m4}
+  '';
+
+  patches = [
+    ./squeak-configure-version.patch
+    ./squeak-plugins-discovery.patch
+    ./squeak-squeaksh-nixpkgs.patch
+  ];
+
+  postPatch = ''
+    vmVersionDate=$(sed 's/\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)/\1-\2-\3T\4:\5+0000/' <<< "$vmVersionRelease")
+    vmVersionDate=$(date -u '+%a %b %-d %T %Y %z' -d "$vmVersionDate")
+    vmVersionFiles=$(sed -n 's/^versionfiles="\(.*\)"/\1/p' ./scripts/updateSCCSVersions)
+    vmHash=$(< "$vmHash")
+    vmAbbrevHash=''${vmHash:0:12}
+    printf '%s\n' "$vmAbbrevHash"
+    for vmVersionFile in $vmVersionFiles; do
+      substituteInPlace "$vmVersionFile" \
+        --replace "\$Date\$" "\$Date: ''${vmVersionDate} \$" \
+        --replace "\$URL\$" "\$URL: ''${vmSrcUrl} \$" \
+        --replace "\$Rev\$" "\$Rev: ''${vmVersionRelease} \$" \
+        --replace "\$CommitHash\$" "\$CommitHash: ''${vmAbbrevHash} \$"
+    done
+    patchShebangs --build ./"build.$vmBuild"/squeak.cog.spur ./scripts
+    for squeaksh in ./platforms/unix/config/{,bin.}squeak.sh.in; do
+      substituteInPlace "$squeaksh" \
+        --subst-var-by 'glibc' ${lib.escapeShellArg (lib.getBin glibc)} \
+        --subst-var-by 'gnugrep' ${lib.escapeShellArg (lib.getBin gnugrep)}
+    done
+    substituteInPlace ./platforms/unix/config/mkmf \
+      --replace '/bin/rm ' '${coreutils}/bin/rm '
+  '';
+
+  # Workaround build failure on -fno-common toolchains:
+  #   ld: vm/vm.a(cogit.o):spur64src/vm/cogitX64SysV.c:2552: multiple definition of
+  #       `traceStores'; vm/vm.a(gcc3x-cointerp.o):spur64src/vm/cogit.h:140: first defined here
+  env.NIX_CFLAGS_COMPILE = toString (
+    [ "-fcommon" ]
+    ++ (lib.optionals stdenv.cc.isClang [
+      # LLVM 16 turned these into errors (rightly, perhaps.)
+      # Allow this package to continue to build despite this change.
+      "-Wno-error=int-conversion"
+      "-Wno-error=implicit-function-declaration"
+      "-Wno-error=incompatible-function-pointer-types"
+    ])
+  );
+
+  preAutoreconf = ''
+    pushd ./platforms/unix/config > /dev/null
+    ./mkacinc > ./acplugins.m4
+  '';
+  postAutoreconf = ''
+    rm ./acplugins.m4
+    popd > /dev/null
+  '';
+
+  preConfigure = ''
+    if [ -z "''${dontFixLibtool:-}" ]; then
+        local i
+        find ./platforms/unix/config -iname "ltmain.sh" -print0 | while IFS=''' read -r -d ''' i; do
+            echo "fixing libtool script $i"
+            fixLibtool "$i"
+        done
+    fi
+
+    substituteInPlace ./platforms/unix/config/configure \
+      --replace "/usr/bin/file" "${file}/bin/file"
+    cd ./"build.$vmBuild"/squeak.cog.spur/build
+    substituteInPlace ./mvm \
+      --replace 'read a' 'a=y' \
+      --replace $'if [ $# -ge 1 ]; then\n\tINSTALLDIR="$1"; shift\nfi\n' "" \
+      --replace 'config/configure' 'config/configure "$@"' \
+      --replace 'make install' '# make install'
+  '';
+
+  configureFlags = [
+    "--disable-dynamicopenssl"
+    "SQ_MAJOR=${squeakVersionMajor}"
+    "SQ_MINOR=${squeakVersionMinor}"
+    "SQ_UPDATE=${squeakImageVersion}"
+    "SQ_VERSION=${squeakVersion}-${toString bits}bit"
+    "SQ_SRC_VERSION=${squeakSourcesVersion}"
+    "VM_MAJOR=${squeakVmVersionMajor}"
+    "VM_MINOR=${squeakVmVersionMinor}"
+    "VM_RELEASE=${squeakVmVersionRelease}"
+    "VM_VERSION=${squeakVmVersion}"
+  ];
+  configureScript = "./mvm";
+
+  installTargets = [ "install" "install-image" ];
+
+  postInstall = ''
+    rm "$out/squeak"
+    cp --no-preserve mode "$sourcesSrc" "$out"/lib/squeak/SqueakV${lib.escapeShellArg squeakSourcesVersion}.sources
+  '';
+
+  meta = with lib; {
+    description = "Squeak virtual machine";
+    homepage = "https://opensmalltalk.org/";
+    license = with licenses; [ asl20 mit ];
+    maintainers = with lib.maintainers; [ ehmry ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/squeak/squeak-configure-version.patch b/nixpkgs/pkgs/development/compilers/squeak/squeak-configure-version.patch
new file mode 100644
index 000000000000..46ba8e0448cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/squeak/squeak-configure-version.patch
@@ -0,0 +1,94 @@
+--- a/platforms/unix/config/Makefile.install
++++ b/platforms/unix/config/Makefile.install
+@@ -101,10 +101,10 @@ uninstall-image : getversion
+ 
+ install-sources :
+ 	$(MKINSTALLDIRS) $(ROOT)$(imgdir)
+-	$(INSTALL_DATA) $(topdir)/SqueakV$(SQ_MAJOR).sources $(ROOT)$(imgdir)
++	$(INSTALL_DATA) $(topdir)/SqueakV$(SQ_SRC_VERSION).sources $(ROOT)$(imgdir)
+ 
+ uninstall-sources :
+-	@$(UNINSTALL) $(ROOT)$(imgdir) SqueakV$(SQ_MAJOR).sources
++	@$(UNINSTALL) $(ROOT)$(imgdir) SqueakV$(SQ_SRC_VERSION).sources
+ 
+ # npsqueak
+ 
+--- a/platforms/unix/config/configure.ac
++++ b/platforms/unix/config/configure.ac
+@@ -122,7 +122,7 @@ AC_SUBST(vmpdir)
+ AC_SUBST(vmmcfg)
+ AC_SUBST(blddir)
+ 
+-SQ_VERSION=${SQ_MAJOR}.${SQ_MINOR}-${SQ_UPDATE}
++AS_VAR_SET_IF([SQ_VERSION], [], [SQ_VERSION=${SQ_MAJOR}.${SQ_MINOR}-${SQ_UPDATE}])
+ 
+ AC_DEFINE_UNQUOTED(SQ_VERSION, "${SQ_VERSION}", [Squeak version])
+ 
+@@ -131,21 +131,24 @@ AC_SUBST(SQ_MINOR)
+ AC_SUBST(SQ_UPDATE)
+ AC_SUBST(SQ_VERSION)
+ 
++AS_VAR_SET_IF([SQ_SRC_VERSION], [], [SQ_SRC_VERSION=${SQ_MAJOR}])
++AC_SUBST(SQ_SRC_VERSION)
++
+ #VM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE}
+ 
+ #AC_DEFINE_UNQUOTED(VM_VERSION, "${VM_VERSION}", [VM version])
+ 
+-#AC_SUBST(VM_MAJOR)
+-#AC_SUBST(VM_MINOR)
+-#AC_SUBST(VM_RELEASE)
+-#AC_SUBST(VM_VERSION)
++AC_SUBST(VM_MAJOR)
++AC_SUBST(VM_MINOR)
++AC_SUBST(VM_RELEASE)
++AC_SUBST(VM_VERSION)
+ 
+ # libdir contains ${exec_prefix}, so we have to default and expand early
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ imgdir=`eval echo ${libdir}/squeak`
+ expanded_relative_imgdir=`eval echo lib/squeak/${VM_VERSION}`
+-plgdir='${imgdir}/`${blddir}/getversion VERSION_TAG`'
++plgdir=`eval echo '${imgdir}'/${VM_VERSION}`
+ 
+ AC_SUBST(imgdir)
+ AC_SUBST(expanded_relative_imgdir)
+--- a/platforms/unix/config/inisqueak.in
++++ b/platforms/unix/config/inisqueak.in
+@@ -32,6 +32,7 @@
+ 
+ MAJOR=@SQ_MAJOR@
+ VERSION=@SQ_VERSION@
++SRC_VERSION=@SQ_SRC_VERSION@
+ 
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+@@ -77,7 +78,7 @@ if test "$1" != ""; then
+ fi
+ 
+ SQUEAK=${bindir}/squeak
+-SOURCES=SqueakV${MAJOR}.sources
++SOURCES=SqueakV${SRC_VERSION}.sources
+ IMAGE=squeak.image.gz
+ CHANGES=squeak.changes.gz
+ 
+--- a/platforms/unix/config/make.cfg.in
++++ b/platforms/unix/config/make.cfg.in
+@@ -96,6 +96,16 @@ X_INCLUDES=	@X_INCLUDES@
+ X_LIBS=		@X_LIBS@
+ 
+ 
++SQ_MAJOR=	@SQ_MAJOR@
++SQ_MINOR=	@SQ_MINOR@
++SQ_UPDATE=	@SQ_UPDATE@
++SQ_VERSION=	@SQ_VERSION@
++SQ_SRC_VERSION=	@SQ_SRC_VERSION@
++VM_MAJOR=	@VM_MAJOR@
++VM_MINOR=	@VM_MINOR@
++VM_RELEASE=	@VM_RELEASE@
++VM_VERSION=	@VM_VERSION@
++
+ INTERP=		@INTERP@
+ 
+ VM_APP_ICONS=	@VM_APP_ICONS@
diff --git a/nixpkgs/pkgs/development/compilers/squeak/squeak-plugins-discovery.patch b/nixpkgs/pkgs/development/compilers/squeak/squeak-plugins-discovery.patch
new file mode 100644
index 000000000000..8d1aa20a6f35
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/squeak/squeak-plugins-discovery.patch
@@ -0,0 +1,34 @@
+--- a/platforms/unix/plugins/UnicodePlugin/Makefile.inc
++++ b/platforms/unix/plugins/UnicodePlugin/Makefile.inc
+@@ -1,2 +1,2 @@
+-XCPPFLAGS=	-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0  -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include
++XCPPFLAGS=	[unicode_plugin_cflags]
+-XLDFLAGS= -lpangocairo-1.0 -lcairo -lpango-1.0 -lgobject-2.0 -lglib-2.0
++XLDFLAGS=	[unicode_plugin_libs]
+--- a/platforms/unix/plugins/UnicodePlugin/acinclude.m4
++++ b/platforms/unix/plugins/UnicodePlugin/acinclude.m4
+@@ -2,9 +2,14 @@
+ 
+ AC_MSG_CHECKING([for PangoCairo libraries])
+ save_CPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include"
++CPPFLAGS=`pkg-config --cflags glib-2.0 pangocairo`
+ AC_TRY_COMPILE([#include <pango/pangocairo.h>],[{}],[
+   AC_MSG_RESULT(yes)
++  PKG_CHECK_MODULES([UNICODE_PLUGIN],[glib-2.0 pangocairo])
++  AC_SUBST([UNICODE_PLUGIN_CFLAGS])
++  AC_SUBST([UNICODE_PLUGIN_LIBS])
++  AC_PLUGIN_DEFINE_UNQUOTED([unicode_plugin_cflags],[$UNICODE_PLUGIN_CFLAGS])
++  AC_PLUGIN_DEFINE_UNQUOTED([unicode_plugin_libs],[$UNICODE_PLUGIN_LIBS])
+ ],[
+   AC_MSG_RESULT(no)
+   AC_PLUGIN_DISABLE
+--- a/platforms/unix/plugins/XDisplayControlPlugin/acinclude.m4
++++ b/platforms/unix/plugins/XDisplayControlPlugin/acinclude.m4
+@@ -1,5 +1,3 @@
+ # Require X11
+ 
+-AC_CHECK_LIB(X11,XOpenDisplay,
+-  [AC_PLUGIN_USE_LIB(X11)],
+-  [AC_PLUGIN_DISABLE])
++AC_PLUGIN_CHECK_LIB(X11,XOpenDisplay)
diff --git a/nixpkgs/pkgs/development/compilers/squeak/squeak-squeaksh-nixpkgs.patch b/nixpkgs/pkgs/development/compilers/squeak/squeak-squeaksh-nixpkgs.patch
new file mode 100644
index 000000000000..e5fa380676f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/squeak/squeak-squeaksh-nixpkgs.patch
@@ -0,0 +1,40 @@
+--- a/platforms/unix/config/bin.squeak.sh.in
++++ b/platforms/unix/config/bin.squeak.sh.in
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # Run the VM, setting SQUEAK_PLUGINS if unset to the VM's containing directory
+ # if unset, and ensuring LD_LIBRARY_PATH includes the VM's containing directory.
+-BIN=`/usr/bin/dirname "$0"`/../@expanded_relative_imgdir@
++BIN=`dirname "$0"`/../@expanded_relative_imgdir@
+ GDB=
+ if [ "${SQUEAK_PLUGINS-unset}" = unset ]; then
+        export SQUEAK_PLUGINS="$BIN"
+@@ -26,7 +26,7 @@ fi
+ # libc (e.g. through the FFI) then it must use the same version that the VM uses
+ # and so it should take precedence over /lib libc.  This is done by setting
+ # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM.
+-LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
++LIBC_SO="`@glibc@/bin/ldd "$BIN/squeak" | @gnugrep@/bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+ PLATFORMLIBDIR=`expr "$LIBC_SO" : '\(.*\)/libc.*'`
+ 
+ if [ "$PLATFORMLIBDIR" = "" ]; then
+--- a/platforms/unix/config/squeak.sh.in
++++ b/platforms/unix/config/squeak.sh.in
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # Run the VM, setting SQUEAK_PLUGINS if unset to the VM's containing directory
+ # if unset, and ensuring LD_LIBRARY_PATH includes the VM's containing directory.
+-BIN=`/usr/bin/dirname "$0"`/@expanded_relative_imgdir@
++BIN=`dirname "$0"`/@expanded_relative_imgdir@
+ GDB=
+ if [ "${SQUEAK_PLUGINS-unset}" = unset ]; then
+        export SQUEAK_PLUGINS="$BIN"
+@@ -26,7 +26,7 @@ fi
+ # libc (e.g. through the FFI) then it must use the same version that the VM uses
+ # and so it should take precedence over /lib libc.  This is done by setting
+ # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM.
+-LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
++LIBC_SO="`@glibc@/bin/ldd "$BIN/squeak" | @gnugrep@/bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+ PLATFORMLIBDIR=`expr "$LIBC_SO" : '\(.*\)/libc.*'`
+ 
+ if [ "$PLATFORMLIBDIR" = "" ]; then
diff --git a/nixpkgs/pkgs/development/compilers/stalin/default.nix b/nixpkgs/pkgs/development/compilers/stalin/default.nix
new file mode 100644
index 000000000000..50603919b8b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/stalin/default.nix
@@ -0,0 +1,46 @@
+{ fetchurl, lib, stdenv, ncompress, libX11 }:
+
+stdenv.mkDerivation rec {
+  pname = "stalin";
+  version = "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/stalin-${version}"
+    cp README "$out/doc/stalin-${version}"
+
+    mkdir -p "$out/share/stalin-${version}/include"
+    cp "include/"* "$out/share/stalin-${version}/include"
+
+    substituteInPlace "$out/bin/stalin" \
+      --replace "$PWD/include/stalin" "$out/share/stalin-${version}/include/stalin"
+    substituteInPlace "$out/bin/stalin" \
+      --replace "$PWD/include" "$out/share/stalin-${version}/include"
+  '';
+
+  meta = {
+    homepage = "http://www.ece.purdue.edu/~qobi/software.html";
+    license = lib.licenses.gpl2Plus;
+    description = "An optimizing Scheme compiler";
+
+    maintainers = [ ];
+    platforms = ["i686-linux"];  # doesn't want to work on 64-bit platforms
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/stanc/default.nix b/nixpkgs/pkgs/development/compilers/stanc/default.nix
new file mode 100644
index 000000000000..66671823d866
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/stanc/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, fetchFromGitHub
+, ocamlPackages
+}:
+
+ocamlPackages.buildDunePackage rec {
+  pname = "stanc";
+  version = "2.34.0";
+
+  minimalOCamlVersion = "4.12";
+  duneVersion = "3";
+
+  src = fetchFromGitHub {
+    owner = "stan-dev";
+    repo = "stanc3";
+    rev = "v${version}";
+    hash = "sha256-ixZCix3oLZhzs08JbmbNCO0lhAu1Jf+KnpHNKlU/FaA=";
+  };
+
+  # Error: This expression has type [ `Use_Sys_unix ]
+  postPatch = ''
+    substituteInPlace test/integration/run_bin_on_args.ml \
+      --replace "if Sys.file_exists (to_windows path) then to_windows cmd else cmd" "cmd"
+  '';
+
+  nativeBuildInputs = with ocamlPackages; [
+    menhir
+  ];
+  buildInputs = with ocamlPackages; [
+    core_unix
+    menhirLib
+    ppx_deriving
+    fmt
+    yojson
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/stan-dev/stanc3";
+    description = "The Stan compiler and utilities";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
+  };
+}
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..a6049da55578
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swi-prolog/default.nix
@@ -0,0 +1,88 @@
+{ lib, stdenv, fetchFromGitHub, jdk, gmp, readline, openssl, unixODBC, zlib
+, libarchive, db, pcre2, libedit, libossp_uuid, libxcrypt,libXpm
+, libSM, libXt, freetype, pkg-config, fontconfig
+, cmake, libyaml, Security
+, libjpeg, libX11, libXext, libXft, libXinerama
+, extraLibraries ? [ jdk unixODBC libXpm libSM libXt freetype fontconfig ]
+# Packs must be installed from a local directory during the build, with dependencies
+# resolved manually, e.g. to install the 'julian' pack, which depends on the 'delay', 'list_util' and 'typedef' packs:
+#   julian = pkgs.fetchzip {
+#     name = "swipl-pack-julian";
+#     url = "https://github.com/mndrix/julian/archive/v0.1.3.zip";
+#     sha256 = "1sgql7c21p3c5m14kwa0bcmlwn9fql612krn9h36gla1j9yjdfgy";
+#   };
+#   delay = pkgs.fetchzip {
+#     name = "swipl-pack-delay";
+#     url = "https://github.com/mndrix/delay/archive/v0.3.3.zip";
+#     sha256 = "0ira87afxnc2dnbbmgwmrr8qvary8lhzvhqwd52dccm6yqd3nybg";
+#   };
+#   list_util = pkgs.fetchzip {
+#     name = "swipl-pack-list_util";
+#     url = "https://github.com/mndrix/list_util/archive/v0.13.0.zip";
+#     sha256 = "0lx7vffflak0y8l8vg8k0g8qddwwn23ksbz02hi3f8rbarh1n89q";
+#   };
+#   typedef = builtins.fetchTarball {
+#     name = "swipl-pack-typedef";
+#     url = "https://raw.githubusercontent.com/samer--/prolog/master/typedef/release/typedef-0.1.9.tgz";
+#     sha256 = "056nqjn01g18fb1b2qivv9s7hb4azk24nx2d4kvkbmm1k91f44p3";
+#   };
+#   swiProlog = pkgs.swiProlog.override { extraPacks = map (dep-path: "'file://${dep-path}'") [
+#     julian delay list_util typedef
+#   ]; };
+, extraPacks ? []
+, withGui ? false
+}:
+
+let
+  version = "9.1.21";
+  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}";
+    hash = "sha256-c4OSntnwIzo6lGhpyNVtNM4el5FGrn8kcz8WkDRfQhU=";
+    fetchSubmodules = true;
+  };
+
+  # Add the packInstall path to the swipl pack search path
+  postPatch = ''
+    echo "user:file_search_path(pack, '$out/lib/swipl/pack')." >> boot/init.pl
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ gmp readline openssl
+    libarchive libyaml db pcre2 libedit libossp_uuid libxcrypt
+    zlib ]
+  ++ lib.optionals (withGui && !stdenv.isDarwin) [ libXpm libX11 libXext libXft libXinerama libjpeg ]
+  ++ extraLibraries
+  ++ lib.optional stdenv.isDarwin Security;
+
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [ "-DSWIPL_INSTALL_IN_LIB=ON" ];
+
+  preInstall = ''
+    mkdir -p $out/lib/swipl/pack
+  '';
+
+  postInstall = builtins.concatStringsSep "\n"
+  ( builtins.map (packInstall "$out") extraPacks
+  );
+
+  meta = {
+    homepage = "https://www.swi-prolog.org";
+    description = "A Prolog compiler and interpreter";
+    license = lib.licenses.bsd2;
+    mainProgram = "swipl";
+    platforms = lib.platforms.linux ++ lib.optionals (!withGui) lib.platforms.darwin;
+    maintainers = [ lib.maintainers.meditans ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix b/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix
new file mode 100644
index 000000000000..76c2da0a656a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix
@@ -0,0 +1,709 @@
+{ lib
+, stdenv
+, callPackage
+, cmake
+, bash
+, coreutils
+, gnugrep
+, perl
+, ninja
+, pkg-config
+, clang
+, bintools
+, python3
+, git
+, fetchpatch
+, makeWrapper
+, gnumake
+, file
+, runCommand
+, writeShellScriptBin
+# For lldb
+, libedit
+, ncurses
+, swig
+, libxml2
+# Linux-specific
+, glibc
+, libuuid
+# Darwin-specific
+, substituteAll
+, fixDarwinDylibNames
+, runCommandLocal
+, xcbuild
+, cctools # libtool
+, sigtool
+, DarwinTools
+, CoreServices
+, Foundation
+, Combine
+, MacOSX-SDK
+, CLTools_Executables
+}:
+
+let
+
+  inherit (stdenv) hostPlatform targetPlatform;
+
+  sources = callPackage ../sources.nix { };
+
+  # Tools invoked by swift at run-time.
+  runtimeDeps = lib.optionals stdenv.isDarwin [
+    # libtool is used for static linking. This is part of cctools, but adding
+    # that as a build input puts an unwrapped linker in PATH, and breaks
+    # builds. This small derivation exposes just libtool.
+    # NOTE: The same applies to swift-driver, but that is currently always
+    # invoked via the old `swift` / `swiftc`. May change in the future.
+    (runCommandLocal "libtool" { } ''
+      mkdir -p $out/bin
+      ln -s ${cctools}/bin/libtool $out/bin/libtool
+    '')
+  ];
+
+  # There are apparently multiple naming conventions on Darwin. Swift uses the
+  # xcrun naming convention. See `configure_sdk_darwin` calls in CMake files.
+  swiftOs = if targetPlatform.isDarwin
+    then {
+      "macos" = "macosx";
+      "ios" = "iphoneos";
+      #iphonesimulator
+      #appletvos
+      #appletvsimulator
+      #watchos
+      #watchsimulator
+    }.${targetPlatform.darwinPlatform}
+      or (throw "Cannot build Swift for target Darwin platform '${targetPlatform.darwinPlatform}'")
+    else targetPlatform.parsed.kernel.name;
+
+  # Apple Silicon uses a different CPU name in the target triple.
+  swiftArch = if stdenv.isDarwin && stdenv.isAarch64 then "arm64"
+    else targetPlatform.parsed.cpu.name;
+
+  # On Darwin, a `.swiftmodule` is a subdirectory in `lib/swift/<OS>`,
+  # containing binaries for supported archs. On other platforms, binaries are
+  # installed to `lib/swift/<OS>/<ARCH>`. Note that our setup-hook also adds
+  # `lib/swift` for convenience.
+  swiftLibSubdir = "lib/swift/${swiftOs}";
+  swiftModuleSubdir = if hostPlatform.isDarwin
+    then "lib/swift/${swiftOs}"
+    else "lib/swift/${swiftOs}/${swiftArch}";
+
+  # And then there's also a separate subtree for statically linked  modules.
+  toStaticSubdir = lib.replaceStrings [ "/swift/" ] [ "/swift_static/" ];
+  swiftStaticLibSubdir = toStaticSubdir swiftLibSubdir;
+  swiftStaticModuleSubdir = toStaticSubdir swiftModuleSubdir;
+
+  # This matches _SWIFT_DEFAULT_COMPONENTS, with specific components disabled.
+  swiftInstallComponents = [
+    "autolink-driver"
+    "compiler"
+    # "clang-builtin-headers"
+    "stdlib"
+    "sdk-overlay"
+    "static-mirror-lib"
+    "editor-integration"
+    # "tools"
+    # "testsuite-tools"
+    "toolchain-tools"
+    "toolchain-dev-tools"
+    "license"
+    (if stdenv.isDarwin then "sourcekit-xpc-service" else "sourcekit-inproc")
+    "swift-remote-mirror"
+    "swift-remote-mirror-headers"
+  ];
+
+  # Build a tool used during the build to create a custom clang wrapper, with
+  # which we wrap the clang produced by the swift build.
+  #
+  # This is used in a `POST_BUILD` for the CMake target, so we rename the
+  # actual clang to clang-unwrapped, then put the wrapper in place.
+  #
+  # We replace the `exec ...` command with `exec -a "$0"` in order to
+  # preserve $0 for clang. This is because, unlike Nix, we don't have
+  # separate wrappers for clang/clang++, and clang uses $0 to detect C++.
+  #
+  # Similarly, the C++ detection in the wrapper itself also won't work for us,
+  # so we base it on $0 as well.
+  makeClangWrapper = writeShellScriptBin "nix-swift-make-clang-wrapper" ''
+    set -euo pipefail
+
+    targetFile="$1"
+    unwrappedClang="$targetFile-unwrapped"
+
+    mv "$targetFile" "$unwrappedClang"
+    sed < '${clang}/bin/clang' > "$targetFile" \
+      -e 's|^\s*exec|exec -a "$0"|g' \
+      -e 's|^\[\[ "${clang.cc}/bin/clang" = \*++ ]]|[[ "$0" = *++ ]]|' \
+      -e "s|${clang.cc}/bin/clang|$unwrappedClang|g" \
+      -e "s|^\(\s*\)\($unwrappedClang\) \"@\\\$responseFile\"|\1argv0=\$0\n\1${bash}/bin/bash -c \"exec -a '\$argv0' \2 '@\$responseFile'\"|"
+    chmod a+x "$targetFile"
+  '';
+
+  # Create a tool used during the build to create a custom swift wrapper for
+  # each of the swift executables produced by the build.
+  #
+  # The build produces several `swift-frontend` executables during
+  # bootstrapping. Each of these has numerous aliases via symlinks, and the
+  # executable uses $0 to detect what tool is called.
+  wrapperParams = {
+    inherit bintools;
+    default_cc_wrapper = clang; # Instead of `@out@` in the original.
+    coreutils_bin = lib.getBin coreutils;
+    gnugrep_bin = gnugrep;
+    suffixSalt = lib.replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
+    use_response_file_by_default = 1;
+    swiftDriver = "";
+    # NOTE: @prog@ needs to be filled elsewhere.
+  };
+  swiftWrapper = runCommand "swift-wrapper.sh" wrapperParams ''
+    substituteAll '${../wrapper/wrapper.sh}' "$out"
+  '';
+  makeSwiftcWrapper = writeShellScriptBin "nix-swift-make-swift-wrapper" ''
+    set -euo pipefail
+
+    targetFile="$1"
+    unwrappedSwift="$targetFile-unwrapped"
+
+    mv "$targetFile" "$unwrappedSwift"
+    sed < '${swiftWrapper}' > "$targetFile" \
+      -e "s|@prog@|'$unwrappedSwift'|g" \
+      -e 's|exec "$prog"|exec -a "$0" "$prog"|g'
+    chmod a+x "$targetFile"
+  '';
+
+  # On Darwin, we need to use BOOTSTRAPPING-WITH-HOSTLIBS because of ABI
+  # stability, and have to provide the definitions for the system stdlib.
+  appleSwiftCore = stdenv.mkDerivation {
+    name = "apple-swift-core";
+    dontUnpack = true;
+
+    installPhase = ''
+      mkdir -p $out/lib/swift
+      cp -r \
+        "${MacOSX-SDK}/usr/lib/swift/Swift.swiftmodule" \
+        "${MacOSX-SDK}/usr/lib/swift/libswiftCore.tbd" \
+        $out/lib/swift/
+    '';
+  };
+
+in stdenv.mkDerivation {
+  pname = "swift";
+  inherit (sources) version;
+
+  outputs = [ "out" "lib" "dev" "doc" "man" ];
+
+  nativeBuildInputs = [
+    cmake
+    git
+    ninja
+    perl # pod2man
+    pkg-config
+    python3
+    makeWrapper
+    makeClangWrapper
+    makeSwiftcWrapper
+  ]
+    ++ lib.optionals stdenv.isDarwin [
+      xcbuild
+      sigtool # codesign
+      DarwinTools # sw_vers
+      fixDarwinDylibNames
+    ];
+
+  buildInputs = [
+    # For lldb
+    python3
+    swig
+    libxml2
+  ]
+    ++ lib.optionals stdenv.isLinux [
+      libuuid
+    ]
+    ++ lib.optionals stdenv.isDarwin [
+      CoreServices
+      Foundation
+      Combine
+    ];
+
+  # This is a partial reimplementation of our setup hook. Because we reuse
+  # the Swift wrapper for the Swift build itself, we need to do some of the
+  # same preparation.
+  postHook = ''
+    for pkg in "''${pkgsHostTarget[@]}" '${clang.libc}'; do
+      for subdir in ${swiftModuleSubdir} ${swiftStaticModuleSubdir} lib/swift; do
+        if [[ -d "$pkg/$subdir" ]]; then
+          export NIX_SWIFTFLAGS_COMPILE+=" -I $pkg/$subdir"
+        fi
+      done
+      for subdir in ${swiftLibSubdir} ${swiftStaticLibSubdir} lib/swift; do
+        if [[ -d "$pkg/$subdir" ]]; then
+          export NIX_LDFLAGS+=" -L $pkg/$subdir"
+        fi
+      done
+    done
+  '';
+
+  # We invoke cmakeConfigurePhase multiple times, but only need this once.
+  dontFixCmake = true;
+  # We setup custom build directories.
+  dontUseCmakeBuildDir = true;
+
+  unpackPhase = let
+    copySource = repo: "cp -r ${sources.${repo}} ${repo}";
+  in ''
+    mkdir src
+    cd src
+
+    ${copySource "swift-cmark"}
+    ${copySource "llvm-project"}
+    ${copySource "swift"}
+    ${copySource "swift-experimental-string-processing"}
+    ${copySource "swift-syntax"}
+    ${lib.optionalString
+      (!stdenv.isDarwin)
+      (copySource "swift-corelibs-libdispatch")}
+
+    chmod -R u+w .
+  '';
+
+  patchPhase = ''
+    # Just patch all the things for now, we can focus this later.
+    # TODO: eliminate use of env.
+    find -type f -print0 | xargs -0 sed -i \
+    ${lib.optionalString stdenv.isDarwin
+      "-e 's|/usr/libexec/PlistBuddy|${xcbuild}/bin/PlistBuddy|g'"} \
+      -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'
+
+    patch -p1 -d swift -i ${./patches/swift-cmake-3.25-compat.patch}
+    patch -p1 -d swift -i ${./patches/swift-wrap.patch}
+    patch -p1 -d swift -i ${./patches/swift-nix-resource-root.patch}
+    patch -p1 -d swift -i ${./patches/swift-linux-fix-libc-paths.patch}
+    patch -p1 -d swift -i ${./patches/swift-linux-fix-linking.patch}
+    patch -p1 -d swift -i ${./patches/swift-darwin-libcxx-flags.patch}
+    patch -p1 -d swift -i ${./patches/swift-darwin-link-cxxabi.patch}
+    patch -p1 -d swift -i ${substituteAll {
+      src = ./patches/swift-darwin-plistbuddy-workaround.patch;
+      inherit swiftArch;
+    }}
+    patch -p1 -d swift -i ${substituteAll {
+      src = ./patches/swift-prevent-sdk-dirs-warning.patch;
+      inherit (builtins) storeDir;
+    }}
+
+    # This patch needs to know the lib output location, so must be substituted
+    # in the same derivation as the compiler.
+    storeDir="${builtins.storeDir}" \
+      substituteAll ${./patches/swift-separate-lib.patch} $TMPDIR/swift-separate-lib.patch
+    patch -p1 -d swift -i $TMPDIR/swift-separate-lib.patch
+
+    patch -p1 -d llvm-project/llvm -i ${./patches/llvm-module-cache.patch}
+
+    patch -p1 -d llvm-project/clang -i ${./patches/clang-toolchain-dir.patch}
+    patch -p1 -d llvm-project/clang -i ${./patches/clang-wrap.patch}
+    patch -p1 -d llvm-project/clang -i ${../../llvm/14/clang/purity.patch}
+    patch -p2 -d llvm-project/clang -i ${fetchpatch {
+      name = "clang-cmake-fix-interpreter.patch";
+      url = "https://github.com/llvm/llvm-project/commit/b5eaf500f2441eff2277ea2973878fb1f171fd0a.patch";
+      sha256 = "1rma1al0rbm3s3ql6bnvbcighp74lri1lcrwbyacgdqp80fgw1b6";
+    }}
+
+   # gcc-13 build fixes
+    patch -p2 -d llvm-project/llvm -i ${fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch";
+      hash = "sha256-nkRPWx8gNvYr7mlvEUiOAb1rTrf+skCZjAydJVUHrcI=";
+    }}
+
+    ${lib.optionalString stdenv.isLinux ''
+    substituteInPlace llvm-project/clang/lib/Driver/ToolChains/Linux.cpp \
+      --replace 'SysRoot + "/lib' '"${glibc}/lib" "' \
+      --replace 'SysRoot + "/usr/lib' '"${glibc}/lib" "' \
+      --replace 'LibDir = "lib";' 'LibDir = "${glibc}/lib";' \
+      --replace 'LibDir = "lib64";' 'LibDir = "${glibc}/lib";' \
+      --replace 'LibDir = X32 ? "libx32" : "lib64";' 'LibDir = "${glibc}/lib";'
+
+    # 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
+    ''}
+
+    # Remove tests for cross compilation, which we don't currently support.
+    rm swift/test/Interop/Cxx/class/constructors-copy-irgen-*.swift
+    rm swift/test/Interop/Cxx/class/constructors-irgen-*.swift
+
+    # TODO: consider fixing and re-adding. This test fails due to a non-standard "install_prefix".
+    rm swift/validation-test/Python/build_swift.swift
+
+    # We cannot handle the SDK location being in "Weird Location" due to Nix isolation.
+    rm swift/test/DebugInfo/compiler-flags.swift
+
+    # TODO: Fix issue with ld.gold invoked from script finding crtbeginS.o and crtendS.o.
+    rm swift/test/IRGen/ELF-remove-autolink-section.swift
+
+    # The following two tests fail because we use don't use the bundled libicu:
+    # [SOURCE_DIR/utils/build-script] ERROR: can't find source directory for libicu (tried /build/src/icu)
+    rm swift/validation-test/BuildSystem/default_build_still_performs_epilogue_opts_after_split.test
+    rm swift/validation-test/BuildSystem/test_early_swift_driver_and_infer.swift
+
+    # TODO: This test fails for some unknown reason
+    rm swift/test/Serialization/restrict-swiftmodule-to-revision.swift
+
+    # This test was flaky in ofborg, see #186476
+    rm swift/test/AutoDiff/compiler_crashers_fixed/issue-56649-missing-debug-scopes-in-pullback-trampoline.swift
+
+    patchShebangs .
+
+    ${lib.optionalString (!stdenv.isDarwin) ''
+    # NOTE: This interferes with ABI stability on Darwin, which uses the system
+    # libraries in the hardcoded path /usr/lib/swift.
+    fixCmakeFiles .
+    ''}
+  '';
+
+  configurePhase = ''
+    export SWIFT_SOURCE_ROOT="$PWD"
+    mkdir -p ../build
+    cd ../build
+    export SWIFT_BUILD_ROOT="$PWD"
+
+    # Most builds set a target, but LLDB doesn't. Harmless on non-Darwin.
+    export MACOSX_DEPLOYMENT_TARGET=10.15
+  '';
+
+  # These steps are derived from doing a normal build with.
+  #
+  #   ./swift/utils/build-toolchain test --dry-run
+  #
+  # But dealing with the custom Python build system is far more trouble than
+  # simply invoking CMake directly. Few variables it passes to CMake are
+  # actually required or non-default.
+  #
+  # Using CMake directly also allows us to split up the already large build,
+  # and package Swift components separately.
+  #
+  # Besides `--dry-run`, another good way to compare build changes between
+  # Swift releases is to diff the scripts:
+  #
+  #   git diff swift-5.6.3-RELEASE..swift-5.7-RELEASE -- utils/build*
+  #
+  buildPhase = ''
+    # Helper to build a subdirectory.
+    #
+    # Always reset cmakeFlags before calling this. The cmakeConfigurePhase
+    # amends flags and would otherwise keep expanding it.
+    function buildProject() {
+      mkdir -p $SWIFT_BUILD_ROOT/$1
+      cd $SWIFT_BUILD_ROOT/$1
+
+      cmakeDir=$SWIFT_SOURCE_ROOT/''${2-$1}
+      cmakeConfigurePhase
+
+      ninjaBuildPhase
+    }
+
+    cmakeFlags="-GNinja"
+    buildProject swift-cmark
+
+    # Some notes:
+    # - The Swift build just needs Clang.
+    # - We can further reduce targets to just our targetPlatform.
+    cmakeFlags="
+      -GNinja
+      -DLLVM_ENABLE_PROJECTS=clang
+      -DLLVM_TARGETS_TO_BUILD=${{
+        "x86_64" = "X86";
+        "aarch64" = "AArch64";
+      }.${targetPlatform.parsed.cpu.name}}
+    "
+    buildProject llvm llvm-project/llvm
+
+    '' + lib.optionalString stdenv.isDarwin ''
+    # Add appleSwiftCore to the search paths. We can't simply add it to
+    # buildInputs, because it is potentially an older stdlib than the one we're
+    # building. We have to remove it again after the main Swift build, or later
+    # build steps may fail. (Specific case: Concurrency backdeploy uses the
+    # Sendable protocol, which appears to not be present in the macOS 11 SDK.)
+    OLD_NIX_SWIFTFLAGS_COMPILE="$NIX_SWIFTFLAGS_COMPILE"
+    OLD_NIX_LDFLAGS="$NIX_LDFLAGS"
+    export NIX_SWIFTFLAGS_COMPILE+=" -I ${appleSwiftCore}/lib/swift"
+    export NIX_LDFLAGS+=" -L ${appleSwiftCore}/lib/swift"
+    '' + ''
+
+    # Some notes:
+    # - BOOTSTRAPPING_MODE defaults to OFF in CMake, but is enabled in standard
+    #   builds, so we enable it as well. On Darwin, we have to use the system
+    #   Swift libs because of ABI-stability, but this may be trouble if the
+    #   builder is an older macOS.
+    # - Experimental features are OFF by default in CMake, but are enabled in
+    #   official builds, so we do the same. (Concurrency is also required in
+    #   the stdlib. StringProcessing is often implicitely imported, causing
+    #   lots of warnings if missing.)
+    # - SWIFT_STDLIB_ENABLE_OBJC_INTEROP is set explicitely because its check
+    #   is buggy. (Uses SWIFT_HOST_VARIANT_SDK before initialized.)
+    #   Fixed in: https://github.com/apple/swift/commit/84083afef1de5931904d5c815d53856cdb3fb232
+    cmakeFlags="
+      -GNinja
+      -DBOOTSTRAPPING_MODE=BOOTSTRAPPING${lib.optionalString stdenv.isDarwin "-WITH-HOSTLIBS"}
+      -DSWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING=ON
+      -DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=ON
+      -DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=ON
+      -DSWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING=ON
+      -DLLVM_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/llvm
+      -DClang_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/clang
+      -DSWIFT_PATH_TO_CMARK_SOURCE=$SWIFT_SOURCE_ROOT/swift-cmark
+      -DSWIFT_PATH_TO_CMARK_BUILD=$SWIFT_BUILD_ROOT/swift-cmark
+      -DSWIFT_PATH_TO_LIBDISPATCH_SOURCE=$SWIFT_SOURCE_ROOT/swift-corelibs-libdispatch
+      -DSWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE=$SWIFT_SOURCE_ROOT/swift-syntax
+      -DSWIFT_PATH_TO_STRING_PROCESSING_SOURCE=$SWIFT_SOURCE_ROOT/swift-experimental-string-processing
+      -DSWIFT_INSTALL_COMPONENTS=${lib.concatStringsSep ";" swiftInstallComponents}
+      -DSWIFT_STDLIB_ENABLE_OBJC_INTEROP=${if stdenv.isDarwin then "ON" else "OFF"}
+    "
+    buildProject swift
+
+    '' + lib.optionalString stdenv.isDarwin ''
+    # Restore search paths to remove appleSwiftCore.
+    export NIX_SWIFTFLAGS_COMPILE="$OLD_NIX_SWIFTFLAGS_COMPILE"
+    export NIX_LDFLAGS="$OLD_NIX_LDFLAGS"
+    '' + ''
+
+    # These are based on flags in `utils/build-script-impl`.
+    #
+    # LLDB_USE_SYSTEM_DEBUGSERVER=ON disables the debugserver build on Darwin,
+    # which requires a special signature.
+    #
+    # CMAKE_BUILD_WITH_INSTALL_NAME_DIR ensures we don't use rpath on Darwin.
+    #
+    # NOTE: On Darwin, we only want ncurses in the linker search path, because
+    # headers are part of libsystem. Adding its headers to the search path
+    # causes strange mixing and errors. Note that libedit propagates ncurses,
+    # so we add both manually here, instead of relying on setup hooks.
+    # TODO: Find a better way to prevent this conflict.
+    cmakeFlags="
+      -GNinja
+      -DLLDB_SWIFTC=$SWIFT_BUILD_ROOT/swift/bin/swiftc
+      -DLLDB_SWIFT_LIBS=$SWIFT_BUILD_ROOT/swift/lib/swift
+      -DLLVM_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/llvm
+      -DClang_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/clang
+      -DSwift_DIR=$SWIFT_BUILD_ROOT/swift/lib/cmake/swift
+      -DLLDB_ENABLE_CURSES=ON
+      -DLLDB_ENABLE_LIBEDIT=ON
+      -DLLDB_ENABLE_PYTHON=ON
+      -DLLDB_ENABLE_LZMA=OFF
+      -DLLDB_ENABLE_LUA=OFF
+      -DLLDB_INCLUDE_TESTS=OFF
+      -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON
+      ${lib.optionalString stdenv.isDarwin ''
+      -DLLDB_USE_SYSTEM_DEBUGSERVER=ON
+      ''}
+      -DLibEdit_INCLUDE_DIRS=${libedit.dev}/include
+      -DLibEdit_LIBRARIES=${libedit}/lib/libedit${stdenv.hostPlatform.extensions.sharedLibrary}
+      -DCURSES_INCLUDE_DIRS=${if stdenv.isDarwin then "/var/empty" else ncurses.dev}/include
+      -DCURSES_LIBRARIES=${ncurses}/lib/libncurses${stdenv.hostPlatform.extensions.sharedLibrary}
+      -DPANEL_LIBRARIES=${ncurses}/lib/libpanel${stdenv.hostPlatform.extensions.sharedLibrary}
+    ";
+    buildProject lldb llvm-project/lldb
+
+    ${lib.optionalString stdenv.isDarwin ''
+    # Need to do a standalone build of concurrency for Darwin back deployment.
+    # Based on: utils/swift_build_support/swift_build_support/products/backdeployconcurrency.py
+    cmakeFlags="
+      -GNinja
+      -DCMAKE_Swift_COMPILER=$SWIFT_BUILD_ROOT/swift/bin/swiftc
+      -DSWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE=$SWIFT_SOURCE_ROOT/swift-syntax
+
+      -DTOOLCHAIN_DIR=/var/empty
+      -DSWIFT_NATIVE_LLVM_TOOLS_PATH=${stdenv.cc}/bin
+      -DSWIFT_NATIVE_CLANG_TOOLS_PATH=${stdenv.cc}/bin
+      -DSWIFT_NATIVE_SWIFT_TOOLS_PATH=$SWIFT_BUILD_ROOT/swift/bin
+
+      -DCMAKE_CROSSCOMPILING=ON
+
+      -DBUILD_SWIFT_CONCURRENCY_BACK_DEPLOYMENT_LIBRARIES=ON
+      -DSWIFT_INCLUDE_TOOLS=OFF
+      -DSWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT=OFF
+      -DSWIFT_BUILD_TEST_SUPPORT_MODULES=OFF
+      -DSWIFT_BUILD_STDLIB=OFF
+      -DSWIFT_BUILD_DYNAMIC_STDLIB=OFF
+      -DSWIFT_BUILD_STATIC_STDLIB=OFF
+      -DSWIFT_BUILD_REMOTE_MIRROR=OFF
+      -DSWIFT_BUILD_SDK_OVERLAY=OFF
+      -DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY=OFF
+      -DSWIFT_BUILD_STATIC_SDK_OVERLAY=OFF
+      -DSWIFT_INCLUDE_TESTS=OFF
+      -DSWIFT_BUILD_PERF_TESTSUITE=OFF
+
+      -DSWIFT_HOST_VARIANT_ARCH=${swiftArch}
+      -DBUILD_STANDALONE=ON
+
+      -DSWIFT_INSTALL_COMPONENTS=back-deployment
+
+      -DSWIFT_SDKS=${{
+        "macos" = "OSX";
+        "ios" = "IOS";
+        #IOS_SIMULATOR
+        #TVOS
+        #TVOS_SIMULATOR
+        #WATCHOS
+        #WATCHOS_SIMULATOR
+      }.${targetPlatform.darwinPlatform}}
+
+      -DLLVM_DIR=$SWIFT_BUILD_ROOT/llvm/lib/cmake/llvm
+
+      -DSWIFT_DEST_ROOT=$out
+      -DSWIFT_HOST_VARIANT_SDK=OSX
+
+      -DSWIFT_DARWIN_DEPLOYMENT_VERSION_OSX=10.15
+      -DSWIFT_DARWIN_DEPLOYMENT_VERSION_IOS=13.0
+      -DSWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST=13.0
+      -DSWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS=13.0
+      -DSWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS=6.0
+    "
+
+    # This depends on the special Clang build specific to the Swift branch.
+    # We also need to call a specific Ninja target.
+    export CC=$SWIFT_BUILD_ROOT/llvm/bin/clang
+    export CXX=$SWIFT_BUILD_ROOT/llvm/bin/clang++
+    ninjaFlags="back-deployment"
+
+    buildProject swift-concurrency-backdeploy swift
+
+    export CC=$NIX_CC/bin/clang
+    export CXX=$NIX_CC/bin/clang++
+    unset ninjaFlags
+  ''}
+  '';
+
+  # TODO: ~50 failing tests on x86_64-linux. Other platforms not checked.
+  doCheck = false;
+  nativeCheckInputs = [ file ];
+  # TODO: consider using stress-tester and integration-test.
+  checkPhase = ''
+    cd $SWIFT_BUILD_ROOT/swift
+    checkTarget=check-swift-all
+    ninjaCheckPhase
+    unset checkTarget
+  '';
+
+  installPhase = ''
+    # Undo the clang and swift wrapping we did for the build.
+    # (This happened via patches to cmake files.)
+    cd $SWIFT_BUILD_ROOT
+    mv llvm/bin/clang-15{-unwrapped,}
+    mv swift/bin/swift-frontend{-unwrapped,}
+
+    mkdir $out $lib
+
+    # Install clang binaries only. We hide these with the wrapper, so they are
+    # for private use by Swift only.
+    cd $SWIFT_BUILD_ROOT/llvm
+    installTargets=install-clang
+    ninjaInstallPhase
+    unset installTargets
+
+    # LLDB is also a private install.
+    cd $SWIFT_BUILD_ROOT/lldb
+    ninjaInstallPhase
+
+    cd $SWIFT_BUILD_ROOT/swift
+    ninjaInstallPhase
+
+    ${lib.optionalString stdenv.isDarwin ''
+    cd $SWIFT_BUILD_ROOT/swift-concurrency-backdeploy
+    installTargets=install-back-deployment
+    ninjaInstallPhase
+    unset installTargets
+    ''}
+
+    # Separate $lib output here, because specific logic follows.
+    # Only move the dynamic run-time parts, to keep $lib small. Every Swift
+    # build will depend on it.
+    moveToOutput "lib/swift" "$lib"
+    moveToOutput "lib/libswiftDemangle.*" "$lib"
+
+    # This link is here because various tools (swiftpm) check for stdlib
+    # relative to the swift compiler. It's fine if this is for build-time
+    # stuff, but we should patch all cases were it would end up in an output.
+    ln -s $lib/lib/swift $out/lib/swift
+
+    # Swift has a separate resource root from Clang, but locates the Clang
+    # resource root via subdir or symlink. Provide a default here, but we also
+    # patch Swift to prefer NIX_CC if set.
+    #
+    # NOTE: We don't symlink directly here, because that'd add a run-time dep
+    # on the full Clang compiler to every Swift executable. The copy here is
+    # just copying the 3 symlinks inside to smaller closures.
+    mkdir $lib/lib/swift/clang
+    cp -P ${clang}/resource-root/* $lib/lib/swift/clang/
+
+    ${lib.optionalString stdenv.isDarwin ''
+    # Install required library for ObjC interop.
+    # TODO: Is there no source code for this available?
+    cp -r ${CLTools_Executables}/usr/lib/arc $out/lib/arc
+    ''}
+  '';
+
+  preFixup = lib.optionalString stdenv.isLinux ''
+    # This is cheesy, but helps the patchelf hook remove /build from RPATH.
+    cd $SWIFT_BUILD_ROOT/..
+    mv build buildx
+  '';
+
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    # These libraries need to use the system install name. The official SDK
+    # does the same (as opposed to using rpath). Presumably, they are part of
+    # the stable ABI. Not using the system libraries at run-time is known to
+    # cause ObjC class conflicts and segfaults.
+    declare -A systemLibs=(
+      [libswiftCore.dylib]=1
+      [libswiftDarwin.dylib]=1
+      [libswiftSwiftOnoneSupport.dylib]=1
+      [libswift_Concurrency.dylib]=1
+    )
+
+    for systemLib in "''${!systemLibs[@]}"; do
+      install_name_tool -id /usr/lib/swift/$systemLib $lib/${swiftLibSubdir}/$systemLib
+    done
+
+    for file in $out/bin/swift-frontend $lib/${swiftLibSubdir}/*.dylib; do
+      changeArgs=""
+      for dylib in $(otool -L $file | awk '{ print $1 }'); do
+        if [[ ''${systemLibs["$(basename $dylib)"]} ]]; then
+          changeArgs+=" -change $dylib /usr/lib/swift/$(basename $dylib)"
+        elif [[ "$dylib" = */bootstrapping1/* ]]; then
+          changeArgs+=" -change $dylib $lib/lib/swift/$(basename $dylib)"
+        fi
+      done
+      if [[ -n "$changeArgs" ]]; then
+        install_name_tool $changeArgs $file
+      fi
+    done
+
+    wrapProgram $out/bin/swift-frontend \
+      --prefix PATH : ${lib.makeBinPath runtimeDeps}
+  '';
+
+  passthru = {
+    inherit
+      swiftOs swiftArch
+      swiftModuleSubdir swiftLibSubdir
+      swiftStaticModuleSubdir swiftStaticLibSubdir;
+
+    # Internal attr for the wrapper.
+    _wrapperParams = wrapperParams;
+  };
+
+  meta = {
+    description = "The Swift Programming Language";
+    homepage = "https://github.com/apple/swift";
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+    license = lib.licenses.asl20;
+    platforms = with lib.platforms; linux ++ darwin;
+    # Swift doesn't support 32-bit Linux, unknown on other platforms.
+    badPlatforms = lib.platforms.i686;
+    timeout = 86400; # 24 hours.
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-toolchain-dir.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-toolchain-dir.patch
new file mode 100644
index 000000000000..40d7728cf788
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-toolchain-dir.patch
@@ -0,0 +1,13 @@
+Use the Nix include dirs and gcc runtime dir, when no sysroot is configured.
+
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -574,7 +574,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) {
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-wrap.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-wrap.patch
new file mode 100644
index 000000000000..9c6cafed3699
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-wrap.patch
@@ -0,0 +1,18 @@
+Wrap the clang produced during the build
+
+--- a/tools/driver/CMakeLists.txt
++++ b/tools/driver/CMakeLists.txt
+@@ -59,6 +59,13 @@ endif()
+ 
+ add_dependencies(clang clang-resource-headers)
+ 
++# Nix: wrap the clang build.
++add_custom_command(
++  TARGET clang POST_BUILD
++  COMMAND nix-swift-make-clang-wrapper $<TARGET_FILE:clang>
++  VERBATIM
++)
++
+ if(NOT CLANG_LINKS_TO_CREATE)
+   set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp)
+ endif()
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/llvm-module-cache.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/llvm-module-cache.patch
new file mode 100644
index 000000000000..9a22d0482ea5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/llvm-module-cache.patch
@@ -0,0 +1,30 @@
+The compiler fails if LLVM modules are enabled and it cannot write its module
+cache. This patch detects and rejects the fake, non-existant $HOME used in Nix
+builds.
+
+We could simply return false in `cache_directory`, but that completely disables
+module caching, and may unnecessarily slow down builds. Instead, let it use
+'/tmp/.cache'.
+
+--- a/lib/Support/Unix/Path.inc
++++ b/lib/Support/Unix/Path.inc
+@@ -1380,6 +1380,9 @@ bool user_config_directory(SmallVectorImpl<char> &result) {
+   if (!home_directory(result)) {
+     return false;
+   }
++  if (std::equal(result.begin(), result.end(), "/homeless-shelter")) {
++    return false;
++  }
+   append(result, ".config");
+   return true;
+ }
+@@ -1401,6 +1404,9 @@ bool cache_directory(SmallVectorImpl<char> &result) {
+   if (!home_directory(result)) {
+     return false;
+   }
++  if (std::equal(result.begin(), result.end(), "/homeless-shelter")) {
++    system_temp_directory(true/*ErasedOnReboot*/, result);
++  }
+   append(result, ".cache");
+   return true;
+ }
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-cmake-3.25-compat.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-cmake-3.25-compat.patch
new file mode 100644
index 000000000000..83c8d95984ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-cmake-3.25-compat.patch
@@ -0,0 +1,1509 @@
+Upstream PR: https://github.com/apple/swift/pull/65534
+
+commit 112681f7f5927588569b225d926ca9f5f9ec98b3
+Author: Stéphan Kochen <git@stephank.nl>
+Date:   Sat Apr 29 20:34:40 2023 +0200
+
+    build: fix accidental cmake expansions
+    
+    As of CMake 3.25, there are now global variables `LINUX=1`, `ANDROID=1`,
+    etc. These conflict with expressions that used these names as unquoted
+    strings in positions where CMake accepts 'variable|string', for example:
+    
+    - `if(sdk STREQUAL LINUX)` would fail, because `LINUX` is now defined and
+      expands to 1, where it would previously coerce to a string.
+    
+    - `if(${sdk} STREQUAL "LINUX")` would fail if `sdk=LINUX`, because the
+      left-hand side expands twice.
+    
+    In this patch, I looked for a number of patterns to fix up, sometimes a
+    little defensively:
+    
+    - Quoted right-hand side of `STREQUAL` where I was confident it was
+      intended to be a string literal.
+    
+    - Removed manual variable expansion on left-hand side of `STREQUAL`,
+      `MATCHES` and `IN_LIST` where I was confident it was unintended.
+    
+    Fixes #65028.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index eaab71fbaf0..45aa5d65dd3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -119,7 +119,7 @@ else()
+   if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|amd64")
+     set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
+   elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
+-    if(SWIFT_HOST_VARIANT_SDK_default STREQUAL OSX)
++    if(SWIFT_HOST_VARIANT_SDK_default STREQUAL "OSX")
+       set(SWIFT_HOST_VARIANT_ARCH_default "arm64")
+     else()
+       set(SWIFT_HOST_VARIANT_ARCH_default "aarch64")
+@@ -336,7 +336,7 @@ set(SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
+ #   - MultiThreadedDebug (/MTd)
+ #   - MultiThreadedDLL (/MD)
+ #   - MultiThreadedDebugDLL (/MDd)
+-if(CMAKE_BUILD_TYPE STREQUAL Debug)
++if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+   set(SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY_default MultiThreadedDebugDLL)
+ else()
+   set(SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY_default MultiThreadedDLL)
+@@ -598,7 +598,7 @@ if(SWIFT_BUILT_STANDALONE)
+   project(Swift C CXX ASM)
+ endif()
+ 
+-if(MSVC OR "${CMAKE_SIMULATE_ID}" STREQUAL MSVC)
++if(MSVC OR "${CMAKE_SIMULATE_ID}" STREQUAL "MSVC")
+   include(ClangClCompileRules)
+ elseif(UNIX)
+   include(UnixCompileRules)
+@@ -627,7 +627,7 @@ if(SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY AND "${SWIFT_CONCURRENCY_GLOBAL_EXECUTO
+ endif()
+ 
+ set(SWIFT_BUILD_HOST_DISPATCH FALSE)
+-if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   # Only build libdispatch for the host if the host tools are being built and
+   # specifically if these two libraries that depend on it are built.
+   if(SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_SOURCEKIT)
+@@ -801,11 +801,11 @@ endif()
+ # build environment.
+ if(LLVM_USE_LINKER)
+   set(SWIFT_USE_LINKER_default "${LLVM_USE_LINKER}")
+-elseif(${SWIFT_HOST_VARIANT_SDK} STREQUAL ANDROID)
++elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
+   set(SWIFT_USE_LINKER_default "lld")
+-elseif(CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
++elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+   set(SWIFT_USE_LINKER_default "lld")
+-elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
++elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   set(SWIFT_USE_LINKER_default "")
+ else()
+   set(SWIFT_USE_LINKER_default "gold")
+diff --git a/SwiftCompilerSources/CMakeLists.txt b/SwiftCompilerSources/CMakeLists.txt
+index 225e72663a1..d14e0ccecac 100644
+--- a/SwiftCompilerSources/CMakeLists.txt
++++ b/SwiftCompilerSources/CMakeLists.txt
+@@ -80,7 +80,7 @@ function(add_swift_compiler_modules_library name)
+     list(APPEND swift_compile_options "-Xfrontend" "-disable-implicit-string-processing-module-import")
+   endif()
+ 
+-  if(CMAKE_BUILD_TYPE STREQUAL Debug)
++  if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+     list(APPEND swift_compile_options "-g")
+   else()
+     list(APPEND swift_compile_options "-O" "-cross-module-optimization")
+@@ -98,7 +98,7 @@ function(add_swift_compiler_modules_library name)
+     set(deployment_version "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
+     set(sdk_path "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}")
+     set(sdk_option "-sdk" "${sdk_path}")
+-    if(${BOOTSTRAPPING_MODE} STREQUAL "CROSSCOMPILE-WITH-HOSTLIBS")
++    if(BOOTSTRAPPING_MODE STREQUAL "CROSSCOMPILE-WITH-HOSTLIBS")
+       # Let the cross-compiled compile don't pick up the compiled stdlib by providing
+       # an (almost) empty resource dir.
+       # The compiler will instead pick up the stdlib from the SDK.
+@@ -117,7 +117,7 @@ function(add_swift_compiler_modules_library name)
+         message(ERROR "libc++ not found in the toolchain.")
+       endif()
+     endif()
+-  elseif(${BOOTSTRAPPING_MODE} STREQUAL "CROSSCOMPILE")
++  elseif(BOOTSTRAPPING_MODE STREQUAL "CROSSCOMPILE")
+     set(sdk_option "-sdk" "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}")
+     get_filename_component(swift_exec_bin_dir ${ALS_SWIFT_EXEC} DIRECTORY)
+     set(sdk_option ${sdk_option} "-resource-dir" "${swift_exec_bin_dir}/../lib/swift")
+@@ -253,13 +253,13 @@ else()
+   add_dependencies(importedHeaderDependencies swift-ast-generated-headers)
+   target_include_directories(importedHeaderDependencies PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../include/swift")
+ 
+-  if(${BOOTSTRAPPING_MODE} MATCHES "HOSTTOOLS|CROSSCOMPILE")
++  if(BOOTSTRAPPING_MODE MATCHES "HOSTTOOLS|CROSSCOMPILE")
+ 
+     if (NOT SWIFT_EXEC_FOR_SWIFT_MODULES)
+       message(FATAL_ERROR "Need a swift toolchain building swift compiler sources")
+     endif()
+ 
+-    if(${BOOTSTRAPPING_MODE} STREQUAL "HOSTTOOLS")
++    if(BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
+       if(NOT SWIFT_EXEC_FOR_SWIFT_MODULES STREQUAL CMAKE_Swift_COMPILER)
+         message(FATAL_ERROR "The Swift compiler (${CMAKE_Swift_COMPILER}) differs from the Swift compiler in SWIFT_NATIVE_SWIFT_TOOLS_PATH (${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc).")
+       endif()
+@@ -275,11 +275,11 @@ else()
+     add_swift_compiler_modules_library(swiftCompilerModules
+       SWIFT_EXEC "${SWIFT_EXEC_FOR_SWIFT_MODULES}")
+ 
+-  elseif(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
++  elseif(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+ 
+     set(b0_deps swift-frontend-bootstrapping0 symlink-headers-bootstrapping0)
+     set(b1_deps swift-frontend-bootstrapping1 symlink-headers-bootstrapping1)
+-    if(${BOOTSTRAPPING_MODE} STREQUAL "BOOTSTRAPPING")
++    if(BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING")
+       list(APPEND b0_deps swiftCore-bootstrapping0)
+       list(APPEND b1_deps swiftCore-bootstrapping1)
+       if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+@@ -290,7 +290,7 @@ else()
+         list(APPEND b0_deps swiftDarwin-bootstrapping0)
+         list(APPEND b1_deps swiftDarwin-bootstrapping1)
+       endif()
+-      if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_LIBSTDCXX_PLATFORMS)
++      if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_LIBSTDCXX_PLATFORMS)
+         list(APPEND b0_deps copy-libstdcxx-modulemap-bootstrapping0 copy-libstdcxx-header-bootstrapping0)
+         list(APPEND b1_deps copy-libstdcxx-modulemap-bootstrapping1 copy-libstdcxx-header-bootstrapping1)
+       endif()
+diff --git a/benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake b/benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+index dd989efe618..3ed37754214 100644
+--- a/benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
++++ b/benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+@@ -21,7 +21,7 @@ macro(configure_build)
+     # thus allowing the --host-cc build-script argument to work here.
+     get_filename_component(c_compiler ${CMAKE_C_COMPILER} NAME)
+ 
+-    if(${c_compiler} STREQUAL "clang")
++    if(c_compiler STREQUAL "clang")
+       set(CLANG_EXEC ${CMAKE_C_COMPILER})
+     else()
+       if(NOT SWIFT_DARWIN_XCRUN_TOOLCHAIN)
+@@ -713,7 +713,7 @@ function(swift_benchmark_compile)
+ 
+   if(NOT SWIFT_BENCHMARK_BUILT_STANDALONE)
+     set(stdlib_dependencies "swift-frontend" "swiftCore-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+-    if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++    if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+       list(APPEND stdlib_dependencies "swiftDarwin-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+     endif()
+     foreach(stdlib_dependency ${UNIVERSAL_LIBRARY_NAMES_${SWIFT_BENCHMARK_COMPILE_PLATFORM}})
+diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake
+index 58c7eb1bd4f..96c4fe804f9 100644
+--- a/cmake/modules/AddSwift.cmake
++++ b/cmake/modules/AddSwift.cmake
+@@ -63,16 +63,16 @@ function(_set_target_prefix_and_suffix target kind sdk)
+   precondition(kind MESSAGE "kind is required")
+   precondition(sdk MESSAGE "sdk is required")
+ 
+-  if(${sdk} STREQUAL ANDROID)
+-    if(${kind} STREQUAL STATIC)
++  if(sdk STREQUAL "ANDROID")
++    if(kind STREQUAL "STATIC")
+       set_target_properties(${target} PROPERTIES PREFIX "lib" SUFFIX ".a")
+-    elseif(${kind} STREQUAL SHARED)
++    elseif(kind STREQUAL "SHARED")
+       set_target_properties(${target} PROPERTIES PREFIX "lib" SUFFIX ".so")
+     endif()
+-  elseif(${sdk} STREQUAL WINDOWS)
+-    if(${kind} STREQUAL STATIC)
++  elseif(sdk STREQUAL "WINDOWS")
++    if(kind STREQUAL "STATIC")
+       set_target_properties(${target} PROPERTIES PREFIX "" SUFFIX ".lib")
+-    elseif(${kind} STREQUAL SHARED)
++    elseif(kind STREQUAL "SHARED")
+       set_target_properties(${target} PROPERTIES PREFIX "" SUFFIX ".dll")
+     endif()
+   endif()
+@@ -115,7 +115,7 @@ function(_add_host_variant_c_compile_link_flags name)
+     set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
+   endif()
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL ANDROID)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
+     set(DEPLOYMENT_VERSION ${SWIFT_ANDROID_API_LEVEL})
+   endif()
+ 
+@@ -151,7 +151,7 @@ function(_add_host_variant_c_compile_link_flags name)
+     target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:--sysroot=${_sysroot}>)
+   endif()
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL ANDROID)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
+     # Make sure the Android NDK lld is used.
+     swift_android_tools_path(${SWIFT_HOST_VARIANT_ARCH} tools_path)
+     target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-B${tools_path}>)
+@@ -223,7 +223,7 @@ function(_add_host_variant_c_compile_flags target)
+     endif()
+   endif()
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     # MSVC/clang-cl don't support -fno-pic or -fms-compatibility-version.
+     if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
+       target_compile_options(${target} PRIVATE
+@@ -276,14 +276,14 @@ function(_add_host_variant_c_compile_flags target)
+     # NOTE(compnerd) workaround LLVM invoking `add_definitions(-D_DEBUG)` which
+     # causes failures for the runtime library when cross-compiling due to
+     # undefined symbols from the standard library.
+-    if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
++    if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+       target_compile_options(${target} PRIVATE
+         $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-U_DEBUG>)
+     endif()
+   endif()
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL ANDROID)
+-    if(SWIFT_HOST_VARIANT_ARCH STREQUAL x86_64)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
++    if(SWIFT_HOST_VARIANT_ARCH STREQUAL "x86_64")
+       # NOTE(compnerd) Android NDK 21 or lower will generate library calls to
+       # `__sync_val_compare_and_swap_16` rather than lowering to the CPU's
+       # `cmpxchg16b` instruction as the `cx16` feature is disabled due to a bug
+@@ -317,15 +317,15 @@ function(_add_host_variant_c_compile_flags target)
+       $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-fprofile-instr-generate -fcoverage-mapping>)
+   endif()
+ 
+-  if((SWIFT_HOST_VARIANT_ARCH STREQUAL armv7 OR
+-      SWIFT_HOST_VARIANT_ARCH STREQUAL aarch64) AND
+-     (SWIFT_HOST_VARIANT_SDK STREQUAL LINUX OR
+-      SWIFT_HOST_VARIANT_SDK STREQUAL ANDROID))
++  if((SWIFT_HOST_VARIANT_ARCH STREQUAL "armv7" OR
++      SWIFT_HOST_VARIANT_ARCH STREQUAL "aarch64") AND
++     (SWIFT_HOST_VARIANT_SDK STREQUAL "LINUX" OR
++      SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID"))
+     target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-funwind-tables>)
+   endif()
+ 
+   if(SWIFT_HOST_VARIANT_SDK STREQUAL "LINUX")
+-    if(SWIFT_HOST_VARIANT_ARCH STREQUAL x86_64)
++    if(SWIFT_HOST_VARIANT_ARCH STREQUAL "x86_64")
+       # this is the minimum architecture that supports 16 byte CAS, which is
+       # necessary to avoid a dependency to libatomic
+       target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-march=core2>)
+@@ -336,7 +336,7 @@ function(_add_host_variant_c_compile_flags target)
+   # llvm/llvm-project@66395c9, which can cause incompatibilities with the Swift
+   # frontend if not built the same way.
+   if("${SWIFT_HOST_VARIANT_ARCH}" MATCHES "armv6|armv7|i686" AND
+-     NOT (SWIFT_HOST_VARIANT_SDK STREQUAL ANDROID AND SWIFT_ANDROID_API_LEVEL LESS 24))
++     NOT (SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID" AND SWIFT_ANDROID_API_LEVEL LESS 24))
+     target_compile_definitions(${target} PRIVATE
+       $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:_LARGEFILE_SOURCE _FILE_OFFSET_BITS=64>)
+   endif()
+@@ -345,19 +345,19 @@ endfunction()
+ function(_add_host_variant_link_flags target)
+   _add_host_variant_c_compile_link_flags(${target})
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL LINUX)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "LINUX")
+     target_link_libraries(${target} PRIVATE
+       pthread
+       dl)
+     if("${SWIFT_HOST_VARIANT_ARCH}" MATCHES "armv5|armv6|armv7|i686")
+       target_link_libraries(${target} PRIVATE atomic)
+     endif()
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL FREEBSD)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "FREEBSD")
+     target_link_libraries(${target} PRIVATE
+       pthread)
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL CYGWIN)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "CYGWIN")
+     # No extra libraries required.
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     # We don't need to add -nostdlib using MSVC or clang-cl, as MSVC and
+     # clang-cl rely on auto-linking entirely.
+     if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
+@@ -375,12 +375,12 @@ function(_add_host_variant_link_flags target)
+     # the Windows SDK on case sensitive file systems.
+     target_link_directories(${target} PRIVATE
+       ${CMAKE_BINARY_DIR}/winsdk_lib_${SWIFT_HOST_VARIANT_ARCH}_symlinks)
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL HAIKU)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "HAIKU")
+     target_link_libraries(${target} PRIVATE
+       bsd)
+     target_link_options(${target} PRIVATE
+       "SHELL:-Xlinker -Bsymbolic")
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL ANDROID)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
+     target_link_libraries(${target} PRIVATE
+       dl
+       log
+@@ -422,7 +422,7 @@ function(_add_host_variant_link_flags target)
+   #
+   # TODO: Evaluate/enable -f{function,data}-sections --gc-sections for bfd,
+   # gold, and lld.
+-  if(NOT CMAKE_BUILD_TYPE STREQUAL Debug AND CMAKE_SYSTEM_NAME MATCHES Darwin)
++  if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND CMAKE_SYSTEM_NAME MATCHES Darwin)
+     if (NOT SWIFT_DISABLE_DEAD_STRIPPING)
+       # See rdar://48283130: This gives 6MB+ size reductions for swift and
+       # SourceKitService, and much larger size reductions for sil-opt etc.
+@@ -446,7 +446,7 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
+   # RPATH where Swift runtime can be found.
+   set(swift_runtime_rpath)
+ 
+-  if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++  if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+ 
+     set(sdk_dir "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}/usr/lib/swift")
+ 
+@@ -529,7 +529,7 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
+ 
+   elseif(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD")
+     set(swiftrt "swiftImageRegistrationObject${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_OBJECT_FORMAT}-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}-${SWIFT_HOST_VARIANT_ARCH}")
+-    if(${ASRLF_BOOTSTRAPPING_MODE} MATCHES "HOSTTOOLS|CROSSCOMPILE")
++    if(ASRLF_BOOTSTRAPPING_MODE MATCHES "HOSTTOOLS|CROSSCOMPILE")
+       # At build time and run time, link against the swift libraries in the
+       # installed host toolchain.
+       get_filename_component(swift_bin_dir ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
+@@ -575,7 +575,7 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
+     # able to fall back to the SDK directory for libswiftCore et al.
+     if (BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+       if (NOT "${bootstrapping}" STREQUAL "1")
+-        if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++        if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+           target_link_directories(${target} PRIVATE "${sdk_dir}")
+ 
+           # Include the abi stable system stdlib in our rpath.
+@@ -706,10 +706,10 @@ function(add_swift_host_library name)
+   if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+     set_target_properties(${name} PROPERTIES
+       INSTALL_NAME_DIR "@rpath")
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL LINUX)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "LINUX")
+     set_target_properties(${name} PROPERTIES
+       INSTALL_RPATH "$ORIGIN")
+-  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL CYGWIN)
++  elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "CYGWIN")
+     set_target_properties(${name} PROPERTIES
+       INSTALL_RPATH "$ORIGIN:/usr/lib/swift/cygwin")
+   elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
+@@ -731,18 +731,18 @@ function(add_swift_host_library name)
+   endif()
+ 
+   # Set compilation and link flags.
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     swift_windows_include_for_arch(${SWIFT_HOST_VARIANT_ARCH}
+       ${SWIFT_HOST_VARIANT_ARCH}_INCLUDE)
+     target_include_directories(${name} SYSTEM PRIVATE
+       ${${SWIFT_HOST_VARIANT_ARCH}_INCLUDE})
+ 
+-    if(libkind STREQUAL SHARED)
++    if(libkind STREQUAL "SHARED")
+       target_compile_definitions(${name} PRIVATE
+         _WINDLL)
+     endif()
+ 
+-    if(NOT ${CMAKE_C_COMPILER_ID} STREQUAL MSVC)
++    if(NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+       swift_windows_get_sdk_vfs_overlay(ASHL_VFS_OVERLAY)
+       # Both clang and clang-cl on Windows set CMAKE_C_SIMULATE_ID to MSVC.
+       # We are using CMAKE_C_COMPILER_FRONTEND_VARIANT to detect the correct
+@@ -770,7 +770,7 @@ function(add_swift_host_library name)
+ 
+   set_target_properties(${name} PROPERTIES LINKER_LANGUAGE CXX)
+ 
+-  if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++  if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+     target_link_options(${name} PRIVATE
+       "LINKER:-compatibility_version,1")
+     if(SWIFT_COMPILER_VERSION)
+@@ -856,7 +856,7 @@ function(add_swift_host_tool executable)
+     add_dependencies(${executable} ${LLVM_COMMON_DEPENDS})
+   endif()
+ 
+-  if(NOT ${ASHT_BOOTSTRAPPING} STREQUAL "")
++  if(NOT "${ASHT_BOOTSTRAPPING}" STREQUAL "")
+     # Strip the "-bootstrapping<n>" suffix from the target name to get the base
+     # executable name.
+     string(REGEX REPLACE "-bootstrapping.*" "" executable_filename ${executable})
+@@ -891,7 +891,7 @@ function(add_swift_host_tool executable)
+     BINARY_DIR ${out_bin_dir}
+     LIBRARY_DIR ${out_lib_dir})
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     swift_windows_include_for_arch(${SWIFT_HOST_VARIANT_ARCH}
+       ${SWIFT_HOST_VARIANT_ARCH}_INCLUDE)
+     target_include_directories(${executable} SYSTEM PRIVATE
+@@ -913,8 +913,8 @@ function(add_swift_host_tool executable)
+ 
+   if(SWIFT_SWIFT_PARSER)
+     set(extra_relative_rpath "")
+-    if(NOT ${ASHT_BOOTSTRAPPING} STREQUAL "")
+-      if (${executable} MATCHES "-bootstrapping")
++    if(NOT "${ASHT_BOOTSTRAPPING}" STREQUAL "")
++      if(executable MATCHES "-bootstrapping")
+         set(extra_relative_rpath "../")
+       endif()
+     endif()
+@@ -938,7 +938,7 @@ function(add_swift_host_tool executable)
+     target_link_options(${executable} PRIVATE "${lto_codegen_only_link_options}")
+   endif()
+ 
+-  if(NOT ${ASHT_SWIFT_COMPONENT} STREQUAL "no_component")
++  if(NOT ASHT_SWIFT_COMPONENT STREQUAL "no_component")
+     add_dependencies(${ASHT_SWIFT_COMPONENT} ${executable})
+     swift_install_in_component(TARGETS ${executable}
+                                RUNTIME
+diff --git a/cmake/modules/Libdispatch.cmake b/cmake/modules/Libdispatch.cmake
+index f0ea3577a2b..3fb0ecdce89 100644
+--- a/cmake/modules/Libdispatch.cmake
++++ b/cmake/modules/Libdispatch.cmake
+@@ -1,13 +1,13 @@
+ include(ExternalProject)
+ 
+-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+-  if(CMAKE_C_COMPILER_ID STREQUAL Clang AND
++if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++  if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND
+     CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.8
+     OR LLVM_USE_SANITIZER)
+     set(SWIFT_LIBDISPATCH_C_COMPILER ${CMAKE_C_COMPILER})
+     set(SWIFT_LIBDISPATCH_CXX_COMPILER ${CMAKE_CXX_COMPILER})
+-  elseif(${CMAKE_SYSTEM_NAME} STREQUAL ${CMAKE_HOST_SYSTEM_NAME})
+-    if(CMAKE_SYSTEM_NAME STREQUAL Windows)
++  elseif(CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
++    if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+       if(CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR AND
+         TARGET clang)
+         set(SWIFT_LIBDISPATCH_C_COMPILER
+@@ -29,7 +29,7 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+     message(SEND_ERROR "libdispatch requires a newer clang compiler (${CMAKE_C_COMPILER_VERSION} < 3.9)")
+   endif()
+ 
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     set(LIBDISPATCH_RUNTIME_DIR bin)
+   else()
+     set(LIBDISPATCH_RUNTIME_DIR lib)
+@@ -40,7 +40,7 @@ set(DISPATCH_SDKS)
+ 
+ # Build the host libdispatch if needed.
+ if(SWIFT_BUILD_HOST_DISPATCH)
+-  if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++  if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+     if(NOT "${SWIFT_HOST_VARIANT_SDK}" IN_LIST SWIFT_SDKS)
+       list(APPEND DISPATCH_SDKS "${SWIFT_HOST_VARIANT_SDK}")
+     endif()
+@@ -52,20 +52,20 @@ foreach(sdk ${SWIFT_SDKS})
+   # Darwin targets have libdispatch available, do not build it.
+   # Wasm/WASI doesn't support libdispatch yet.
+   # See https://github.com/apple/swift/issues/54533 for more details.
+-  if(NOT "${sdk}" IN_LIST SWIFT_DARWIN_PLATFORMS AND NOT "${sdk}" STREQUAL WASI)
++  if(NOT "${sdk}" IN_LIST SWIFT_DARWIN_PLATFORMS AND NOT "${sdk}" STREQUAL "WASI")
+     list(APPEND DISPATCH_SDKS "${sdk}")
+   endif()
+ endforeach()
+ 
+ foreach(sdk ${DISPATCH_SDKS})
+   set(ARCHS ${SWIFT_SDK_${sdk}_ARCHITECTURES})
+-  if(${sdk} STREQUAL "${SWIFT_HOST_VARIANT_SDK}")
++  if(sdk STREQUAL "${SWIFT_HOST_VARIANT_SDK}")
+     if(NOT "${SWIFT_HOST_VARIANT_ARCH}" IN_LIST ARCHS)
+       list(APPEND ARCHS "${SWIFT_HOST_VARIANT_ARCH}")
+     endif()
+   endif()
+   
+-  if(sdk STREQUAL ANDROID)
++  if(sdk STREQUAL "ANDROID")
+     set(SWIFT_LIBDISPATCH_COMPILER_CMAKE_ARGS)
+   else()
+     set(SWIFT_LIBDISPATCH_COMPILER_CMAKE_ARGS -DCMAKE_C_COMPILER=${SWIFT_LIBDISPATCH_C_COMPILER};-DCMAKE_CXX_COMPILER=${SWIFT_LIBDISPATCH_CXX_COMPILER})
+diff --git a/cmake/modules/SwiftComponents.cmake b/cmake/modules/SwiftComponents.cmake
+index 6816b75e8a4..2ec225140dc 100644
+--- a/cmake/modules/SwiftComponents.cmake
++++ b/cmake/modules/SwiftComponents.cmake
+@@ -82,7 +82,7 @@ list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "clang-builtin-headers-in-clang-resou
+ # This conflicts with LLVM itself when doing unified builds.
+ list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "llvm-toolchain-dev-tools")
+ # The sourcekit install variants are currently mutually exclusive.
+-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+   list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "sourcekit-inproc")
+ else()
+   list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "sourcekit-xpc-service")
+diff --git a/cmake/modules/SwiftConfigureSDK.cmake b/cmake/modules/SwiftConfigureSDK.cmake
+index d4cb352d658..5dd258cdd24 100644
+--- a/cmake/modules/SwiftConfigureSDK.cmake
++++ b/cmake/modules/SwiftConfigureSDK.cmake
+@@ -232,7 +232,7 @@ macro(configure_sdk_darwin
+     SWIFT_SDK_${prefix}_MODULE_ARCHITECTURES)     # result
+ 
+   # Determine whether this is a simulator SDK.
+-  if ( ${xcrun_name} MATCHES "simulator" )
++  if(xcrun_name MATCHES "simulator")
+     set(SWIFT_SDK_${prefix}_IS_SIMULATOR TRUE)
+   else()
+     set(SWIFT_SDK_${prefix}_IS_SIMULATOR FALSE)
+@@ -378,11 +378,11 @@ macro(configure_sdk_unix name architectures)
+           message(FATAL_ERROR "unknown arch for ${prefix}: ${arch}")
+         endif()
+       elseif("${prefix}" STREQUAL "FREEBSD")
+-        if(NOT arch STREQUAL x86_64)
++        if(NOT arch STREQUAL "x86_64")
+           message(FATAL_ERROR "unsupported arch for FreeBSD: ${arch}")
+         endif()
+ 
+-        if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL FreeBSD)
++        if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
+           message(WARNING "CMAKE_SYSTEM_VERSION will not match target")
+         endif()
+ 
+@@ -391,7 +391,7 @@ macro(configure_sdk_unix name architectures)
+ 
+         set(SWIFT_SDK_FREEBSD_ARCH_x86_64_TRIPLE "x86_64-unknown-freebsd${freebsd_system_version}")
+       elseif("${prefix}" STREQUAL "OPENBSD")
+-        if(NOT arch STREQUAL amd64)
++        if(NOT arch STREQUAL "amd64")
+           message(FATAL_ERROR "unsupported arch for OpenBSD: ${arch}")
+         endif()
+ 
+@@ -404,17 +404,17 @@ macro(configure_sdk_unix name architectures)
+           set(SWIFT_SDK_OPENBSD_ARCH_${arch}_PATH "${CMAKE_SYSROOT}${SWIFT_SDK_OPENBSD_ARCH_${arch}_PATH}" CACHE INTERNAL "sysroot path" FORCE)
+         endif()
+       elseif("${prefix}" STREQUAL "CYGWIN")
+-        if(NOT arch STREQUAL x86_64)
++        if(NOT arch STREQUAL "x86_64")
+           message(FATAL_ERROR "unsupported arch for cygwin: ${arch}")
+         endif()
+         set(SWIFT_SDK_CYGWIN_ARCH_x86_64_TRIPLE "x86_64-unknown-windows-cygnus")
+       elseif("${prefix}" STREQUAL "HAIKU")
+-        if(NOT arch STREQUAL x86_64)
++        if(NOT arch STREQUAL "x86_64")
+           message(FATAL_ERROR "unsupported arch for Haiku: ${arch}")
+         endif()
+         set(SWIFT_SDK_HAIKU_ARCH_x86_64_TRIPLE "x86_64-unknown-haiku")
+       elseif("${prefix}" STREQUAL "WASI")
+-        if(NOT arch STREQUAL wasm32)
++        if(NOT arch STREQUAL "wasm32")
+           message(FATAL_ERROR "unsupported arch for WebAssembly: ${arch}")
+         endif()
+         set(SWIFT_SDK_WASI_ARCH_wasm32_PATH "${SWIFT_WASI_SYSROOT_PATH}")
+@@ -459,7 +459,7 @@ macro(configure_sdk_windows name environment architectures)
+   get_threading_package(${prefix} "win32" SWIFT_SDK_${prefix}_THREADING_PACKAGE)
+ 
+   foreach(arch ${architectures})
+-    if(arch STREQUAL armv7)
++    if(arch STREQUAL "armv7")
+       set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
+           "thumbv7-unknown-windows-${environment}")
+     else()
+diff --git a/cmake/modules/SwiftWindowsSupport.cmake b/cmake/modules/SwiftWindowsSupport.cmake
+index 6216b82c12b..a3432476658 100644
+--- a/cmake/modules/SwiftWindowsSupport.cmake
++++ b/cmake/modules/SwiftWindowsSupport.cmake
+@@ -2,13 +2,13 @@
+ include(SwiftUtils)
+ 
+ function(swift_windows_arch_spelling arch var)
+-  if(${arch} STREQUAL i686)
++  if(arch STREQUAL "i686")
+     set(${var} x86 PARENT_SCOPE)
+-  elseif(${arch} STREQUAL x86_64)
++  elseif(arch STREQUAL "x86_64")
+     set(${var} x64 PARENT_SCOPE)
+-  elseif(${arch} STREQUAL armv7)
++  elseif(arch STREQUAL "armv7")
+     set(${var} arm PARENT_SCOPE)
+-  elseif(${arch} STREQUAL aarch64)
++  elseif(arch STREQUAL "aarch64")
+     set(${var} arm64 PARENT_SCOPE)
+   else()
+     message(FATAL_ERROR "do not know MSVC spelling for ARCH: `${arch}`")
+@@ -33,7 +33,7 @@ function(swift_windows_lib_for_arch arch var)
+   # a directory called "Lib" rather than VS2017 which normalizes the layout and
+   # places them in a directory named "lib".
+   if(IS_DIRECTORY "${VCToolsInstallDir}/Lib")
+-    if(${ARCH} STREQUAL x86)
++    if(ARCH STREQUAL "x86")
+       list(APPEND paths "${VCToolsInstallDir}/Lib/")
+     else()
+       list(APPEND paths "${VCToolsInstallDir}/Lib/${ARCH}")
+diff --git a/include/swift/AST/CMakeLists.txt b/include/swift/AST/CMakeLists.txt
+index 869d96ba13b..050695f65c6 100644
+--- a/include/swift/AST/CMakeLists.txt
++++ b/include/swift/AST/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
++if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+   set(SWIFT_GYB_FLAGS --line-directive "^\"#line %(line)d \\\"%(file)s\\\"^\"")
+ else()
+   set(SWIFT_GYB_FLAGS --line-directive "\'#line" "%(line)d" "\"%(file)s\"\'")
+diff --git a/lib/AST/CMakeLists.txt b/lib/AST/CMakeLists.txt
+index a0011d8a68c..13363dea4aa 100644
+--- a/lib/AST/CMakeLists.txt
++++ b/lib/AST/CMakeLists.txt
+@@ -125,7 +125,7 @@ add_swift_host_library(swiftAST STATIC
+   )
+ 
+ if(SWIFT_FORCE_OPTIMIZED_TYPECHECKER)
+-  if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL MSVC)
++  if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+     target_compile_options(swiftAST PRIVATE /O2 /Ob2)
+   else()
+     target_compile_options(swiftAST PRIVATE -O3)
+diff --git a/lib/Migrator/CMakeLists.txt b/lib/Migrator/CMakeLists.txt
+index 1dfd089d21a..228baa470ed 100644
+--- a/lib/Migrator/CMakeLists.txt
++++ b/lib/Migrator/CMakeLists.txt
+@@ -23,7 +23,7 @@ set(outputs)
+ foreach(input ${datafiles})
+   set(source "${CMAKE_CURRENT_SOURCE_DIR}/${input}")
+   set(dest "${output_dir}/${input}")
+-  if(CMAKE_SYSTEM_NAME STREQUAL Windows)
++  if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+     set(CMAKE_SYMLINK_COMMAND copy)
+   else()
+     set(CMAKE_SYMLINK_COMMAND create_symlink)
+diff --git a/lib/Parse/CMakeLists.txt b/lib/Parse/CMakeLists.txt
+index b46a4b217c3..b8550c96b2a 100644
+--- a/lib/Parse/CMakeLists.txt
++++ b/lib/Parse/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ 
+ 
+-if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
++if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+   set(SWIFT_GYB_FLAGS --line-directive "^\"#line %(line)d \\\"%(file)s\\\"^\"")
+ else()
+   set(SWIFT_GYB_FLAGS --line-directive "\'#line" "%(line)d" "\"%(file)s\"\'")
+diff --git a/lib/Sema/CMakeLists.txt b/lib/Sema/CMakeLists.txt
+index c0e3608d07a..bf70a33782d 100644
+--- a/lib/Sema/CMakeLists.txt
++++ b/lib/Sema/CMakeLists.txt
+@@ -74,7 +74,7 @@ add_swift_host_library(swiftSema STATIC
+   TypeChecker.cpp
+   IDETypeCheckingRequests.cpp)
+ if(SWIFT_FORCE_OPTIMIZED_TYPECHECKER)
+-  if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL MSVC)
++  if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+     target_compile_options(swiftSema PRIVATE /O2 /Ob2)
+   else()
+     target_compile_options(swiftSema PRIVATE -O3)
+diff --git a/lib/SwiftRemoteMirror/CMakeLists.txt b/lib/SwiftRemoteMirror/CMakeLists.txt
+index f774297e51c..da2248de9f7 100644
+--- a/lib/SwiftRemoteMirror/CMakeLists.txt
++++ b/lib/SwiftRemoteMirror/CMakeLists.txt
+@@ -3,6 +3,6 @@ add_swift_host_library(swiftRemoteMirror STATIC
+ target_link_libraries(swiftRemoteMirror PRIVATE
+   swiftDemangling)
+ 
+-if(CMAKE_SYSTEM_NAME STREQUAL Windows)
++if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+   target_compile_definitions(swiftRemoteMirror PRIVATE _LIB)
+ endif()
+diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake
+index 25a79d145fb..781d6fd33cf 100644
+--- a/stdlib/cmake/modules/AddSwiftStdlib.cmake
++++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake
+@@ -249,7 +249,7 @@ function(_add_target_variant_c_compile_flags)
+     # NOTE(compnerd) workaround LLVM invoking `add_definitions(-D_DEBUG)` which
+     # causes failures for the runtime library when cross-compiling due to
+     # undefined symbols from the standard library.
+-    if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
++    if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+       list(APPEND result "-U_DEBUG")
+     endif()
+   endif()
+@@ -258,7 +258,7 @@ function(_add_target_variant_c_compile_flags)
+   # uses a spin lock for this, so to get reasonable behavior we have to
+   # implement it ourselves using _InterlockedCompareExchange128.
+   # clang-cl requires us to enable the `cx16` feature to use this intrinsic.
+-  if(CFLAGS_ARCH STREQUAL x86_64)
++  if(CFLAGS_ARCH STREQUAL "x86_64")
+     if(SWIFT_COMPILER_IS_MSVC_LIKE)
+       list(APPEND result /clang:-mcx16)
+     else()
+@@ -287,7 +287,7 @@ function(_add_target_variant_c_compile_flags)
+   endif()
+ 
+   if("${CFLAGS_SDK}" STREQUAL "LINUX")
+-    if(${CFLAGS_ARCH} STREQUAL x86_64)
++    if("${CFLAGS_ARCH}" STREQUAL "x86_64")
+       # this is the minimum architecture that supports 16 byte CAS, which is necessary to avoid a dependency to libatomic
+       list(APPEND result "-march=core2")
+     endif()
+@@ -493,7 +493,7 @@ function(_add_target_variant_link_flags)
+     else()
+       set(linker "${SWIFT_USE_LINKER}")
+     endif()
+-    if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
++    if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+       list(APPEND result "-fuse-ld=${linker}.exe")
+     else()
+       list(APPEND result "-fuse-ld=${linker}")
+@@ -506,8 +506,8 @@ function(_add_target_variant_link_flags)
+   #
+   # TODO: Evaluate/enable -f{function,data}-sections --gc-sections for bfd,
+   # gold, and lld.
+-  if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
+-    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++  if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
++    if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+       # See rdar://48283130: This gives 6MB+ size reductions for swift and
+       # SourceKitService, and much larger size reductions for sil-opt etc.
+       list(APPEND result "-Wl,-dead_strip")
+@@ -969,7 +969,7 @@ function(add_swift_target_library_single target name)
+   endif()
+ 
+   set(INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS ${SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS})
+-  if(${libkind} STREQUAL "SHARED")
++  if(libkind STREQUAL "SHARED")
+     list(APPEND INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS
+          ${SWIFTLIB_INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS_SHARED_ONLY})
+   endif()
+@@ -991,7 +991,7 @@ function(add_swift_target_library_single target name)
+       # target_sources(${target}
+       #                PRIVATE
+       #                  $<TARGET_OBJECTS:swiftImageRegistrationObject${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}-${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}>)
+-      if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS)
++      if(SWIFTLIB_SINGLE_SDK STREQUAL "WINDOWS")
+         set(extension .obj)
+       else()
+         set(extension .o)
+@@ -1059,8 +1059,8 @@ function(add_swift_target_library_single target name)
+   set_target_properties("${target}" PROPERTIES
+     LIBRARY_OUTPUT_DIRECTORY ${swiftlib_prefix}/${output_sub_dir}
+     ARCHIVE_OUTPUT_DIRECTORY ${swiftlib_prefix}/${output_sub_dir})
+-  if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND SWIFTLIB_SINGLE_IS_STDLIB_CORE
+-      AND libkind STREQUAL SHARED)
++  if(SWIFTLIB_SINGLE_SDK STREQUAL "WINDOWS" AND SWIFTLIB_SINGLE_IS_STDLIB_CORE
++      AND libkind STREQUAL "SHARED")
+     add_custom_command(TARGET ${target} POST_BUILD
+       COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${target}> ${swiftlib_prefix}/${output_sub_dir})
+   endif()
+@@ -1264,8 +1264,8 @@ function(add_swift_target_library_single target name)
+     MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}"
+     )
+ 
+-  if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS)
+-    if(libkind STREQUAL SHARED)
++  if(SWIFTLIB_SINGLE_SDK STREQUAL "WINDOWS")
++    if(libkind STREQUAL "SHARED")
+       list(APPEND c_compile_flags -D_WINDLL)
+     endif()
+   endif()
+@@ -1324,13 +1324,13 @@ function(add_swift_target_library_single target name)
+   endif()
+ 
+   # Set compilation and link flags.
+-  if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS)
++  if(SWIFTLIB_SINGLE_SDK STREQUAL "WINDOWS")
+     swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE}
+       ${SWIFTLIB_SINGLE_ARCHITECTURE}_INCLUDE)
+     target_include_directories(${target} SYSTEM PRIVATE
+       ${${SWIFTLIB_SINGLE_ARCHITECTURE}_INCLUDE})
+ 
+-    if(NOT ${CMAKE_C_COMPILER_ID} STREQUAL MSVC)
++    if(NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+       swift_windows_get_sdk_vfs_overlay(SWIFTLIB_SINGLE_VFS_OVERLAY)
+       target_compile_options(${target} PRIVATE
+         "SHELL:-Xclang -ivfsoverlay -Xclang ${SWIFTLIB_SINGLE_VFS_OVERLAY}")
+@@ -1347,7 +1347,7 @@ function(add_swift_target_library_single target name)
+     ${c_compile_flags})
+   target_link_options(${target} PRIVATE
+     ${link_flags})
+-  if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++  if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+     target_link_options(${target} PRIVATE
+       "LINKER:-compatibility_version,1")
+     if(SWIFT_COMPILER_VERSION)
+@@ -1380,7 +1380,7 @@ function(add_swift_target_library_single target name)
+     list(APPEND swiftlib_link_flags_all "-Xlinker -no_warn_inits")
+   endif()
+ 
+-  if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
++  if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
+     # In the past, we relied on unsetting globally
+     # CMAKE_OSX_ARCHITECTURES to ensure that CMake
+     # would not add the -arch flag. This is no longer
+@@ -1403,7 +1403,7 @@ function(add_swift_target_library_single target name)
+   # doing so will result in incorrect symbol resolution and linkage.  We created
+   # import library targets when the library was added.  Use that to adjust the
+   # link libraries.
+-  if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
++  if(SWIFTLIB_SINGLE_SDK STREQUAL "WINDOWS" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
+     foreach(library_list LINK_LIBRARIES PRIVATE_LINK_LIBRARIES)
+       set(import_libraries)
+       foreach(library ${SWIFTLIB_SINGLE_${library_list}})
+@@ -1415,7 +1415,7 @@ function(add_swift_target_library_single target name)
+         set(import_library ${library})
+         if(TARGET ${library})
+           get_target_property(type ${library} TYPE)
+-          if(${type} STREQUAL "SHARED_LIBRARY")
++          if(type STREQUAL "SHARED_LIBRARY")
+             set(import_library ${library}_IMPLIB)
+           endif()
+         endif()
+@@ -1744,7 +1744,7 @@ function(add_swift_target_library name)
+     list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
+ 
+     # swiftSwiftOnoneSupport does not depend on itself, obviously.
+-    if(NOT ${name} STREQUAL swiftSwiftOnoneSupport)
++    if(NOT name STREQUAL "swiftSwiftOnoneSupport")
+       # All Swift code depends on the SwiftOnoneSupport in non-optimized mode,
+       # except for the standard library itself.
+       is_build_type_optimized("${SWIFT_STDLIB_BUILD_TYPE}" optimized)
+@@ -1851,7 +1851,7 @@ function(add_swift_target_library name)
+ 
+     # Collect architecture agnostic SDK module dependencies
+     set(swiftlib_module_depends_flattened ${SWIFTLIB_SWIFT_MODULE_DEPENDS})
+-    if(${sdk} STREQUAL OSX)
++    if(sdk STREQUAL "OSX")
+        if(DEFINED maccatalyst_build_flavor AND NOT maccatalyst_build_flavor STREQUAL "macos-like")
+           list(APPEND swiftlib_module_depends_flattened
+             ${SWIFTLIB_SWIFT_MODULE_DEPENDS_MACCATALYST})
+@@ -1863,70 +1863,70 @@ function(add_swift_target_library name)
+         endif()
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_OSX})
+-    elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR)
++    elseif(sdk STREQUAL "IOS" OR sdk STREQUAL "IOS_SIMULATOR")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_IOS})
+-    elseif(${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
++    elseif(sdk STREQUAL "TVOS" OR sdk STREQUAL "TVOS_SIMULATOR")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_TVOS})
+-    elseif(${sdk} STREQUAL WATCHOS OR ${sdk} STREQUAL WATCHOS_SIMULATOR)
++    elseif(sdk STREQUAL "WATCHOS" OR sdk STREQUAL "WATCHOS_SIMULATOR")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_WATCHOS})
+-    elseif(${sdk} STREQUAL FREESTANDING)
++    elseif(sdk STREQUAL "FREESTANDING")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_FREESTANDING})
+-    elseif(${sdk} STREQUAL FREEBSD)
++    elseif(sdk STREQUAL "FREEBSD")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_FREEBSD})
+-    elseif(${sdk} STREQUAL OPENBSD)
++    elseif(sdk STREQUAL "OPENBSD")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_OPENBSD})
+-    elseif(${sdk} STREQUAL LINUX OR ${sdk} STREQUAL ANDROID)
++    elseif(sdk STREQUAL "LINUX" OR sdk STREQUAL "ANDROID")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX})
+-    elseif(${sdk} STREQUAL CYGWIN)
++    elseif(sdk STREQUAL "CYGWIN")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_CYGWIN})
+-    elseif(${sdk} STREQUAL HAIKU)
++    elseif(sdk STREQUAL "HAIKU")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_HAIKU})
+-    elseif(${sdk} STREQUAL WASI)
++    elseif(sdk STREQUAL "WASI")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_WASI})
+-    elseif(${sdk} STREQUAL WINDOWS)
++    elseif(sdk STREQUAL "WINDOWS")
+       list(APPEND swiftlib_module_depends_flattened
+            ${SWIFTLIB_SWIFT_MODULE_DEPENDS_WINDOWS})
+     endif()
+ 
+     # Collect architecture agnostic SDK framework dependencies
+     set(swiftlib_framework_depends_flattened ${SWIFTLIB_FRAMEWORK_DEPENDS})
+-    if(${sdk} STREQUAL OSX)
++    if(sdk STREQUAL "OSX")
+       list(APPEND swiftlib_framework_depends_flattened
+            ${SWIFTLIB_FRAMEWORK_DEPENDS_OSX})
+-    elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR OR
+-           ${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
++    elseif(sdk STREQUAL "IOS" OR sdk STREQUAL "IOS_SIMULATOR" OR
++           sdk STREQUAL "TVOS" OR sdk STREQUAL "TVOS_SIMULATOR")
+       list(APPEND swiftlib_framework_depends_flattened
+            ${SWIFTLIB_FRAMEWORK_DEPENDS_IOS_TVOS})
+     endif()
+ 
+     # Collect architecture agnostic swift compiler flags
+     set(swiftlib_swift_compile_flags_all ${SWIFTLIB_SWIFT_COMPILE_FLAGS})
+-    if(${sdk} STREQUAL OSX)
++    if(sdk STREQUAL "OSX")
+       list(APPEND swiftlib_swift_compile_flags_all
+            ${SWIFTLIB_SWIFT_COMPILE_FLAGS_OSX})
+-    elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR)
++    elseif(sdk STREQUAL "IOS" OR sdk STREQUAL "IOS_SIMULATOR")
+       list(APPEND swiftlib_swift_compile_flags_all
+            ${SWIFTLIB_SWIFT_COMPILE_FLAGS_IOS})
+-    elseif(${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
++    elseif(sdk STREQUAL "TVOS" OR sdk STREQUAL "TVOS_SIMULATOR")
+       list(APPEND swiftlib_swift_compile_flags_all
+            ${SWIFTLIB_SWIFT_COMPILE_FLAGS_TVOS})
+-    elseif(${sdk} STREQUAL WATCHOS OR ${sdk} STREQUAL WATCHOS_SIMULATOR)
++    elseif(sdk STREQUAL "WATCHOS" OR sdk STREQUAL "WATCHOS_SIMULATOR")
+       list(APPEND swiftlib_swift_compile_flags_all
+            ${SWIFTLIB_SWIFT_COMPILE_FLAGS_WATCHOS})
+-    elseif(${sdk} STREQUAL LINUX)
++    elseif(sdk STREQUAL "LINUX")
+       list(APPEND swiftlib_swift_compile_flags_all
+            ${SWIFTLIB_SWIFT_COMPILE_FLAGS_LINUX})
+-    elseif(${sdk} STREQUAL WINDOWS)
++    elseif(sdk STREQUAL "WINDOWS")
+       # FIXME: https://github.com/apple/swift/issues/44614
+       # static and shared are not mutually exclusive; however since we do a
+       # single build of the sources, this doesn't work for building both
+@@ -1945,7 +1945,7 @@ function(add_swift_target_library name)
+ 
+     # Collect architecture agnostic SDK linker flags
+     set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
+-    if(${sdk} STREQUAL IOS_SIMULATOR AND ${name} STREQUAL swiftMediaPlayer)
++    if(sdk STREQUAL "IOS_SIMULATOR" AND name STREQUAL "swiftMediaPlayer")
+       # message("DISABLING AUTOLINK FOR swiftMediaPlayer")
+       list(APPEND swiftlib_link_flags_all "-Xlinker" "-ignore_auto_link")
+     endif()
+@@ -1959,8 +1959,8 @@ function(add_swift_target_library name)
+     # back to supported targets and libraries only.  This is needed for ELF
+     # targets only; however, RemoteMirror needs to build with undefined
+     # symbols.
+-    if(${SWIFT_SDK_${sdk}_OBJECT_FORMAT} STREQUAL ELF AND
+-       NOT ${name} STREQUAL swiftRemoteMirror)
++    if(SWIFT_SDK_${sdk}_OBJECT_FORMAT STREQUAL "ELF" AND
++       NOT name STREQUAL "swiftRemoteMirror")
+       list(APPEND swiftlib_link_flags_all "-Wl,-z,defs")
+     endif()
+     # Setting back linker flags which are not supported when making Android build on macOS cross-compile host.
+@@ -2067,22 +2067,22 @@ function(add_swift_target_library name)
+       set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
+ 
+       # Collect architecture agnostic c compiler flags
+-      if(${sdk} STREQUAL OSX)
++      if(sdk STREQUAL "OSX")
+         list(APPEND swiftlib_c_compile_flags_all
+              ${SWIFTLIB_C_COMPILE_FLAGS_OSX})
+-      elseif(${sdk} STREQUAL IOS OR ${sdk} STREQUAL IOS_SIMULATOR)
++      elseif(sdk STREQUAL "IOS" OR sdk STREQUAL "IOS_SIMULATOR")
+         list(APPEND swiftlib_c_compile_flags_all
+              ${SWIFTLIB_C_COMPILE_FLAGS_IOS})
+-      elseif(${sdk} STREQUAL TVOS OR ${sdk} STREQUAL TVOS_SIMULATOR)
++      elseif(sdk STREQUAL "TVOS" OR sdk STREQUAL "TVOS_SIMULATOR")
+         list(APPEND swiftlib_c_compile_flags_all
+              ${SWIFTLIB_C_COMPILE_FLAGS_TVOS})
+-      elseif(${sdk} STREQUAL WATCHOS OR ${sdk} STREQUAL WATCHOS_SIMULATOR)
++      elseif(sdk STREQUAL "WATCHOS" OR sdk STREQUAL "WATCHOS_SIMULATOR")
+         list(APPEND swiftlib_c_compile_flags_all
+              ${SWIFTLIB_C_COMPILE_FLAGS_WATCHOS})
+-      elseif(${sdk} STREQUAL LINUX)
++      elseif(sdk STREQUAL "LINUX")
+         list(APPEND swiftlib_c_compile_flags_all
+              ${SWIFTLIB_C_COMPILE_FLAGS_LINUX})
+-      elseif(${sdk} STREQUAL WINDOWS)
++      elseif(sdk STREQUAL "WINDOWS")
+         list(APPEND swiftlib_c_compile_flags_all
+              ${SWIFTLIB_C_COMPILE_FLAGS_WINDOWS})
+       endif()
+@@ -2124,7 +2124,7 @@ function(add_swift_target_library name)
+       endif()
+ 
+       # Setting back linker flags which are not supported when making Android build on macOS cross-compile host.
+-      if(SWIFTLIB_SHARED AND ${sdk} STREQUAL ANDROID)
++      if(SWIFTLIB_SHARED AND sdk STREQUAL "ANDROID")
+         list(APPEND swiftlib_link_flags_all "-shared")
+         # TODO: Instead of `lib${name}.so` find variable or target property which already have this value.
+         list(APPEND swiftlib_link_flags_all "-Wl,-soname,lib${name}.so")
+@@ -2181,7 +2181,7 @@ function(add_swift_target_library name)
+       add_dependencies(${VARIANT_NAME} clang)
+     endif()
+ 
+-      if(sdk STREQUAL WINDOWS)
++      if(sdk STREQUAL "WINDOWS")
+         if(SWIFT_COMPILER_IS_MSVC_LIKE)
+           if (SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY MATCHES MultiThreadedDebugDLL)
+             target_compile_options(${VARIANT_NAME} PRIVATE /MDd /D_DLL /D_DEBUG)
+@@ -2326,7 +2326,7 @@ function(add_swift_target_library name)
+         set(optional_arg "OPTIONAL")
+       endif()
+ 
+-      if(sdk STREQUAL WINDOWS AND CMAKE_SYSTEM_NAME STREQUAL Windows)
++      if(sdk STREQUAL "WINDOWS" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
+         add_dependencies(${SWIFTLIB_INSTALL_IN_COMPONENT} ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH})
+         swift_install_in_component(TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}
+                                    RUNTIME
+@@ -2357,7 +2357,7 @@ function(add_swift_target_library name)
+                                    PERMISSIONS ${file_permissions}
+                                    "${optional_arg}")
+       endif()
+-      if(sdk STREQUAL WINDOWS)
++      if(sdk STREQUAL "WINDOWS")
+         foreach(arch ${SWIFT_SDK_WINDOWS_ARCHITECTURES})
+           if(TARGET ${name}-windows-${arch}_IMPLIB)
+             get_target_property(import_library ${name}-windows-${arch}_IMPLIB IMPORTED_LOCATION)
+@@ -2558,13 +2558,13 @@ function(_add_swift_target_executable_single name)
+         ${SWIFTEXE_SINGLE_DEPENDS})
+   llvm_update_compile_flags("${name}")
+ 
+-  if(SWIFTEXE_SINGLE_SDK STREQUAL WINDOWS)
++  if(SWIFTEXE_SINGLE_SDK STREQUAL "WINDOWS")
+     swift_windows_include_for_arch(${SWIFTEXE_SINGLE_ARCHITECTURE}
+       ${SWIFTEXE_SINGLE_ARCHITECTURE}_INCLUDE)
+     target_include_directories(${name} SYSTEM PRIVATE
+       ${${SWIFTEXE_SINGLE_ARCHITECTURE}_INCLUDE})
+ 
+-    if(NOT ${CMAKE_C_COMPILER_ID} STREQUAL MSVC)
++    if(NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+       # MSVC doesn't support -Xclang. We don't need to manually specify
+       # the dependent libraries as `cl` does so.
+       target_compile_options(${name} PRIVATE
+@@ -2584,7 +2584,7 @@ function(_add_swift_target_executable_single name)
+   if (SWIFT_PARALLEL_LINK_JOBS)
+     set_property(TARGET ${name} PROPERTY JOB_POOL_LINK swift_link_job_pool)
+   endif()
+-  if(${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++  if(SWIFTEXE_SINGLE_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+     set_target_properties(${name} PROPERTIES
+       BUILD_WITH_INSTALL_RPATH YES
+       INSTALL_RPATH "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
+@@ -2596,7 +2596,7 @@ function(_add_swift_target_executable_single name)
+   # NOTE(compnerd) use the C linker language to invoke `clang` rather than
+   # `clang++` as we explicitly link against the C++ runtime.  We were previously
+   # actually passing `-nostdlib++` to avoid the C++ runtime linkage.
+-  if(${SWIFTEXE_SINGLE_SDK} STREQUAL ANDROID)
++  if(SWIFTEXE_SINGLE_SDK STREQUAL "ANDROID")
+     set_property(TARGET "${name}" PROPERTY
+       LINKER_LANGUAGE "C")
+   else()
+@@ -2666,7 +2666,7 @@ function(add_swift_target_executable name)
+           EXCLUDE_FROM_ALL TRUE)
+       endif()
+ 
+-      if(${sdk} IN_LIST SWIFT_APPLE_PLATFORMS)
++      if(sdk IN_LIST SWIFT_APPLE_PLATFORMS)
+         # In the past, we relied on unsetting globally
+         # CMAKE_OSX_ARCHITECTURES to ensure that CMake would
+         # not add the -arch flag
+diff --git a/stdlib/cmake/modules/SwiftSource.cmake b/stdlib/cmake/modules/SwiftSource.cmake
+index d5d57dfd18a..39c2e07860f 100644
+--- a/stdlib/cmake/modules/SwiftSource.cmake
++++ b/stdlib/cmake/modules/SwiftSource.cmake
+@@ -730,7 +730,7 @@ function(_compile_swift_files
+ 
+   set(line_directive_tool "${SWIFT_SOURCE_DIR}/utils/line-directive")
+ 
+-  if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
++  if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+     set(HOST_EXECUTABLE_SUFFIX .exe)
+   endif()
+   if(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
+@@ -748,7 +748,7 @@ function(_compile_swift_files
+         "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc${HOST_EXECUTABLE_SUFFIX}"
+         "${SWIFTFILE_BOOTSTRAPPING}")
+ 
+-    if(NOT ${SWIFTFILE_BOOTSTRAPPING} STREQUAL "")
++    if(NOT "${SWIFTFILE_BOOTSTRAPPING}" STREQUAL "")
+       set(target_suffix "-bootstrapping${SWIFTFILE_BOOTSTRAPPING}")
+     endif()
+ 
+@@ -786,7 +786,7 @@ function(_compile_swift_files
+       # When building the stdlib with bootstrapping, the compiler needs
+       # to pick up the stdlib from the previous bootstrapping stage, because the
+       # stdlib in the current stage is not built yet.
+-      if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
++      if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
+         set(set_environment_args "${CMAKE_COMMAND}" "-E" "env" "DYLD_LIBRARY_PATH=${bs_lib_dir}")
+       elseif(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD")
+         set(set_environment_args "${CMAKE_COMMAND}" "-E" "env" "LD_LIBRARY_PATH=${bs_lib_dir}")
+diff --git a/stdlib/public/Concurrency/CMakeLists.txt b/stdlib/public/Concurrency/CMakeLists.txt
+index ff614adce76..76e0694a731 100644
+--- a/stdlib/public/Concurrency/CMakeLists.txt
++++ b/stdlib/public/Concurrency/CMakeLists.txt
+@@ -26,14 +26,14 @@ set(SWIFT_RUNTIME_CONCURRENCY_C_FLAGS)
+ set(SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS)
+ 
+ set(swift_concurrency_private_link_libraries)
+-if(CMAKE_SYSTEM_NAME STREQUAL Windows)
++if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+   list(APPEND swift_concurrency_private_link_libraries Synchronization)
+ endif()
+ 
+ set(swift_concurrency_incorporate_object_libraries_so swiftThreading)
+ 
+ if("${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR}" STREQUAL "dispatch")
+-  if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++  if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+     include_directories(AFTER
+                           ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE})
+ 
+@@ -61,7 +61,7 @@ endif()
+ 
+ # Don't emit extended frame info on platforms other than darwin, system
+ # backtracer and system debugger are unlikely to support it.
+-if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS
+     "-fswift-async-fp=${swift_concurrency_async_fp_mode}")
+   list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS
+diff --git a/stdlib/public/Cxx/std/CMakeLists.txt b/stdlib/public/Cxx/std/CMakeLists.txt
+index f24d08b6b62..b805b2ed6cb 100644
+--- a/stdlib/public/Cxx/std/CMakeLists.txt
++++ b/stdlib/public/Cxx/std/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ set(libstdcxx_modulemap_target_list)
+ foreach(sdk ${SWIFT_SDKS})
+-  if(NOT ${sdk} IN_LIST SWIFT_LIBSTDCXX_PLATFORMS)
++  if(NOT sdk IN_LIST SWIFT_LIBSTDCXX_PLATFORMS)
+     continue()
+   endif()
+ 
+@@ -86,7 +86,7 @@ foreach(sdk ${SWIFT_SDKS})
+           COMPONENT sdk-overlay)
+     endif()
+ 
+-    if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
++    if(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+       foreach(bootstrapping "0" "1")
+         get_bootstrapping_path(bootstrapping_dir ${module_dir} ${bootstrapping})
+         set(libstdcxx_modulemap_out_bootstrapping "${bootstrapping_dir}/libstdcxx.modulemap")
+diff --git a/stdlib/public/Platform/CMakeLists.txt b/stdlib/public/Platform/CMakeLists.txt
+index 9063931bd20..757a89eb760 100644
+--- a/stdlib/public/Platform/CMakeLists.txt
++++ b/stdlib/public/Platform/CMakeLists.txt
+@@ -42,8 +42,8 @@ set(swiftDarwin_common_options
+       DEPENDS ${darwin_depends})
+ 
+ 
+-if(${BOOTSTRAPPING_MODE} STREQUAL "BOOTSTRAPPING" AND
+-   ${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++if(BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING" AND
++   SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+ 
+   set(swiftDarwin_common_bootstrapping_options
+       ${swiftDarwin_common_options}
+@@ -179,7 +179,7 @@ foreach(sdk ${SWIFT_SDKS})
+     # with its own native sysroot, create a native modulemap without a sysroot
+     # prefix. This is the one we'll install instead.
+     if(NOT "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${arch}_PATH}" STREQUAL "/" AND
+-       NOT (${sdk} STREQUAL ANDROID AND NOT "${SWIFT_ANDROID_NATIVE_SYSROOT}" STREQUAL ""))
++       NOT (sdk STREQUAL "ANDROID" AND NOT "${SWIFT_ANDROID_NATIVE_SYSROOT}" STREQUAL ""))
+       set(glibc_sysroot_relative_modulemap_out "${module_dir}/sysroot-relative-modulemaps/glibc.modulemap")
+ 
+       handle_gyb_source_single(glibc_modulemap_native_target
+diff --git a/stdlib/public/SwiftOnoneSupport/CMakeLists.txt b/stdlib/public/SwiftOnoneSupport/CMakeLists.txt
+index 50efa52b7e1..cf6f09bcf69 100644
+--- a/stdlib/public/SwiftOnoneSupport/CMakeLists.txt
++++ b/stdlib/public/SwiftOnoneSupport/CMakeLists.txt
+@@ -10,7 +10,7 @@ set(swiftOnoneSupport_common_options
+   SWIFT_COMPILE_FLAGS "-parse-stdlib" "-Xllvm" "-sil-inline-generics=false" "-Xfrontend" "-validate-tbd-against-ir=none" "-Xfrontend" "-check-onone-completeness" "-Xfrontend" "-disable-access-control" "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}"
+   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}")
+ 
+-if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ${BOOTSTRAPPING_MODE} STREQUAL "BOOTSTRAPPING")
++if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING")
+ 
+   set(swiftOnoneSupport_common_bootstrapping_options
+     SHARED
+diff --git a/stdlib/public/SwiftShims/swift/shims/CMakeLists.txt b/stdlib/public/SwiftShims/swift/shims/CMakeLists.txt
+index c54b2cf84b2..f925940d8a2 100644
+--- a/stdlib/public/SwiftShims/swift/shims/CMakeLists.txt
++++ b/stdlib/public/SwiftShims/swift/shims/CMakeLists.txt
+@@ -152,7 +152,7 @@ if(NOT SWIFT_BUILT_STANDALONE)
+   endforeach()
+ endif()
+ 
+-if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
++if(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+   foreach(bootstrapping "0" "1")
+     get_bootstrapping_path(outdir ${SWIFTLIB_DIR} ${bootstrapping})
+     set(target_name "symlink-headers-bootstrapping${bootstrapping}")
+diff --git a/stdlib/public/core/CMakeLists.txt b/stdlib/public/core/CMakeLists.txt
+index c2217c9f294..be0d826b29d 100644
+--- a/stdlib/public/core/CMakeLists.txt
++++ b/stdlib/public/core/CMakeLists.txt
+@@ -251,18 +251,18 @@ set(swift_core_framework_depends)
+ set(swift_core_private_link_libraries)
+ set(swift_stdlib_compile_flags "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}")
+ 
+-if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL CYGWIN)
++if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL "CYGWIN")
+   # TODO(compnerd) cache this variable to permit re-configuration
+   execute_process(COMMAND "cygpath" "-u" "$ENV{SYSTEMROOT}" OUTPUT_VARIABLE ENV_SYSTEMROOT)
+   list(APPEND swift_core_private_link_libraries "${ENV_SYSTEMROOT}/system32/psapi.dll")
+-elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL FREEBSD)
++elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL "FREEBSD")
+   find_library(EXECINFO_LIBRARY execinfo)
+   list(APPEND swift_core_private_link_libraries ${EXECINFO_LIBRARY})
+-elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL LINUX)
++elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL "LINUX")
+   if(SWIFT_BUILD_STATIC_STDLIB)
+     list(APPEND swift_core_private_link_libraries)
+   endif()
+-elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL WINDOWS)
++elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL "WINDOWS")
+   list(APPEND swift_core_private_link_libraries shell32;DbgHelp;Synchronization)
+ endif()
+ 
+@@ -331,7 +331,7 @@ set(swiftCore_common_options
+ set(swiftCore_common_dependencies
+     copy_shim_headers "${SWIFTLIB_DIR}/shims" ${GROUP_INFO_JSON_FILE})
+ 
+-if(${BOOTSTRAPPING_MODE} STREQUAL "BOOTSTRAPPING")
++if(BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING")
+ 
+   set(b0_deps symlink-headers-bootstrapping0)
+   set(b1_deps symlink-headers-bootstrapping1)
+diff --git a/stdlib/public/runtime/CMakeLists.txt b/stdlib/public/runtime/CMakeLists.txt
+index e46c37d626b..db503543b6b 100644
+--- a/stdlib/public/runtime/CMakeLists.txt
++++ b/stdlib/public/runtime/CMakeLists.txt
+@@ -163,7 +163,7 @@ foreach(sdk ${SWIFT_SDKS})
+       # set(swiftrtObject "$<TARGET_OBJECTS:swiftImageRegistrationObject${SWIFT_SDK_${sdk}_OBJECT_FORMAT}-${arch_suffix}>")
+       set(swiftrtObject ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/swiftImageRegistrationObject${SWIFT_SDK_${sdk}_OBJECT_FORMAT}-${arch_suffix}.dir/SwiftRT-${SWIFT_SDK_${sdk}_OBJECT_FORMAT}.cpp${CMAKE_C_OUTPUT_EXTENSION})
+ 
+-      if(sdk STREQUAL WINDOWS)
++      if(sdk STREQUAL "WINDOWS")
+         set(extension .obj)
+       else()
+         set(extension .o)
+@@ -209,12 +209,12 @@ foreach(sdk ${SWIFT_SDKS})
+ 
+     # Generate the static-stdlib-args.lnk file used by -static-stdlib option for
+     # 'GenericUnix' (eg linux)
+-    if(${SWIFT_SDK_${sdk}_OBJECT_FORMAT} STREQUAL ELF)
++    if(SWIFT_SDK_${sdk}_OBJECT_FORMAT STREQUAL "ELF")
+       string(TOLOWER "${sdk}" lowercase_sdk)
+       set(libpthread -lpthread)
+       set(concurrency_libs)
+       set(android_libraries)
+-      if(${sdk} STREQUAL ANDROID)
++      if(sdk STREQUAL "ANDROID")
+         set(android_libraries -llog)
+         set(libpthread)
+       elseif(SWIFT_CONCURRENCY_USES_DISPATCH)
+diff --git a/stdlib/toolchain/legacy_layouts/CMakeLists.txt b/stdlib/toolchain/legacy_layouts/CMakeLists.txt
+index ad18c6b1b32..96da3906821 100644
+--- a/stdlib/toolchain/legacy_layouts/CMakeLists.txt
++++ b/stdlib/toolchain/legacy_layouts/CMakeLists.txt
+@@ -55,7 +55,7 @@ foreach(sdk ${SWIFT_SDKS})
+   endforeach()
+ endforeach()
+ 
+-if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
++if(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+   # The resource dir for bootstrapping0 may be used explicitly
+   # to cross compile for other architectures, so we would need
+   # to have all the legacy layouts in there
+diff --git a/tools/SourceKit/CMakeLists.txt b/tools/SourceKit/CMakeLists.txt
+index f87720f9c80..6c0c0800bc4 100644
+--- a/tools/SourceKit/CMakeLists.txt
++++ b/tools/SourceKit/CMakeLists.txt
+@@ -82,7 +82,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+   # Add deployment target to C/C++ compiler and linker flags.
+   # FIXME: CMAKE_OSX_DEPLOYMENT_TARGET falls over when used for iOS versions.
+   if (XCODE)
+-    if (${SOURCEKIT_DEPLOYMENT_OS} MATCHES "^macosx")
++    if (SOURCEKIT_DEPLOYMENT_OS MATCHES "^macosx")
+       set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET ${SOURCEKIT_DEPLOYMENT_TARGET})
+     else()
+       set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${SOURCEKIT_DEPLOYMENT_TARGET})
+@@ -101,7 +101,7 @@ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+ endif()
+ 
+ if(SWIFT_BUILD_HOST_DISPATCH)
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     set(SOURCEKIT_RUNTIME_DIR bin)
+   else()
+     set(SOURCEKIT_RUNTIME_DIR lib)
+@@ -114,7 +114,7 @@ if(SWIFT_BUILD_HOST_DISPATCH)
+       DESTINATION ${SOURCEKIT_RUNTIME_DIR}
+       COMPONENT sourcekit-inproc)
+   endif()
+-  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     swift_install_in_component(FILES
+       $<TARGET_LINKER_FILE:dispatch>
+       $<TARGET_LINKER_FILE:BlocksRuntime>
+diff --git a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+index 14d9a99a13a..bc26b263848 100644
+--- a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
++++ b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+@@ -8,7 +8,7 @@ function(add_sourcekit_default_compiler_flags target)
+   _add_host_variant_link_flags(${target})
+ 
+   # Set compilation and link flags.
+-  if(${SWIFT_HOST_VARIANT_SDK} STREQUAL WINDOWS)
++  if(SWIFT_HOST_VARIANT_SDK STREQUAL "WINDOWS")
+     swift_windows_include_for_arch(${SWIFT_HOST_VARIANT_ARCH}
+       ${SWIFT_HOST_VARIANT_ARCH}_INCLUDE)
+     target_include_directories(${target} SYSTEM PRIVATE
+@@ -30,7 +30,7 @@ function(add_sourcekit_swift_runtime_link_flags target path HAS_SWIFT_MODULES)
+     endif()
+   endif()
+ 
+-  if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++  if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+ 
+     # Lists of rpaths that we are going to add to our executables.
+     #
+@@ -118,7 +118,7 @@ function(add_sourcekit_swift_runtime_link_flags target path HAS_SWIFT_MODULES)
+ 
+   elseif(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD" AND HAS_SWIFT_MODULES AND ASKD_BOOTSTRAPPING_MODE)
+     set(swiftrt "swiftImageRegistrationObject${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_OBJECT_FORMAT}-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}-${SWIFT_HOST_VARIANT_ARCH}")
+-    if(${ASKD_BOOTSTRAPPING_MODE} MATCHES "HOSTTOOLS|CROSSCOMPILE")
++    if(ASKD_BOOTSTRAPPING_MODE MATCHES "HOSTTOOLS|CROSSCOMPILE")
+       # At build time and run time, link against the swift libraries in the
+       # installed host toolchain.
+       get_filename_component(swift_bin_dir ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
+@@ -163,7 +163,7 @@ function(add_sourcekit_swift_runtime_link_flags target path HAS_SWIFT_MODULES)
+     # able to fall back to the SDK directory for libswiftCore et al.
+     if (BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+       if (NOT "${bootstrapping}" STREQUAL "1")
+-        if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++        if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+           target_link_directories(${target} PRIVATE "${sdk_dir}")
+ 
+           # Include the abi stable system stdlib in our rpath.
+diff --git a/tools/SourceKit/lib/Support/CMakeLists.txt b/tools/SourceKit/lib/Support/CMakeLists.txt
+index c4e2cbcd31e..a47b2347a12 100644
+--- a/tools/SourceKit/lib/Support/CMakeLists.txt
++++ b/tools/SourceKit/lib/Support/CMakeLists.txt
+@@ -9,7 +9,7 @@ target_link_libraries(SourceKitSupport PRIVATE
+   swiftBasic
+   clangBasic
+   clangRewrite)
+-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   target_link_libraries(SourceKitSupport INTERFACE
+     dispatch
+     BlocksRuntime)
+diff --git a/tools/SourceKit/tools/complete-test/CMakeLists.txt b/tools/SourceKit/tools/complete-test/CMakeLists.txt
+index ec3437650a0..d1b3fe3b36a 100644
+--- a/tools/SourceKit/tools/complete-test/CMakeLists.txt
++++ b/tools/SourceKit/tools/complete-test/CMakeLists.txt
+@@ -7,13 +7,13 @@ if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
+ else()
+   target_link_libraries(complete-test PRIVATE sourcekitd)
+ endif()
+-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   target_link_libraries(complete-test PRIVATE
+     dispatch
+     BlocksRuntime)
+ endif()
+ 
+-if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   set_target_properties(complete-test PROPERTIES
+     INSTALL_RPATH "@executable_path/../lib")
+   target_link_options(complete-test PRIVATE
+diff --git a/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt b/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt
+index d4a3a77df2a..f537ad74544 100644
+--- a/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt
++++ b/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
+ else()
+   target_link_libraries(sourcekitd-repl PRIVATE sourcekitd)
+ endif()
+-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   target_link_libraries(sourcekitd-repl PRIVATE
+     dispatch
+     BlocksRuntime)
+@@ -15,7 +15,7 @@ endif()
+ target_link_libraries(sourcekitd-repl PRIVATE
+   libedit)
+ 
+-if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   set_target_properties(sourcekitd-repl PROPERTIES
+     INSTALL_RPATH "@executable_path/../lib")
+   target_link_options(sourcekitd-repl PRIVATE
+diff --git a/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt b/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt
+index 91c28f371c4..e5f7aa5c9fb 100644
+--- a/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt
++++ b/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt
+@@ -17,7 +17,7 @@ if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
+ else()
+   target_link_libraries(sourcekitd-test PRIVATE sourcekitd)
+ endif()
+-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   target_link_libraries(sourcekitd-test PRIVATE
+     dispatch
+     BlocksRuntime)
+@@ -25,7 +25,7 @@ endif()
+ 
+ add_dependencies(sourcekitd-test sourcekitdTestOptionsTableGen)
+ 
+-if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
++if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   set_target_properties(sourcekitd-test PROPERTIES
+     INSTALL_RPATH "@executable_path/../lib")
+   target_link_options(sourcekitd-test PRIVATE
+diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
+index 4521356ffc6..ab6dad7b273 100644
+--- a/tools/driver/CMakeLists.txt
++++ b/tools/driver/CMakeLists.txt
+@@ -10,7 +10,7 @@ function(add_swift_parser_link_libraries target)
+   endif()
+ endfunction()
+ 
+-if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
++if(BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*")
+ 
+   # Bootstrapping - level 0
+   # For more information on how bootstrapping works, see docs/SwiftInTheCompiler.md
+diff --git a/tools/libSwiftScan/CMakeLists.txt b/tools/libSwiftScan/CMakeLists.txt
+index f11c2a99758..93beb4629b0 100644
+--- a/tools/libSwiftScan/CMakeLists.txt
++++ b/tools/libSwiftScan/CMakeLists.txt
+@@ -8,7 +8,7 @@ add_swift_host_library(libSwiftScan SHARED
+   libSwiftScan.cpp
+   c-include-check.c)
+ 
+-if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
++if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
+   # Workaround for a linker crash related to autolinking: rdar://77839981
+   set_property(TARGET libSwiftScan APPEND_STRING PROPERTY
+                LINK_FLAGS " -lobjc ")
+diff --git a/unittests/Basic/CMakeLists.txt b/unittests/Basic/CMakeLists.txt
+index 547751e6cac..10b413ce732 100644
+--- a/unittests/Basic/CMakeLists.txt
++++ b/unittests/Basic/CMakeLists.txt
+@@ -49,6 +49,6 @@ target_link_libraries(SwiftBasicTests
+   LLVMTestingSupport
+   )
+ 
+-if(SWIFT_HOST_VARIANT STREQUAL windows)
++if(SWIFT_HOST_VARIANT STREQUAL "windows")
+   target_link_libraries(SwiftBasicTests PRIVATE Synchronization)
+ endif()
+diff --git a/unittests/Threading/CMakeLists.txt b/unittests/Threading/CMakeLists.txt
+index 5e0f27c089d..239630d038c 100644
+--- a/unittests/Threading/CMakeLists.txt
++++ b/unittests/Threading/CMakeLists.txt
+@@ -14,7 +14,7 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
+     swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}
+     )
+ 
+-  if(SWIFT_HOST_VARIANT STREQUAL windows)
++  if(SWIFT_HOST_VARIANT STREQUAL "windows")
+     target_link_libraries(SwiftThreadingTests PRIVATE Synchronization)
+   endif()
+ endif()
+diff --git a/unittests/runtime/CMakeLists.txt b/unittests/runtime/CMakeLists.txt
+index 79df463c0ed..cef40263785 100644
+--- a/unittests/runtime/CMakeLists.txt
++++ b/unittests/runtime/CMakeLists.txt
+@@ -63,7 +63,7 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
+     list(APPEND PLATFORM_TARGET_LINK_LIBRARIES
+       ${EXECINFO_LIBRARY}
+       )
+-  elseif(SWIFT_HOST_VARIANT STREQUAL windows)
++  elseif(SWIFT_HOST_VARIANT STREQUAL "windows")
+     list(APPEND PLATFORM_TARGET_LINK_LIBRARIES DbgHelp;Synchronization)
+   endif()
+ 
+diff --git a/unittests/runtime/LongTests/CMakeLists.txt b/unittests/runtime/LongTests/CMakeLists.txt
+index 592e532f8cf..37b5e00714e 100644
+--- a/unittests/runtime/LongTests/CMakeLists.txt
++++ b/unittests/runtime/LongTests/CMakeLists.txt
+@@ -30,7 +30,7 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
+     list(APPEND PLATFORM_TARGET_LINK_LIBRARIES
+       ${EXECINFO_LIBRARY}
+       )
+-  elseif(SWIFT_HOST_VARIANT STREQUAL windows)
++  elseif(SWIFT_HOST_VARIANT STREQUAL "windows")
+     list(APPEND PLATFORM_TARGET_LINK_LIBRARIES DbgHelp;Synchronization)
+   endif()
+ 
+diff --git a/utils/api_checker/CMakeLists.txt b/utils/api_checker/CMakeLists.txt
+index e664a73ddd9..fea720f6095 100644
+--- a/utils/api_checker/CMakeLists.txt
++++ b/utils/api_checker/CMakeLists.txt
+@@ -16,7 +16,7 @@ set(SWIFTLIB_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib/swift")
+ set(dest "${SWIFTLIB_DIR}/${framework}")
+ set(source "${CMAKE_CURRENT_SOURCE_DIR}/${framework}")
+ 
+-if(CMAKE_SYSTEM_NAME STREQUAL Windows)
++if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+     set(CMAKE_SYMLINK_COMMAND copy)
+ else()
+     set(CMAKE_SYMLINK_COMMAND create_symlink)
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-libcxx-flags.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-libcxx-flags.patch
new file mode 100644
index 000000000000..c2b5adafa592
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-libcxx-flags.patch
@@ -0,0 +1,63 @@
+On Darwin, the SDK is a directory of stubs, and libc++ lives separately. We
+need to patch the CMake files in several places to make the build for C++
+interop succeed. The required flags can be read from cc-wrapper support files.
+
+--- a/SwiftCompilerSources/CMakeLists.txt
++++ b/SwiftCompilerSources/CMakeLists.txt
+@@ -105,18 +105,11 @@ function(add_swift_compiler_modules_library name)
+       get_filename_component(swift_exec_bin_dir ${ALS_SWIFT_EXEC} DIRECTORY)
+       set(sdk_option ${sdk_option} "-resource-dir" "${swift_exec_bin_dir}/../bootstrapping0/lib/swift")
+     endif()
+-    if(NOT EXISTS "${sdk_path}/usr/include/c++")
+-      # Darwin SDKs in Xcode 12 or older do not include libc++, which prevents clang from finding libc++ when invoked
+-      # from ClangImporter. This results in build errors. To workaround this, let's explicitly pass the path to libc++
+-      # to clang.
+-      message(WARNING "Building with an outdated Darwin SDK: libc++ missing from the ${SWIFT_HOST_VARIANT_SDK} SDK. Will use libc++ from the toolchain.")
+-      get_filename_component(absolute_libcxx_path "${CMAKE_C_COMPILER}/../../include/c++/v1" REALPATH)
+-      if (EXISTS "${absolute_libcxx_path}")
+-        set(sdk_option ${sdk_option} "-Xcc" "-isystem" "-Xcc" "${absolute_libcxx_path}")
+-      else()
+-        message(ERROR "libc++ not found in the toolchain.")
+-      endif()
+-    endif()
++    file(READ "$ENV{NIX_CC}/nix-support/libcxx-cxxflags" nix_libcxx_cxxflags)
++    separate_arguments(nix_libcxx_cxxflags)
++    foreach(nix_libcxx_cxxflag ${nix_libcxx_cxxflags})
++      set(sdk_option ${sdk_option} "-Xcc" "${nix_libcxx_cxxflag}")
++    endforeach()
+   elseif(BOOTSTRAPPING_MODE STREQUAL "CROSSCOMPILE")
+     set(sdk_option "-sdk" "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}")
+     get_filename_component(swift_exec_bin_dir ${ALS_SWIFT_EXEC} DIRECTORY)
+--- a/cmake/modules/SwiftConfigureSDK.cmake
++++ b/cmake/modules/SwiftConfigureSDK.cmake
+@@ -270,6 +270,18 @@ macro(configure_sdk_darwin
+   # Add this to the list of known SDKs.
+   list(APPEND SWIFT_CONFIGURED_SDKS "${prefix}")
+ 
++  set(cxx_overlay_opt "")
++  if("${prefix}" STREQUAL "OSX")
++    file(READ "$ENV{NIX_CC}/nix-support/libcxx-cxxflags" nix_libcxx_cxxflags)
++    separate_arguments(nix_libcxx_cxxflags)
++    foreach(nix_libcxx_cxxflag ${nix_libcxx_cxxflags})
++      set(cxx_overlay_opt ${cxx_overlay_opt} "-Xcc" "${nix_libcxx_cxxflag}")
++    endforeach()
++  endif()
++  set(SWIFT_SDK_${prefix}_CXX_OVERLAY_SWIFT_COMPILE_FLAGS
++      ${cxx_overlay_opt}
++    CACHE STRING "Extra flags for compiling the C++ overlay")
++
+   _report_sdk("${prefix}")
+ endmacro()
+ 
+--- a/stdlib/public/Cxx/std/CMakeLists.txt
++++ b/stdlib/public/Cxx/std/CMakeLists.txt
+@@ -145,6 +145,9 @@ add_swift_target_library(swiftstd STATIC NO_LINK_NAME IS_STDLIB
+     SWIFT_COMPILE_FLAGS_LINUX
+     ${SWIFT_SDK_LINUX_CXX_OVERLAY_SWIFT_COMPILE_FLAGS}
+ 
++    SWIFT_COMPILE_FLAGS_OSX
++    ${SWIFT_SDK_OSX_CXX_OVERLAY_SWIFT_COMPILE_FLAGS}
++
+     LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
+     TARGET_SDKS ALL_APPLE_PLATFORMS LINUX
+     INSTALL_IN_COMPONENT compiler
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-link-cxxabi.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-link-cxxabi.patch
new file mode 100644
index 000000000000..dad9b3285dc1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-link-cxxabi.patch
@@ -0,0 +1,14 @@
+This patches the stdlib backdeploy static lib to have its users link c++abi.
+Without this, later steps that try to link this fail looking for global
+new/delete operators (__Znwm/__ZdlPv).
+
+--- a/stdlib/toolchain/Compatibility56/Overrides.cpp
++++ b/stdlib/toolchain/Compatibility56/Overrides.cpp
+@@ -23,6 +23,7 @@
+ using namespace swift;
+ 
+ __asm__ (".linker_option \"-lc++\"");
++__asm__ (".linker_option \"-lc++abi\"");
+ 
+ #define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs) \
+   Override_ ## name name;
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-plistbuddy-workaround.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-plistbuddy-workaround.patch
new file mode 100644
index 000000000000..a3cf4f60675c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-plistbuddy-workaround.patch
@@ -0,0 +1,17 @@
+CMake tries to read a list field from SDKSettings.plist, but the output of
+facebook/xcbuild PlistBuddy is incompatible with Apple's.
+
+Simply set the supported architectures to the one target architecture we're
+building for.
+
+--- a/cmake/modules/SwiftConfigureSDK.cmake
++++ b/cmake/modules/SwiftConfigureSDK.cmake
+@@ -189,7 +189,7 @@ macro(configure_sdk_darwin
+   endif()
+ 
+   # Remove any architectures not supported by the SDK.
+-  remove_sdk_unsupported_archs(${name} ${xcrun_name} ${SWIFT_SDK_${prefix}_PATH} SWIFT_SDK_${prefix}_ARCHITECTURES)
++  set(SWIFT_SDK_${prefix}_ARCHITECTURES "@swiftArch@")
+ 
+   list_intersect(
+     "${SWIFT_DARWIN_MODULE_ARCHS}"            # lhs
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-libc-paths.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-libc-paths.patch
new file mode 100644
index 000000000000..02cdeb368bb7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-libc-paths.patch
@@ -0,0 +1,48 @@
+This code injects an LLVM modulemap for glibc and libstdc++ by overriding
+specific VFS paths. In order to do that, it needs to know the actual locations
+of glibc and libstdc++, but it only searches `-sysroot` and fails. Here we
+patch it to also consider `-idirafter` and `-isystem` as added by cc-wrapper.
+
+--- a/lib/ClangImporter/ClangIncludePaths.cpp
++++ b/lib/ClangImporter/ClangIncludePaths.cpp
+@@ -120,6 +120,7 @@ static clang::driver::Driver createClangDriver(const ASTContext &ctx) {
+ /// \return a path without dots (`../`, './').
+ static llvm::Optional<Path>
+ findFirstIncludeDir(const llvm::opt::InputArgList &args,
++                    const llvm::opt::ArgList &DriverArgs,
+                     const ArrayRef<const char *> expectedFileNames) {
+   // C++ stdlib paths are added as `-internal-isystem`.
+   std::vector<std::string> includeDirs =
+@@ -128,6 +129,14 @@ findFirstIncludeDir(const llvm::opt::InputArgList &args,
+   llvm::append_range(includeDirs,
+                      args.getAllArgValues(
+                          clang::driver::options::OPT_internal_externc_isystem));
++  // Nix adds the C stdlib include path using `-idirafter`.
++  llvm::append_range(includeDirs,
++                     DriverArgs.getAllArgValues(
++                         clang::driver::options::OPT_idirafter));
++  // Nix adds the C++ stdlib include path using `-isystem`.
++  llvm::append_range(includeDirs,
++                     DriverArgs.getAllArgValues(
++                         clang::driver::options::OPT_isystem));
+ 
+   for (const auto &includeDir : includeDirs) {
+     Path dir(includeDir);
+@@ -193,7 +202,7 @@ getGlibcFileMapping(ASTContext &ctx) {
+   // Ideally we would check that all of the headers referenced from the
+   // modulemap are present.
+   Path glibcDir;
+-  if (auto dir = findFirstIncludeDir(parsedIncludeArgs,
++  if (auto dir = findFirstIncludeDir(parsedIncludeArgs, clangDriverArgs,
+                                      {"inttypes.h", "unistd.h", "stdint.h"})) {
+     glibcDir = dir.value();
+   } else {
+@@ -251,7 +260,7 @@ getLibStdCxxFileMapping(ASTContext &ctx) {
+   auto parsedStdlibArgs = parseClangDriverArgs(clangDriver, stdlibArgStrings);
+ 
+   Path cxxStdlibDir;
+-  if (auto dir = findFirstIncludeDir(parsedStdlibArgs,
++  if (auto dir = findFirstIncludeDir(parsedStdlibArgs, clangDriverArgs,
+                                      {"cstdlib", "string", "vector"})) {
+     cxxStdlibDir = dir.value();
+   } else {
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-linking.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-linking.patch
new file mode 100644
index 000000000000..e09d5162a93a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-linux-fix-linking.patch
@@ -0,0 +1,21 @@
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -1475,7 +1475,17 @@ const char *ToolChain::getClangLinkerDriver(
+ 
+     // If there is a linker driver in the toolchain folder, use that instead.
+     if (auto tool = llvm::sys::findProgramByName(LinkerDriver, {toolchainPath}))
+-      LinkerDriver = Args.MakeArgString(tool.get());
++      return Args.MakeArgString(tool.get());
++  }
++
++  // For Nix, prefer linking using the wrapped system clang, instead of using
++  // the unwrapped clang packaged with swift. The latter is unable to link, but
++  // we still want to use it for other purposes (clang importer).
++  if (auto nixCC = llvm::sys::Process::GetEnv("NIX_CC")) {
++    llvm::SmallString<128> binDir(nixCC.getValue());
++    llvm::sys::path::append(binDir, "bin");
++    if (auto tool = llvm::sys::findProgramByName(LinkerDriver, {binDir.str()}))
++      return Args.MakeArgString(tool.get());
+   }
+ 
+   return LinkerDriver;
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-nix-resource-root.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-nix-resource-root.patch
new file mode 100644
index 000000000000..b67286a5d1c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-nix-resource-root.patch
@@ -0,0 +1,67 @@
+Swift normally looks for the Clang resource dir in a subdir/symlink of its own
+resource dir. We provide a symlink to the Swift build-time Clang as a default
+there, but we also here patch two checks to try locate it via NIX_CC.
+
+The first (ClangImporter.cpp) happens when Swift code imports C modules. The
+second (ToolChains.cpp) happens when Swift is used to link the final product.
+
+--- a/lib/ClangImporter/ClangImporter.cpp
++++ b/lib/ClangImporter/ClangImporter.cpp
+@@ -73,6 +73,7 @@
+ #include "llvm/Support/FileSystem.h"
+ #include "llvm/Support/Memory.h"
+ #include "llvm/Support/Path.h"
++#include "llvm/Support/Process.h"
+ #include "llvm/Support/VirtualFileSystem.h"
+ #include "llvm/Support/YAMLParser.h"
+ #include <algorithm>
+@@ -786,6 +787,17 @@ importer::addCommonInvocationArguments(
+ 
+   const std::string &overrideResourceDir = importerOpts.OverrideResourceDir;
+   if (overrideResourceDir.empty()) {
++    // Prefer the Clang resource directory from NIX_CC, to allow swapping in a
++    // different stdenv.
++    // TODO: Figure out how to provide a user override for this. Probably a
++    // niche use case, though, and for now a user can unset NIX_CC to work
++    // around it if necessary.
++    if (auto nixCC = llvm::sys::Process::GetEnv("NIX_CC")) {
++      llvm::SmallString<128> resourceDir(nixCC.getValue());
++      llvm::sys::path::append(resourceDir, "resource-root");
++      invocationArgStrs.push_back("-resource-dir");
++      invocationArgStrs.push_back(std::string(resourceDir.str()));
++    } else {
+     llvm::SmallString<128> resourceDir(searchPathOpts.RuntimeResourcePath);
+ 
+     // Adjust the path to refer to our copy of the Clang resource directory
+@@ -801,6 +813,7 @@ importer::addCommonInvocationArguments(
+     // Set the Clang resource directory to the path we computed.
+     invocationArgStrs.push_back("-resource-dir");
+     invocationArgStrs.push_back(std::string(resourceDir.str()));
++    } // nixCC
+   } else {
+     invocationArgStrs.push_back("-resource-dir");
+     invocationArgStrs.push_back(overrideResourceDir);
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -1393,10 +1393,20 @@ void ToolChain::getClangLibraryPath(const ArgList &Args,
+                                     SmallString<128> &LibPath) const {
+   const llvm::Triple &T = getTriple();
+ 
++  // Nix: We provide a `clang` symlink in the default Swift resource root, but
++  // prefer detecting the Clang resource root via NIX_CC, to allow swapping in
++  // a different stdenv. However, always honor a user-provided `-resource-dir`.
++  auto nixCC = llvm::sys::Process::GetEnv("NIX_CC");
++  if (nixCC && !Args.hasArgNoClaim(options::OPT_resource_dir)) {
++    LibPath.assign(nixCC.getValue());
++    llvm::sys::path::append(LibPath, "resource-root");
++  } else {
+   getResourceDirPath(LibPath, Args, /*Shared=*/true);
+   // Remove platform name.
+   llvm::sys::path::remove_filename(LibPath);
+-  llvm::sys::path::append(LibPath, "clang", "lib",
++  llvm::sys::path::append(LibPath, "clang");
++  } // nixCC
++  llvm::sys::path::append(LibPath, "lib",
+                           T.isOSDarwin() ? "darwin"
+                                          : getPlatformNameForTriple(T));
+ }
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-prevent-sdk-dirs-warning.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-prevent-sdk-dirs-warning.patch
new file mode 100644
index 000000000000..987b99d74539
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-prevent-sdk-dirs-warning.patch
@@ -0,0 +1,39 @@
+Prevents a user-visible warning on every compilation:
+
+  ld: warning: directory not found for option '-L.../MacOSX11.0.sdk/usr/lib/swift'
+
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -1455,9 +1455,11 @@ void ToolChain::getRuntimeLibraryPaths(SmallVectorImpl<std::string> &runtimeLibP
+       runtimeLibPaths.push_back(std::string(scratchPath.str()));
+     }
+ 
++    if (!SDKPath.startswith("@storeDir@")) {
+     scratchPath = SDKPath;
+     llvm::sys::path::append(scratchPath, "usr", "lib", "swift");
+     runtimeLibPaths.push_back(std::string(scratchPath.str()));
++    }
+   }
+ }
+ 
+--- a/lib/Frontend/CompilerInvocation.cpp
++++ b/lib/Frontend/CompilerInvocation.cpp
+@@ -185,7 +185,9 @@ static void updateRuntimeLibraryPaths(SearchPathOptions &SearchPathOpts,
+       RuntimeLibraryImportPaths.push_back(std::string(LibPath.str()));
+     }
+ 
+-    LibPath = SearchPathOpts.getSDKPath();
++    auto SDKPath = SearchPathOpts.getSDKPath();
++    if (!SDKPath.startswith("@storeDir@")) {
++    LibPath = SDKPath;
+     llvm::sys::path::append(LibPath, "usr", "lib", "swift");
+     if (!Triple.isOSDarwin()) {
+       // Use the non-architecture suffixed form with directory-layout
+@@ -200,6 +202,7 @@ static void updateRuntimeLibraryPaths(SearchPathOptions &SearchPathOpts,
+       llvm::sys::path::append(LibPath, swift::getMajorArchitectureName(Triple));
+     }
+     RuntimeLibraryImportPaths.push_back(std::string(LibPath.str()));
++    }
+   }
+   SearchPathOpts.setRuntimeLibraryImportPaths(RuntimeLibraryImportPaths);
+ }
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-separate-lib.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-separate-lib.patch
new file mode 100644
index 000000000000..20d81a6e8296
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-separate-lib.patch
@@ -0,0 +1,26 @@
+Patch paths to use the separate 'lib' output. One of the things this patch
+fixes is the output of `swift -frontend -print-target-info`, which swiftpm uses
+to set rpath on Linux.
+
+The check if the executable path starts with 'out' is necessary for
+bootstrapping, or the compiler will fail when run from the build directory.
+
+--- a/lib/Frontend/CompilerInvocation.cpp
++++ b/lib/Frontend/CompilerInvocation.cpp
+@@ -49,11 +49,16 @@ swift::CompilerInvocation::CompilerInvocation() {
+ void CompilerInvocation::computeRuntimeResourcePathFromExecutablePath(
+     StringRef mainExecutablePath, bool shared,
+     llvm::SmallVectorImpl<char> &runtimeResourcePath) {
++  if (mainExecutablePath.startswith("@storeDir@")) {
++    auto libPath = StringRef("@lib@");
++    runtimeResourcePath.append(libPath.begin(), libPath.end());
++  } else {
+   runtimeResourcePath.append(mainExecutablePath.begin(),
+                              mainExecutablePath.end());
+ 
+   llvm::sys::path::remove_filename(runtimeResourcePath); // Remove /swift
+   llvm::sys::path::remove_filename(runtimeResourcePath); // Remove /bin
++  }
+   appendSwiftLibDir(runtimeResourcePath, shared);
+ }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-wrap.patch b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-wrap.patch
new file mode 100644
index 000000000000..e4697f631e70
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-wrap.patch
@@ -0,0 +1,46 @@
+Wrap the swift compiler produced during the build
+
+--- a/tools/driver/CMakeLists.txt
++++ b/tools/driver/CMakeLists.txt
+@@ -16,6 +16,13 @@ if(${LIBSWIFT_BUILD_MODE} MATCHES "BOOTSTRAPPING.*")
+                           swiftDriverTool
+                           libswiftStub)
+ 
++  # Nix: wrap the swift build.
++  add_custom_command(
++    TARGET swift-frontend-bootstrapping0 POST_BUILD
++    COMMAND nix-swift-make-swift-wrapper $<TARGET_FILE:swift-frontend-bootstrapping0>
++    VERBATIM
++  )
++
+   swift_create_post_build_symlink(swift-frontend-bootstrapping0
+     SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX}"
+     DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}"
+@@ -34,6 +41,13 @@ if(${LIBSWIFT_BUILD_MODE} MATCHES "BOOTSTRAPPING.*")
+                           swiftDriverTool
+                           libswift-bootstrapping1)
+ 
++  # Nix: wrap the swift build.
++  add_custom_command(
++    TARGET swift-frontend-bootstrapping1 POST_BUILD
++    COMMAND nix-swift-make-swift-wrapper $<TARGET_FILE:swift-frontend-bootstrapping1>
++    VERBATIM
++  )
++
+   swift_create_post_build_symlink(swift-frontend-bootstrapping1
+     SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX}"
+     DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}"
+@@ -50,6 +64,13 @@ target_link_libraries(swift-frontend
+                         swiftDriverTool
+                         libswift)
+ 
++# Nix: wrap the swift build.
++add_custom_command(
++  TARGET swift-frontend POST_BUILD
++  COMMAND nix-swift-make-swift-wrapper $<TARGET_FILE:swift-frontend>
++  VERBATIM
++)
++
+ # Create a `swift-driver` executable adjacent to the `swift-frontend` executable
+ # to ensure that `swiftc` forwards to the standalone driver when invoked.
+ swift_create_early_driver_copies(swift-frontend)
diff --git a/nixpkgs/pkgs/development/compilers/swift/default.nix b/nixpkgs/pkgs/development/compilers/swift/default.nix
new file mode 100644
index 000000000000..afb8ce39dcce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/default.nix
@@ -0,0 +1,121 @@
+{ lib
+, pkgs
+, newScope
+, darwin
+, llvmPackages
+, llvmPackages_15
+, overrideCC
+}:
+
+let
+  swiftLlvmPackages = llvmPackages_15;
+
+  self = rec {
+
+    callPackage = newScope self;
+
+    # Current versions of Swift on Darwin require macOS SDK 10.15 at least.
+    # Re-export this so we can rely on the minimum Swift SDK elsewhere.
+    apple_sdk = pkgs.darwin.apple_sdk_11_0;
+
+    # Swift builds its own Clang for internal use. We wrap that clang with a
+    # cc-wrapper derived from the clang configured below. Because cc-wrapper
+    # applies a specific resource-root, the two versions are best matched, or
+    # we'll often run into compilation errors.
+    #
+    # The following selects the correct Clang version, matching the version
+    # used in Swift, and applies the same libc overrides as `apple_sdk.stdenv`.
+    clang = if pkgs.stdenv.isDarwin
+      then
+        swiftLlvmPackages.clang.override rec {
+          libc = apple_sdk.Libsystem;
+          bintools = pkgs.bintools.override { inherit libc; };
+          # Ensure that Swift’s internal clang uses the same libc++ and libc++abi as the
+          # default Darwin stdenv. Using the default libc++ avoids issues (such as crashes)
+          # that can happen when a Swift application dynamically links different versions
+          # of libc++ and libc++abi than libraries it links are using.
+          inherit (llvmPackages) libcxx;
+          extraPackages = [
+            llvmPackages.libcxxabi
+            # Use the compiler-rt associated with clang, but use the libc++abi from the stdenv
+            # to avoid linking against two different versions (for the same reasons as above).
+            (swiftLlvmPackages.compiler-rt.override {
+              inherit (llvmPackages) libcxxabi;
+            })
+          ];
+        }
+      else
+        swiftLlvmPackages.clang;
+
+    # Overrides that create a useful environment for swift packages, allowing
+    # packaging with `swiftPackages.callPackage`. These are similar to
+    # `apple_sdk_11_0.callPackage`, with our clang on top.
+    inherit (clang) bintools;
+    stdenv = overrideCC pkgs.stdenv clang;
+    darwin = pkgs.darwin.overrideScope (_: prev: {
+      inherit apple_sdk;
+      inherit (apple_sdk) Libsystem LibsystemCross libcharset libunwind objc4 configd IOKit Security;
+      CF = apple_sdk.CoreFoundation // { __attrsFailEvaluation = true; };
+      __attrsFailEvaluation = true;
+    });
+    xcodebuild = pkgs.xcbuild.override {
+      inherit (apple_sdk.frameworks) CoreServices CoreGraphics ImageIO;
+      inherit stdenv;
+      sdkVer = "10.15";
+    };
+    xcbuild = xcodebuild;
+
+    swift-unwrapped = callPackage ./compiler {
+      inherit (darwin) DarwinTools cctools sigtool;
+      inherit (apple_sdk) MacOSX-SDK CLTools_Executables;
+      inherit (apple_sdk.frameworks) CoreServices Foundation Combine;
+    };
+
+    swiftNoSwiftDriver = callPackage ./wrapper {
+      swift = swift-unwrapped;
+      useSwiftDriver = false;
+    };
+
+    Dispatch = if stdenv.isDarwin
+      then null # part of libsystem
+      else callPackage ./libdispatch { swift = swiftNoSwiftDriver; };
+
+    Foundation = if stdenv.isDarwin
+      then apple_sdk.frameworks.Foundation
+      else callPackage ./foundation { swift = swiftNoSwiftDriver; };
+
+    # TODO: Apple distributes a binary XCTest with Xcode, but it is not part of
+    # CLTools (or SUS), so would have to figure out how to fetch it. The binary
+    # version has several extra features, like a test runner and ObjC support.
+    XCTest = callPackage ./xctest {
+      inherit (darwin) DarwinTools;
+      swift = swiftNoSwiftDriver;
+    };
+
+    swiftpm = callPackage ./swiftpm {
+      inherit (darwin) DarwinTools cctools;
+      inherit (apple_sdk.frameworks) CryptoKit LocalAuthentication;
+      swift = swiftNoSwiftDriver;
+    };
+
+    swift-driver = callPackage ./swift-driver {
+      swift = swiftNoSwiftDriver;
+    };
+
+    swift = callPackage ./wrapper {
+      swift = swift-unwrapped;
+    };
+
+    sourcekit-lsp = callPackage ./sourcekit-lsp {
+      inherit (apple_sdk.frameworks) CryptoKit LocalAuthentication;
+    };
+
+    swift-docc = callPackage ./swift-docc {
+      inherit (apple_sdk.frameworks) CryptoKit LocalAuthentication;
+    };
+
+    swift-format = callPackage ./swift-format { };
+
+  };
+
+in self
diff --git a/nixpkgs/pkgs/development/compilers/swift/foundation/default.nix b/nixpkgs/pkgs/development/compilers/swift/foundation/default.nix
new file mode 100644
index 000000000000..b0da48c68a95
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/foundation/default.nix
@@ -0,0 +1,71 @@
+# TODO: We already package the CoreFoundation component of Foundation in:
+#   pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
+# This is separate because the CF build is completely different and part of
+# stdenv. Merging the two was kept outside of the scope of Swift work.
+
+{ lib
+, stdenv
+, fetchpatch
+, callPackage
+, cmake
+, ninja
+, swift
+, Dispatch
+, icu
+, libxml2
+, curl
+}:
+
+let
+  sources = callPackage ../sources.nix { };
+in stdenv.mkDerivation {
+  pname = "swift-corelibs-foundation";
+
+  inherit (sources) version;
+  src = sources.swift-corelibs-foundation;
+
+  patches = [
+    # from https://github.com/apple/swift-corelibs-foundation/pull/4811
+    # fix build with glibc >=2.38
+    (fetchpatch {
+      url = "https://github.com/apple/swift-corelibs-foundation/commit/47260803a108c6e0d639adcebeed3ac6a76e8bcd.patch";
+      hash = "sha256-1JUSQW86IHKkBZqxvpk0P8zcSKntzOTNlMoGBfgeT4c=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja swift ];
+  buildInputs = [ icu libxml2 curl ];
+  propagatedBuildInputs = [ Dispatch ];
+
+  preConfigure = ''
+    # Fails to build with -D_FORTIFY_SOURCE.
+    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}
+  '';
+
+  postInstall = ''
+    # Split up the output.
+    mkdir $dev
+    mv $out/lib/swift/${swift.swiftOs} $out/swiftlibs
+    mv $out/lib/swift $dev/include
+    mkdir $out/lib/swift
+    mv $out/swiftlibs $out/lib/swift/${swift.swiftOs}
+
+    # Provide a CMake module. This is primarily used to glue together parts of
+    # the Swift toolchain. Modifying the CMake config to do this for us is
+    # otherwise more trouble.
+    mkdir -p $dev/lib/cmake/Foundation
+    export dylibExt="${stdenv.hostPlatform.extensions.sharedLibrary}"
+    export swiftOs="${swift.swiftOs}"
+    substituteAll ${./glue.cmake} $dev/lib/cmake/Foundation/FoundationConfig.cmake
+  '';
+
+  meta = {
+    description = "Core utilities, internationalization, and OS independence for Swift";
+    homepage = "https://github.com/apple/swift-corelibs-foundation";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/foundation/glue.cmake b/nixpkgs/pkgs/development/compilers/swift/foundation/glue.cmake
new file mode 100644
index 000000000000..a34984d19f04
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/foundation/glue.cmake
@@ -0,0 +1,8 @@
+add_library(Foundation SHARED IMPORTED)
+set_property(TARGET Foundation PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libFoundation@dylibExt@")
+
+add_library(FoundationNetworking SHARED IMPORTED)
+set_property(TARGET FoundationNetworking PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libFoundationNetworking@dylibExt@")
+
+add_library(FoundationXML SHARED IMPORTED)
+set_property(TARGET FoundationXML PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libFoundationXML@dylibExt@")
diff --git a/nixpkgs/pkgs/development/compilers/swift/libdispatch/default.nix b/nixpkgs/pkgs/development/compilers/swift/libdispatch/default.nix
new file mode 100644
index 000000000000..4a0616ded5ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/libdispatch/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, callPackage
+, cmake
+, ninja
+, useSwift ? true, swift
+}:
+
+let
+  sources = callPackage ../sources.nix { };
+in stdenv.mkDerivation {
+  pname = "swift-corelibs-libdispatch";
+
+  inherit (sources) version;
+  src = sources.swift-corelibs-libdispatch;
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optionals useSwift [ ninja swift ];
+
+  patches = [ ./disable-swift-overlay.patch ];
+
+  cmakeFlags = lib.optional useSwift "-DENABLE_SWIFT=ON";
+
+  postInstall = ''
+    # Provide a CMake module. This is primarily used to glue together parts of
+    # the Swift toolchain. Modifying the CMake config to do this for us is
+    # otherwise more trouble.
+    mkdir -p $dev/lib/cmake/dispatch
+    export dylibExt="${stdenv.hostPlatform.extensions.sharedLibrary}"
+    substituteAll ${./glue.cmake} $dev/lib/cmake/dispatch/dispatchConfig.cmake
+  '';
+
+  meta = {
+    description = "Grand Central Dispatch";
+    homepage = "https://github.com/apple/swift-corelibs-libdispatch";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ cmm dtzWill trepetti dduan trundle stephank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/libdispatch/disable-swift-overlay.patch b/nixpkgs/pkgs/development/compilers/swift/libdispatch/disable-swift-overlay.patch
new file mode 100644
index 000000000000..0ea1869d5528
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/libdispatch/disable-swift-overlay.patch
@@ -0,0 +1,35 @@
+Enabling Swift support is normally intended for building an overlay for a
+Swift SDK, which changes the installation layout. Prevent this.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -287,7 +287,7 @@ configure_file("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
+ add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:HAVE_CONFIG_H>)
+ 
+ 
+-if(ENABLE_SWIFT)
++if(0)
+   set(INSTALL_TARGET_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>" CACHE PATH "Path where the libraries will be installed")
+   set(INSTALL_DISPATCH_HEADERS_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/dispatch" CACHE PATH "Path where the headers will be installed for libdispatch")
+   set(INSTALL_BLOCK_HEADERS_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/Block" CACHE PATH "Path where the headers will be installed for the blocks runtime")
+--- a/man/CMakeLists.txt
++++ b/man/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ 
+ # TODO(compnerd) add symlinks
+-if(NOT ENABLE_SWIFT)
++if(1)
+   install(FILES
+             dispatch.3
+             dispatch_after.3
+--- a/src/swift/CMakeLists.txt
++++ b/src/swift/CMakeLists.txt
+@@ -47,7 +47,7 @@ get_swift_host_arch(swift_arch)
+ install(FILES
+   ${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftmodule
+   ${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftdoc
+-  DESTINATION ${INSTALL_TARGET_DIR}/${swift_arch})
++  DESTINATION ${INSTALL_TARGET_DIR}/swift)
+ set_property(GLOBAL APPEND PROPERTY DISPATCH_EXPORTS swiftDispatch)
+ install(TARGETS swiftDispatch
+   EXPORT dispatchExports
diff --git a/nixpkgs/pkgs/development/compilers/swift/libdispatch/glue.cmake b/nixpkgs/pkgs/development/compilers/swift/libdispatch/glue.cmake
new file mode 100644
index 000000000000..dd696dc61085
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/libdispatch/glue.cmake
@@ -0,0 +1,5 @@
+add_library(dispatch SHARED IMPORTED)
+set_property(TARGET dispatch PROPERTY IMPORTED_LOCATION "@out@/lib/libdispatch@dylibExt@")
+
+add_library(swiftDispatch SHARED IMPORTED)
+set_property(TARGET swiftDispatch PROPERTY IMPORTED_LOCATION "@out@/lib/libswiftDispatch@dylibExt@")
diff --git a/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/default.nix b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/default.nix
new file mode 100644
index 000000000000..caba3e3441f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/default.nix
@@ -0,0 +1,75 @@
+{ lib
+, stdenv
+, callPackage
+, pkg-config
+, swift
+, swiftpm
+, swiftpm2nix
+, Foundation
+, XCTest
+, sqlite
+, ncurses
+, CryptoKit
+, LocalAuthentication
+}:
+let
+  sources = callPackage ../sources.nix { };
+  generated = swiftpm2nix.helpers ./generated;
+
+  # On Darwin, we only want ncurses in the linker search path, because headers
+  # are part of libsystem. Adding its headers to the search path causes strange
+  # mixing and errors.
+  # TODO: Find a better way to prevent this conflict.
+  ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses;
+in
+stdenv.mkDerivation {
+  pname = "sourcekit-lsp";
+
+  inherit (sources) version;
+  src = sources.sourcekit-lsp;
+
+  nativeBuildInputs = [ pkg-config swift swiftpm ];
+  buildInputs = [
+    Foundation
+    XCTest
+    sqlite
+    ncursesInput
+  ] ++ lib.optionals stdenv.isDarwin [ CryptoKit LocalAuthentication ];
+
+  configurePhase = generated.configure + ''
+    swiftpmMakeMutable indexstore-db
+    patch -p1 -d .build/checkouts/indexstore-db -i ${./patches/indexstore-db-macos-target.patch}
+
+    swiftpmMakeMutable swift-tools-support-core
+    patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
+
+    # This toggles a section specific to Xcode XCTest, which doesn't work on
+    # Darwin, where we also use swift-corelibs-xctest.
+    substituteInPlace Sources/LSPTestSupport/PerfTestCase.swift \
+      --replace '#if os(macOS)' '#if false'
+
+    # Required to link with swift-corelibs-xctest on Darwin.
+    export SWIFTTSC_MACOS_DEPLOYMENT_TARGET=10.12
+  '';
+
+  # TODO: BuildServerBuildSystemTests fails
+  #doCheck = true;
+
+  installPhase = ''
+    binPath="$(swiftpmBinPath)"
+    mkdir -p $out/bin
+    cp $binPath/sourcekit-lsp $out/bin/
+  '';
+
+  # Canary to verify output of our Swift toolchain does not depend on the Swift
+  # compiler itself. (Only its 'lib' output.)
+  disallowedRequisites = [ swift.swift ];
+
+  meta = {
+    description = "Language Server Protocol implementation for Swift and C-based languages";
+    homepage = "https://github.com/apple/sourcekit-lsp";
+    platforms = with lib.platforms; linux ++ darwin;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/default.nix b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/default.nix
new file mode 100644
index 000000000000..d753f378946a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/default.nix
@@ -0,0 +1,17 @@
+# This file was generated by swiftpm2nix.
+{
+  workspaceStateFile = ./workspace-state.json;
+  hashes = {
+    "indexstore-db" = "0lf96m82s8f6lv67wbcnm9ii01fgw4bsr4vn2xp07ydfj1iqy8il";
+    "swift-argument-parser" = "1jph9w7lk9nr20fsv2c8p4hisx3dda817fh7pybd0r0j1jwa9nmw";
+    "swift-collections" = "1k6sjx5rqmp3gklny77b480hyzy6gkhpi23r0s8ljfbrcwawgnan";
+    "swift-crypto" = "0kllp7j0hd8k67l9b9zr2c3ddc5bvshldchzivhcz3q31qvq9ag8";
+    "swift-driver" = "0cbvddj54k3sbw0vzlmzhccs7h43hi5kq6i3n2i0mysz3bf0c6zg";
+    "swift-llbuild" = "106vnssh6pgy5s9dnq1hi1c9v2wkfydqgncg5dy7c9n23iisjy3s";
+    "swift-package-manager" = "1d1ngh7da42dm0rwkw7jzxa63a1rpc88wimm85w2j59cm446pk9k";
+    "swift-syntax" = "05394mzznmcrw246lyzsjsn1fmilj98jgkjyyxr2ynhnbgzp2jl2";
+    "swift-system" = "0402hkx2q2dv27gccnn8ma79ngvwiwzkhcv4zlcdldmy6cgi0px7";
+    "swift-tools-support-core" = "1qvblyiazv58qwyxgyk2dh5ymbab3y70vm2q81qs6rmv43hs8ciz";
+    "Yams" = "0b4lprxl4f6yqq0djnp394mxgmsxm2pljr7fh4f6ihdhnpwfsfvl";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/workspace-state.json b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/workspace-state.json
new file mode 100644
index 000000000000..b2659770cc7a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/generated/workspace-state.json
@@ -0,0 +1,195 @@
+{
+  "object": {
+    "artifacts": [],
+    "dependencies": [
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "indexstore-db",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/indexstore-db.git",
+          "name": "IndexStoreDB"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "6caa12ab3bb6245eee4e09dce7677e64720c6545"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "indexstore-db"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-argument-parser",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-argument-parser.git",
+          "name": "swift-argument-parser"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
+            "version": "1.0.3"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-argument-parser"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-collections",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-collections.git",
+          "name": "swift-collections"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "937e904258d22af6e447a0b72c0bc67583ef64a2",
+            "version": "1.0.4"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-collections"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-crypto",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-crypto.git",
+          "name": "swift-crypto"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "75ec60b8b4cc0f085c3ac414f3dca5625fa3588e",
+            "version": "2.2.4"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-crypto"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-driver",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-driver.git",
+          "name": "swift-driver"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "7cfe0c0b6e6297efe88a3ce34e6138ee7eda969e"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-driver"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-llbuild",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-llbuild.git",
+          "name": "llbuild"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "dccfc2e127a34b89a849407594cf2d604b598ba9"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-llbuild"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-package-manager",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-package-manager.git",
+          "name": "SwiftPM"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "6651d98a4ce3c6faa82768256ca286412bf4a04d"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-package-manager"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-syntax",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-syntax.git",
+          "name": "SwiftSyntax"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "cd793adf5680e138bf2bcbaacc292490175d0dcd"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-syntax"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-system",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-system.git",
+          "name": "swift-system"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "836bc4557b74fe6d2660218d56e3ce96aff76574",
+            "version": "1.1.1"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-system"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-tools-support-core",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-tools-support-core.git",
+          "name": "swift-tools-support-core"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "ac4871e01ef338cb95b5d28328cab0ec1dfae935"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-tools-support-core"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "yams",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/jpsim/Yams.git",
+          "name": "Yams"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "f47ba4838c30dbd59998a4e4c87ab620ff959e8a",
+            "version": "5.0.5"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "Yams"
+      }
+    ]
+  },
+  "version": 6
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/force-unwrap-file-handles.patch b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/force-unwrap-file-handles.patch
new file mode 100644
index 000000000000..a2f2d38c37c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/force-unwrap-file-handles.patch
@@ -0,0 +1,33 @@
+From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloom@riseup.net>
+Date: Tue, 21 Nov 2023 20:53:33 +0300
+Subject: [PATCH] Force-unwrap file handles.
+
+---
+ Sources/TSCBasic/FileSystem.swift | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
+index 3a63bdf..a1f3d9d 100644
+--- a/Sources/TSCBasic/FileSystem.swift
++++ b/Sources/TSCBasic/FileSystem.swift
+@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Read the data one block at a time.
+         let data = BufferedOutputByteStream()
+@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Write the data in one chunk.
+         var contents = bytes.contents
+--
+2.42.0
diff --git a/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/indexstore-db-macos-target.patch b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/indexstore-db-macos-target.patch
new file mode 100644
index 000000000000..53e790874d5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/sourcekit-lsp/patches/indexstore-db-macos-target.patch
@@ -0,0 +1,12 @@
+Raise the deployment target of IndexStoreDB so it can link against our XCTest.
+
+--- a/Package.swift
++++ b/Package.swift
+@@ -4,6 +4,7 @@ import PackageDescription
+
+ let package = Package(
+   name: "IndexStoreDB",
++  platforms: [.macOS("10.12")],
+   products: [
+     .library(
+       name: "IndexStoreDB",
diff --git a/nixpkgs/pkgs/development/compilers/swift/sources.nix b/nixpkgs/pkgs/development/compilers/swift/sources.nix
new file mode 100644
index 000000000000..11240f767d08
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/sources.nix
@@ -0,0 +1,35 @@
+{ lib, fetchFromGitHub }:
+
+let
+
+  # These packages are all part of the Swift toolchain, and have a single
+  # upstream version that should match. We also list the hashes here so a basic
+  # version upgrade touches only this file.
+  version = "5.8";
+  hashes = {
+    llvm-project = "sha256-0xwSAwwkzFgYO3mY1rHqV8TCeH2NpM7m3VUkCDqjcdE=";
+    sourcekit-lsp = "sha256-XDGq64LbpgBrRy3IvZNgsoLUePXECK5p10vQ8cUKeGE=";
+    swift = "sha256-EY2IImBCVLiUutvDQjNUiInwCNxZsCu1mZzYSjNd4+A=";
+    swift-cmark = "sha256-6xkO9kN6eXMAigjk+KyIgVhTyC50BxmkZmD4+9z6nz8=";
+    swift-corelibs-foundation = "sha256-yRjjxJRy1eTM9VG7/Fn60UMghPavsaoueH0V8cjaIyM=";
+    swift-corelibs-libdispatch = "sha256-XOAWuaGqWJtxhGIPXYT3PIvk5OK0rkY4g1IOybJUlm4=";
+    swift-corelibs-xctest = "sha256-uwxQhKUQ1xp5ao6kfkdlYOvMr6yAb5IaBIdOfoyf+n8=";
+    swift-docc = "sha256-k1ygYDZwF4Jo7iOkHxc/3NzfgN+8XNCks5aizxBgPjM=";
+    swift-docc-render-artifact = "sha256-vdSyICXOjlNSjZXzPRxa/5305pg6PG4xww9GYEV9m10=";
+    swift-driver = "sha256-7xsG3Bpf+wqisCMaPEuEg8CjGYO/0r8BX3pMUmRrezE=";
+    swift-experimental-string-processing = "sha256-ioXG6pQKjlAc2oF38Z7TGighyZN8w2ZAAtFUq83Ow6Q=";
+    swift-format = "sha256-uKhIcbJb0DDHKACfVrhQ4fSyXVUkAj090eUZsOrtEqw=";
+    swift-package-manager = "sha256-xd6ZpeXfMoHyVrJxz6XcDLPKBvc2nl1lgWXuLrJdq+E=";
+    swift-syntax = "sha256-gkpx/1sWWi9y917OJ1GSNFYXrJb6e2qI4JlV+38laRQ=";
+  };
+
+  # Create fetch derivations.
+  sources = lib.mapAttrs (repo: hash: fetchFromGitHub {
+    owner = "apple";
+    inherit repo;
+    rev = "swift-${version}-RELEASE";
+    name = "${repo}-${version}-src";
+    hash = hashes.${repo};
+  }) hashes;
+
+in sources // { inherit version; }
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-docc/default.nix b/nixpkgs/pkgs/development/compilers/swift/swift-docc/default.nix
new file mode 100644
index 000000000000..e79487e7eded
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-docc/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, callPackage
+, swift
+, swiftpm
+, swiftpm2nix
+, Foundation
+, XCTest
+, CryptoKit
+, LocalAuthentication
+}:
+let
+  sources = callPackage ../sources.nix { };
+  generated = swiftpm2nix.helpers ./generated;
+in
+stdenv.mkDerivation {
+  pname = "swift-docc";
+
+  inherit (sources) version;
+  src = sources.swift-docc;
+  # TODO: We could build this from `apple/swift-docc-render` source, but that
+  # repository is not tagged.
+  renderArtifact = sources.swift-docc-render-artifact;
+
+  nativeBuildInputs = [ swift swiftpm ];
+  buildInputs = [ Foundation XCTest ]
+    ++ lib.optionals stdenv.isDarwin [ CryptoKit LocalAuthentication ];
+
+  configurePhase = generated.configure;
+
+  # We only install the docc binary, so don't need the other products.
+  # This works around a failure building generate-symbol-graph:
+  #  Sources/generate-symbol-graph/main.swift:13:18: error: module 'SwiftDocC' was not compiled for testing
+  # TODO: Figure out the cause. It doesn't seem to happen outside Nixpkgs.
+  swiftpmFlags = [ "--product docc" ];
+
+  # TODO: Tests depend on indexstore-db being provided by an existing Swift
+  # toolchain. (ie. looks for `../lib/libIndexStore.so` relative to swiftc.
+  #doCheck = true;
+
+  installPhase = ''
+    binPath="$(swiftpmBinPath)"
+    mkdir -p $out/bin $out/share/docc
+    cp $binPath/docc $out/bin/
+    ln -s $renderArtifact/dist $out/share/docc/render
+  '';
+
+  # Canary to verify output of our Swift toolchain does not depend on the Swift
+  # compiler itself. (Only its 'lib' output.)
+  disallowedRequisites = [ swift.swift ];
+
+  meta = {
+    description = "Documentation compiler for Swift";
+    homepage = "https://github.com/apple/swift-docc";
+    platforms = with lib.platforms; linux ++ darwin;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/default.nix b/nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/default.nix
new file mode 100644
index 000000000000..47822ca40bb4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/default.nix
@@ -0,0 +1,14 @@
+# This file was generated by swiftpm2nix.
+{
+  workspaceStateFile = ./workspace-state.json;
+  hashes = {
+    "swift-argument-parser" = "1jph9w7lk9nr20fsv2c8p4hisx3dda817fh7pybd0r0j1jwa9nmw";
+    "swift-cmark" = "1qswlh6j9mlfq8qj7xfqspla7w7rrzvplgcs4mgllgi012yfgwnp";
+    "swift-crypto" = "020b8q4ss2k7a65r5dgh59z40i6sn7ij1allxkh8c8a9d0jzn313";
+    "swift-docc-plugin" = "11d6nhi139yzk1lxxrixsbgyj1bnvmh40wj30y725q83nqq49ljh";
+    "swift-docc-symbolkit" = "14w37wzbx1mygfwm4iv0ypj120n1axhk627rg5a7v8j0ln511r7s";
+    "swift-lmdb" = "0azmc24mnxn4pbda8w8v7hy3h0gqqm4br43pnr7lc4sfj3dcv43m";
+    "swift-markdown" = "1l4ydc0xyv88gnyc33p61qavdh8cv98c548n1icphrfd6i78yygw";
+    "swift-nio" = "04bvay94b34ynmlvgyl9a7f431l3cf8k2zr483spv8mvyh1hxiqn";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/workspace-state.json b/nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/workspace-state.json
new file mode 100644
index 000000000000..699de93f7907
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-docc/generated/workspace-state.json
@@ -0,0 +1,144 @@
+{
+  "object": {
+    "artifacts": [],
+    "dependencies": [
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-argument-parser",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-argument-parser",
+          "name": "swift-argument-parser"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
+            "version": "1.0.3"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-argument-parser"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-cmark",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-cmark.git",
+          "name": "cmark-gfm"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "gfm",
+            "revision": "eb9a6a357b6816c68f4b194eaa5b67f3cd1fa5c3"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-cmark"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-crypto",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-crypto.git",
+          "name": "swift-crypto"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "ddb07e896a2a8af79512543b1c7eb9797f8898a5",
+            "version": "1.1.7"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-crypto"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-docc-plugin",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-docc-plugin",
+          "name": "SwiftDocCPlugin"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "3303b164430d9a7055ba484c8ead67a52f7b74f6",
+            "version": "1.0.0"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-docc-plugin"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-docc-symbolkit",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-docc-symbolkit",
+          "name": "SymbolKit"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "main",
+            "revision": "b45d1f2ed151d057b54504d653e0da5552844e34"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-docc-symbolkit"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-lmdb",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-lmdb.git",
+          "name": "CLMDB"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "main",
+            "revision": "584941b1236b15bad74d8163785d389c028b1ad8"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-lmdb"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-markdown",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-markdown.git",
+          "name": "swift-markdown"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "main",
+            "revision": "d491147940587dbadfb3472354f4d0c6e063e061"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-markdown"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-nio",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-nio.git",
+          "name": "swift-nio"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "1d425b0851ffa2695d488cce1d68df2539f42500",
+            "version": "2.31.2"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-nio"
+      }
+    ]
+  },
+  "version": 6
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/default.nix b/nixpkgs/pkgs/development/compilers/swift/swift-driver/default.nix
new file mode 100644
index 000000000000..d69a4da0eb3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/default.nix
@@ -0,0 +1,80 @@
+{ lib
+, stdenv
+, callPackage
+, fetchpatch
+, swift
+, swiftpm
+, swiftpm2nix
+, Foundation
+, XCTest
+, sqlite
+, ncurses
+, substituteAll
+}:
+let
+  sources = callPackage ../sources.nix { };
+  generated = swiftpm2nix.helpers ./generated;
+
+  # On Darwin, we only want ncurses in the linker search path, because headers
+  # are part of libsystem. Adding its headers to the search path causes strange
+  # mixing and errors.
+  # TODO: Find a better way to prevent this conflict.
+  ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses;
+in
+stdenv.mkDerivation {
+  pname = "swift-driver";
+
+  inherit (sources) version;
+  src = sources.swift-driver;
+
+  nativeBuildInputs = [ swift swiftpm ];
+  buildInputs = [
+    Foundation
+    XCTest
+    sqlite
+    ncursesInput
+  ];
+
+  patches = [
+    ./patches/nix-resource-root.patch
+    ./patches/disable-catalyst.patch
+    ./patches/linux-fix-linking.patch
+    # TODO: Replace with branch patch once merged:
+    # https://github.com/apple/swift-driver/pull/1197
+    (fetchpatch {
+      url = "https://github.com/apple/swift-driver/commit/d3ef9cdf4871a58eddec7ff0e28fe611130da3f9.patch";
+      hash = "sha256-eVBaKN6uzj48ZnHtwGV0k5ChKjak1tDCyE+wTdyGq2c=";
+    })
+    # Prevent a warning about SDK directories we don't have.
+    (substituteAll {
+      src = ./patches/prevent-sdk-dirs-warnings.patch;
+      inherit (builtins) storeDir;
+    })
+  ];
+
+  configurePhase = generated.configure + ''
+    swiftpmMakeMutable swift-tools-support-core
+    patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
+  '';
+
+  # TODO: Tests depend on indexstore-db being provided by an existing Swift
+  # toolchain. (ie. looks for `../lib/libIndexStore.so` relative to swiftc.
+  #doCheck = true;
+
+  # TODO: Darwin-specific installation includes more, but not sure why.
+  installPhase = ''
+    binPath="$(swiftpmBinPath)"
+    mkdir -p $out/bin
+    for executable in swift-driver swift-help swift-build-sdk-interfaces; do
+      cp $binPath/$executable $out/bin/
+    done
+  '';
+
+  meta = {
+    description = "Swift compiler driver";
+    homepage = "https://github.com/apple/swift-driver";
+    platforms = with lib.platforms; linux ++ darwin;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/default.nix b/nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/default.nix
new file mode 100644
index 000000000000..cb6f3cca078e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/default.nix
@@ -0,0 +1,11 @@
+# This file was generated by swiftpm2nix.
+{
+  workspaceStateFile = ./workspace-state.json;
+  hashes = {
+    "swift-argument-parser" = "1jph9w7lk9nr20fsv2c8p4hisx3dda817fh7pybd0r0j1jwa9nmw";
+    "swift-llbuild" = "106vnssh6pgy5s9dnq1hi1c9v2wkfydqgncg5dy7c9n23iisjy3s";
+    "swift-system" = "0402hkx2q2dv27gccnn8ma79ngvwiwzkhcv4zlcdldmy6cgi0px7";
+    "swift-tools-support-core" = "1qvblyiazv58qwyxgyk2dh5ymbab3y70vm2q81qs6rmv43hs8ciz";
+    "Yams" = "11abhcfkmqm3cmh7vp7rqzvxd1zj02j2866a2pp6v9m89456xb76";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/workspace-state.json b/nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/workspace-state.json
new file mode 100644
index 000000000000..09f0b7398d97
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/generated/workspace-state.json
@@ -0,0 +1,93 @@
+{
+  "object": {
+    "artifacts": [],
+    "dependencies": [
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-argument-parser",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-argument-parser.git",
+          "name": "swift-argument-parser"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
+            "version": "1.0.3"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-argument-parser"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-llbuild",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-llbuild.git",
+          "name": "llbuild"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "dccfc2e127a34b89a849407594cf2d604b598ba9"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-llbuild"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-system",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-system.git",
+          "name": "swift-system"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "836bc4557b74fe6d2660218d56e3ce96aff76574",
+            "version": "1.1.1"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-system"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-tools-support-core",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-tools-support-core.git",
+          "name": "swift-tools-support-core"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "ac4871e01ef338cb95b5d28328cab0ec1dfae935"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-tools-support-core"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "yams",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/jpsim/Yams.git",
+          "name": "Yams"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "01835dc202670b5bb90d07f3eae41867e9ed29f6",
+            "version": "5.0.1"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "Yams"
+      }
+    ]
+  },
+  "version": 6
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/disable-catalyst.patch b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/disable-catalyst.patch
new file mode 100644
index 000000000000..b9eb23f21061
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/disable-catalyst.patch
@@ -0,0 +1,17 @@
+Tries to parse SDKSettings.plist looking for a Catalyst version map, but we
+don't currently support this.
+
+--- a/Sources/SwiftDriver/Toolchains/DarwinToolchain.swift
++++ b/Sources/SwiftDriver/Toolchains/DarwinToolchain.swift
+@@ -297,11 +297,7 @@ public final class DarwinToolchain: Toolchain {
+                                                debugDescription: "Malformed version string")
+       }
+       self.version = version
+-      if self.canonicalName.hasPrefix("macosx") {
+-        self.versionMap = try keyedContainer.decode(VersionMap.self, forKey: .versionMap)
+-      } else {
+         self.versionMap = VersionMap()
+-      }
+     }
+ 
+ 
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/force-unwrap-file-handles.patch b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/force-unwrap-file-handles.patch
new file mode 100644
index 000000000000..a2f2d38c37c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/force-unwrap-file-handles.patch
@@ -0,0 +1,33 @@
+From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloom@riseup.net>
+Date: Tue, 21 Nov 2023 20:53:33 +0300
+Subject: [PATCH] Force-unwrap file handles.
+
+---
+ Sources/TSCBasic/FileSystem.swift | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
+index 3a63bdf..a1f3d9d 100644
+--- a/Sources/TSCBasic/FileSystem.swift
++++ b/Sources/TSCBasic/FileSystem.swift
+@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Read the data one block at a time.
+         let data = BufferedOutputByteStream()
+@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Write the data in one chunk.
+         var contents = bytes.contents
+--
+2.42.0
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/linux-fix-linking.patch b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/linux-fix-linking.patch
new file mode 100644
index 000000000000..8f91b3a234b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/linux-fix-linking.patch
@@ -0,0 +1,40 @@
+--- a/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
++++ b/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
+@@ -10,6 +10,7 @@
+ //
+ //===----------------------------------------------------------------------===//
+ 
++import Foundation
+ import SwiftOptions
+ 
+ import func TSCBasic.lookupExecutablePath
+@@ -120,7 +121,20 @@ extension GenericUnixToolchain {
+       // just using `clang` and avoid a dependency on the C++ runtime.
+       let clangTool: Tool =
+         parsedOptions.hasArgument(.enableExperimentalCxxInterop) ? .clangxx : .clang
+-      var clangPath = try getToolPath(clangTool)
++
++      // For Nix, prefer linking using the wrapped system clang, instead of using
++      // the unwrapped clang packaged with swift. The latter is unable to link, but
++      // we still want to use it for other purposes (clang importer).
++      var clangPath: AbsolutePath
++      let env = ProcessInfo.processInfo.environment
++      if let nixCC = env["NIX_CC"],
++         let binPath = try? AbsolutePath(validating: "\(nixCC)/bin"),
++         let tool = lookupExecutablePath(filename: parsedOptions.hasArgument(.enableExperimentalCxxInterop)
++                                                        ? "clang++" : "clang",
++                                         searchPaths: [binPath]) {
++        clangPath = tool
++      } else {
++      clangPath = try getToolPath(clangTool)
+       if let toolsDirPath = parsedOptions.getLastArgument(.toolsDirectory) {
+         // FIXME: What if this isn't an absolute path?
+         let toolsDir = try AbsolutePath(validating: toolsDirPath.asSingle)
+@@ -136,6 +150,7 @@ extension GenericUnixToolchain {
+         commandLine.appendFlag("-B")
+         commandLine.appendPath(toolsDir)
+       }
++      } // nixCC
+ 
+       // Executables on Linux get -pie
+       if targetTriple.os == .linux && linkerOutputType == .executable {
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch
new file mode 100644
index 000000000000..8c24db5aad1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/nix-resource-root.patch
@@ -0,0 +1,28 @@
+Swift normally looks for the Clang resource dir in a subdir/symlink of its own
+resource dir. We provide a symlink to the Swift build-time Clang as a default
+there, but we also here patch a check to try locate it via NIX_CC.
+
+--- a/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
++++ b/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
+@@ -10,6 +10,7 @@
+ //
+ //===----------------------------------------------------------------------===//
+ 
++import Foundation
+ import SwiftOptions
+ 
+ import protocol TSCBasic.FileSystem
+@@ -26,6 +27,13 @@ extension Toolchain {
+     for targetInfo: FrontendTargetInfo,
+     parsedOptions: inout ParsedOptions
+   ) throws -> VirtualPath {
++    let env = ProcessInfo.processInfo.environment
++    if let nixCC = env["NIX_CC"] {
++      return try VirtualPath(path: nixCC)
++        .appending(components: "resource-root", "lib",
++                   targetInfo.target.triple.platformName(conflatingDarwin: true)!)
++    }
++
+     return VirtualPath.lookup(targetInfo.runtimeResourcePath.path)
+       .appending(components: "clang", "lib",
+                  targetInfo.target.triple.platformName(conflatingDarwin: true)!)
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/prevent-sdk-dirs-warnings.patch b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/prevent-sdk-dirs-warnings.patch
new file mode 100644
index 000000000000..6080865ebe37
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-driver/patches/prevent-sdk-dirs-warnings.patch
@@ -0,0 +1,16 @@
+Prevents a user-visible warning on every compilation:
+
+  ld: warning: directory not found for option '-L.../MacOSX11.0.sdk/usr/lib/swift'
+
+--- a/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
++++ b/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
+@@ -50,7 +50,9 @@ extension Toolchain {
+         result.append(sdkPath.appending(components: "System", "iOSSupport", "usr", "lib", "swift"))
+       }
+ 
++      if sdkPath.absolutePath?.pathString.starts(with: "@storeDir@") == false {
+       result.append(sdkPath.appending(components: "usr", "lib", "swift"))
++      }
+     }
+ 
+     return result
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-format/default.nix b/nixpkgs/pkgs/development/compilers/swift/swift-format/default.nix
new file mode 100644
index 000000000000..2f7e630e6804
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-format/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, callPackage
+, swift
+, swiftpm
+, swiftpm2nix
+, Foundation
+}:
+let
+  sources = callPackage ../sources.nix { };
+  generated = swiftpm2nix.helpers ./generated;
+in
+stdenv.mkDerivation {
+  pname = "swift-format";
+
+  inherit (sources) version;
+  src = sources.swift-format;
+
+  nativeBuildInputs = [ swift swiftpm ];
+  buildInputs = [ Foundation ];
+
+  configurePhase = generated.configure + ''
+    swiftpmMakeMutable swift-tools-support-core
+    patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
+  '';
+
+  # We only install the swift-format binary, so don't need the other products.
+  swiftpmFlags = [ "--product swift-format" ];
+
+  installPhase = ''
+    binPath="$(swiftpmBinPath)"
+    mkdir -p $out/bin
+    cp $binPath/swift-format $out/bin/
+  '';
+
+  meta = {
+    description = "Formatting technology for Swift source code";
+    homepage = "https://github.com/apple/swift-format";
+    platforms = with lib.platforms; linux ++ darwin;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+    mainProgram = "swift-format";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-format/generated/default.nix b/nixpkgs/pkgs/development/compilers/swift/swift-format/generated/default.nix
new file mode 100644
index 000000000000..ec4969bc60b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-format/generated/default.nix
@@ -0,0 +1,10 @@
+# This file was generated by swiftpm2nix.
+{
+  workspaceStateFile = ./workspace-state.json;
+  hashes = {
+    "swift-argument-parser" = "01p814snzlfpby2qj67a3dcnsa6038fbk8411npi28440w1hzpzx";
+    "swift-syntax" = "05394mzznmcrw246lyzsjsn1fmilj98jgkjyyxr2ynhnbgzp2jl2";
+    "swift-system" = "0402hkx2q2dv27gccnn8ma79ngvwiwzkhcv4zlcdldmy6cgi0px7";
+    "swift-tools-support-core" = "16kp0y1akr99v319j46x0zwc8kzh5klnqcvjhsb57ah5xr0l29bk";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-format/generated/workspace-state.json b/nixpkgs/pkgs/development/compilers/swift/swift-format/generated/workspace-state.json
new file mode 100644
index 000000000000..b726eefc56ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-format/generated/workspace-state.json
@@ -0,0 +1,76 @@
+{
+  "object": {
+    "artifacts": [],
+    "dependencies": [
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-argument-parser",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-argument-parser.git",
+          "name": "swift-argument-parser"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "main",
+            "revision": "c5050aa63ed5bb23209e7120b7ff6618ee06e0ee"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-argument-parser"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-syntax",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-syntax.git",
+          "name": "SwiftSyntax"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "main",
+            "revision": "cd793adf5680e138bf2bcbaacc292490175d0dcd"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-syntax"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-system",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-system.git",
+          "name": "swift-system"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "836bc4557b74fe6d2660218d56e3ce96aff76574",
+            "version": "1.1.1"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-system"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-tools-support-core",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-tools-support-core.git",
+          "name": "swift-tools-support-core"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "main",
+            "revision": "1296d2f11b0226c4b83540010936c7238d21c12b"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-tools-support-core"
+      }
+    ]
+  },
+  "version": 6
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swift-format/patches/force-unwrap-file-handles.patch b/nixpkgs/pkgs/development/compilers/swift/swift-format/patches/force-unwrap-file-handles.patch
new file mode 100644
index 000000000000..a2f2d38c37c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swift-format/patches/force-unwrap-file-handles.patch
@@ -0,0 +1,33 @@
+From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloom@riseup.net>
+Date: Tue, 21 Nov 2023 20:53:33 +0300
+Subject: [PATCH] Force-unwrap file handles.
+
+---
+ Sources/TSCBasic/FileSystem.swift | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
+index 3a63bdf..a1f3d9d 100644
+--- a/Sources/TSCBasic/FileSystem.swift
++++ b/Sources/TSCBasic/FileSystem.swift
+@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Read the data one block at a time.
+         let data = BufferedOutputByteStream()
+@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Write the data in one chunk.
+         var contents = bytes.contents
+--
+2.42.0
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/cmake-glue.nix b/nixpkgs/pkgs/development/compilers/swift/swiftpm/cmake-glue.nix
new file mode 100644
index 000000000000..252040dd3ec0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/cmake-glue.nix
@@ -0,0 +1,87 @@
+# SwiftPM dependencies are normally not installed using CMake, and only provide
+# CMake modules to link them together in a build tree. We have separate
+# derivations, so need a real install step. Here we provide our own minimal
+# CMake modules to install along with the build products.
+{ lib, stdenv, swift }:
+let
+
+  inherit (stdenv.hostPlatform) extensions;
+
+  # This file exports shell snippets for use in postInstall.
+  mkInstallScript = module: template: ''
+    mkdir -p $out/lib/cmake/${module}
+    (
+      export staticLibExt="${extensions.staticLibrary}"
+      export sharedLibExt="${extensions.sharedLibrary}"
+      export swiftOs="${swift.swiftOs}"
+      substituteAll \
+        ${builtins.toFile "${module}Config.cmake" template} \
+        $out/lib/cmake/${module}/${module}Config.cmake
+    )
+  '';
+
+in lib.mapAttrs mkInstallScript {
+  SwiftSystem = ''
+    add_library(SwiftSystem::SystemPackage STATIC IMPORTED)
+    set_property(TARGET SwiftSystem::SystemPackage PROPERTY IMPORTED_LOCATION "@out@/lib/swift_static/@swiftOs@/libSystemPackage@staticLibExt@")
+  '';
+
+  SwiftCollections = ''
+    add_library(SwiftCollections::Collections STATIC IMPORTED)
+    set_property(TARGET SwiftCollections::Collections PROPERTY IMPORTED_LOCATION "@out@/lib/swift_static/@swiftOs@/libCollections@staticLibExt@")
+
+    add_library(SwiftCollections::DequeModule STATIC IMPORTED)
+    set_property(TARGET SwiftCollections::DequeModule PROPERTY IMPORTED_LOCATION "@out@/lib/swift_static/@swiftOs@/libDequeModule@staticLibExt@")
+
+    add_library(SwiftCollections::OrderedCollections STATIC IMPORTED)
+    set_property(TARGET SwiftCollections::OrderedCollections PROPERTY IMPORTED_LOCATION "@out@/lib/swift_static/@swiftOs@/libOrderedCollections@staticLibExt@")
+  '';
+
+  TSC = ''
+    add_library(TSCLibc SHARED IMPORTED)
+    set_property(TARGET TSCLibc PROPERTY IMPORTED_LOCATION "@out@/lib/libTSCLibc@sharedLibExt@")
+
+    add_library(TSCBasic SHARED IMPORTED)
+    set_property(TARGET TSCBasic PROPERTY IMPORTED_LOCATION "@out@/lib/libTSCBasic@sharedLibExt@")
+
+    add_library(TSCUtility SHARED IMPORTED)
+    set_property(TARGET TSCUtility PROPERTY IMPORTED_LOCATION "@out@/lib/libTSCUtility@sharedLibExt@")
+  '';
+
+  ArgumentParser = ''
+    add_library(ArgumentParser SHARED IMPORTED)
+    set_property(TARGET ArgumentParser PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libArgumentParser@sharedLibExt@")
+
+    add_library(ArgumentParserToolInfo SHARED IMPORTED)
+    set_property(TARGET ArgumentParserToolInfo PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libArgumentParserToolInfo@sharedLibExt@")
+  '';
+
+  Yams = ''
+    add_library(Yams SHARED IMPORTED)
+    set_property(TARGET Yams PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libYams@sharedLibExt@")
+  '';
+
+  LLBuild = ''
+    add_library(libllbuild SHARED IMPORTED)
+    set_property(TARGET libllbuild PROPERTY IMPORTED_LOCATION "@out@/lib/libllbuild@sharedLibExt@")
+
+    add_library(llbuildSwift SHARED IMPORTED)
+    set_property(TARGET llbuildSwift PROPERTY IMPORTED_LOCATION "@out@/lib/swift/pm/llbuild/libllbuildSwift@sharedLibExt@")
+  '';
+
+  SwiftDriver = ''
+    add_library(SwiftDriver SHARED IMPORTED)
+    set_property(TARGET SwiftDriver PROPERTY IMPORTED_LOCATION "@out@/lib/libSwiftDriver@sharedLibExt@")
+
+    add_library(SwiftDriverExecution SHARED IMPORTED)
+    set_property(TARGET SwiftDriverExecution PROPERTY IMPORTED_LOCATION "@out@/lib/libSwiftDriverExecution@sharedLibExt@")
+
+    add_library(SwiftOptions SHARED IMPORTED)
+    set_property(TARGET SwiftOptions PROPERTY IMPORTED_LOCATION "@out@/lib/libSwiftOptions@sharedLibExt@")
+  '';
+
+  SwiftCrypto = ''
+    add_library(Crypto SHARED IMPORTED)
+    set_property(TARGET Crypto PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@")
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/default.nix b/nixpkgs/pkgs/development/compilers/swift/swiftpm/default.nix
new file mode 100644
index 000000000000..4a7a4ab63cce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/default.nix
@@ -0,0 +1,453 @@
+{ lib
+, stdenv
+, callPackage
+, cmake
+, ninja
+, git
+, swift
+, swiftpm2nix
+, Foundation
+, XCTest
+, pkg-config
+, sqlite
+, ncurses
+, substituteAll
+, runCommandLocal
+, makeWrapper
+, DarwinTools # sw_vers
+, cctools # vtool
+, xcbuild
+, CryptoKit
+, LocalAuthentication
+}:
+
+let
+
+  inherit (swift) swiftOs swiftModuleSubdir swiftStaticModuleSubdir;
+  sharedLibraryExt = stdenv.hostPlatform.extensions.sharedLibrary;
+
+  sources = callPackage ../sources.nix { };
+  generated = swiftpm2nix.helpers ./generated;
+  cmakeGlue = callPackage ./cmake-glue.nix { };
+
+  # Common attributes for the bootstrap swiftpm and the final swiftpm.
+  commonAttrs = {
+    inherit (sources) version;
+    src = sources.swift-package-manager;
+    nativeBuildInputs = [ makeWrapper ];
+    # Required at run-time for the host platform to build package manifests.
+    propagatedBuildInputs = [ Foundation ];
+    patches = [
+      ./patches/cmake-disable-rpath.patch
+      ./patches/cmake-fix-quoting.patch
+      ./patches/disable-index-store.patch
+      ./patches/disable-sandbox.patch
+      ./patches/disable-xctest.patch
+      ./patches/fix-clang-cxx.patch
+      ./patches/nix-pkgconfig-vars.patch
+      (substituteAll {
+        src = ./patches/fix-stdlib-path.patch;
+        inherit (builtins) storeDir;
+        swiftLib = swift.swift.lib;
+      })
+    ];
+    postPatch = ''
+      # The location of xcrun is hardcoded. We need PATH lookup instead.
+      find Sources -name '*.swift' | xargs sed -i -e 's|/usr/bin/xcrun|xcrun|g'
+
+      # Patch the location where swiftpm looks for its API modules.
+      substituteInPlace Sources/PackageModel/UserToolchain.swift \
+        --replace \
+          'librariesPath = applicationPath.parentDirectory' \
+          "librariesPath = AbsolutePath(\"$out\")"
+
+      # Fix case-sensitivity issues.
+      # Upstream PR: https://github.com/apple/swift-package-manager/pull/6500
+      substituteInPlace Sources/CMakeLists.txt \
+        --replace \
+          'packageCollectionsSigning' \
+          'PackageCollectionsSigning'
+      substituteInPlace Sources/PackageCollectionsSigning/CMakeLists.txt \
+        --replace \
+          'SubjectPublickeyInfo' \
+          'SubjectPublicKeyInfo'
+      substituteInPlace Sources/PackageCollections/CMakeLists.txt \
+        --replace \
+          'FilepackageCollectionsSourcesStorage' \
+          'FilePackageCollectionsSourcesStorage'
+    '';
+  };
+
+  # Tools invoked by swiftpm at run-time.
+  runtimeDeps = [ git ]
+    ++ lib.optionals stdenv.isDarwin [
+      xcbuild.xcrun
+      # These tools are part of cctools, but adding that as a build input puts
+      # an unwrapped linker in PATH, and breaks builds. This small derivation
+      # exposes just the tools we need:
+      # - vtool is used to determine a minimum deployment target.
+      # - libtool is used to build static libraries.
+      (runCommandLocal "swiftpm-cctools" { } ''
+        mkdir -p $out/bin
+        ln -s ${cctools}/bin/vtool $out/bin/vtool
+        ln -s ${cctools}/bin/libtool $out/bin/libtool
+      '')
+    ];
+
+  # Common attributes for the bootstrap derivations.
+  mkBootstrapDerivation = attrs: stdenv.mkDerivation (attrs // {
+    nativeBuildInputs = (attrs.nativeBuildInputs or [ ])
+      ++ [ cmake ninja swift ]
+      ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
+
+    buildInputs = (attrs.buildInputs or [ ])
+      ++ [ Foundation ];
+
+    postPatch = (attrs.postPatch or "")
+      + lib.optionalString stdenv.isDarwin ''
+        # On Darwin only, Swift uses arm64 as cpu arch.
+        if [ -e cmake/modules/SwiftSupport.cmake ]; then
+          substituteInPlace cmake/modules/SwiftSupport.cmake \
+            --replace '"aarch64" PARENT_SCOPE' '"arm64" PARENT_SCOPE'
+        fi
+      '';
+
+    preConfigure = (attrs.preConfigure or "")
+      + ''
+        # Builds often don't set a target, and our default minimum macOS deployment
+        # target on x86_64-darwin is too low. Harmless on non-Darwin.
+        export MACOSX_DEPLOYMENT_TARGET=10.15.4
+      '';
+
+    postInstall = (attrs.postInstall or "")
+      + lib.optionalString stdenv.isDarwin ''
+        # The install name of libraries is incorrectly set to lib/ (via our
+        # CMake setup hook) instead of lib/swift/. This'd be easily fixed by
+        # fixDarwinDylibNames, but some builds create libraries that reference
+        # eachother, and we also have to fix those references.
+        dylibs="$(find $out/lib/swift* -name '*.dylib')"
+        changes=""
+        for dylib in $dylibs; do
+          changes+=" -change $(otool -D $dylib | tail -n 1) $dylib"
+        done
+        for dylib in $dylibs; do
+          install_name_tool -id $dylib $changes $dylib
+        done
+      '';
+
+    cmakeFlags = (attrs.cmakeFlags or [ ])
+      ++ [
+        # Some builds link to libraries within the same build. Make sure these
+        # create references to $out. None of our builds run their own products,
+        # so we don't have to account for that scenario.
+        "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
+      ];
+  });
+
+  # On Darwin, we only want ncurses in the linker search path, because headers
+  # are part of libsystem. Adding its headers to the search path causes strange
+  # mixing and errors.
+  # TODO: Find a better way to prevent this conflict.
+  ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses;
+
+  # Derivations for bootstrapping dependencies using CMake.
+  # This is based on the `swiftpm/Utilities/bootstrap` script.
+  #
+  # Some of the installation steps here are a bit hacky, because it seems like
+  # these packages were not really meant to be installed using CMake. The
+  # regular swiftpm bootstrap simply refers to the source and build
+  # directories. The advantage of separate builds is that we can more easily
+  # link libs together using existing Nixpkgs infra.
+  #
+  # In the end, we don't expose these derivations, and they only exist during
+  # the bootstrap phase. The final swiftpm derivation does not depend on them.
+
+  swift-system = mkBootstrapDerivation {
+    name = "swift-system";
+    src = generated.sources.swift-system;
+
+    postInstall = cmakeGlue.SwiftSystem
+      + lib.optionalString (!stdenv.isDarwin) ''
+        # The cmake rules apparently only use the Darwin install convention.
+        # Fix up the installation so the module can be found on non-Darwin.
+        mkdir -p $out/${swiftStaticModuleSubdir}
+        mv $out/lib/swift_static/${swiftOs}/*.swiftmodule $out/${swiftStaticModuleSubdir}/
+      '';
+  };
+
+  swift-collections = mkBootstrapDerivation {
+    name = "swift-collections";
+    src = generated.sources.swift-collections;
+
+    postPatch = ''
+      # Only builds static libs on Linux, but this installation difference is a
+      # hassle. Because this installation is temporary for the bootstrap, may
+      # as well build static libs everywhere.
+      sed -i -e '/BUILD_SHARED_LIBS/d' CMakeLists.txt
+    '';
+
+    postInstall = cmakeGlue.SwiftCollections
+      + lib.optionalString (!stdenv.isDarwin) ''
+        # The cmake rules apparently only use the Darwin install convention.
+        # Fix up the installation so the module can be found on non-Darwin.
+        mkdir -p $out/${swiftStaticModuleSubdir}
+        mv $out/lib/swift_static/${swiftOs}/*.swiftmodule $out/${swiftStaticModuleSubdir}/
+      '';
+  };
+
+  swift-tools-support-core = mkBootstrapDerivation {
+    name = "swift-tools-support-core";
+    src = generated.sources.swift-tools-support-core;
+
+    patches = [
+      ./patches/force-unwrap-file-handles.patch
+    ];
+
+    buildInputs = [
+      swift-system
+      sqlite
+    ];
+
+    postInstall = cmakeGlue.TSC + ''
+      # Swift modules are not installed.
+      mkdir -p $out/${swiftModuleSubdir}
+      cp swift/*.swift{module,doc} $out/${swiftModuleSubdir}/
+
+      # Static libs are not installed.
+      cp lib/*.a $out/lib/
+
+      # Headers are not installed.
+      mkdir -p $out/include
+      cp -r ../Sources/TSCclibc/include $out/include/TSC
+    '';
+  };
+
+  swift-argument-parser = mkBootstrapDerivation {
+    name = "swift-argument-parser";
+    src = generated.sources.swift-argument-parser;
+
+    buildInputs = [ ncursesInput sqlite ];
+
+    cmakeFlags = [
+      "-DBUILD_TESTING=NO"
+      "-DBUILD_EXAMPLES=NO"
+    ];
+
+    postInstall = cmakeGlue.ArgumentParser
+      + lib.optionalString stdenv.isLinux ''
+        # Fix rpath so ArgumentParserToolInfo can be found.
+        patchelf --add-rpath "$out/lib/swift/${swiftOs}" \
+          $out/lib/swift/${swiftOs}/libArgumentParser.so
+      '';
+  };
+
+  Yams = mkBootstrapDerivation {
+    name = "Yams";
+    src = generated.sources.Yams;
+
+    # Conflicts with BUILD file on case-insensitive filesystems.
+    cmakeBuildDir = "_build";
+
+    postInstall = cmakeGlue.Yams;
+  };
+
+  llbuild = mkBootstrapDerivation {
+    name = "llbuild";
+    src = generated.sources.swift-llbuild;
+
+    nativeBuildInputs = lib.optional stdenv.isDarwin xcbuild;
+    buildInputs = [ ncursesInput sqlite ];
+
+    patches = [
+      ./patches/llbuild-cmake-disable-rpath.patch
+    ];
+
+    postPatch = ''
+      # Substitute ncurses for curses.
+      find . -name CMakeLists.txt | xargs sed -i -e 's/curses/ncurses/'
+
+      # Use absolute install names instead of rpath.
+      substituteInPlace \
+        products/libllbuild/CMakeLists.txt \
+        products/llbuildSwift/CMakeLists.txt \
+        --replace '@rpath' "$out/lib"
+
+      # This subdirectory is enabled for Darwin only, but requires ObjC XCTest
+      # (and only Swift XCTest is open source).
+      substituteInPlace perftests/CMakeLists.txt \
+        --replace 'add_subdirectory(Xcode/' '#add_subdirectory(Xcode/'
+    '';
+
+    cmakeFlags = [
+      "-DLLBUILD_SUPPORT_BINDINGS=Swift"
+    ];
+
+    postInstall = cmakeGlue.LLBuild + ''
+      # Install module map.
+      cp ../products/libllbuild/include/module.modulemap $out/include
+
+      # Swift modules are not installed.
+      mkdir -p $out/${swiftModuleSubdir}
+      cp products/llbuildSwift/*.swift{module,doc} $out/${swiftModuleSubdir}/
+    '';
+  };
+
+  swift-driver = mkBootstrapDerivation {
+    name = "swift-driver";
+    src = generated.sources.swift-driver;
+
+    buildInputs = [
+      Yams
+      llbuild
+      swift-system
+      swift-argument-parser
+      swift-tools-support-core
+    ];
+
+    postPatch = ''
+      # Tries to link against CYaml, but that's private.
+      substituteInPlace Sources/SwiftDriver/CMakeLists.txt \
+        --replace CYaml ""
+    '';
+
+    postInstall = cmakeGlue.SwiftDriver + ''
+      # Swift modules are not installed.
+      mkdir -p $out/${swiftModuleSubdir}
+      cp swift/*.swift{module,doc} $out/${swiftModuleSubdir}/
+    '';
+  };
+
+  swift-crypto = mkBootstrapDerivation {
+    name = "swift-crypto";
+    src = generated.sources.swift-crypto;
+
+    postPatch = ''
+      # Fix use of hardcoded tool paths on Darwin.
+      substituteInPlace CMakeLists.txt \
+        --replace /usr/bin/ar $NIX_CC/bin/ar
+      substituteInPlace CMakeLists.txt \
+        --replace /usr/bin/ranlib $NIX_CC/bin/ranlib
+    '';
+
+    postInstall = cmakeGlue.SwiftCrypto + ''
+      # Static libs are not installed.
+      cp lib/*.a $out/lib/
+
+      # Headers are not installed.
+      cp -r ../Sources/CCryptoBoringSSL/include $out/include
+    '';
+  };
+
+  # Build a bootrapping swiftpm using CMake.
+  swiftpm-bootstrap = mkBootstrapDerivation (commonAttrs // {
+    pname = "swiftpm-bootstrap";
+
+    buildInputs = [
+      llbuild
+      sqlite
+      swift-argument-parser
+      swift-collections
+      swift-crypto
+      swift-driver
+      swift-system
+      swift-tools-support-core
+    ];
+
+    cmakeFlags = [
+      "-DUSE_CMAKE_INSTALL=ON"
+    ];
+
+    postInstall = ''
+      for program in $out/bin/swift-*; do
+        wrapProgram $program --prefix PATH : ${lib.makeBinPath runtimeDeps}
+      done
+    '';
+  });
+
+# Build the final swiftpm with the bootstrapping swiftpm.
+in stdenv.mkDerivation (commonAttrs // {
+  pname = "swiftpm";
+
+  nativeBuildInputs = commonAttrs.nativeBuildInputs ++ [
+    pkg-config
+    swift
+    swiftpm-bootstrap
+  ];
+  buildInputs = [
+    ncursesInput
+    sqlite
+    XCTest
+  ]
+    ++ lib.optionals stdenv.isDarwin [
+      CryptoKit
+      LocalAuthentication
+    ];
+
+  configurePhase = generated.configure + ''
+    # Functionality provided by Xcode XCTest, but not available in
+    # swift-corelibs-xctest.
+    swiftpmMakeMutable swift-tools-support-core
+    substituteInPlace .build/checkouts/swift-tools-support-core/Sources/TSCTestSupport/XCTestCasePerf.swift \
+      --replace 'canImport(Darwin)' 'false'
+    patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch}
+
+    # Prevent a warning about SDK directories we don't have.
+    swiftpmMakeMutable swift-driver
+    patch -p1 -d .build/checkouts/swift-driver -i ${substituteAll {
+      src = ../swift-driver/patches/prevent-sdk-dirs-warnings.patch;
+      inherit (builtins) storeDir;
+    }}
+  '';
+
+  buildPhase = ''
+    # Required to link with swift-corelibs-xctest on Darwin.
+    export SWIFTTSC_MACOS_DEPLOYMENT_TARGET=10.12
+
+    TERM=dumb swift-build -c release
+  '';
+
+  # TODO: Tests depend on indexstore-db being provided by an existing Swift
+  # toolchain. (ie. looks for `../lib/libIndexStore.so` relative to swiftc.
+  #doCheck = true;
+  #checkPhase = ''
+  #  TERM=dumb swift-test -c release
+  #'';
+
+  # The following is dervied from Utilities/bootstrap, see install_swiftpm.
+  installPhase = ''
+    binPath="$(swift-build --show-bin-path -c release)"
+
+    mkdir -p $out/bin $out/lib/swift
+
+    cp $binPath/swift-package-manager $out/bin/swift-package
+    wrapProgram $out/bin/swift-package \
+      --prefix PATH : ${lib.makeBinPath runtimeDeps}
+    for tool in swift-build swift-test swift-run swift-package-collection swift-experimental-destination; do
+      ln -s $out/bin/swift-package $out/bin/$tool
+    done
+
+    installSwiftpmModule() {
+      mkdir -p $out/lib/swift/pm/$2
+      cp $binPath/lib$1${sharedLibraryExt} $out/lib/swift/pm/$2/
+
+      if [[ -f $binPath/$1.swiftinterface ]]; then
+        cp $binPath/$1.swiftinterface $out/lib/swift/pm/$2/
+      else
+        cp -r $binPath/$1.swiftmodule $out/lib/swift/pm/$2/
+      fi
+      cp $binPath/$1.swiftdoc $out/lib/swift/pm/$2/
+    }
+    installSwiftpmModule PackageDescription ManifestAPI
+    installSwiftpmModule PackagePlugin PluginAPI
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    description = "The Package Manager for the Swift Programming Language";
+    homepage = "https://github.com/apple/swift-package-manager";
+    platforms = with lib.platforms; linux ++ darwin;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/default.nix b/nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/default.nix
new file mode 100644
index 000000000000..dbcd0f18e71f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/default.nix
@@ -0,0 +1,14 @@
+# This file was generated by swiftpm2nix.
+{
+  workspaceStateFile = ./workspace-state.json;
+  hashes = {
+    "swift-argument-parser" = "1jph9w7lk9nr20fsv2c8p4hisx3dda817fh7pybd0r0j1jwa9nmw";
+    "swift-collections" = "1k6sjx5rqmp3gklny77b480hyzy6gkhpi23r0s8ljfbrcwawgnan";
+    "swift-crypto" = "0kllp7j0hd8k67l9b9zr2c3ddc5bvshldchzivhcz3q31qvq9ag8";
+    "swift-driver" = "0cbvddj54k3sbw0vzlmzhccs7h43hi5kq6i3n2i0mysz3bf0c6zg";
+    "swift-llbuild" = "106vnssh6pgy5s9dnq1hi1c9v2wkfydqgncg5dy7c9n23iisjy3s";
+    "swift-system" = "0402hkx2q2dv27gccnn8ma79ngvwiwzkhcv4zlcdldmy6cgi0px7";
+    "swift-tools-support-core" = "1qvblyiazv58qwyxgyk2dh5ymbab3y70vm2q81qs6rmv43hs8ciz";
+    "Yams" = "0b4lprxl4f6yqq0djnp394mxgmsxm2pljr7fh4f6ihdhnpwfsfvl";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/workspace-state.json b/nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/workspace-state.json
new file mode 100644
index 000000000000..187df519fb7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/generated/workspace-state.json
@@ -0,0 +1,144 @@
+{
+  "object": {
+    "artifacts": [],
+    "dependencies": [
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-argument-parser",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-argument-parser.git",
+          "name": "swift-argument-parser"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
+            "version": "1.0.3"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-argument-parser"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-collections",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-collections.git",
+          "name": "swift-collections"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "937e904258d22af6e447a0b72c0bc67583ef64a2",
+            "version": "1.0.4"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-collections"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-crypto",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-crypto.git",
+          "name": "swift-crypto"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "75ec60b8b4cc0f085c3ac414f3dca5625fa3588e",
+            "version": "2.2.4"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-crypto"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-driver",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-driver.git",
+          "name": "swift-driver"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "7cfe0c0b6e6297efe88a3ce34e6138ee7eda969e"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-driver"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-llbuild",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-llbuild.git",
+          "name": "llbuild"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "dccfc2e127a34b89a849407594cf2d604b598ba9"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-llbuild"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-system",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-system.git",
+          "name": "swift-system"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "836bc4557b74fe6d2660218d56e3ce96aff76574",
+            "version": "1.1.1"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-system"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "swift-tools-support-core",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/apple/swift-tools-support-core.git",
+          "name": "swift-tools-support-core"
+        },
+        "state": {
+          "checkoutState": {
+            "branch": "release/5.8",
+            "revision": "ac4871e01ef338cb95b5d28328cab0ec1dfae935"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "swift-tools-support-core"
+      },
+      {
+        "basedOn": null,
+        "packageRef": {
+          "identity": "yams",
+          "kind": "remoteSourceControl",
+          "location": "https://github.com/jpsim/Yams.git",
+          "name": "Yams"
+        },
+        "state": {
+          "checkoutState": {
+            "revision": "f47ba4838c30dbd59998a4e4c87ab620ff959e8a",
+            "version": "5.0.5"
+          },
+          "name": "sourceControlCheckout"
+        },
+        "subpath": "Yams"
+      }
+    ]
+  },
+  "version": 6
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch
new file mode 100644
index 000000000000..9aeba452f9e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-disable-rpath.patch
@@ -0,0 +1,36 @@
+Disable rpath for the bootstrap build with CMake.
+
+--- a/Sources/PackageDescription/CMakeLists.txt
++++ b/Sources/PackageDescription/CMakeLists.txt
+@@ -31,14 +31,11 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
+   set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/ManifestAPI/PackageDescription.swiftinterface)
+   target_compile_options(PackageDescription PUBLIC
+     $<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>)
+-  target_link_options(PackageDescription PRIVATE
+-    "SHELL:-Xlinker -install_name -Xlinker @rpath/libPackageDescription.dylib")
+ endif()
+ 
+ set_target_properties(PackageDescription PROPERTIES
+     Swift_MODULE_NAME PackageDescription
+     Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/pm/ManifestAPI
+-    INSTALL_NAME_DIR \\@rpath
+     OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/ManifestAPI
+     OUTPUT_NAME PackageDescription
+     ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/ManifestAPI
+--- a/Sources/PackagePlugin/CMakeLists.txt
++++ b/Sources/PackagePlugin/CMakeLists.txt
+@@ -29,14 +29,11 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
+   set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/PluginAPI/PackagePlugin.swiftinterface)
+   target_compile_options(PackagePlugin PUBLIC
+     $<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>)
+-  target_link_options(PackagePlugin PRIVATE
+-    "SHELL:-Xlinker -install_name -Xlinker @rpath/libPackagePlugin.dylib")
+ endif()
+ 
+ set_target_properties(PackagePlugin PROPERTIES
+   Swift_MODULE_NAME PackagePlugin
+   Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/pm/PluginAPI
+-  INSTALL_NAME_DIR \\@rpath
+   OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/PluginAPI
+   OUTPUT_NAME PackagePlugin
+   ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/PluginAPI
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-fix-quoting.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-fix-quoting.patch
new file mode 100644
index 000000000000..04f51e9ec835
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/cmake-fix-quoting.patch
@@ -0,0 +1,12 @@
+--- a/Sources/PackageCollectionsSigning/CMakeLists.txt
++++ b/Sources/PackageCollectionsSigning/CMakeLists.txt
+@@ -43,6 +43,7 @@ target_link_libraries(PackageCollectionsSigning PUBLIC
+   PackageCollectionsModel
+   TSCBasic)
+ target_link_libraries(PackageCollectionsSigning PRIVATE
+-  PackageCollectionsSigningLibc
+-  $<$<PLATFORM_ID:Darwin>:SHELL:-Xlinker -framework -Xlinker Security>)
++  PackageCollectionsSigningLibc)
++target_link_options(PackageCollectionsSigning PRIVATE
++  "$<$<PLATFORM_ID:Darwin>:SHELL:-Xlinker -framework -Xlinker Security>")
+ 
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch
new file mode 100644
index 000000000000..bef8d43a0dbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-index-store.patch
@@ -0,0 +1,23 @@
+The `-index-store-path` option is an Apple extension not available in our
+Clang. Make it opt-in by default.
+
+(It is assumed the `target.type == test` check is for Xcode support, because
+there is no evidence of it in swift-corelibs-xctest.)
+
+--- a/Sources/Build/BuildPlan.swift
++++ b/Sources/Build/BuildPlan.swift
+@@ -103,14 +103,7 @@ extension BuildParameters {
+         case .off:
+             addIndexStoreArguments = false
+         case .auto:
+-            if configuration == .debug {
+-                addIndexStoreArguments = true
+-            } else if target.type == .test {
+-                // Test discovery requires an index store for the test target to discover the tests
+-                addIndexStoreArguments = true
+-            } else {
+                 addIndexStoreArguments = false
+-            }
+         }
+ 
+         if addIndexStoreArguments {
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-sandbox.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-sandbox.patch
new file mode 100644
index 000000000000..0c76d59f9dfb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-sandbox.patch
@@ -0,0 +1,21 @@
+Nix may already sandbox the build, in which case sandbox_apply will fail.
+
+--- a/Sources/Basics/Sandbox.swift
++++ b/Sources/Basics/Sandbox.swift
+@@ -33,12 +33,14 @@ public enum Sandbox {
+         readOnlyDirectories: [AbsolutePath] = []
+     ) throws -> [String] {
+         #if os(macOS)
++        let env = ProcessInfo.processInfo.environment
++        if env["NIX_BUILD_TOP"] == nil || env["IN_NIX_SHELL"] != nil {
+         let profile = try macOSSandboxProfile(strictness: strictness, writableDirectories: writableDirectories, readOnlyDirectories: readOnlyDirectories)
+         return ["/usr/bin/sandbox-exec", "-p", profile] + command
+-        #else
++        }
++        #endif
+         // rdar://40235432, rdar://75636874 tracks implementing sandboxes for other platforms.
+         return command
+-        #endif
+     }
+ 
+     /// Basic strictness level of a sandbox applied to a command line.
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-xctest.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-xctest.patch
new file mode 100644
index 000000000000..b587393dc2a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/disable-xctest.patch
@@ -0,0 +1,37 @@
+XCTest is not fully open-source, only the Swift library parts. We don't have a
+command-line runner available, so disable support.
+
+--- a/Sources/Commands/Utilities/TestingSupport.swift
++++ b/Sources/Commands/Utilities/TestingSupport.swift
+@@ -72,7 +72,7 @@ enum TestingSupport {
+     /// - Returns: Array of TestSuite
+     static func getTestSuites(fromTestAt path: AbsolutePath, swiftTool: SwiftTool, enableCodeCoverage: Bool, sanitizers: [Sanitizer]) throws -> [TestSuite] {
+         // Run the correct tool.
+-        #if os(macOS)
++        #if false
+         let data: String = try withTemporaryFile { tempFile in
+             let args = [try Self.xctestHelperPath(swiftTool: swiftTool).pathString, path.pathString, tempFile.path.pathString]
+             var env = try Self.constructTestEnvironment(
+--- a/Sources/swiftpm-xctest-helper/main.swift
++++ b/Sources/swiftpm-xctest-helper/main.swift
+@@ -11,8 +11,11 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #if os(macOS)
+-import XCTest
+ import func Darwin.C.exit
++print("Not supported in Nix.")
++exit(1)
++#if false
++import XCTest
+ 
+ /// A helper tool to get list of tests from a XCTest Bundle on macOS.
+ ///
+@@ -134,6 +137,7 @@ do {
+     exit(1)
+ }
+ 
++#endif // nix
+ #else
+ 
+ #if os(Windows)
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-clang-cxx.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-clang-cxx.patch
new file mode 100644
index 000000000000..93c43c664ed3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-clang-cxx.patch
@@ -0,0 +1,121 @@
+Swiftpm may invoke clang, not clang++, to compile C++. Our cc-wrapper also
+doesn't pick up the arguments that enable C++ compilation in this case. Patch
+swiftpm to properly invoke clang++.
+
+--- a/Sources/Build/BuildPlan.swift
++++ b/Sources/Build/BuildPlan.swift
+@@ -2089,7 +2089,7 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
+         for target in dependencies.staticTargets {
+             if case let target as ClangTarget = target.underlyingTarget, target.isCXX {
+                 if buildParameters.hostTriple.isDarwin() {
+-                    buildProduct.additionalFlags += ["-lc++"]
++                    buildProduct.additionalFlags += ["-lc++", "-lc++abi"]
+                 } else if buildParameters.hostTriple.isWindows() {
+                     // Don't link any C++ library.
+                 } else {
+--- a/Sources/Build/LLBuildManifestBuilder.swift
++++ b/Sources/Build/LLBuildManifestBuilder.swift
+@@ -786,7 +786,7 @@ extension LLBuildManifestBuilder {
+ 
+             args += ["-c", path.source.pathString, "-o", path.object.pathString]
+ 
+-            let clangCompiler = try buildParameters.toolchain.getClangCompiler().pathString
++            let clangCompiler = try buildParameters.toolchain.getClangCompiler(isCXX: isCXX).pathString
+             args.insert(clangCompiler, at: 0)
+ 
+             let objectFileNode: Node = .file(path.object)
+--- a/Sources/PackageModel/Toolchain.swift
++++ b/Sources/PackageModel/Toolchain.swift
+@@ -23,7 +23,7 @@ public protocol Toolchain {
+     var macosSwiftStdlib: AbsolutePath { get throws }
+ 
+     /// Path of the `clang` compiler.
+-    func getClangCompiler() throws -> AbsolutePath
++    func getClangCompiler(isCXX: Bool) throws -> AbsolutePath
+ 
+     // FIXME: This is a temporary API until index store is widely available in
+     // the OSS clang compiler. This API should not used for any other purpose.
+--- a/Sources/PackageModel/UserToolchain.swift
++++ b/Sources/PackageModel/UserToolchain.swift
+@@ -57,7 +57,7 @@ public final class UserToolchain: Toolchain {
+     /// Only use search paths, do not fall back to `xcrun`.
+     let useXcrun: Bool
+ 
+-    private var _clangCompiler: AbsolutePath?
++    private var _clangCompiler: [Bool: AbsolutePath] = [:]
+ 
+     private let environment: EnvironmentVariables
+ 
+@@ -196,29 +196,31 @@ public final class UserToolchain: Toolchain {
+     }
+ 
+     /// Returns the path to clang compiler tool.
+-    public func getClangCompiler() throws -> AbsolutePath {
++    public func getClangCompiler(isCXX: Bool) throws -> AbsolutePath {
+         // Check if we already computed.
+-        if let clang = self._clangCompiler {
++        if let clang = self._clangCompiler[isCXX] {
+             return clang
+         }
+ 
+         // Check in the environment variable first.
+-        if let toolPath = UserToolchain.lookup(variable: "CC", searchPaths: self.envSearchPaths, environment: environment) {
+-            self._clangCompiler = toolPath
++        let envVar = isCXX ? "CXX" : "CC";
++        if let toolPath = UserToolchain.lookup(variable: envVar, searchPaths: self.envSearchPaths, environment: environment) {
++            self._clangCompiler[isCXX] = toolPath
+             return toolPath
+         }
+ 
+         // Then, check the toolchain.
++        let tool = isCXX ? "clang++" : "clang";
+         do {
+-            if let toolPath = try? UserToolchain.getTool("clang", binDir: self.destination.toolchainBinDir) {
+-                self._clangCompiler = toolPath
++            if let toolPath = try? UserToolchain.getTool(tool, binDir: self.destination.binDir) {
++                self._clangCompiler[isCXX] = toolPath
+                 return toolPath
+             }
+         }
+ 
+         // Otherwise, lookup it up on the system.
+-        let toolPath = try UserToolchain.findTool("clang", envSearchPaths: self.envSearchPaths, useXcrun: useXcrun)
+-        self._clangCompiler = toolPath
++        let toolPath = try UserToolchain.findTool(tool, envSearchPaths: self.envSearchPaths, useXcrun: useXcrun)
++        self._clangCompiler[isCXX] = toolPath
+         return toolPath
+     }
+ 
+--- a/Sources/SPMBuildCore/BuildParameters.swift
++++ b/Sources/SPMBuildCore/BuildParameters.swift
+@@ -394,7 +394,7 @@ private struct _Toolchain: Encodable {
+     public func encode(to encoder: Encoder) throws {
+         var container = encoder.container(keyedBy: CodingKeys.self)
+         try container.encode(toolchain.swiftCompilerPath, forKey: .swiftCompiler)
+-        try container.encode(toolchain.getClangCompiler(), forKey: .clangCompiler)
++        try container.encode(toolchain.getClangCompiler(isCXX: false), forKey: .clangCompiler)
+ 
+         try container.encode(toolchain.extraFlags.cCompilerFlags, forKey: .extraCCFlags)
+         // Maintaining `extraCPPFlags` key for compatibility with older encoding.
+--- a/Sources/XCBuildSupport/XcodeBuildSystem.swift
++++ b/Sources/XCBuildSupport/XcodeBuildSystem.swift
+@@ -182,7 +182,7 @@ public final class XcodeBuildSystem: SPMBuildCore.BuildSystem {
+         // Generate a table of any overriding build settings.
+         var settings: [String: String] = [:]
+         // An error with determining the override should not be fatal here.
+-        settings["CC"] = try? buildParameters.toolchain.getClangCompiler().pathString
++        settings["CC"] = try? buildParameters.toolchain.getClangCompiler(isCXX: false).pathString
+         // Always specify the path of the effective Swift compiler, which was determined in the same way as for the native build system.
+         settings["SWIFT_EXEC"] = buildParameters.toolchain.swiftCompilerPath.pathString
+         settings["LIBRARY_SEARCH_PATHS"] = "$(inherited) \(try buildParameters.toolchain.toolchainLibDir.pathString)"
+--- a/Tests/BuildTests/MockBuildTestHelper.swift
++++ b/Tests/BuildTests/MockBuildTestHelper.swift
+@@ -23,7 +23,7 @@ struct MockToolchain: PackageModel.Toolchain {
+     #else
+     let extraFlags = BuildFlags(cxxCompilerFlags: ["-lstdc++"])
+     #endif
+-    func getClangCompiler() throws -> AbsolutePath {
++    func getClangCompiler(isCXX: Bool) throws -> AbsolutePath {
+         return AbsolutePath(path: "/fake/path/to/clang")
+     }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-stdlib-path.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-stdlib-path.patch
new file mode 100644
index 000000000000..6c9c21cfb98e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/fix-stdlib-path.patch
@@ -0,0 +1,25 @@
+Swiftpm looks for the Swift stdlib relative to the swift compiler, but that's a
+wrapper in our case. It wants to add the stdlib to the rpath, which is
+necessary for back-deployment of some features.
+
+--- a/Sources/PackageModel/Toolchain.swift
++++ b/Sources/PackageModel/Toolchain.swift
+@@ -53,12 +53,18 @@ extension Toolchain {
+ 
+     public var macosSwiftStdlib: AbsolutePath {
+         get throws {
++            if swiftCompilerPath.pathString.starts(with: "@storeDir@") {
++                return AbsolutePath("@swiftLib@/lib/swift/macosx")
++            }
+             return try AbsolutePath(validating: "../../lib/swift/macosx", relativeTo: resolveSymlinks(swiftCompilerPath))
+         }
+     }
+ 
+     public var toolchainLibDir: AbsolutePath {
+         get throws {
++            if swiftCompilerPath.pathString.starts(with: "@storeDir@") {
++                return AbsolutePath("@swiftLib@/lib")
++            }
+             // FIXME: Not sure if it's better to base this off of Swift compiler or our own binary.
+             return try AbsolutePath(validating: "../../lib", relativeTo: resolveSymlinks(swiftCompilerPath))
+         }
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/force-unwrap-file-handles.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/force-unwrap-file-handles.patch
new file mode 100644
index 000000000000..a2f2d38c37c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/force-unwrap-file-handles.patch
@@ -0,0 +1,33 @@
+From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloom@riseup.net>
+Date: Tue, 21 Nov 2023 20:53:33 +0300
+Subject: [PATCH] Force-unwrap file handles.
+
+---
+ Sources/TSCBasic/FileSystem.swift | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift
+index 3a63bdf..a1f3d9d 100644
+--- a/Sources/TSCBasic/FileSystem.swift
++++ b/Sources/TSCBasic/FileSystem.swift
+@@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Read the data one block at a time.
+         let data = BufferedOutputByteStream()
+@@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem {
+         if fp == nil {
+             throw FileSystemError(errno: errno, path)
+         }
+-        defer { fclose(fp) }
++        defer { fclose(fp!) }
+
+         // Write the data in one chunk.
+         var contents = bytes.contents
+--
+2.42.0
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/llbuild-cmake-disable-rpath.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/llbuild-cmake-disable-rpath.patch
new file mode 100644
index 000000000000..785e82cc34b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/llbuild-cmake-disable-rpath.patch
@@ -0,0 +1,14 @@
+Specifying `-platform_version` targeting macos before 10.15 causes cctools ld
+to link with `@rpath`. This may have something to do with Swift ABI stability.
+
+--- a/products/llbuildSwift/CMakeLists.txt
++++ b/products/llbuildSwift/CMakeLists.txt
+@@ -22,7 +17,7 @@ endif()
+
+ # TODO(compnerd) move both of these outside of the CMake into the invocation
+ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+-  add_compile_options(-target ${CMAKE_OSX_ARCHITECTURES}-apple-macosx10.10)
++  add_compile_options(-target ${CMAKE_OSX_ARCHITECTURES}-apple-macosx10.15)
+   if(NOT CMAKE_OSX_SYSROOT STREQUAL "")
+     add_compile_options(-sdk ${CMAKE_OSX_SYSROOT})
+   endif()
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/nix-pkgconfig-vars.patch b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/nix-pkgconfig-vars.patch
new file mode 100644
index 000000000000..e032ce80bf90
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/patches/nix-pkgconfig-vars.patch
@@ -0,0 +1,28 @@
+Swift parses .pc files manually, but this means it bypasses our pkg-config
+wrapper. That wrapper normally takes care of introducing the correct
+PKG_CONFIG_PATH for cross compiling.
+
+--- a/Sources/PackageLoading/PkgConfig.swift
++++ b/Sources/PackageLoading/PkgConfig.swift
+@@ -123,14 +123,17 @@ public struct PkgConfig {
+ 
+     private static var envSearchPaths: [AbsolutePath] {
+         get throws {
+-            if let configPath = ProcessEnv.vars["PKG_CONFIG_PATH"] {
++            var result: [AbsolutePath] = []
++            for envVar in ["PKG_CONFIG_PATH", "PKG_CONFIG_PATH_FOR_TARGET"] {
++            if let configPath = ProcessEnv.vars[envVar] {
+                 #if os(Windows)
+-                return try configPath.split(separator: ";").map({ try AbsolutePath(validating: String($0)) })
++                result += try configPath.split(separator: ";").map({ try AbsolutePath(validating: String($0)) })
+                 #else
+-                return try configPath.split(separator: ":").map({ try AbsolutePath(validating: String($0)) })
++                result += try configPath.split(separator: ":").map({ try AbsolutePath(validating: String($0)) })
+                 #endif
+             }
+-            return []
++            }
++            return result
+         }
+     }
+ }
diff --git a/nixpkgs/pkgs/development/compilers/swift/swiftpm/setup-hook.sh b/nixpkgs/pkgs/development/compilers/swift/swiftpm/setup-hook.sh
new file mode 100644
index 000000000000..160fbb1ccca3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/swiftpm/setup-hook.sh
@@ -0,0 +1,60 @@
+# Build using 'swift-build'.
+swiftpmBuildPhase() {
+    runHook preBuild
+
+    local buildCores=1
+    if [ "${enableParallelBuilding-1}" ]; then
+        buildCores="$NIX_BUILD_CORES"
+    fi
+
+    local flagsArray=(
+        -j $buildCores
+        -c "${swiftpmBuildConfig-release}"
+        $swiftpmFlags "${swiftpmFlagsArray[@]}"
+    )
+
+    echoCmd 'build flags' "${flagsArray[@]}"
+    TERM=dumb swift-build "${flagsArray[@]}"
+
+    runHook postBuild
+}
+
+if [ -z "${dontUseSwiftpmBuild-}" ] && [ -z "${buildPhase-}" ]; then
+    buildPhase=swiftpmBuildPhase
+fi
+
+# Check using 'swift-test'.
+swiftpmCheckPhase() {
+    runHook preCheck
+
+    local buildCores=1
+    if [ "${enableParallelBuilding-1}" ]; then
+        buildCores="$NIX_BUILD_CORES"
+    fi
+
+    local flagsArray=(
+        -j $buildCores
+        -c "${swiftpmBuildConfig-release}"
+        $swiftpmFlags "${swiftpmFlagsArray[@]}"
+    )
+
+    echoCmd 'check flags' "${flagsArray[@]}"
+    TERM=dumb swift-test "${flagsArray[@]}"
+
+    runHook postCheck
+}
+
+if [ -z "${dontUseSwiftpmCheck-}" ] && [ -z "${checkPhase-}" ]; then
+    checkPhase=swiftpmCheckPhase
+fi
+
+# Helper used to find the binary output path.
+# Useful for performing the installPhase of swiftpm packages.
+swiftpmBinPath() {
+    local flagsArray=(
+        -c "${swiftpmBuildConfig-release}"
+        $swiftpmFlags "${swiftpmFlagsArray[@]}"
+    )
+
+    swift-build --show-bin-path "${flagsArray[@]}"
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/wrapper/default.nix b/nixpkgs/pkgs/development/compilers/swift/wrapper/default.nix
new file mode 100644
index 000000000000..0c7e0f8cbcf8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/wrapper/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, swift
+, useSwiftDriver ? true, swift-driver
+}:
+
+stdenv.mkDerivation (swift._wrapperParams // {
+  pname = "swift-wrapper";
+  inherit (swift) version meta;
+
+  outputs = [ "out" "man" ];
+
+  # Wrapper and setup hook variables.
+  inherit swift;
+  inherit (swift)
+    swiftOs swiftArch
+    swiftModuleSubdir swiftLibSubdir
+    swiftStaticModuleSubdir swiftStaticLibSubdir;
+  swiftDriver = lib.optionalString useSwiftDriver "${swift-driver}/bin/swift-driver";
+
+  passAsFile = [ "buildCommand" ];
+  buildCommand = ''
+    mkdir -p $out/bin $out/nix-support
+
+    # Symlink all Swift binaries first.
+    # NOTE: This specifically omits clang binaries. We want to hide these for
+    # private use by Swift only.
+    ln -s -t $out/bin/ $swift/bin/swift*
+
+    # Replace specific binaries with wrappers.
+    for executable in swift swiftc swift-frontend; do
+      export prog=$swift/bin/$executable
+      rm $out/bin/$executable
+      substituteAll '${./wrapper.sh}' $out/bin/$executable
+      chmod a+x $out/bin/$executable
+    done
+
+    ${lib.optionalString useSwiftDriver ''
+    # Symlink swift-driver executables.
+    ln -s -t $out/bin/ ${swift-driver}/bin/*
+    ''}
+
+    ln -s ${swift.man} $man
+
+    # This link is here because various tools (swiftpm) check for stdlib
+    # relative to the swift compiler. It's fine if this is for build-time
+    # stuff, but we should patch all cases were it would end up in an output.
+    ln -s ${swift.lib}/lib $out/lib
+
+    substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook
+  '';
+
+  passthru = {
+    inherit swift;
+    inherit (swift) swiftOs swiftArch swiftModuleSubdir swiftLibSubdir;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/swift/wrapper/setup-hook.sh b/nixpkgs/pkgs/development/compilers/swift/wrapper/setup-hook.sh
new file mode 100644
index 000000000000..398f19977f66
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/wrapper/setup-hook.sh
@@ -0,0 +1,28 @@
+# Add import paths for build inputs.
+swiftWrapper_addImports () {
+    # Include subdirectories following both the Swift platform convention, and
+    # a simple `lib/swift` for Nix convenience.
+    for subdir in @swiftModuleSubdir@ @swiftStaticModuleSubdir@ lib/swift; do
+        if [[ -d "$1/$subdir" ]]; then
+            export NIX_SWIFTFLAGS_COMPILE+=" -I $1/$subdir"
+        fi
+    done
+    for subdir in @swiftLibSubdir@ @swiftStaticLibSubdir@ lib/swift; do
+        if [[ -d "$1/$subdir" ]]; then
+            export NIX_LDFLAGS+=" -L $1/$subdir"
+        fi
+    done
+}
+
+addEnvHooks "$targetOffset" swiftWrapper_addImports
+
+# Use a postHook here because we rely on NIX_CC, which is set by the cc-wrapper
+# setup hook, so delay until we're sure it was run.
+swiftWrapper_postHook () {
+    # On Darwin, libc also contains Swift modules.
+    if [[ -e "$NIX_CC/nix-support/orig-libc" ]]; then
+        swiftWrapper_addImports "$(<$NIX_CC/nix-support/orig-libc)"
+    fi
+}
+
+postHooks+=(swiftWrapper_postHook)
diff --git a/nixpkgs/pkgs/development/compilers/swift/wrapper/wrapper.sh b/nixpkgs/pkgs/development/compilers/swift/wrapper/wrapper.sh
new file mode 100644
index 000000000000..0ac066d340d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/wrapper/wrapper.sh
@@ -0,0 +1,291 @@
+#! @shell@
+# NOTE: This wrapper is derived from cc-wrapper.sh, and is hopefully somewhat
+# diffable with the original, so changes can be merged if necessary.
+set -eu -o pipefail +o posix
+shopt -s nullglob
+
+if (( "${NIX_DEBUG:-0}" >= 7 )); then
+    set -x
+fi
+
+cc_wrapper="${NIX_CC:-@default_cc_wrapper@}"
+
+source $cc_wrapper/nix-support/utils.bash
+
+expandResponseParams "$@"
+
+# Check if we should wrap this Swift invocation at all, and how. Specifically,
+# there are some internal tools we don't wrap, plus swift-frontend doesn't link
+# and doesn't understand linker flags. This follows logic in
+# `lib/DriverTool/driver.cpp`.
+prog=@prog@
+progName="$(basename "$prog")"
+firstArg="${params[0]:-}"
+isFrontend=0
+isRepl=0
+
+# These checks follow `shouldRunAsSubcommand`.
+if [[ "$progName" == swift ]]; then
+    case "$firstArg" in
+        "" | -* | *.* | */* | repl)
+            ;;
+        *)
+            exec "swift-$firstArg" "${params[@]:1}"
+            ;;
+    esac
+fi
+
+# These checks follow the first part of `run_driver`.
+#
+# NOTE: The original function short-circuits, but we can't here, because both
+# paths must be wrapped. So we use an 'isFrontend' flag instead.
+case "$firstArg" in
+    -frontend)
+        isFrontend=1
+        # Ensure this stays the first argument.
+        params=( "${params[@]:1}" )
+        extraBefore+=( "-frontend" )
+        ;;
+    -modulewrap)
+        # Don't wrap this integrated tool.
+        exec "$prog" "${params[@]}"
+        ;;
+    repl)
+        isRepl=1
+        params=( "${params[@]:1}" )
+        ;;
+    --driver-mode=*)
+        ;;
+    *)
+        if [[ "$progName" == swift-frontend ]]; then
+            isFrontend=1
+        fi
+        ;;
+esac
+
+# For many tasks, Swift reinvokes swift-driver, the new driver implementation
+# written in Swift. It needs some help finding the executable, though, and
+# reimplementing the logic here is little effort. These checks follow
+# `shouldDisallowNewDriver`.
+if [[
+    $isFrontend = 0 &&
+    -n "@swiftDriver@" &&
+    -z "${SWIFT_USE_OLD_DRIVER:-}" &&
+    ( "$progName" == "swift" || "$progName" == "swiftc" )
+]]; then
+    prog=@swiftDriver@
+    # Driver mode must be the very first argument.
+    extraBefore+=( "--driver-mode=$progName" )
+    if [[ $isRepl = 1 ]]; then
+        extraBefore+=( "-repl" )
+    fi
+
+    # Ensure swift-driver invokes the unwrapped frontend (instead of finding
+    # the wrapped one via PATH), because we don't have to wrap a second time.
+    export SWIFT_DRIVER_SWIFT_FRONTEND_EXEC="@swift@/bin/swift-frontend"
+
+    # Ensure swift-driver can find the LLDB with Swift support for the REPL.
+    export SWIFT_DRIVER_LLDB_EXEC="@swift@/bin/lldb"
+fi
+
+path_backup="$PATH"
+
+# That @-vars are substituted separately from bash evaluation makes
+# shellcheck think this, and others like it, are useless conditionals.
+# shellcheck disable=SC2157
+if [[ -n "@coreutils_bin@" && -n "@gnugrep_bin@" ]]; then
+    PATH="@coreutils_bin@/bin:@gnugrep_bin@/bin"
+fi
+
+# Parse command line options and set several variables.
+# For instance, figure out if linker flags should be passed.
+# GCC prints annoying warnings when they are not needed.
+isCxx=0
+dontLink=$isFrontend
+
+for p in "${params[@]}"; do
+    case "$p" in
+        -enable-cxx-interop | -enable-experimental-cxx-interop)
+            isCxx=1 ;;
+    esac
+done
+
+# NOTE: We don't modify these for Swift, but sourced scripts may use them.
+cxxInclude=1
+cxxLibrary=1
+cInclude=1
+
+linkType=$(checkLinkType "${params[@]}")
+
+# Optionally filter out paths not refering to the store.
+if [[ "${NIX_ENFORCE_PURITY:-}" = 1 && -n "$NIX_STORE" ]]; then
+    kept=()
+    nParams=${#params[@]}
+    declare -i n=0
+    while (( "$n" < "$nParams" )); do
+        p=${params[n]}
+        p2=${params[n+1]:-} # handle `p` being last one
+        n+=1
+
+        skipNext=false
+        path=""
+        case "$p" in
+            -[IL]/*) path=${p:2} ;;
+            -[IL]) path=$p2 skipNext=true ;;
+        esac
+
+        if [[ -n $path ]] && badPath "$path"; then
+            skip "$path"
+            $skipNext && n+=1
+            continue
+        fi
+
+        kept+=("$p")
+    done
+    # Old bash empty array hack
+    params=(${kept+"${kept[@]}"})
+fi
+
+# Flirting with a layer violation here.
+if [ -z "${NIX_BINTOOLS_WRAPPER_FLAGS_SET_@suffixSalt@:-}" ]; then
+    source @bintools@/nix-support/add-flags.sh
+fi
+
+# Put this one second so libc ldflags take priority.
+if [ -z "${NIX_CC_WRAPPER_FLAGS_SET_@suffixSalt@:-}" ]; then
+    source $cc_wrapper/nix-support/add-flags.sh
+fi
+
+if [[ "$isCxx" = 1 ]]; then
+    if [[ "$cxxInclude" = 1 ]]; then
+        NIX_CFLAGS_COMPILE_@suffixSalt@+=" $NIX_CXXSTDLIB_COMPILE_@suffixSalt@"
+    fi
+    if [[ "$cxxLibrary" = 1 ]]; then
+        NIX_CFLAGS_LINK_@suffixSalt@+=" $NIX_CXXSTDLIB_LINK_@suffixSalt@"
+    fi
+fi
+
+source $cc_wrapper/nix-support/add-hardening.sh
+
+# Add the flags for the C compiler proper.
+addCFlagsToList() {
+    declare -n list="$1"
+    shift
+
+    for ((i = 1; i <= $#; i++)); do
+        local val="${!i}"
+        case "$val" in
+            # Pass through using -Xcc, but also convert to Swift -I.
+            # These have slightly different meaning for Clang, but Swift
+            # doesn't have exact equivalents.
+            -isystem | -idirafter)
+                i=$((i + 1))
+                list+=("-Xcc" "$val" "-Xcc" "${!i}" "-I" "${!i}")
+                ;;
+            # Simple rename.
+            -iframework)
+                i=$((i + 1))
+                list+=("-Fsystem" "${!i}")
+                ;;
+            # Pass through verbatim.
+            -I | -Fsystem)
+                i=$((i + 1))
+                list+=("${val}" "${!i}")
+                ;;
+            -I* | -L* | -F*)
+                list+=("${val}")
+                ;;
+            # Pass through using -Xcc.
+            *)
+                list+=("-Xcc" "$val")
+                ;;
+        esac
+    done
+}
+for i in ${NIX_SWIFTFLAGS_COMPILE:-}; do
+    extraAfter+=("$i")
+done
+for i in ${NIX_SWIFTFLAGS_COMPILE_BEFORE:-}; do
+    extraBefore+=("$i")
+done
+addCFlagsToList extraAfter $NIX_CFLAGS_COMPILE_@suffixSalt@
+addCFlagsToList extraBefore ${hardeningCFlags[@]+"${hardeningCFlags[@]}"} $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@
+
+if [ "$dontLink" != 1 ]; then
+
+    # Add the flags that should only be passed to the compiler when
+    # linking.
+    addCFlagsToList extraAfter $(filterRpathFlags "$linkType" $NIX_CFLAGS_LINK_@suffixSalt@)
+
+    # Add the flags that should be passed to the linker (and prevent
+    # `ld-wrapper' from adding NIX_LDFLAGS_@suffixSalt@ again).
+    for i in $(filterRpathFlags "$linkType" $NIX_LDFLAGS_BEFORE_@suffixSalt@); do
+        extraBefore+=("-Xlinker" "$i")
+    done
+    if [[ "$linkType" == dynamic && -n "$NIX_DYNAMIC_LINKER_@suffixSalt@" ]]; then
+        extraBefore+=("-Xlinker" "-dynamic-linker=$NIX_DYNAMIC_LINKER_@suffixSalt@")
+    fi
+    for i in $(filterRpathFlags "$linkType" $NIX_LDFLAGS_@suffixSalt@); do
+        if [ "${i:0:3}" = -L/ ]; then
+            extraAfter+=("$i")
+        else
+            extraAfter+=("-Xlinker" "$i")
+        fi
+    done
+    export NIX_LINK_TYPE_@suffixSalt@=$linkType
+fi
+
+# TODO: If we ever need to expand functionality of this hook, it may no longer
+# be compatible with Swift. Right now, it is only used on Darwin to force
+# -target, which also happens to work with Swift.
+if [[ -e $cc_wrapper/nix-support/add-local-cc-cflags-before.sh ]]; then
+    source $cc_wrapper/nix-support/add-local-cc-cflags-before.sh
+fi
+
+# May need to transform the triple injected by the above.
+for ((i = 1; i < ${#extraBefore[@]}; i++)); do
+    if [[ "${extraBefore[i]}" = -target ]]; then
+        i=$((i + 1))
+        # On Darwin only, need to change 'aarch64' to 'arm64'.
+        extraBefore[i]="${extraBefore[i]/aarch64-apple-/arm64-apple-}"
+        # On Darwin, Swift requires the triple to be annotated with a version.
+        # TODO: Assumes macOS.
+        extraBefore[i]="${extraBefore[i]/-apple-darwin/-apple-macosx${MACOSX_DEPLOYMENT_TARGET:-11.0}}"
+        break
+    fi
+done
+
+# As a very special hack, if the arguments are just `-v', then don't
+# add anything.  This is to prevent `gcc -v' (which normally prints
+# out the version number and returns exit code 0) from printing out
+# `No input files specified' and returning exit code 1.
+if [ "$*" = -v ]; then
+    extraAfter=()
+    extraBefore=()
+fi
+
+# Optionally print debug info.
+if (( "${NIX_DEBUG:-0}" >= 1 )); then
+    # Old bash workaround, see ld-wrapper for explanation.
+    echo "extra flags before to $prog:" >&2
+    printf "  %q\n" ${extraBefore+"${extraBefore[@]}"}  >&2
+    echo "original flags to $prog:" >&2
+    printf "  %q\n" ${params+"${params[@]}"} >&2
+    echo "extra flags after to $prog:" >&2
+    printf "  %q\n" ${extraAfter+"${extraAfter[@]}"} >&2
+fi
+
+PATH="$path_backup"
+# Old bash workaround, see above.
+
+if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
+    exec "$prog" @<(printf "%q\n" \
+       ${extraBefore+"${extraBefore[@]}"} \
+       ${params+"${params[@]}"} \
+       ${extraAfter+"${extraAfter[@]}"})
+else
+    exec "$prog" \
+       ${extraBefore+"${extraBefore[@]}"} \
+       ${params+"${params[@]}"} \
+       ${extraAfter+"${extraAfter[@]}"}
+fi
diff --git a/nixpkgs/pkgs/development/compilers/swift/xctest/default.nix b/nixpkgs/pkgs/development/compilers/swift/xctest/default.nix
new file mode 100644
index 000000000000..c8003d8486f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/xctest/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, callPackage
+, cmake
+, ninja
+, swift
+, Foundation
+, DarwinTools
+}:
+
+let
+  sources = callPackage ../sources.nix { };
+in stdenv.mkDerivation {
+  pname = "swift-corelibs-xctest";
+
+  inherit (sources) version;
+  src = sources.swift-corelibs-xctest;
+
+  outputs = [ "out" ];
+
+  nativeBuildInputs = [ cmake ninja swift ]
+    ++ lib.optional stdenv.isDarwin DarwinTools; # sw_vers
+  buildInputs = [ Foundation ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    # On Darwin only, Swift uses arm64 as cpu arch.
+    substituteInPlace cmake/modules/SwiftSupport.cmake \
+      --replace '"aarch64" PARENT_SCOPE' '"arm64" PARENT_SCOPE'
+  '';
+
+  preConfigure = ''
+    # On aarch64-darwin, our minimum target is 11.0, but we can target lower,
+    # and some dependants require a lower target. Harmless on non-Darwin.
+    export MACOSX_DEPLOYMENT_TARGET=10.12
+  '';
+
+  cmakeFlags = lib.optional stdenv.isDarwin "-DUSE_FOUNDATION_FRAMEWORK=ON";
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    # Darwin normally uses the Xcode version of XCTest. Installing
+    # swift-corelibs-xctest is probably not officially supported, but we have
+    # no alternative. Fix up the installation here.
+    mv $out/lib/swift/darwin/${swift.swiftArch}/* $out/lib/swift/darwin
+    rmdir $out/lib/swift/darwin/${swift.swiftArch}
+    mv $out/lib/swift/darwin $out/lib/swift/${swift.swiftOs}
+  '';
+
+  meta = {
+    description = "Framework for writing unit tests in Swift";
+    homepage = "https://github.com/apple/swift-corelibs-xctest";
+    platforms = lib.platforms.all;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/temurin-bin/generate-sources.py b/nixpkgs/pkgs/development/compilers/temurin-bin/generate-sources.py
new file mode 100755
index 000000000000..bb60d6903df1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/temurin-bin/generate-sources.py
@@ -0,0 +1,72 @@
+#!/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
+
+feature_versions = (8, 11, 16, 17, 18, 19, 20, 21)
+oses = ("mac", "linux", "alpine-linux")
+types = ("jre", "jdk")
+impls = ("hotspot")
+
+arch_to_nixos = {
+    "x64": ("x86_64",),
+    "aarch64": ("aarch64",),
+    "arm": ("armv6l", "armv7l"),
+    "ppc64le": ("powerpc64le",),
+}
+
+def generate_sources(assets, feature_version, out):
+    for asset in assets:
+        binary = asset["binary"]
+        if binary["os"] not in oses: continue
+        if binary["image_type"] not in types: continue
+        if binary["jvm_impl"] not in impls: continue
+        if binary["heap_size"] != "normal": continue
+        if binary["architecture"] not in arch_to_nixos: continue
+
+        version = ".".join(str(v) for v in [
+            asset["version"]["major"],
+            asset["version"]["minor"],
+            asset["version"]["security"]
+        ])
+        build = str(asset["version"]["build"])
+
+        arch_map = (
+            out
+            .setdefault(binary["jvm_impl"], {})
+            .setdefault(binary["os"], {})
+            .setdefault(binary["image_type"], {})
+            .setdefault(feature_version, {
+                "packageType": binary["image_type"],
+                "vmType": binary["jvm_impl"],
+            })
+        )
+
+        for nixos_arch in arch_to_nixos[binary["architecture"]]:
+            arch_map[nixos_arch] = {
+                "url": binary["package"]["link"],
+                "sha256": binary["package"]["checksum"],
+                "version": version,
+                "build": build,
+            }
+
+    return out
+
+
+out = {}
+for feature_version in feature_versions:
+    # Default user-agenet is blocked by Azure WAF.
+    headers = {'user-agent': 'nixpkgs-temurin-generate-sources/1.0.0'}
+    resp = requests.get(f"https://api.adoptium.net/v3/assets/latest/{feature_version}/hotspot", headers=headers)
+
+    if resp.status_code != 200:
+        print("error: could not fetch data for release {} (code {}) {}".format(feature_version, resp.status_code, resp.content), file=sys.stderr)
+        sys.exit(1)
+    generate_sources(resp.json(), f"openjdk{feature_version}", out)
+
+with open("sources.json", "w") as f:
+    json.dump(out, f, indent=2, sort_keys=True)
+    f.write('\n')
diff --git a/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin-base.nix b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin-base.nix
new file mode 100644
index 000000000000..eff9eda73ed3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin-base.nix
@@ -0,0 +1,74 @@
+{ name-prefix ? "temurin"
+, brand-name ? "Eclipse Temurin"
+, sourcePerArch
+, knownVulnerabilities ? []
+}:
+
+{ swingSupport ? true # not used for now
+, lib, stdenv
+, fetchurl
+, setJavaClassPath
+}:
+
+let
+  cpuName = stdenv.hostPlatform.parsed.cpu.name;
+  validCpuTypes = builtins.attrNames lib.systems.parse.cpuTypes;
+  providedCpuTypes = builtins.filter
+    (arch: builtins.elem arch validCpuTypes)
+    (builtins.attrNames sourcePerArch);
+  result = stdenv.mkDerivation {
+    pname = if sourcePerArch.packageType == "jdk"
+      then "${name-prefix}-bin"
+      else "${name-prefix}-${sourcePerArch.packageType}-bin";
+    version =
+      sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
+
+    src = fetchurl {
+      inherit (sourcePerArch.${cpuName}) url sha256;
+    };
+
+    # See: https://github.com/NixOS/patchelf/issues/10
+    dontStrip = 1;
+
+    installPhase = ''
+      cd ..
+
+      mv $sourceRoot $out
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/Contents/Home/include/darwin/*_md.h $out/Contents/Home/include/
+
+      # Remove some broken manpages.
+      # Only for 11 and earlier.
+      [ -e "$out/Contents/Home/man/ja" ] && rm -r $out/Contents/Home/man/ja
+
+      ln -s $out/Contents/Home/* $out/
+
+      # 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
+
+      # 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;
+      home = result;
+    };
+
+    meta = with lib; {
+      license = licenses.gpl2Classpath;
+      description = "${brand-name}, prebuilt OpenJDK binary";
+      platforms = builtins.map (arch: arch + "-darwin") providedCpuTypes;  # some inherit jre.meta.platforms
+      maintainers = with maintainers; [ taku0 ];
+      inherit knownVulnerabilities;
+      mainProgram = "java";
+    };
+  };
+in result
diff --git a/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin.nix b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin.nix
new file mode 100644
index 000000000000..5122b6ed7294
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-darwin.nix
@@ -0,0 +1,28 @@
+{ lib, callPackage }:
+
+let
+  sources = (lib.importJSON ./sources.json).hotspot.mac;
+  common = opts: callPackage (import ./jdk-darwin-base.nix opts) {};
+in
+{
+  jdk-8 = common { sourcePerArch = sources.jdk.openjdk8; };
+  jre-8 = common { sourcePerArch = sources.jre.openjdk8; };
+  jdk-11 = common { sourcePerArch = sources.jdk.openjdk11; };
+  jre-11 = common { sourcePerArch = sources.jre.openjdk11; };
+  jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; };
+
+  jdk-17 = common { sourcePerArch = sources.jdk.openjdk17; };
+  jre-17 = common { sourcePerArch = sources.jre.openjdk17; };
+
+  jdk-18 = common { sourcePerArch = sources.jdk.openjdk18; };
+  jre-18 = common { sourcePerArch = sources.jre.openjdk18; };
+
+  jdk-19 = common { sourcePerArch = sources.jdk.openjdk19; };
+  jre-19 = common { sourcePerArch = sources.jre.openjdk19; };
+
+  jdk-20 = common { sourcePerArch = sources.jdk.openjdk20; };
+  jre-20 = common { sourcePerArch = sources.jre.openjdk20; };
+
+  jdk-21 = common { sourcePerArch = sources.jdk.openjdk21; };
+  jre-21 = common { sourcePerArch = sources.jre.openjdk21; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix
new file mode 100644
index 000000000000..b8726749bef8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux-base.nix
@@ -0,0 +1,131 @@
+{ name-prefix ? "temurin"
+, brand-name ? "Eclipse Temurin"
+, sourcePerArch
+, knownVulnerabilities ? []
+}:
+
+{ stdenv
+, lib
+, fetchurl
+, autoPatchelfHook
+, makeWrapper
+, setJavaClassPath
+# minimum dependencies
+, alsa-lib
+, fontconfig
+, freetype
+, libffi
+, xorg
+, zlib
+# runtime dependencies
+, cups
+# runtime dependencies for GTK+ Look and Feel
+# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
+# which should be fixable, this is a no-rebuild workaround for GHC.
+, gtkSupport ? !stdenv.targetPlatform.isGhcjs
+, cairo
+, glib
+, gtk3
+}:
+
+let
+  cpuName = stdenv.hostPlatform.parsed.cpu.name;
+  runtimeDependencies = [
+    cups
+  ] ++ lib.optionals gtkSupport [
+    cairo glib gtk3
+  ];
+  runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
+  validCpuTypes = builtins.attrNames lib.systems.parse.cpuTypes;
+  providedCpuTypes = builtins.filter
+    (arch: builtins.elem arch validCpuTypes)
+    (builtins.attrNames sourcePerArch);
+  result = stdenv.mkDerivation {
+    pname = if sourcePerArch.packageType == "jdk"
+      then "${name-prefix}-bin"
+      else "${name-prefix}-${sourcePerArch.packageType}-bin";
+
+    version =
+      sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
+
+    src = fetchurl {
+      inherit (sourcePerArch.${cpuName}) url sha256;
+    };
+
+    buildInputs = [
+      alsa-lib # libasound.so wanted by lib/libjsound.so
+      fontconfig
+      freetype
+      stdenv.cc.cc.lib # libstdc++.so.6
+      xorg.libX11
+      xorg.libXext
+      xorg.libXi
+      xorg.libXrender
+      xorg.libXtst
+      zlib
+    ] ++ lib.optional stdenv.isAarch32 libffi;
+
+    nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+
+    # See: https://github.com/NixOS/patchelf/issues/10
+    dontStrip = 1;
+
+    installPhase = ''
+      cd ..
+
+      mv $sourceRoot $out
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/linux/*_md.h $out/include/
+
+      # Remove some broken manpages.
+      # Only for 11 and earlier.
+      [ -e "$out/man/ja" ] && rm -r $out/man/ja*
+
+      # Remove embedded freetype to avoid problems like
+      # https://github.com/NixOS/nixpkgs/issues/57733
+      find "$out" -name 'libfreetype.so*' -delete
+
+      # 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
+
+      # Set JAVA_HOME automatically.
+      cat <<EOF >> "$out/nix-support/setup-hook"
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+      EOF
+
+      # We cannot use -exec since wrapProgram is a function but not a command.
+      #
+      # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it
+      # breaks building OpenJDK (#114495).
+      for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
+        if patchelf --print-interpreter "$bin" &> /dev/null; then
+          wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
+        fi
+      done
+    '';
+
+    preFixup = ''
+      find "$out" -name libfontmanager.so -exec \
+        patchelf --add-needed libfontconfig.so {} \;
+    '';
+
+    # FIXME: use multiple outputs or return actual JRE package
+    passthru = {
+      jre = result;
+      home = result;
+    };
+
+    meta = with lib; {
+      license = licenses.gpl2Classpath;
+      description = "${brand-name}, prebuilt OpenJDK binary";
+      platforms = builtins.map (arch: arch + "-linux") providedCpuTypes;  # some inherit jre.meta.platforms
+      maintainers = with maintainers; [ taku0 ];
+      inherit knownVulnerabilities;
+      mainProgram = "java";
+    };
+  };
+in result
diff --git a/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux.nix b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux.nix
new file mode 100644
index 000000000000..87a00a373916
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/temurin-bin/jdk-linux.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, callPackage }:
+
+let
+  variant = if stdenv.hostPlatform.isMusl then "alpine-linux" else "linux";
+  sources = (lib.importJSON ./sources.json).hotspot.${variant};
+  common = opts: callPackage (import ./jdk-linux-base.nix opts) {};
+in
+{
+  jdk-8 = common { sourcePerArch = sources.jdk.openjdk8; };
+  jre-8 = common { sourcePerArch = sources.jre.openjdk8; };
+  jdk-11 = common { sourcePerArch = sources.jdk.openjdk11; };
+  jre-11 = common { sourcePerArch = sources.jre.openjdk11; };
+  jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; };
+
+  jdk-17 = common { sourcePerArch = sources.jdk.openjdk17; };
+  jre-17 = common { sourcePerArch = sources.jre.openjdk17; };
+
+  jdk-18 = common { sourcePerArch = sources.jdk.openjdk18; };
+  jre-18 = common { sourcePerArch = sources.jre.openjdk18; };
+
+  jdk-19 = common { sourcePerArch = sources.jdk.openjdk19; };
+  jre-19 = common { sourcePerArch = sources.jre.openjdk19; };
+
+  jdk-20 = common { sourcePerArch = sources.jdk.openjdk20; };
+  jre-20 = common { sourcePerArch = sources.jre.openjdk20; };
+
+  jdk-21 = common { sourcePerArch = sources.jdk.openjdk21; };
+  jre-21 = common { sourcePerArch = sources.jre.openjdk21; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/temurin-bin/sources.json b/nixpkgs/pkgs/development/compilers/temurin-bin/sources.json
new file mode 100644
index 000000000000..00a0e72997ec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/temurin-bin/sources.json
@@ -0,0 +1,868 @@
+{
+  "hotspot": {
+    "alpine-linux": {
+      "jdk": {
+        "openjdk11": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "d5e2235d3707526f7c9ba3f0dc194e60d5dec33eceff2a2dcf9d874464cc0e9e",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          }
+        },
+        "openjdk16": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "85788b1a1f470ca7ddc576028f29abbc3bc3b08f82dd811a3e24371689d7dc0f",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_alpine-linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "c2a571a56e5bd3f30956b17b048880078c7801ed9e8754af6d1e38b9176059a9",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          }
+        },
+        "openjdk18": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "1",
+            "sha256": "478c8f56dec7378ed8c687e8d7d0fbf729973c62c497cfc8cf58bd621849d764",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_x64_alpine-linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          }
+        },
+        "openjdk19": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "e2d971400ad2db25ad43ea6fa2058b269c0236e3977986dcdee2097da301beb2",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_x64_alpine-linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          }
+        },
+        "openjdk20": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "b03aced4b7a1c49bc00297e35e45480fd03818862b93e17e1551a3b721e89306",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jdk_x64_alpine-linux_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          }
+        },
+        "openjdk21": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "77006c0a753808c2a6662007906eb6eb230f2fb6eb9d201a39cc46113e68f82c",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "422f23f5109056cacb9227247bebf8532e2dc3c9d505e71637ba610569d6b3ff",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          }
+        },
+        "openjdk8": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "5",
+            "sha256": "6cf2d4925c387c4cdc0bf2e71de3690527141b5244695d0b3109ce83a8512235",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u382-b05/OpenJDK8U-jdk_x64_alpine-linux_hotspot_8u382b05.tar.gz",
+            "version": "8.0.382"
+          }
+        }
+      },
+      "jre": {
+        "openjdk11": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "6a3d1759bdf91433411d37ca2ad1505a7f214c1401797834e9884165c2457368",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_x64_alpine-linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          }
+        },
+        "openjdk17": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "70e5d108f51ae7c7b2435d063652df058723e303a18b4f72f17f75c5320052d3",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jre_x64_alpine-linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          }
+        },
+        "openjdk18": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "1",
+            "sha256": "ad23309a82e690f769037b1e6417022f588702d214da533289f116bba0f61f4e",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_x64_alpine-linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          }
+        },
+        "openjdk19": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "6c0ce0ead2e7ce3e0f06b9578447499c8bd0509306c95fcd81dbecb634228933",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_x64_alpine-linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          }
+        },
+        "openjdk20": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "53b34747a3c042a4cccb2b8b78fba3330b105bc523f0861237baa9143dc39115",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jre_x64_alpine-linux_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          }
+        },
+        "openjdk21": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "2898ea1ddf6f70f09b09cf99d928f6d4c862f78f81104f5dce3e44a832b8444a",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_aarch64_alpine-linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "a8fcc43927664ba191c9a77d1013f1f32fec1acc22fe6f0c29d687221f2cc95d",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_x64_alpine-linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          }
+        },
+        "openjdk8": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "5",
+            "sha256": "7040d865493f13204194c5a1add63e22516b1fa4481264baa6a5b2614a275a0e",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u382-b05/OpenJDK8U-jre_x64_alpine-linux_hotspot_8u382b05.tar.gz",
+            "version": "8.0.382"
+          }
+        }
+      }
+    },
+    "linux": {
+      "jdk": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "8c3146035b99c55ab26a2982f4b9abd2bf600582361cf9c732539f713d271faf",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          },
+          "armv6l": {
+            "build": "1",
+            "sha256": "e83674aee238ebb5f359b9395b3c5e3fad5b645846095494662802d2f0fd01c9",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_arm_linux_hotspot_11.0.20.1_1.tar.gz",
+            "version": "11.0.20"
+          },
+          "armv7l": {
+            "build": "1",
+            "sha256": "e83674aee238ebb5f359b9395b3c5e3fad5b645846095494662802d2f0fd01c9",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_arm_linux_hotspot_11.0.20.1_1.tar.gz",
+            "version": "11.0.20"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "262ff98d6d88a7c7cc522cb4ec4129491a0eb04f5b17dcca0da57cfcdcf3830d",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "60ea98daa09834fdd3162ca91ddc8d92a155ab3121204f6f643176ee0c2d0d5e",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          }
+        },
+        "openjdk16": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "cb77d9d126f97898dfdc8b5fb694d1e0e5d93d13a0a6cb2aeda76f8635384340",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_aarch64_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "7721ef81416af8122a28448f3d661eb4bda40a9f78d400e4ecc55b58e627a00c",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_arm_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "7721ef81416af8122a28448f3d661eb4bda40a9f78d400e4ecc55b58e627a00c",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_arm_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "36ebe6c72f2fc19b8b17371f731390e15fa3aab08c28b55b9a8b71d0a578adc9",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_ppc64le_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "323d6d7474a359a28eff7ddd0df8e65bd61554a8ed12ef42fd9365349e573c2c",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "e2c5e26f8572544b201bc22a9b28f2b1a3147ab69be111cea07c7f52af252e75",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          },
+          "armv6l": {
+            "build": "1",
+            "sha256": "b1f1d8b7fcb159a0a8029b6c3106d1d16207cecbb2047f9a4be2a64d29897da5",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_arm_linux_hotspot_17.0.8.1_1.tar.gz",
+            "version": "17.0.8"
+          },
+          "armv7l": {
+            "build": "1",
+            "sha256": "b1f1d8b7fcb159a0a8029b6c3106d1d16207cecbb2047f9a4be2a64d29897da5",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_arm_linux_hotspot_17.0.8.1_1.tar.gz",
+            "version": "17.0.8"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "3ae4b254d5b720f94f986481e787fbd67f0667571140ba2e2ae5020ceddbc826",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "7b175dbe0d6e3c9c23b6ed96449b018308d8fc94a5ecd9c0df8b8bc376c3c18a",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          }
+        },
+        "openjdk18": {
+          "aarch64": {
+            "build": "1",
+            "sha256": "262be608e266fd76d7496af83b2832be853c3aaf7460d6a4da198cd40db74553",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_aarch64_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "armv6l": {
+            "build": "1",
+            "sha256": "4cd49b92d13847bfad7b3bf635cca349e2c89c7641748c5288bc40d612cdbbd6",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_arm_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "armv7l": {
+            "build": "1",
+            "sha256": "4cd49b92d13847bfad7b3bf635cca349e2c89c7641748c5288bc40d612cdbbd6",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_arm_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "1",
+            "sha256": "030261a2189a8f773fda543a85ab9beb4c430bf81ca5be37cf6cb970b5ccbb03",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_ppc64le_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "1",
+            "sha256": "7d6beba8cfc0a8347f278f7414351191a95a707d46b6586e9a786f2669af0f8b",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_x64_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          }
+        },
+        "openjdk19": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "1c4be9aa173cb0deb0d215643d9509c8900e5497290b29eee4bee335fa57984f",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_aarch64_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "6a51cb3868b5a3b81848a0d276267230ff3f8639f20ba9ae9ef1d386440bf1fd",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_arm_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "6a51cb3868b5a3b81848a0d276267230ff3f8639f20ba9ae9ef1d386440bf1fd",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_arm_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "173d1256dfb9d13d309b5390e6bdf72d143b512201b0868f9d349d5ed3d64072",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_ppc64le_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "3a3ba7a3f8c3a5999e2c91ea1dca843435a0d1c43737bd2f6822b2f02fc52165",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_x64_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          }
+        },
+        "openjdk20": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "b475bcc23db0bd618c815bb8f11d8e084dc58288ea3bcdf4e7f389ed41c89f56",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "36",
+            "sha256": "45dde71faf8cbb78fab3c976894259655c8d3de827347f23e0ebe5710921dded",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20%2B36/OpenJDK20U-jdk_ppc64le_linux_hotspot_20_36.tar.gz",
+            "version": "20.0.0"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "3d91842e9c172967ac397076523249d05a82ead51b0006838f5f0315ad52222c",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jdk_x64_linux_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          }
+        },
+        "openjdk21": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "e184dc29a6712c1f78754ab36fb48866583665fa345324f1a79e569c064f95e9",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "12",
+            "sha256": "9574828ef3d735a25404ced82e09bf20e1614f7d6403956002de9cfbfcb8638f",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_ppc64le_linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "1a6fa8abda4c5caed915cfbeeb176e7fbd12eb6b222f26e290ee45808b529aa1",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          }
+        },
+        "openjdk8": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "70636c2fa4927913e9e869d471607a99d3a521c1fa3f3687b889c2acba67c493",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_aarch64_linux_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          },
+          "armv6l": {
+            "build": "5",
+            "sha256": "5d805ff157f272acf0f7d192f21af4a3b68c840333ca95568e4e07142efc369d",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u382-b05/OpenJDK8U-jdk_arm_linux_hotspot_8u382b05.tar.gz",
+            "version": "8.0.382"
+          },
+          "armv7l": {
+            "build": "5",
+            "sha256": "5d805ff157f272acf0f7d192f21af4a3b68c840333ca95568e4e07142efc369d",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u382-b05/OpenJDK8U-jdk_arm_linux_hotspot_8u382b05.tar.gz",
+            "version": "8.0.382"
+          },
+          "packageType": "jdk",
+          "powerpc64le": {
+            "build": "8",
+            "sha256": "9d9813d2840360ffdbc449c45e71124e8170c31a3b6cce9151fbb31352064406",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "15d091e22aa0cad12a241acff8c1634e7228b9740f8d19634250aa6fe0c19a33",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          }
+        }
+      },
+      "jre": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "8dc527e5c5da62f80ad3b6a2cd7b1789f745b1d90d5e83faba45f7a1d0b6cab8",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          },
+          "armv6l": {
+            "build": "1",
+            "sha256": "2fc1cc935897312c0bc2515b2e7ea1fa3b267e77305a1b51a8c3917d92af380f",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jre_arm_linux_hotspot_11.0.20.1_1.tar.gz",
+            "version": "11.0.20"
+          },
+          "armv7l": {
+            "build": "1",
+            "sha256": "2fc1cc935897312c0bc2515b2e7ea1fa3b267e77305a1b51a8c3917d92af380f",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jre_arm_linux_hotspot_11.0.20.1_1.tar.gz",
+            "version": "11.0.20"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "286e37ce06316185377eea847d2aa9f1523b9f1428684e59e772f2f6055e89b9",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_ppc64le_linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "156861bb901ef18759e05f6f008595220c7d1318a46758531b957b0c950ef2c3",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_x64_linux_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "05b192f81ed478178ba953a2a779b67fc5a810acadb633ad69f8c4412399edb8",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jre_aarch64_linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          },
+          "armv6l": {
+            "build": "1",
+            "sha256": "8af898c5d356f0b2cee2db67ff9c8e7a8e738c0f6b3a61c383150b3168b9ea58",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jre_arm_linux_hotspot_17.0.8.1_1.tar.gz",
+            "version": "17.0.8"
+          },
+          "armv7l": {
+            "build": "1",
+            "sha256": "8af898c5d356f0b2cee2db67ff9c8e7a8e738c0f6b3a61c383150b3168b9ea58",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jre_arm_linux_hotspot_17.0.8.1_1.tar.gz",
+            "version": "17.0.8"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "9",
+            "sha256": "79c85ecf1320c67b828310167e1ced62e402bc86a5d47ca9cc7bfa3b708cb07a",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jre_ppc64le_linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "c37f729200b572884b8f8e157852c739be728d61d9a1da0f920104876d324733",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jre_x64_linux_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          }
+        },
+        "openjdk18": {
+          "aarch64": {
+            "build": "1",
+            "sha256": "e11e00438c2f6f79f86ff1ca2b015913b0e16bd9491953a082d5c786402cb50a",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_aarch64_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "armv6l": {
+            "build": "1",
+            "sha256": "0ae7281fa883de0d39a75b39bfbbcec1d2a5f8ed8691af12226962ce1a761cd7",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_arm_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "armv7l": {
+            "build": "1",
+            "sha256": "0ae7281fa883de0d39a75b39bfbbcec1d2a5f8ed8691af12226962ce1a761cd7",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_arm_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "1",
+            "sha256": "2298504c99b4c15f620f70415215e481766d2b2f784d066206eed8c583922f8f",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_ppc64le_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "1",
+            "sha256": "74f602ab5abaa554859a5e92a65e5bb6e23c2d4165228299c7f54ed56dbc5959",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_x64_linux_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          }
+        },
+        "openjdk19": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "3653f9e5ad21e4744e5a655e243fba2895651029bee23f3d2366d5debc41a736",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_aarch64_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "d4588e8c01ca60da2ceed68b7d43d2fd9ec3350b93043f0dabd0eb6cb03cb23d",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_arm_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "armv7l": {
+            "build": "7",
+            "sha256": "d4588e8c01ca60da2ceed68b7d43d2fd9ec3350b93043f0dabd0eb6cb03cb23d",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_arm_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "7",
+            "sha256": "a30203431c7c21602227d39368c5af6e7abd19000d6da5562de7f3f5c57cbad5",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_ppc64le_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "7386e10c74f00a4382be0540bc0494854804ad79427d8a50ac77a4c7208ff348",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_x64_linux_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          }
+        },
+        "openjdk20": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "63a730d5a3b6d21d31f7cba15dc44b019a8a4d8652e13acec45040f98584112c",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jre_aarch64_linux_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "36",
+            "sha256": "a1c5a16d5a438ce7da4563cd51ff6778cdf62331c00a3096ab2388a916e076d2",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20%2B36/OpenJDK20U-jre_ppc64le_linux_hotspot_20_36.tar.gz",
+            "version": "20.0.0"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "e3592e86290c192804d9c6b5035d42cc32cf04141d1c0b9d1ecb67739826c8c5",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jre_x64_linux_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          }
+        },
+        "openjdk21": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "4582c4cc0c6d498ba7a23fdb0a5179c9d9c0d7a26f2ee8610468d5c2954fcf2f",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_aarch64_linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "12",
+            "sha256": "05cc9b7bfbe246c27d307783b3d5095797be747184b168018ae3f7cc55608db2",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_ppc64le_linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "277f4084bee875f127a978253cfbaad09c08df597feaf5ccc82d2206962279a3",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_x64_linux_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          }
+        },
+        "openjdk8": {
+          "aarch64": {
+            "build": "8",
+            "sha256": "37b997f12cd572da979283fccafec9ba903041a209605b50fcb46cc34f1a9917",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jre_aarch64_linux_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          },
+          "armv6l": {
+            "build": "5",
+            "sha256": "b92fb3972372b5d1f9fb51815def903105722b747f680b7ecf2ba2ba863ab156",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u382-b05/OpenJDK8U-jre_arm_linux_hotspot_8u382b05.tar.gz",
+            "version": "8.0.382"
+          },
+          "armv7l": {
+            "build": "5",
+            "sha256": "b92fb3972372b5d1f9fb51815def903105722b747f680b7ecf2ba2ba863ab156",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u382-b05/OpenJDK8U-jre_arm_linux_hotspot_8u382b05.tar.gz",
+            "version": "8.0.382"
+          },
+          "packageType": "jre",
+          "powerpc64le": {
+            "build": "8",
+            "sha256": "0ecb0aeb54fb9d3c9e1a7ea411490127e8e298d93219fafc4dd6051a5b74671f",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jre_ppc64le_linux_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          },
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "91d31027da0d985be3549714389593d9e0da3da5057d87e3831c7c538b9a2a0f",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jre_x64_linux_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "3be236f2cf9612cd38cd6b7cfa4b8eef642a88beab0cd37c6ccf1766d755b4cc",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "39e30e333d01f70765f0fdc57332bc2c5ae101392bcc315ef06f472d80d8e2d7",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          }
+        },
+        "openjdk16": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "27975d9e695cfbb93861540926f9f7bcac973a254ceecbee549706a99cbbdf95",
+            "url": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_mac_hotspot_16.0.2_7.tar.gz",
+            "version": "16.0.2"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "823777266415347983bbd87ccd8136537242ff27e62f307b7e8521494c665f0d",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "c69b37ea72136df49ce54972408803584b49b2c91b0fbc876d7125e963c7db37",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_mac_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          }
+        },
+        "openjdk18": {
+          "aarch64": {
+            "build": "1",
+            "sha256": "c5ec423f52d8f3aa632941f29fd289f2e31dce5fe6f3abed9b72bd374f54cd41",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_aarch64_mac_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "1",
+            "sha256": "2ed916b0c9d197a6bf71b76e84d94125023c2609e0a9b22c64553eff5c9c29c1",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_x64_mac_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          }
+        },
+        "openjdk19": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "c419330cc8d6b9974d3bf1937f8f0e747c34c469afd5c546831d35aa19e03d49",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_aarch64_mac_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "f59d4157b3b53a35e72db283659d47f14aecae0ff5936d5f8078000504299da6",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_x64_mac_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          }
+        },
+        "openjdk20": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "6ef42b63581c0265c5a6b734e203bb922ee720571a8de46532ecca50a804c596",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jdk_aarch64_mac_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "bdeb37322a7c9292434e417d4db9f5debd7477cf413335d3a653a4e5e50a2473",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jdk_x64_mac_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          }
+        },
+        "openjdk21": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "0d29257c9bcb5f20f5c4643ef9437f36b10376863eddaf6248d09093796c6b30",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "35f3cbc86d7ff0a01facefd741d5cfb675867e0a5ec137f62ba071d2511a45c9",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_mac_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          }
+        },
+        "openjdk8": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "d152f5b2ed8473ee0eb29c7ee134958d75ea86c8ccbafb5ee04a5545dd76108f",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_x64_mac_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          }
+        }
+      },
+      "jre": {
+        "openjdk11": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "bcac3231195a95cac397a35410bfa3f0945ec03e5194e7b0c1d0e785a48f8b76",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_aarch64_mac_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "43d29affe994a09de31bf2fb6f8ab6d6792ba4267b9a2feacaa1f6e042481b9b",
+            "url": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.21%2B9/OpenJDK11U-jre_x64_mac_hotspot_11.0.21_9.tar.gz",
+            "version": "11.0.21"
+          }
+        },
+        "openjdk17": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "89831d03b7cd9922bd178f1a9c8544a36c54d52295366db4e6628454b01acaef",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jre_aarch64_mac_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "ba214f2217dc134e94432085cff4fc5a97e964ffc211d343725fd535f3cd98a0",
+            "url": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jre_x64_mac_hotspot_17.0.9_9.tar.gz",
+            "version": "17.0.9"
+          }
+        },
+        "openjdk18": {
+          "aarch64": {
+            "build": "1",
+            "sha256": "071f073efb9550838bc02e429ef972f9450b477360f803dd1cf19096ca41182e",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_aarch64_mac_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "1",
+            "sha256": "3629e3dc9dbab7ed13070fbea3a827030acdd62afa557496e88a6d01f9300474",
+            "url": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jre_x64_mac_hotspot_18.0.2.1_1.tar.gz",
+            "version": "18.0.2"
+          }
+        },
+        "openjdk19": {
+          "aarch64": {
+            "build": "7",
+            "sha256": "1cd53e60478912fe5f2095313821e90c4926e74ff60a4aa9d99fc2ec912411c1",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_aarch64_mac_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "7",
+            "sha256": "33a37be7a5d7a6003595eeee6d09e47abfa1a1065a4da9a6f592b4b09cfcea19",
+            "url": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jre_x64_mac_hotspot_19.0.2_7.tar.gz",
+            "version": "19.0.2"
+          }
+        },
+        "openjdk20": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "81b475ab029ab224b2c711ccdfa9c25e0300539faad342a4ceefd33772fb38b4",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jre_aarch64_mac_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "9",
+            "sha256": "565d62faac325c098670705fb26a5cc3d4af0a25e86444ddd643f779ad2a3417",
+            "url": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.2%2B9/OpenJDK20U-jre_x64_mac_hotspot_20.0.2_9.tar.gz",
+            "version": "20.0.2"
+          }
+        },
+        "openjdk21": {
+          "aarch64": {
+            "build": "12",
+            "sha256": "bc384961d3a866198b1055a80fdff7fb6946aa6823b3ce624cc8c3125a26bed5",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_aarch64_mac_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "12",
+            "sha256": "c21a2648ec21bc4701acfb6b7a1fd90aca001db1efb8454e2980d4c8dcd9e310",
+            "url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jre_x64_mac_hotspot_21.0.1_12.tar.gz",
+            "version": "21.0.1"
+          }
+        },
+        "openjdk8": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "f1f15920ed299e10c789aef6274d88d45eb21b72f9a7b0d246a352107e344e6a",
+            "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jre_x64_mac_hotspot_8u392b08.tar.gz",
+            "version": "8.0.392"
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/nixpkgs/pkgs/development/compilers/terra/default.nix b/nixpkgs/pkgs/development/compilers/terra/default.nix
new file mode 100644
index 000000000000..d53441a583c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/terra/default.nix
@@ -0,0 +1,93 @@
+{ lib, stdenv, fetchFromGitHub, llvmPackages, ncurses, cmake, libxml2
+, symlinkJoin, breakpointHook, cudaPackages, enableCUDA ? false
+, libobjc, Cocoa, Foundation
+}:
+
+let
+  luajitRev = "50936d784474747b4569d988767f1b5bab8bb6d0";
+  luajitBase = "LuaJIT-${luajitRev}";
+  luajitArchive = "${luajitBase}.tar.gz";
+  luajitSrc = fetchFromGitHub {
+    owner = "LuaJIT";
+    repo = "LuaJIT";
+    rev = luajitRev;
+    sha256 = "1g87pl014b5v6z2nnhiwn3wf405skawszfr5wdzyfbx00j3kgxd0";
+  };
+
+  llvmMerged = symlinkJoin {
+    name = "llvmClangMerged";
+    paths = with llvmPackages; [
+      llvm.out
+      llvm.dev
+      llvm.lib
+      clang-unwrapped.out
+      clang-unwrapped.dev
+      clang-unwrapped.lib
+    ];
+  };
+
+  cuda = cudaPackages.cudatoolkit_11;
+
+  clangVersion = llvmPackages.clang-unwrapped.version;
+
+in stdenv.mkDerivation rec {
+  pname = "terra";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "terralang";
+    repo = "terra";
+    rev = "release-${version}";
+    sha256 = "0v9vpxcp9ybwnfljskqn41vjq7c0srdfv7qs890a6480pnk4kavd";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvmMerged ncurses libxml2 ]
+    ++ lib.optionals enableCUDA [ cuda ]
+    ++ lib.optionals stdenv.isDarwin [ libobjc Cocoa Foundation ];
+
+  cmakeFlags = [
+    "-DHAS_TERRA_VERSION=0"
+    "-DTERRA_VERSION=${version}"
+    "-DTERRA_LUA=luajit"
+    "-DTERRA_SKIP_LUA_DOWNLOAD=ON"
+    "-DCLANG_RESOURCE_DIR=${llvmMerged}/lib/clang/${clangVersion}"
+  ] ++ lib.optional enableCUDA "-DTERRA_ENABLE_CUDA=ON";
+
+  doCheck = true;
+  hardeningDisable = [ "fortify" ];
+  outputs = [ "bin" "dev" "out" "static" ];
+
+  patches = [ ./nix-cflags.patch ];
+
+  postPatch = ''
+    substituteInPlace src/terralib.lua \
+      --subst-var-by NIX_LIBC_INCLUDE ${lib.getDev stdenv.cc.libc}/include
+  '';
+
+  preConfigure = ''
+    mkdir -p build
+    ln -s ${luajitSrc} build/${luajitBase}
+    tar --mode="a+rwX" -chzf build/${luajitArchive} -C build ${luajitBase}
+    rm build/${luajitBase}
+  '';
+
+  installPhase = ''
+    install -Dm755 -t $bin/bin bin/terra
+    install -Dm755 -t $out/lib lib/terra${stdenv.hostPlatform.extensions.sharedLibrary}
+    install -Dm644 -t $static/lib lib/libterra_s.a
+
+    mkdir -pv $dev/include
+    cp -rv include/terra $dev/include
+  '';
+
+  meta = with lib; {
+    description = "A low-level counterpart to Lua";
+    homepage = "https://terralang.org/";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jb55 seylerius thoughtpolice elliottslaughter ];
+    license = licenses.mit;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
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..90ba7e63f1d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/terra/nix-cflags.patch
@@ -0,0 +1,21 @@
+diff --git a/src/terralib.lua b/src/terralib.lua
+index 532ed18..2c265dc 100644
+--- a/src/terralib.lua
++++ b/src/terralib.lua
+@@ -3426,6 +3426,16 @@ 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
+     -- Obey the SDKROOT variable on macOS to match Clang behavior.
+     local sdkroot = os.getenv("SDKROOT")
+     if sdkroot then
diff --git a/nixpkgs/pkgs/development/compilers/teyjus/default.nix b/nixpkgs/pkgs/development/compilers/teyjus/default.nix
new file mode 100644
index 000000000000..3a44a136b6e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/teyjus/default.nix
@@ -0,0 +1,30 @@
+{ lib, fetchFromGitHub, buildDunePackage, flex, bison }:
+
+buildDunePackage rec {
+  pname = "teyjus";
+  version = "2.1.1";
+
+  src = fetchFromGitHub {
+    owner = "teyjus";
+    repo = "teyjus";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-N4XKDd0NFr501PYUdb7PM2sWh0uD1/SUFXoMr10f064=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ flex bison ];
+
+  hardeningDisable = [ "format" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "An efficient implementation of the Lambda Prolog language";
+    homepage = "https://github.com/teyjus/teyjus";
+    changelog = "https://github.com/teyjus/teyjus/releases/tag/v${version}";
+    license = lib.licenses.gpl3;
+    maintainers = [ maintainers.bcdarwin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/tinycc/default.nix b/nixpkgs/pkgs/development/compilers/tinycc/default.nix
new file mode 100644
index 000000000000..906df89b2117
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinycc/default.nix
@@ -0,0 +1,120 @@
+{ lib
+, stdenv
+, fetchFromRepoOrCz
+, copyPkgconfigItems
+, makePkgconfigItem
+, perl
+, texinfo
+, which
+}:
+
+let
+  # avoid "malformed 32-bit x.y.z" error on mac when using clang
+  isCleanVer = version: builtins.match "^[0-9]\\.+[0-9]+\\.[0-9]+" version != null;
+in
+stdenv.mkDerivation rec {
+  pname = "tcc";
+  version = "unstable-2022-07-15";
+
+  src = fetchFromRepoOrCz {
+    repo = "tinycc";
+    rev = "af1abf1f45d45b34f0b02437f559f4dfdba7d23c";
+    hash = "sha256-jY0P2GErmo//YBaz6u4/jj/voOE3C2JaIDRmo0orXN8=";
+  };
+
+  nativeBuildInputs = [
+    copyPkgconfigItems
+    perl
+    texinfo
+    which
+  ];
+
+  pkgconfigItems = [
+    (makePkgconfigItem rec {
+      name = "libtcc";
+      inherit version;
+      cflags = [ "-I${variables.includedir}" ];
+      libs = [
+        "-L${variables.libdir}"
+        "-Wl,--rpath ${variables.libdir}"
+        "-ltcc"
+      ];
+      variables = rec {
+        prefix = "${placeholder "out"}";
+        includedir = "${prefix}/include";
+        libdir = "${prefix}/lib";
+      };
+      description = "Tiny C compiler backend";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs texi2pod.pl
+  '';
+
+  configureFlags = [
+    "--cc=$CC"
+    "--ar=$AR"
+    "--crtprefix=${lib.getLib stdenv.cc.libc}/lib"
+    "--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include"
+    "--libpaths=${lib.getLib stdenv.cc.libc}/lib"
+    # build cross compilers
+    "--enable-cross"
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    "--config-musl"
+  ];
+
+  preConfigure = ''
+    ${
+      if stdenv.isDarwin && ! isCleanVer version
+      then "echo 'not overwriting VERSION since it would upset ld'"
+      else "echo ${version} > VERSION"
+    }
+    configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)")
+  '';
+
+  outputs = [ "out" "info" "man" ];
+
+  # Test segfault for static build
+  doCheck = !stdenv.hostPlatform.isStatic;
+
+  checkTarget = "test";
+  # https://www.mail-archive.com/tinycc-devel@nongnu.org/msg10142.html
+  preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+    rm tests/tests2/{108,114}*
+  '';
+
+  meta = with lib; {
+    homepage = "https://repo.or.cz/tinycc.git";
+    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.
+    '';
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ joachifm AndersonTorres ];
+    platforms = platforms.unix;
+    # https://www.mail-archive.com/tinycc-devel@nongnu.org/msg10199.html
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
+# TODO: more multiple outputs
+# TODO: self-compilation
+# TODO: provide expression for stable release
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/0001-Makefile.patch b/nixpkgs/pkgs/development/compilers/tinygo/0001-Makefile.patch
new file mode 100644
index 000000000000..342cce788ba3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/0001-Makefile.patch
@@ -0,0 +1,70 @@
+From ef066db7f5cb7f551f88fb218c82fc947e464425 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= <muscaln@protonmail.com>
+Date: Sun, 3 Jul 2022 14:30:51 +0300
+Subject: [PATCH 1/3] Makefile
+
+
+diff --git a/Makefile b/Makefile
+index 60a5a574..904d2db5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,11 +14,6 @@ LLVM_VERSIONS = 14 13 12 11
+ errifempty = $(if $(1),$(1),$(error $(2)))
+ detect = $(shell which $(call errifempty,$(firstword $(foreach p,$(2),$(shell command -v $(p) 2> /dev/null && echo $(p)))),failed to locate $(1) at any of: $(2)))
+ toolSearchPathsVersion = $(1)-$(2)
+-ifeq ($(shell uname -s),Darwin)
+-	# Also explicitly search Brew's copy, which is not in PATH by default.
+-	BREW_PREFIX := $(shell brew --prefix)
+-	toolSearchPathsVersion += $(BREW_PREFIX)/opt/llvm@$(2)/bin/$(1)-$(2) $(BREW_PREFIX)/opt/llvm@$(2)/bin/$(1)
+-endif
+ # First search for a custom built copy, then move on to explicitly version-tagged binaries, then just see if the tool is in path with its normal name.
+ findLLVMTool = $(call detect,$(1),$(abspath llvm-build/bin/$(1)) $(foreach ver,$(LLVM_VERSIONS),$(call toolSearchPathsVersion,$(1),$(ver))) $(1))
+ CLANG ?= $(call findLLVMTool,clang)
+@@ -707,9 +702,8 @@ endif
+ wasmtest:
+ 	$(GO) test ./tests/wasm
+ 
+-build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN)),,binaryen)
++build/release:
+ 	@mkdir -p build/release/tinygo/bin
+-	@mkdir -p build/release/tinygo/lib/clang/include
+ 	@mkdir -p build/release/tinygo/lib/CMSIS/CMSIS
+ 	@mkdir -p build/release/tinygo/lib/macos-minimal-sdk
+ 	@mkdir -p build/release/tinygo/lib/mingw-w64/mingw-w64-crt/lib-common
+@@ -721,15 +715,8 @@ build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN
+ 	@mkdir -p build/release/tinygo/lib/picolibc/newlib/libc
+ 	@mkdir -p build/release/tinygo/lib/picolibc/newlib/libm
+ 	@mkdir -p build/release/tinygo/lib/wasi-libc
+-	@mkdir -p build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0
+-	@mkdir -p build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0plus
+-	@mkdir -p build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4
+ 	@echo copying source files
+ 	@cp -p  build/tinygo$(EXE)           build/release/tinygo/bin
+-ifneq ($(USE_SYSTEM_BINARYEN),1)
+-	@cp -p  build/wasm-opt$(EXE)         build/release/tinygo/bin
+-endif
+-	@cp -p $(abspath $(CLANG_SRC))/lib/Headers/*.h build/release/tinygo/lib/clang/include
+ 	@cp -rp lib/CMSIS/CMSIS/Include      build/release/tinygo/lib/CMSIS/CMSIS
+ 	@cp -rp lib/CMSIS/README.md          build/release/tinygo/lib/CMSIS
+ 	@cp -rp lib/macos-minimal-sdk/*      build/release/tinygo/lib/macos-minimal-sdk
+@@ -768,16 +755,9 @@ endif
+ 	@cp -rp lib/picolibc/newlib/libm/common      build/release/tinygo/lib/picolibc/newlib/libm
+ 	@cp -rp lib/picolibc-stdio.c         build/release/tinygo/lib
+ 	@cp -rp lib/wasi-libc/sysroot        build/release/tinygo/lib/wasi-libc/sysroot
+-	@cp -rp llvm-project/compiler-rt/lib/builtins build/release/tinygo/lib/compiler-rt-builtins
+-	@cp -rp llvm-project/compiler-rt/LICENSE.TXT  build/release/tinygo/lib/compiler-rt-builtins
++	@cp -rp lib/compiler-rt-builtins     build/release/tinygo/lib/compiler-rt-builtins
+ 	@cp -rp src                          build/release/tinygo/src
+ 	@cp -rp targets                      build/release/tinygo/targets
+-	./build/release/tinygo/bin/tinygo build-library -target=cortex-m0     -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0/compiler-rt     compiler-rt
+-	./build/release/tinygo/bin/tinygo build-library -target=cortex-m0plus -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0plus/compiler-rt compiler-rt
+-	./build/release/tinygo/bin/tinygo build-library -target=cortex-m4     -o build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4/compiler-rt    compiler-rt
+-	./build/release/tinygo/bin/tinygo build-library -target=cortex-m0     -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0/picolibc     picolibc
+-	./build/release/tinygo/bin/tinygo build-library -target=cortex-m0plus -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0plus/picolibc picolibc
+-	./build/release/tinygo/bin/tinygo build-library -target=cortex-m4     -o build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4/picolibc    picolibc
+ 
+ release:
+ 	tar -czf build/release.tar.gz -C build/release tinygo
+-- 
+2.37.2
+
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/0002-Add-clang-header-path.patch b/nixpkgs/pkgs/development/compilers/tinygo/0002-Add-clang-header-path.patch
new file mode 100644
index 000000000000..2c0bfba4f3b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/0002-Add-clang-header-path.patch
@@ -0,0 +1,25 @@
+diff --git a/builder/library.go b/builder/library.go
+index 6517355b..b8de1894 100644
+--- a/builder/library.go
++++ b/builder/library.go
+@@ -142,7 +142,7 @@ func (l *Library) load(config *compileopts.Config, tmpdir string) (job *compileJ
+ 	// Note: -fdebug-prefix-map is necessary to make the output archive
+ 	// reproducible. Otherwise the temporary directory is stored in the archive
+ 	// itself, which varies each run.
+-	args := append(l.cflags(target, headerPath), "-c", "-Oz", "-gdwarf-4", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir)
++	args := append(l.cflags(target, headerPath), "-c", "-Oz", "-gdwarf-4", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir, "-isystem", "@clang_include@")
+ 	cpu := config.CPU()
+ 	if cpu != "" {
+ 		// X86 has deprecated the -mcpu flag, so we need to use -march instead.
+diff --git a/compileopts/config.go b/compileopts/config.go
+index 39fc4f2a..8711b5a8 100644
+--- a/compileopts/config.go
++++ b/compileopts/config.go
+@@ -264,6 +264,7 @@ func (c *Config) CFlags() []string {
+ 	for _, flag := range c.Target.CFlags {
+ 		cflags = append(cflags, strings.ReplaceAll(flag, "{root}", goenv.Get("TINYGOROOT")))
+ 	}
++	cflags = append([]string{"-isystem", "@clang_include@"}, cflags...)
+ 	switch c.Target.Libc {
+ 	case "darwin-libSystem":
+ 		root := goenv.Get("TINYGOROOT")
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/0003-Use-out-path-as-build-id-on-darwin.patch b/nixpkgs/pkgs/development/compilers/tinygo/0003-Use-out-path-as-build-id-on-darwin.patch
new file mode 100644
index 000000000000..a151c4ff880f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/0003-Use-out-path-as-build-id-on-darwin.patch
@@ -0,0 +1,56 @@
+From e7357c383188dd735592bd9f2202d2afcfffa39d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= <muscaln@protonmail.com>
+Date: Sun, 11 Sep 2022 17:08:33 +0300
+Subject: [PATCH 3/3] Use out path as build id on darwin
+
+
+diff --git a/builder/buildid.go b/builder/buildid.go
+index e6527700..65cb08e8 100644
+--- a/builder/buildid.go
++++ b/builder/buildid.go
+@@ -3,8 +3,6 @@ package builder
+ import (
+ 	"bytes"
+ 	"debug/elf"
+-	"debug/macho"
+-	"encoding/binary"
+ 	"fmt"
+ 	"io"
+ 	"os"
+@@ -53,30 +51,9 @@ func ReadBuildID() ([]byte, error) {
+ 			return goID, nil
+ 		}
+ 	case "darwin":
+-		// Read the LC_UUID load command, which contains the equivalent of a
+-		// build ID.
+-		file, err := macho.NewFile(f)
+-		if err != nil {
+-			return nil, err
+-		}
+-		for _, load := range file.Loads {
+-			// Unfortunately, the debug/macho package doesn't support the
+-			// LC_UUID command directly. So we have to read it from
+-			// macho.LoadBytes.
+-			load, ok := load.(macho.LoadBytes)
+-			if !ok {
+-				continue
+-			}
+-			raw := load.Raw()
+-			command := binary.LittleEndian.Uint32(raw)
+-			if command != 0x1b {
+-				// Looking for the LC_UUID load command.
+-				// LC_UUID is defined here as 0x1b:
+-				// https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/loader.h.auto.html
+-				continue
+-			}
+-			return raw[4:], nil
+-		}
++		// On darwin, os.Executable() returns broken path in nix build environment
++		// So we are using $out path as build id since its also unique
++		return []byte("OUT_PATH"), nil
+ 	default:
+ 		// On other platforms (such as Windows) there isn't such a convenient
+ 		// build ID. Luckily, Go does have an equivalent of the build ID, which
+-- 
+2.37.2
+
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/0004-fix-darwin-build.patch b/nixpkgs/pkgs/development/compilers/tinygo/0004-fix-darwin-build.patch
new file mode 100644
index 000000000000..924533a49131
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/0004-fix-darwin-build.patch
@@ -0,0 +1,12 @@
+diff --git a/compileopts/config.go b/compileopts/config.go
+index 39fc4f2a..fb5d4575 100644
+--- a/compileopts/config.go
++++ b/compileopts/config.go
+@@ -269,6 +269,7 @@ func (c *Config) CFlags() []string {
+ 		root := goenv.Get("TINYGOROOT")
+ 		cflags = append(cflags,
+ 			"--sysroot="+filepath.Join(root, "lib/macos-minimal-sdk/src"),
++			"-isystem", filepath.Join(root, "lib/macos-minimal-sdk/src/usr/include"), // necessary for Nix
+ 		)
+ 	case "picolibc":
+ 		root := goenv.Get("TINYGOROOT")
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/default.nix b/nixpkgs/pkgs/development/compilers/tinygo/default.nix
new file mode 100644
index 000000000000..5901ab7f9604
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/default.nix
@@ -0,0 +1,166 @@
+{ stdenv
+, lib
+, buildPackages
+, buildGoModule
+, fetchFromGitHub
+, makeWrapper
+, substituteAll
+, llvmPackages
+, go
+, libffi
+, zlib
+, ncurses
+, libxml2
+, xar
+, wasi-libc
+, binaryen
+, avrdude
+, gdb
+, openocd
+, runCommand
+, tinygoTests ? [ "smoketest" ]
+}:
+
+let
+  llvmMajor = lib.versions.major llvm.version;
+  inherit (llvmPackages) llvm clang compiler-rt lld;
+
+  # only doing this because only on darwin placing clang.cc in nativeBuildInputs
+  # doesn't build
+  bootstrapTools = runCommand "tinygo-bootstap-tools" { } ''
+    mkdir -p $out
+    ln -s ${lib.getBin clang.cc}/bin/clang $out/clang-${llvmMajor}
+    ln -s ${lib.getBin lld}/bin/ld.lld $out/ld.lld-${llvmMajor}
+    ln -s ${lib.getBin lld}/bin/wasm-ld $out/wasm-ld-${llvmMajor}
+    # GDB upstream does not support ARM darwin
+    ${lib.optionalString (!(stdenv.isDarwin && stdenv.isAarch64)) "ln -s ${gdb}/bin/gdb $out/gdb-multiarch" }
+  '';
+in
+
+buildGoModule rec {
+  pname = "tinygo";
+  version = "0.30.0";
+
+  src = fetchFromGitHub {
+    owner = "tinygo-org";
+    repo = "tinygo";
+    rev = "v${version}";
+    sha256 = "sha256-hOccfMKuvTKYKDRcEgTJ8k/c/H+qNDpvotWIqk6p2u8=";
+    fetchSubmodules = true;
+  };
+
+  vendorHash = "sha256-2q3N6QhfRmwbs4CTWrFWr1wyhf2jPS2ECAn/wrrpXdM=";
+
+  patches = [
+    ./0001-Makefile.patch
+
+    # clang.cc does not have any paths in the include path.
+    # For TinyGo, we want to have no include paths, _except_ for the built-in
+    # Clang header files (things like stdint.h). That's why we use -nostdlibinc.
+    # So to make Clang work like we want, we will have to manually add this one
+    # include path.
+    # We can't use a regular clang command (something like
+    # llvmPackages.clangUseLLVM) because there are various bugs, see:
+    # https://github.com/NixOS/nixpkgs/issues/259397
+    # https://github.com/NixOS/nixpkgs/issues/259386
+    (substituteAll {
+      src = ./0002-Add-clang-header-path.patch;
+      clang_include = "${clang.cc.lib}/lib/clang/${llvmMajor}/include";
+    })
+
+    #TODO(muscaln): Find a better way to fix build ID on darwin
+    ./0003-Use-out-path-as-build-id-on-darwin.patch
+    ./0004-fix-darwin-build.patch
+  ];
+
+  nativeCheckInputs = [ binaryen ];
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ llvm clang.cc ]
+    ++ lib.optionals stdenv.isDarwin [ zlib ncurses libffi libxml2 xar ];
+
+  doCheck = (stdenv.buildPlatform.canExecute stdenv.hostPlatform);
+  inherit tinygoTests;
+
+  allowGoReference = true;
+  tags = [ "llvm${llvmMajor}" ];
+  ldflags = [ "-X github.com/tinygo-org/tinygo/goenv.TINYGOROOT=${placeholder "out"}/share/tinygo" ];
+  subPackages = [ "." ];
+
+  # Output contains static libraries for different arm cpus
+  # and stripping could mess up these so only strip the compiler
+  stripDebugList = [ "bin" ];
+
+  postConfigure = lib.optionalString stdenv.isDarwin ''
+    for i in vendor/tinygo.org/x/go-llvm/llvm_config_darwin*; do
+      substituteInPlace $i --replace "curses" "ncurses"
+    done
+  '';
+
+  postPatch = ''
+    # Copy wasi-libc, symlink seems not working
+    rm -rf lib/wasi-libc/*
+    mkdir -p lib/wasi-libc/sysroot/lib/wasm32-wasi lib/wasi-libc/sysroot/include
+    cp -a ${wasi-libc}/lib/* lib/wasi-libc/sysroot/lib/wasm32-wasi/
+    cp -a ${wasi-libc.dev}/include/* lib/wasi-libc/sysroot/include/
+
+    # Borrow compiler-rt builtins from our source
+    # See https://github.com/tinygo-org/tinygo/pull/2471
+    mkdir -p lib/compiler-rt-builtins
+    cp -a ${compiler-rt.src}/compiler-rt/lib/builtins/* lib/compiler-rt-builtins/
+
+    substituteInPlace Makefile \
+      --replace "\$(TINYGO)" "$(pwd)/build/tinygo" \
+      --replace "@\$(MD5SUM)" "md5sum" \
+      --replace "build/release/tinygo/bin" "$out/bin" \
+      --replace "build/release/" "$out/share/"
+
+    substituteInPlace builder/buildid.go \
+      --replace "OUT_PATH" "$out"
+
+    # TODO: Fix mingw
+    # Disable windows cross-compile tests
+    sed -i "/GOOS=windows/d" Makefile
+  '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    substituteInPlace Makefile \
+      --replace "./build/tinygo" "${buildPackages.tinygo}/bin/tinygo"
+  '';
+
+  preBuild = ''
+    export PATH=${bootstrapTools}:$PATH
+    export HOME=$TMPDIR
+  '';
+
+  postBuild = ''
+    # Move binary
+    mkdir -p build
+    mv $GOPATH/bin/tinygo build/tinygo
+
+    make gen-device -j $NIX_BUILD_CORES
+
+    export TINYGOROOT=$(pwd)
+  '';
+
+  checkPhase = lib.optionalString (tinygoTests != [ ] && tinygoTests != null) ''
+    make ''${tinygoTests[@]} XTENSA=0
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    make build/release
+
+    wrapProgram $out/bin/tinygo \
+      --prefix PATH : ${lib.makeBinPath [ go avrdude openocd binaryen ]}:${bootstrapTools}
+
+    runHook postInstall
+  '';
+
+  disallowedReferences = [ wasi-libc ];
+
+  meta = with lib; {
+    homepage = "https://tinygo.org/";
+    description = "Go compiler for small places";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ Madouura muscaln ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/tvm/default.nix b/nixpkgs/pkgs/development/compilers/tvm/default.nix
new file mode 100644
index 000000000000..3613ed55e084
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tvm/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "tvm";
+  version = "0.15.0";
+
+  src = fetchFromGitHub {
+    owner = "apache";
+    repo = "incubator-tvm";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "sha256-VbJptTUi12pJh1wz4I+xL6HVo/rSiUHCkvgEMPe1F6o=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  # TVM CMake build uses some sources in the project's ./src/target/opt/
+  # directory which errneously gets mangled by the eager `fixCmakeFiles`
+  # function in Nix's CMake setup-hook.sh to ./src/target/var/empty/,
+  # which then breaks the build. Toggling this flag instructs Nix to
+  # not mangle the legitimate use of the opt/ folder.
+  dontFixCmake = true;
+
+  meta = with lib; {
+    homepage = "https://tvm.apache.org/";
+    description = "An End to End Deep Learning Compiler Stack for CPUs, GPUs and accelerators";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ adelbertc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/typescript/default.nix b/nixpkgs/pkgs/development/compilers/typescript/default.nix
new file mode 100644
index 000000000000..50ddbacb2013
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/typescript/default.nix
@@ -0,0 +1,34 @@
+{ lib, buildNpmPackage, fetchFromGitHub, testers, typescript }:
+
+buildNpmPackage rec {
+  pname = "typescript";
+  version = "5.3.3";
+
+  src = fetchFromGitHub {
+    owner = "microsoft";
+    repo = "TypeScript";
+    rev = "v${version}";
+    hash = "sha256-gZdS4TGbafaOdNc1ZB24uAjMu9g0hef6mEsOr/dPqvY=";
+  };
+
+  patches = [
+    ./disable-dprint-dstBundler.patch
+  ];
+
+  npmDepsHash = "sha256-gj59jjko13UBPqqy/3z1KgVMFUQPUAIg47UTTaseF+w=";
+
+  passthru.tests = {
+    version = testers.testVersion {
+      package = typescript;
+    };
+  };
+
+  meta = with lib; {
+    description = "A superset of JavaScript that compiles to clean JavaScript output";
+    homepage = "https://www.typescriptlang.org/";
+    changelog = "https://github.com/microsoft/TypeScript/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = [ maintainers.marsam ];
+    mainProgram = "tsc";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch b/nixpkgs/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch
new file mode 100644
index 000000000000..95ccf411a93e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/typescript/disable-dprint-dstBundler.patch
@@ -0,0 +1,15 @@
+Disable dprint on dstBundler
+
+dprint fails on sandbox, because it requires internet access to install its
+plugins.
+
+--- a/scripts/dtsBundler.mjs
++++ b/scripts/dtsBundler.mjs
+@@ -430,5 +430,5 @@
+     return result.replace(/\r\n/g, "\n");

+ }

+ 

+-fs.writeFileSync(output, dprint(publicContents));

+-fs.writeFileSync(internalOutput, dprint(internalContents));

++fs.writeFileSync(output, publicContents);

++fs.writeFileSync(internalOutput, internalContents);

diff --git a/nixpkgs/pkgs/development/compilers/uasm/default.nix b/nixpkgs/pkgs/development/compilers/uasm/default.nix
new file mode 100644
index 000000000000..9fe0e42cb138
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/uasm/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, testers
+, uasm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "uasm";
+  version = "2.56.2";
+
+  src = fetchFromGitHub {
+    owner = "Terraspace";
+    repo = pname;
+    # Specifying only the tag results in the following error during download:
+    # the given path has multiple possibilities: #<Git::Ref:0x00007f618689c378>, #<Git::Ref:0x00007f618689c1e8>
+    # Probably because upstream has both a tag and a branch with the same name
+    rev = "refs/tags/v${version}";
+    hash = "sha256-QiRBscY6zefeLDDVhS/+j9yIJ+5QhgkDQh1CLl/CslM=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-v2_55-compilation-on-macos.patch";
+      url = "https://github.com/Terraspace/UASM/commit/b50c430cc3083c7f32e288a9f64fe1cafb03091d.patch";
+      sha256 = "sha256-FGFB282LSEKtGD1cIRH+Qi5bye5Gx4xb0Ty4J03xjCU";
+    })
+  ];
+
+  enableParallelBuilding = true;
+
+  makefile =
+    if stdenv.isDarwin then
+      "ClangOSX64.mak"
+    else
+      "gccLinux64.mak";
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dt "$out/bin" -m0755 GccUnixR/uasm
+    install -Dt "$out/share/doc/${pname}" -m0644 {Readme,History}.txt Doc/*
+
+    runHook postInstall
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = uasm;
+    command = "uasm -h";
+    version = "v${version}";
+  };
+
+  meta = with lib; {
+    homepage = "https://www.terraspace.co.uk/uasm.html";
+    description = "A free MASM-compatible assembler based on JWasm";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ thiagokokada ];
+    license = licenses.watcom;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/unison/default.nix b/nixpkgs/pkgs/development/compilers/unison/default.nix
new file mode 100644
index 000000000000..56ca3a0104cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/unison/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, autoPatchelfHook
+, fetchurl
+, gmp
+, less
+, makeWrapper
+, ncurses6
+, stdenv
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "unison-code-manager";
+  version = "0.5.15";
+
+  src = if stdenv.isDarwin then
+    fetchurl {
+      url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-macos.tar.gz";
+      hash = "sha256-Umpu9WQhg6ln6aBb6bPVUZSax1Zeh6vcYHwmQuFRx2Y=";
+    }
+  else
+    fetchurl {
+      url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-linux.tar.gz";
+      hash = "sha256-cFucBQcyye4F6Vep6O9buENFzqJ96q8/2cVr9NFvHB8=";
+    };
+
+  # The tarball is just the prebuilt binary, in the archive root.
+  sourceRoot = ".";
+  dontBuild = true;
+  dontConfigure = true;
+
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optional (!stdenv.isDarwin) autoPatchelfHook;
+  buildInputs = lib.optionals (!stdenv.isDarwin) [ ncurses6 zlib gmp ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv ucm $out/bin
+    mv ui $out/ui
+    wrapProgram $out/bin/ucm \
+      --prefix PATH ":" "${lib.makeBinPath [ less ]}" \
+      --set UCM_WEB_UI "$out/ui"
+  '';
+
+  meta = with lib; {
+    description = "Modern, statically-typed purely functional language";
+    homepage = "https://unisonweb.org/";
+    license = with licenses; [ mit bsd3 ];
+    mainProgram = "ucm";
+    maintainers = [ maintainers.virusdave ];
+    platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-darwin" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/urn/default.nix b/nixpkgs/pkgs/development/compilers/urn/default.nix
new file mode 100644
index 000000000000..66f1bda6d5f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/urn/default.nix
@@ -0,0 +1,63 @@
+{ lib, 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 (lib) optionalString concatMapStringsSep;
+in
+
+stdenv.mkDerivation {
+  pname = "urn${optionalString (extraLibraries != []) "-with-libraries"}";
+  inherit version;
+
+  src = fetchFromGitLab {
+    owner = "urn";
+    repo = "urn";
+    rev = "v${version}";
+    sha256 = "0nclr3d8ap0y5cg36i7g4ggdqci6m5q27y9f26b57km8p266kcpy";
+  };
+
+  nativeBuildInputs = [ 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 lib; {
+    homepage = "https://urn-lang.com";
+    description = "Yet another Lisp variant which compiles to Lua";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ CrazedProgrammer ];
+    platforms = platforms.all;
+  };
+
+  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..b72548e753c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/urweb/default.nix
@@ -0,0 +1,51 @@
+{ lib, 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${lib.getLib openssl}/lib \
+                   -L${libmysqlclient}/lib \
+                   -L${postgresql.lib}/lib \
+                   -L${sqlite.out}/lib";
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=use-after-free"
+  ];
+
+  # 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     = lib.licenses.bsd3;
+    platforms   = lib.platforms.linux ++ lib.platforms.darwin;
+    maintainers = [ lib.maintainers.thoughtpolice 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..5abe309624bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/default.nix
@@ -0,0 +1,109 @@
+{ stdenv, lib, fetchurl, fetchpatch, pkg-config, flex, bison, libxslt, autoconf, autoreconfHook
+, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll, vala
+}:
+
+let
+  generic = lib.makeOverridable ({
+    version, sha256,
+    extraNativeBuildInputs ? [],
+    extraBuildInputs ? [],
+    withGraphviz ? false
+  }:
+  let
+    # Build vala (valadoc) without graphviz support. Inspired from the openembedded-core project.
+    # https://github.com/openembedded/openembedded-core/blob/a5440d4288e09d3e/meta/recipes-devtools/vala/vala/disable-graphviz.patch
+    graphvizPatch =
+      {
+        "0.48" = ./disable-graphviz-0.46.1.patch;
+
+        "0.54" = ./disable-graphviz-0.46.1.patch;
+
+        "0.56" = ./disable-graphviz-0.56.8.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 ];
+    configureFlags = lib.optional  disableGraphviz "--disable-graphviz";
+    # when cross-compiling ./compiler/valac is valac for host
+    # so add the build vala in nativeBuildInputs
+    preBuild       = lib.optionalString (disableGraphviz && (stdenv.buildPlatform == stdenv.hostPlatform)) "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")";
+
+    outputs = [ "out" "devdoc" ];
+
+    nativeBuildInputs = [
+      pkg-config 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
+      ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ vala ]
+      ++ extraNativeBuildInputs;
+
+    buildInputs = [
+      glib libiconv libintl
+    ] ++ lib.optional (lib.versionAtLeast version "0.38" && withGraphviz) graphviz
+      ++ extraBuildInputs;
+
+    enableParallelBuilding = true;
+
+    doCheck = false; # fails, requires dbus daemon
+
+    passthru = {
+      updateScript = gnome.updateScript {
+        attrPath =
+          let
+            roundUpToEven = num: num + lib.mod num 2;
+          in "${pname}_${lib.versions.major version}_${builtins.toString (roundUpToEven (lib.toInt (lib.versions.minor version)))}";
+        packageName = pname;
+        freeze = true;
+      };
+    };
+
+    meta = with 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 amaxine ] ++ teams.pantheon.members;
+    };
+  });
+
+in rec {
+  vala_0_48 = generic {
+    version = "0.48.25";
+    sha256 = "UMs8Xszdx/1DaL+pZBSlVgReedKxWmiRjHJ7jIOxiiQ=";
+  };
+
+  vala_0_54 = generic {
+    version = "0.54.9";
+    sha256 = "hXLA6Nd9eMFZfVFgCPBUDH50leA10ou0wlzJk+U85LQ=";
+  };
+
+  vala_0_56 = generic {
+    version = "0.56.14";
+    sha256 = "k4LCaMqb3AKq7cgVKpgYvzk1JzBB9inFbeQQ42Cj9Vc=";
+  };
+
+  vala = vala_0_56;
+}
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..7c2ded4c8eda
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.46.1.patch
@@ -0,0 +1,280 @@
+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 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/disable-graphviz-0.56.8.patch b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.56.8.patch
new file mode 100644
index 000000000000..37c5ba504e5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.56.8.patch
@@ -0,0 +1,173 @@
+diff --git a/configure.ac b/configure.ac
+index 088e8f3b5..bded3c54c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -196,13 +196,15 @@ 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)
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
+ AS_IF([test "$VALAC" != :], [FOUND_VALAC_VERION=`$VALAC --version | sed 's/Vala  *//'`
+ 	AS_VERSION_COMPARE(["$FOUND_VALAC_VERION"], ["$VALAC_VALADOC_REQUIRED"], [
+ 		AC_MSG_WARN([Force disable build of valadoc, valac >= $VALAC_VALADOC_REQUIRED is required])
+ 		enable_valadoc=no
+ 	])
+ ])
+-if test x$enable_valadoc = xyes; then
++if test x$enable_valadoc = xyes && test x$enable_graphviz = xyes; then
++	VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
+ 	PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+ 	AC_MSG_CHECKING([for CGRAPH])
+ 	cgraph_tmp_LIBADD="$LIBADD"
+@@ -244,6 +246,7 @@ if test x$enable_valadoc = xyes; then
+ fi
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+ AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ 
+ AC_PATH_PROG([G_IR_COMPILER], [g-ir-compiler], :)
+ AM_CONDITIONAL(HAVE_G_IR_COMPILER, test "$G_IR_COMPILER" != :)
+diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
+index dad9a9e99..e23266606 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,19 +145,34 @@ 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)
++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
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ valadoc@PACKAGE_SUFFIX@.vapi valadoc.h: libvaladoc.vala.stamp
+ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ 	$(VALA_V)$(VALAC) \
+@@ -174,7 +185,7 @@ 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 \
++		$(LIBGVC_PKG) \
+ 		--vapidir $(top_srcdir)/gee --pkg gee \
+ 		--vapidir $(top_srcdir)/vala --pkg vala \
+ 		--vapidir $(top_srcdir)/ccode --pkg ccode \
+@@ -206,6 +217,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
+@@ -213,6 +227,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 f4999efd4..03871d687 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
+ 	}
+ 
+ 
+@@ -1028,6 +1034,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);
+@@ -1047,6 +1054,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/setup-hook.sh b/nixpkgs/pkgs/development/compilers/vala/setup-hook.sh
new file mode 100644
index 000000000000..53976e5cd0db
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/setup-hook.sh
@@ -0,0 +1,24 @@
+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 "$targetOffset" make_vala_find_vapi_files
+
+disable_incompabile_pointer_conversion_warning() {
+    # Work around incompatible function pointer conversion errors with clang 16
+    # by setting ``-Wno-incompatible-function-pointer-types` in an env hook.
+    # See https://gitlab.gnome.org/GNOME/vala/-/issues/1413.
+    NIX_CFLAGS_COMPILE+=" -Wno-incompatible-function-pointer-types"
+}
+
+addEnvHooks "$hostOffset" disable_incompabile_pointer_conversion_warning
+
+_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..a0acfd263474
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vlang/default.nix
@@ -0,0 +1,109 @@
+{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx, boehmgc, xorg, binaryen, darwin }:
+
+let
+  version = "0.4.4";
+  ptraceSubstitution = ''
+    #include <sys/types.h>
+    #include <sys/ptrace.h>
+  '';
+  # vc is the V compiler's source translated to C (needed for boostrap).
+  # So we fix its rev to correspond to the V version.
+  vc = stdenv.mkDerivation {
+    pname = "v.c";
+    version = "0.4.4";
+    src = fetchFromGitHub {
+      owner = "vlang";
+      repo = "vc";
+      rev = "66eb8eae253d31fa5622e35a69580d9ad8efcccb";
+      hash = "sha256-YGlzr0Qq7+NtrnbaFPBuclzjOZBOnTe3BOhsuwdsQ5c=";
+    };
+
+    # patch the ptrace reference for darwin
+    installPhase = lib.optionalString stdenv.isDarwin ''
+      substituteInPlace v.c \
+        --replace "#include <sys/ptrace.h>" "${ptraceSubstitution}"
+    '' + ''
+      mkdir -p $out
+      cp v.c $out/
+    '';
+  };
+  # Required for vdoc.
+  markdown = fetchFromGitHub {
+    owner = "vlang";
+    repo = "markdown";
+    rev = "0c280130cb7ec410b7d21810d1247956c15b72fc";
+    hash = "sha256-Fmhkrg9DBiWxInostNp+WfA3V5GgEIs5+KIYrqZosqY=";
+  };
+  boehmgcStatic = boehmgc.override {
+    enableStatic = true;
+  };
+in
+stdenv.mkDerivation {
+  pname = "vlang";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "vlang";
+    repo = "v";
+    rev = version;
+    hash = "sha256-Aqecw8K+igHx5R34lQiWtdNfeGn+umcjcS4w0vXgpLM=";
+  };
+
+  propagatedBuildInputs = [ glfw freetype openssl ]
+    ++ lib.optional stdenv.hostPlatform.isUnix upx;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [
+    binaryen
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Cocoa
+  ] ++ lib.optionals stdenv.isLinux [
+    xorg.libX11
+    xorg.libXau
+    xorg.libXdmcp
+    xorg.xorgproto
+  ];
+
+  makeFlags = [
+    "local=1"
+  ];
+
+  env.VC = vc;
+
+  preBuild = ''
+    export HOME=$(mktemp -d)
+    mkdir -p ./thirdparty/tcc/lib
+    cp -r ${boehmgcStatic}/lib/* ./thirdparty/tcc/lib
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{bin,lib,share}
+    cp -r examples $out/share
+    cp -r {cmd,vlib,thirdparty} $out/lib
+    cp v $out/lib
+    ln -s $out/lib/v $out/bin/v
+    wrapProgram $out/bin/v --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}
+
+    mkdir -p $HOME/.vmodules;
+    ln -sf ${markdown} $HOME/.vmodules/markdown
+    $out/lib/v -v build-tools
+    $out/lib/v -v $out/lib/cmd/tools/vdoc
+    $out/lib/v -v $out/lib/cmd/tools/vast
+    $out/lib/v -v $out/lib/cmd/tools/vvet
+    $out/lib/v -v $out/lib/cmd/tools/vcreate
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://vlang.io/";
+    description = "Simple, fast, safe, compiled language for developing maintainable software";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Madouura delta231 ];
+    mainProgram = "v";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/vyper/default.nix b/nixpkgs/pkgs/development/compilers/vyper/default.nix
new file mode 100644
index 000000000000..fb83f299bd8c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vyper/default.nix
@@ -0,0 +1,90 @@
+{ lib
+, asttokens
+, buildPythonPackage
+, cbor2
+, fetchPypi
+, git
+, importlib-metadata
+, packaging
+, pycryptodome
+, pytest-runner
+, pythonOlder
+, pythonRelaxDepsHook
+, recommonmark
+, setuptools-scm
+, sphinx
+, sphinx-rtd-theme
+, writeText
+}:
+
+let
+  sample-contract = writeText "example.vy" ''
+    count: int128
+
+    @external
+    def __init__(foo: address):
+        self.count = 1
+  '';
+
+in
+buildPythonPackage rec {
+  pname = "vyper";
+  version = "0.3.10";
+  pyproject = true;
+
+  disabled = pythonOlder "3.10";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-jcH1AcqrQX+wzpxoppRFh/AUfsfMfTiJzzpFwZRm5Ik=";
+  };
+
+  postPatch = ''
+    # pythonRelaxDeps doesn't work
+    substituteInPlace setup.py \
+      --replace "setuptools_scm>=7.1.0,<8.0.0" "setuptools_scm>=7.1.0"
+  '';
+
+  nativeBuildInputs = [
+    # Git is used in setup.py to compute version information during building
+    # ever since https://github.com/vyperlang/vyper/pull/2816
+    git
+
+    pythonRelaxDepsHook
+    pytest-runner
+    setuptools-scm
+  ];
+
+  pythonRelaxDeps = [
+    "asttokens"
+  ];
+
+  propagatedBuildInputs = [
+    asttokens
+    cbor2
+    importlib-metadata
+    packaging
+    pycryptodome
+
+    # docs
+    recommonmark
+    sphinx
+    sphinx-rtd-theme
+  ];
+
+  checkPhase = ''
+    $out/bin/vyper "${sample-contract}"
+  '';
+
+  pythonImportsCheck = [
+    "vyper"
+  ];
+
+  meta = with lib; {
+    description = "Pythonic Smart Contract Language for the EVM";
+    homepage = "https://github.com/vyperlang/vyper";
+    changelog = "https://github.com/vyperlang/vyper/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ siraben ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/wcc/default.nix b/nixpkgs/pkgs/development/compilers/wcc/default.nix
new file mode 100644
index 000000000000..644e9ad646a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/wcc/default.nix
@@ -0,0 +1,51 @@
+{ lib, 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 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..b80b460d4def
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/wla-dx/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv, fetchFromGitHub, cmake}:
+
+stdenv.mkDerivation rec {
+  pname = "wla-dx";
+  version = "9.11";
+
+  src = fetchFromGitHub {
+    owner = "vhelin";
+    repo = "wla-dx";
+    rev = "v${version}-fix";
+    sha256 = "0sz1vqafl7ii3z1710sk0ilvczv8pb4b6lkmg9pr7hqj3kaxndii";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install binaries/* $out/bin
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://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..3ce548c9b483
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/x11basic/default.nix
@@ -0,0 +1,48 @@
+{ lib, 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";
+  };
+
+  nativeBuildInputs = [ autoconf automake ];
+  buildInputs = [
+    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 lib; {
+    homepage = "https://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/xa/dxa.nix b/nixpkgs/pkgs/development/compilers/xa/dxa.nix
new file mode 100644
index 000000000000..44e3e8fb9671
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/xa/dxa.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchurl
+, installShellFiles
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "dxa";
+  version = "0.1.5";
+
+  src = fetchurl {
+    urls = [
+      "https://www.floodgap.com/retrotech/xa/dists/dxa-${finalAttrs.version}.tar.gz"
+      "https://www.floodgap.com/retrotech/xa/dists/unsupported/dxa-${finalAttrs.version}.tar.gz"
+    ];
+    hash = "sha256-jkDtd4FlgfmtlaysLtaaL7KseFDkM9Gc1oQZOkWCZ5k=";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  dontConfigure = true;
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc"
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -T dxa $out/bin/dxa
+    installManPage dxa.1
+
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "https://www.floodgap.com/retrotech/xa/";
+    description = "Andre Fachat's open-source 6502 disassembler";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = with lib.platforms; unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/xa/xa.nix b/nixpkgs/pkgs/development/compilers/xa/xa.nix
new file mode 100644
index 000000000000..52be6de0812d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/xa/xa.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchurl
+, perl
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "xa";
+  version = "2.3.14";
+
+  src = fetchurl {
+    urls = [
+      "https://www.floodgap.com/retrotech/xa/dists/xa-${finalAttrs.version}.tar.gz"
+      "https://www.floodgap.com/retrotech/xa/dists/unsupported/xa-${finalAttrs.version}.tar.gz"
+    ];
+    hash = "sha256-G5u6vdvY07lBC4UuUKEo7qQeaBM55vdsPoB2+lQg8C4=";
+  };
+
+  nativeCheckInputs = [ perl ];
+
+  dontConfigure = true;
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \
+      --replace "LD = gcc" "LD = ${stdenv.cc.targetPrefix}cc" \
+      --replace "CFLAGS = -O2" "CFLAGS ?=" \
+      --replace "LDFLAGS = -lc" "LDFLAGS ?= -lc"
+  '';
+
+  makeFlags = [
+    "DESTDIR:=${placeholder "out"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  # Running tests in parallel does not work
+  enableParallelChecking = false;
+
+  preCheck = ''
+    patchShebangs tests
+  '';
+
+  meta = {
+    homepage = "https://www.floodgap.com/retrotech/xa/";
+    description = "Andre Fachat's open-source 6502 cross assembler";
+    longDescription = ''
+      xa is a high-speed, two-pass portable cross-assembler. It understands
+      mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507,
+      6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and Rockwell R65C02)
+      and the 65816.
+
+      Key amongst its features:
+
+      - C-like preprocessor (and understands cpp for additional feature support)
+      - rich expression syntax and pseudo-op vocabulary
+      - multiple character sets
+      - binary linking
+      - supports o65 relocatable objects with a full linker and relocation
+        suite, as well as "bare" plain binary object files
+      - block structure for label scoping
+    '';
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = with lib.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..7828d0e9b259
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yap/default.nix
@@ -0,0 +1,31 @@
+{ lib, 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" ];
+
+  # -fcommon: workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libYap.a(pl-dtoa.o):/build/yap-6.3.3/H/pl-yap.h:230: multiple definition of `ATOM_';
+  #     libYap.a(pl-buffer.o):/build/yap-6.3.3/H/pl-yap.h:230: first defined here
+  env.NIX_CFLAGS_COMPILE = "-fpermissive -fcommon";
+
+  meta = {
+    # the linux 32 bit build fails.
+    broken = (stdenv.isLinux && stdenv.isAarch64) || !stdenv.is64bit;
+    homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/";
+    description = "A ISO-compatible high-performance Prolog compiler";
+    license = lib.licenses.artistic2;
+
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/yasm/default.nix b/nixpkgs/pkgs/development/compilers/yasm/default.nix
new file mode 100644
index 000000000000..58b8252729a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yasm/default.nix
@@ -0,0 +1,20 @@
+{lib, stdenv, fetchurl, buildPackages}:
+
+stdenv.mkDerivation rec {
+  pname = "yasm";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "https://www.tortall.net/projects/yasm/releases/yasm-${version}.tar.gz";
+    sha256 = "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix";
+  };
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  meta = with 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..ee8fe6cee576
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/default.nix
@@ -0,0 +1,176 @@
+{ stdenv
+, lib
+, abc-verifier
+, bash
+, bison
+, boost
+, fetchFromGitHub
+, flex
+, libffi
+, makeWrapper
+, pkg-config
+, python3
+, readline
+, symlinkJoin
+, tcl
+, verilog
+, zlib
+, yosys
+, yosys-bluespec
+, yosys-ghdl
+, yosys-symbiflow
+, enablePython ? true # enable python binding
+}:
+
+# NOTE: as of late 2020, yosys has switched to an automation robot that
+# automatically tags their repository Makefile with a new build number every
+# day when changes are committed. please MAKE SURE that the version number in
+# the 'version' field exactly matches the YOSYS_VER field in the Yosys
+# makefile!
+#
+# if a change in yosys isn't yet available under a build number like this (i.e.
+# it was very recently merged, within an hour), wait a few hours for the
+# automation robot to tag the new version, like so:
+#
+#     https://github.com/YosysHQ/yosys/commit/71ca9a825309635511b64b3ec40e5e5e9b6ad49b
+#
+# note that while most nix packages for "unstable versions" use a date-based
+# version scheme, synchronizing the nix package version here with the unstable
+# yosys version number helps users report better bugs upstream, and is
+# ultimately less confusing than using dates.
+
+let
+
+  # Provides a wrapper for creating a yosys with the specifed plugins preloaded
+  #
+  # Example:
+  #
+  #     my_yosys = yosys.withPlugins (with yosys.allPlugins; [
+  #        fasm
+  #        bluespec
+  #     ]);
+  withPlugins = plugins:
+    let
+      paths = lib.closePropagation plugins;
+      module_flags = with builtins; concatStringsSep " "
+        (map (n: "--add-flags -m --add-flags ${n.plugin}") plugins);
+    in lib.appendToName "with-plugins" ( symlinkJoin {
+      inherit (yosys) name;
+      paths = paths ++ [ yosys ] ;
+      nativeBuildInputs = [ makeWrapper ];
+      postBuild = ''
+        wrapProgram $out/bin/yosys \
+          --set NIX_YOSYS_PLUGIN_DIRS $out/share/yosys/plugins \
+          ${module_flags}
+      '';
+    });
+
+  allPlugins = {
+    bluespec = yosys-bluespec;
+    ghdl     = yosys-ghdl;
+  } // (yosys-symbiflow);
+
+  boost_python = boost.override {
+    enablePython = true;
+    python = python3;
+  };
+
+in stdenv.mkDerivation (finalAttrs: {
+  pname   = "yosys";
+  version = "0.38";
+
+  src = fetchFromGitHub {
+    owner = "YosysHQ";
+    repo  = "yosys";
+    rev   = "refs/tags/${finalAttrs.pname}-${finalAttrs.version}";
+    hash  = "sha256-mzMBhnIEgToez6mGFOvO7zBA+rNivZ9OnLQsjBBDamA=";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ pkg-config bison flex ];
+  propagatedBuildInputs = [
+    tcl
+    readline
+    libffi
+    zlib
+    (python3.withPackages (pp: with pp; [
+      click
+    ]))
+  ] ++ lib.optional enablePython boost_python;
+
+  makeFlags = [ "PREFIX=${placeholder "out"}"];
+
+  patches = [
+    ./plugin-search-dirs.patch
+    ./fix-clang-build.patch # see https://github.com/YosysHQ/yosys/issues/2011
+  ];
+
+  postPatch = ''
+    substituteInPlace ./Makefile \
+      --replace-fail 'echo UNKNOWN' 'echo ${builtins.substring 0 10 finalAttrs.src.rev}'
+
+    # https://github.com/YosysHQ/yosys/pull/4199
+    substituteInPlace ./tests/various/clk2fflogic_effects.sh \
+      --replace-fail 'tail +3' 'tail -n +3'
+
+    chmod +x ./misc/yosys-config.in
+    patchShebangs tests ./misc/yosys-config.in
+  '';
+
+  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
+
+    if ! grep -q "ABCREV = ${shortAbcRev}" Makefile; then
+      echo "ERROR: yosys isn't compatible with the provided abc (${shortAbcRev}), failing."
+      exit 1
+    fi
+
+    if ! grep -q "YOSYS_VER := $version" Makefile; then
+      echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (allegedly ${finalAttrs.version}), failing."
+      exit 1
+    fi
+  '' + lib.optionalString enablePython ''
+    echo "ENABLE_PYOSYS := 1" >> Makefile.conf
+    echo "PYTHON_DESTDIR := $out/${python3.sitePackages}" >> Makefile.conf
+    echo "BOOST_PYTHON_LIB := -lboost_python${lib.versions.major python3.version}${lib.versions.minor python3.version}" >> Makefile.conf
+  '';
+
+  preCheck = ''
+    # autotest.sh automatically compiles a utility during startup if it's out of date.
+    # having N check jobs race to do that creates spurious codesigning failures on macOS.
+    # run it once without asking it to do anything so that compilation is done before the jobs start.
+    tests/tools/autotest.sh
+  '';
+
+  checkTarget = "test";
+  doCheck = true;
+  nativeCheckInputs = [ 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. this
+  # is also needed at build time for the test suite.
+  postBuild   = "ln -sfv ${abc-verifier}/bin/abc ./yosys-abc";
+  postInstall = "ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc";
+
+  setupHook = ./setup-hook.sh;
+
+  passthru = {
+    inherit withPlugins allPlugins;
+  };
+
+  meta = with lib; {
+    description = "Open RTL synthesis framework and tools";
+    homepage    = "https://yosyshq.net/yosys/";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ shell thoughtpolice emily Luflosi ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/yosys/fix-clang-build.patch b/nixpkgs/pkgs/development/compilers/yosys/fix-clang-build.patch
new file mode 100644
index 000000000000..843ffd6d65af
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/fix-clang-build.patch
@@ -0,0 +1,42 @@
+--- a/Makefile
++++ b/Makefile
+@@ -215,7 +215,7 @@ ABC_ARCHFLAGS += "-DABC_NO_RLIMIT"
+ endif
+ 
+ ifeq ($(CONFIG),clang)
+-CXX = clang
++CXX = clang++
+ LD = clang++
+ CXXFLAGS += -std=$(CXXSTD) -Os
+ ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -Wno-c++11-narrowing $(ABC_ARCHFLAGS)"
+--- a/tests/cxxrtl/run-test.sh
++++ b/tests/cxxrtl/run-test.sh
+@@ -5,7 +5,7 @@ set -ex
+ run_subtest () {
+     local subtest=$1; shift
+ 
+-    ${CC:-gcc} -std=c++11 -O2 -o cxxrtl-test-${subtest} -I../../backends/cxxrtl/runtime test_${subtest}.cc -lstdc++
++    ${CXX:-gcc} -std=c++11 -O2 -o cxxrtl-test-${subtest} -I../../backends/cxxrtl/runtime test_${subtest}.cc -lstdc++
+     ./cxxrtl-test-${subtest}
+ }
+ 
+--- a/tests/fmt/run-test.sh
++++ b/tests/fmt/run-test.sh
+@@ -51,7 +51,7 @@ test_cxxrtl () {
+ 	local subtest=$1; shift
+ 
+ 	../../yosys -p "read_verilog ${subtest}.v; proc; clean; write_cxxrtl -print-output std::cerr yosys-${subtest}.cc"
+-	${CC:-gcc} -std=c++11 -o yosys-${subtest} -I../../backends/cxxrtl/runtime ${subtest}_tb.cc -lstdc++
++	${CXX:-gcc} -std=c++11 -o yosys-${subtest} -I../../backends/cxxrtl/runtime ${subtest}_tb.cc -lstdc++
+ 	./yosys-${subtest} 2>yosys-${subtest}.log
+ 	iverilog -o iverilog-${subtest} ${subtest}.v ${subtest}_tb.v
+ 	./iverilog-${subtest} |grep -v '\$finish called' >iverilog-${subtest}.log
+@@ -69,7 +69,7 @@ diff iverilog-always_full.log iverilog-always_full-1.log
+ 
+ ../../yosys -p "read_verilog display_lm.v" >yosys-display_lm.log
+ ../../yosys -p "read_verilog display_lm.v; write_cxxrtl yosys-display_lm.cc"
+-${CC:-gcc} -std=c++11 -o yosys-display_lm_cc -I../../backends/cxxrtl/runtime display_lm_tb.cc -lstdc++
++${CXX:-gcc} -std=c++11 -o yosys-display_lm_cc -I../../backends/cxxrtl/runtime display_lm_tb.cc -lstdc++
+ ./yosys-display_lm_cc >yosys-display_lm_cc.log
+ for log in yosys-display_lm.log yosys-display_lm_cc.log; do
+ 	grep "^%l: \\\\bot\$" "$log"
diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugin-search-dirs.patch b/nixpkgs/pkgs/development/compilers/yosys/plugin-search-dirs.patch
new file mode 100644
index 000000000000..354eeddbc2e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/plugin-search-dirs.patch
@@ -0,0 +1,45 @@
+diff --git i/passes/cmds/plugin.cc w/passes/cmds/plugin.cc
+index 08b4aa8c4..f00f540e9 100644
+--- i/passes/cmds/plugin.cc
++++ w/passes/cmds/plugin.cc
+@@ -87,15 +87,33 @@ void load_plugin(std::string filename, std::vector<std::string> aliases)
+ 
+ 			// We were unable to open the file, try to do so from the plugin directory
+ 			if (hdl == NULL && orig_filename.find('/') == std::string::npos) {
+-				hdl = dlopen([orig_filename]() {
+-					std::string new_path = proc_share_dirname() + "plugins/" + orig_filename;
++                            std::string install_dir = proc_share_dirname() + "plugins";
+ 
+-					// Check if we need to append .so
+-					if (new_path.find(".so") == std::string::npos)
+-						new_path.append(".so");
++				vector<string> all_dirs;
++				all_dirs.push_back(install_dir);
+ 
+-					return new_path;
+-				}().c_str(), RTLD_LAZY|RTLD_LOCAL);
++				char* plugin_dirs = getenv("NIX_YOSYS_PLUGIN_DIRS");
++				if (plugin_dirs != NULL) {
++					std::string p(plugin_dirs), t;
++					std::stringstream ss(p);
++
++					while(std::getline(ss, t, ':')) {
++						all_dirs.push_back(t);
++					}
++				}
++
++				for (auto dir : all_dirs) {
++					hdl = dlopen([dir, orig_filename]() {
++						std::string new_path = dir + "/" + orig_filename;
++
++						// Check if we need to append .so
++						if (new_path.find(".so") == std::string::npos)
++							new_path.append(".so");
++
++						return new_path;
++					}().c_str(), RTLD_LAZY|RTLD_LOCAL);
++					if (hdl != NULL) break;
++                                }
+ 			}
+ 
+ 			if (hdl == NULL)
diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix b/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix
new file mode 100644
index 000000000000..77d4ad8cf9dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitHub, pkg-config
+, yosys, readline, zlib, bluespec
+}:
+
+stdenv.mkDerivation {
+  pname = "yosys-bluespec";
+  version = "2021.09.08";
+  plugin = "bluespec";
+
+  src = fetchFromGitHub {
+    owner  = "thoughtpolice";
+    repo   = "yosys-bluespec";
+    rev    = "f6f4127a4e96e18080fd5362b6769fa3e24c76b1";
+    sha256 = "sha256-3cNFP/k4JsgLyUQHWU10Htl2Rh0staAcA3R4piD6hDE=";
+  };
+
+  buildInputs = [ yosys readline zlib bluespec ];
+  nativeBuildInputs = [ pkg-config ];
+
+  doCheck = true;
+  makeFlags = [
+    "PREFIX=$(out)/share/yosys/plugins"
+    "STATIC_BSC_PATH=${bluespec}/bin/bsc"
+    "STATIC_BSC_LIBDIR=${bluespec}/lib"
+  ];
+
+  meta = with lib; {
+    description = "Bluespec plugin for Yosys";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix b/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix
new file mode 100644
index 000000000000..2ec17f391a99
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, pkg-config
+, yosys
+, readline
+, zlib
+, ghdl
+}:
+
+stdenv.mkDerivation {
+  pname = "yosys-ghdl";
+  # This is not the latest commit, but it's the latest that builds with current stable ghdl 2.0.0
+  version = "2022.01.11";
+  plugin = "ghdl";
+
+  src = fetchFromGitHub {
+    owner  = "ghdl";
+    repo   = "ghdl-yosys-plugin";
+    rev    = "c9b05e481423c55ffcbb856fd5296701f670808c";
+    sha256 = "sha256-tT2+DXUtbJIBzBUBcyG2sz+3G+dTkciLVIczcRPr0Jw=";
+  };
+
+  buildInputs = [
+    yosys
+    readline
+    zlib
+    ghdl
+  ];
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  doCheck = true;
+  installPhase = ''
+    mkdir -p $out/share/yosys/plugins
+    cp ghdl.so $out/share/yosys/plugins/ghdl.so
+  '';
+
+  meta = with lib; {
+    description = "GHDL plugin for Yosys";
+    homepage    = "https://github.com/ghdl/ghdl-yosys-plugin";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugins/symbiflow.nix b/nixpkgs/pkgs/development/compilers/yosys/plugins/symbiflow.nix
new file mode 100644
index 000000000000..2afa372b6ec4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/plugins/symbiflow.nix
@@ -0,0 +1,99 @@
+{ fetchFromGitHub
+, gtest
+, lib
+, python3
+, readline
+, stdenv
+, yosys
+, zlib
+, yosys-symbiflow
+, pkg-config
+}: let
+
+  version = "1.20230906";
+
+  src = fetchFromGitHub {
+    owner = "chipsalliance";
+    repo  = "yosys-f4pga-plugins";
+    rev   = "v${version}";
+    hash  = "sha256-XIn5wFw8i2njDN0Arua5BdZ0u1q6a/aJAs48YICehsc=";
+  };
+
+  # Supported symbiflow plugins.
+  #
+  # The following are disabled:
+  #
+  # "ql-qlf" builds but fails to load the plugin, so is not currently supported.
+  plugins = [
+    "design_introspection"
+    "fasm"
+    "integrateinv"
+    "params"
+    "ql-iob"
+    # "ql-qlf"
+    "sdc"
+    "xdc"
+  ];
+
+  static_gtest = gtest.overrideAttrs (old: {
+    dontDisableStatic = true;
+    disableHardening = [ "pie" ];
+    cmakeFlags = old.cmakeFlags ++ ["-DBUILD_SHARED_LIBS=OFF"];
+  });
+
+in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec {
+  pname = "yosys-symbiflow-${plugin}-plugin";
+  inherit src version plugin;
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ python3 pkg-config ];
+  buildInputs = [
+    yosys
+    readline
+    zlib
+  ];
+
+  # xdc has an incorrect path to a test which has yet to be patched
+  doCheck = plugin != "xdc";
+  nativeCheckInputs = [ static_gtest ];
+
+  # A Makefile rule tries to wget-fetch a yosys script from github.
+  # Link the script from our yosys sources in preBuild instead, so that
+  # the Makefile rule is a no-op.
+  preBuild = ''
+    ln -s ${yosys.src}/passes/pmgen/pmgen.py pmgen.py
+  '';
+
+  # Providing a symlink avoids the need for patching the test makefile
+  postUnpack = ''
+    mkdir -p source/third_party/googletest/build/
+    ln -s ${static_gtest}/lib source/third_party/googletest/build/lib
+  '';
+
+  makeFlags = [
+    "PLUGIN_LIST=${plugin}"
+  ];
+
+  buildFlags = [
+    "YOSYS_PLUGINS_DIR=\${out}/share/yosys/plugins/"
+    "YOSYS_DATA_DIR=\${out}/share/yosys/"
+  ];
+
+  checkTarget = "test";
+  checkFlags = [
+    ( "NIX_YOSYS_PLUGIN_DIRS=\${NIX_BUILD_TOP}/source/${plugin}-plugin/build"
+      # sdc and xdc plugins use design introspection for their tests
+      + (lib.optionalString ( plugin == "sdc" || plugin == "xdc" )
+        ":${yosys-symbiflow.design_introspection}/share/yosys/plugins/")
+    )
+  ];
+
+  installFlags = buildFlags;
+
+  meta = with lib; {
+    description = "Symbiflow ${plugin} plugin for Yosys";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ ollieB thoughtpolice ];
+  };
+}))
diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugins/synlig.nix b/nixpkgs/pkgs/development/compilers/yosys/plugins/synlig.nix
new file mode 100644
index 000000000000..665421af21f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/plugins/synlig.nix
@@ -0,0 +1,101 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, antlr4
+, capnproto
+, readline
+, surelog
+, uhdm
+, yosys
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "yosys-synlig";
+  plugin = "synlig";
+
+  # The module has automatic regular releases, with date + short git hash
+  GIT_VERSION = "2023-11-28-b8ed72d";
+
+  # Derive our package version from GIT_VERSION, remove hash, just keep date.
+  version = builtins.concatStringsSep "-" (
+    lib.take 3 (builtins.splitVersion finalAttrs.GIT_VERSION));
+
+  src = fetchFromGitHub {
+    owner = "chipsalliance";
+    repo  = "synlig";
+    rev   = "${finalAttrs.GIT_VERSION}";
+    hash  = "sha256-jdA3PBodecqriGWU/BzWtQ5gyu62pZHv+1NvFrwsTTk=";
+    fetchSubmodules = false;  # we use all dependencies from nix
+  };
+
+  patches = [
+    (fetchpatch {
+      # Fixes https://github.com/chipsalliance/synlig/issues/2299
+      name = "make-compile-for-yosys-0.37.patch";
+      url = "https://github.com/chipsalliance/synlig/commit/3dd46d4769c20b6dd1163310f8e56560b351a211.patch";
+      hash = "sha256-OP/2HA/Ukt6o5aKgoBk19P6T/33btU/x6VnoIVXct1g=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    antlr4.runtime.cpp
+    capnproto
+    readline
+    surelog
+    uhdm
+    yosys
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    # Remove assumptions that submodules are available.
+    rm -f third_party/Build.*.mk
+
+    # Create a stub makefile include that delegates the parameter-gathering
+    # to yosys-config
+    cat > third_party/Build.yosys.mk << "EOF"
+    t  := yosys
+    ts := ''$(call GetTargetStructName,''${t})
+
+    ''${ts}.src_dir   := ''$(shell yosys-config --datdir/include)
+    ''${ts}.mod_dir   := ''${TOP_DIR}third_party/yosys_mod/
+    EOF
+
+    make -j $NIX_BUILD_CORES build@systemverilog-plugin \
+            LDFLAGS="''$(yosys-config --ldflags --ldlibs)"
+    runHook postBuild
+  '';
+
+  # Check that the plugin can be loaded successfully and parse simple file.
+  doCheck = true;
+  checkPhase = ''
+     runHook preCheck
+     echo "module litmustest(); endmodule;" > litmustest.sv
+     yosys -p "plugin -i build/release/systemverilog-plugin/systemverilog.so;\
+               read_systemverilog litmustest.sv"
+     runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/yosys/plugins
+    cp ./build/release/systemverilog-plugin/systemverilog.so \
+           $out/share/yosys/plugins/systemverilog.so
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "SystemVerilog support plugin for Yosys";
+    homepage    = "https://github.com/chipsalliance/synlig";
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ hzeller ];
+    platforms   = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/yosys/setup-hook.sh b/nixpkgs/pkgs/development/compilers/yosys/setup-hook.sh
new file mode 100644
index 000000000000..d01bbdd1a8c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/setup-hook.sh
@@ -0,0 +1,5 @@
+addYosysPluginPath() {
+  addToSearchPath NIX_YOSYS_PLUGIN_DIRS "$1/share/yosys/plugins"
+}
+
+addEnvHooks "$targetOffset" addYosysPluginPath
diff --git a/nixpkgs/pkgs/development/compilers/z88dk/default.nix b/nixpkgs/pkgs/development/compilers/z88dk/default.nix
new file mode 100644
index 000000000000..a3217f5732c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/z88dk/default.nix
@@ -0,0 +1,59 @@
+{ fetchFromGitHub, lib, stdenv, makeWrapper, unzip, libxml2, gmp, m4, uthash, which, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "z88dk";
+  version = "2.3";
+
+  src = fetchFromGitHub {
+    owner = "z88dk";
+    repo = "z88dk";
+    rev = "v${version}";
+    sha256 = "sha256-CHTORgK6FYIO6n+cvTUX4huY2Ek5FuHrs40QN5NZX44=";
+    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)
+  env.NIX_CFLAGS_COMPILE = "-O";
+
+  short_rev = builtins.substring 0 7 src.rev;
+  makeFlags = [
+    "git_rev=${short_rev}"
+    "version=${version}"
+    "DESTDIR=$(out)"
+    "git_count=0"
+  ];
+
+  nativeBuildInputs = [ which makeWrapper unzip pkg-config ];
+  buildInputs = [ libxml2 m4 uthash gmp ];
+
+  preInstall = ''
+    mkdir -p $out/{bin,share}
+  '';
+
+  installTargets = [ "libs" "install" ];
+
+  meta = with lib; {
+    homepage = "https://www.z88dk.org";
+    description = "z80 Development Kit";
+    license = licenses.clArtistic;
+    maintainers = [ maintainers.siraben ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zasm/default.nix b/nixpkgs/pkgs/development/compilers/zasm/default.nix
new file mode 100644
index 000000000000..cd15b756b36e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zasm/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, zlib }:
+let
+  libs-src = fetchFromGitHub {
+    owner = "megatokio";
+    repo = "Libraries";
+    # 2021-02-02
+    rev = "c5cb3ed512c677db6f33e2d3539dfbb6e547030b";
+    sha256 = "sha256-GiplhZf640uScVdKL6E/fegOgtC9SE1xgBqcX86XADk=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "zasm";
+  version = "4.4.7";
+
+  src = fetchFromGitHub {
+    owner = "megatokio";
+    repo = "zasm";
+    rev = version;
+    sha256 = "sha256-Zbno8kmzss1H2FjwzHB4U7UXxa6oDfsPV80MVVFfM68=";
+    postFetch = ''
+      # remove folder containing files with weird names (causes the hash to turn out differently under macOS vs. Linux)
+      rm -rv $out/Test
+    '';
+  };
+
+  buildInputs = [ zlib ];
+
+  configurePhase = ''
+    ln -sf ${libs-src} Libraries
+  '';
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+    "LINK=${stdenv.cc.targetPrefix}c++"
+    "STRIP=${stdenv.cc.targetPrefix}strip"
+  ];
+
+  installPhase = ''
+    install -Dm755 -t $out/bin zasm
+  '';
+
+  meta = with lib; {
+    description = "Z80 / 8080 / Z180 assembler (for unix-style OS)";
+    homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.turbomack ];
+    platforms = platforms.unix;
+    badPlatforms = platforms.aarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zig/0.10.nix b/nixpkgs/pkgs/development/compilers/zig/0.10.nix
new file mode 100644
index 000000000000..d02b9ff1c976
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/0.10.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, llvmPackages
+, libxml2
+, zlib
+, coreutils
+, callPackage
+}@args:
+
+import ./generic.nix args {
+  version = "0.10.1";
+
+  hash = "sha256-69QIkkKzApOGfrBdgtmxFMDytRkSh+0YiaJQPbXsBeo=";
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    # Backport alignment related panics from zig-master to 0.10.
+    # Upstream issue: https://github.com/ziglang/zig/issues/14559
+    ./002-0.10-macho-fixes.patch
+  ];
+
+  cmakeFlags = [
+    # file RPATH_CHANGE could not write new RPATH
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+
+    # always link against static build of LLVM
+    "-DZIG_STATIC_LLVM=ON"
+
+    # ensure determinism in the compiler build
+    "-DZIG_TARGET_MCPU=baseline"
+  ];
+
+  postBuild = ''
+    ./zig2 run ../doc/docgen.zig -- ./zig2 ../doc/langref.html.in langref.html
+  '';
+
+  postInstall = ''
+    install -Dm644 -t $doc/share/doc/zig-$version/html ./langref.html
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/zig/0.11.nix b/nixpkgs/pkgs/development/compilers/zig/0.11.nix
new file mode 100644
index 000000000000..b393f42c6513
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/0.11.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, llvmPackages
+, libxml2
+, zlib
+, coreutils
+, callPackage
+}@args:
+
+import ./generic.nix args {
+  version = "0.11.0";
+
+  hash = "sha256-iuU1fzkbJxI+0N1PiLQM013Pd1bzrgqkbIyTxo5gB2I=";
+
+  outputs = [ "out" "doc" ];
+
+  cmakeFlags = [
+    # file RPATH_CHANGE could not write new RPATH
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+
+    # always link against static build of LLVM
+    "-DZIG_STATIC_LLVM=ON"
+
+    # ensure determinism in the compiler build
+    "-DZIG_TARGET_MCPU=baseline"
+  ];
+
+  postBuild = ''
+    stage3/bin/zig run ../tools/docgen.zig -- ../doc/langref.html.in langref.html --zig $PWD/stage3/bin/zig
+  '';
+
+  postInstall = ''
+    install -Dm444 -t $doc/share/doc/zig-$version/html langref.html
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/zig/0.9.nix b/nixpkgs/pkgs/development/compilers/zig/0.9.nix
new file mode 100644
index 000000000000..d648c9c2eb64
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/0.9.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, llvmPackages
+, libxml2
+, zlib
+, coreutils
+, callPackage
+}@args:
+
+import ./generic.nix args {
+  version = "0.9.1";
+
+  hash = "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k=";
+
+  patches = [
+    # Fix index out of bounds reading RPATH (cherry-picked from 0.10-dev)
+    ./000-0.9-read-dynstr-at-rpath-offset.patch
+    # Fix build on macOS 13 (cherry-picked from 0.10-dev)
+    ./001-0.9-bump-macos-supported-version.patch
+  ];
+
+  prePatch =
+    let
+      zig_0_10_0 = fetchFromGitHub {
+        owner = "ziglang";
+        repo = "zig";
+        rev = "0.10.0";
+        hash = "sha256-DNs937N7PLQimuM2anya4npYXcj6cyH+dRS7AiOX7tw=";
+      };
+    in
+    ''
+      cp -R ${zig_0_10_0}/lib/libc/include/any-macos.13-any lib/libc/include/any-macos.13-any
+      cp -R ${zig_0_10_0}/lib/libc/include/aarch64-macos.13-none lib/libc/include/aarch64-macos.13-gnu
+      cp -R ${zig_0_10_0}/lib/libc/include/x86_64-macos.13-none lib/libc/include/x86_64-macos.13-gnu
+      cp ${zig_0_10_0}/lib/libc/darwin/libSystem.13.tbd lib/libc/darwin/
+    '';
+
+  cmakeFlags = [
+    # file RPATH_CHANGE could not write new RPATH
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+
+    # ensure determinism in the compiler build
+    "-DZIG_TARGET_MCPU=baseline"
+  ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/zig/000-0.9-read-dynstr-at-rpath-offset.patch b/nixpkgs/pkgs/development/compilers/zig/000-0.9-read-dynstr-at-rpath-offset.patch
new file mode 100644
index 000000000000..70633193f944
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/000-0.9-read-dynstr-at-rpath-offset.patch
@@ -0,0 +1,39 @@
+commit ebcdbd9b3c9d437780aee4d6af76bbd2ab32ea06
+Author: LeRoyce Pearson <contact@leroycepearson.dev>
+Date:   2022-07-17 16:01:22 -0600
+
+    Read dynstr starting at rpath offset
+    
+    Since we know the offset, we may as well read starting there. Still expects
+    rpath to fit in 4096 bytes; that might be worth fixing in the future.
+    
+    Fixes issue #12112
+
+diff --git a/lib/std/zig/system/NativeTargetInfo.zig b/lib/std/zig/system/NativeTargetInfo.zig
+index af41fc790579..ad0b6d5ce1e1 100644
+--- a/lib/std/zig/system/NativeTargetInfo.zig
++++ b/lib/std/zig/system/NativeTargetInfo.zig
+@@ -652,14 +652,19 @@ pub fn abiAndDynamicLinkerFromFile(
+             } else null;
+ 
+             if (dynstr) |ds| {
+-                const strtab_len = std.math.min(ds.size, strtab_buf.len);
+-                const strtab_read_len = try preadMin(file, &strtab_buf, ds.offset, strtab_len);
+-                const strtab = strtab_buf[0..strtab_read_len];
+                 // TODO this pointer cast should not be necessary
+                 const rpoff_usize = std.math.cast(usize, rpoff) catch |err| switch (err) {
+                     error.Overflow => return error.InvalidElfFile,
+                 };
+-                const rpath_list = mem.sliceTo(std.meta.assumeSentinel(strtab[rpoff_usize..].ptr, 0), 0);
++                if (rpoff_usize > ds.size) return error.InvalidElfFile;
++                const rpoff_file = ds.offset + rpoff_usize;
++                const rp_max_size = ds.size - rpoff_usize;
++
++                const strtab_len = std.math.min(rp_max_size, strtab_buf.len);
++                const strtab_read_len = try preadMin(file, &strtab_buf, rpoff_file, strtab_len);
++                const strtab = strtab_buf[0..strtab_read_len];
++
++                const rpath_list = mem.sliceTo(std.meta.assumeSentinel(strtab.ptr, 0), 0);
+                 var it = mem.tokenize(u8, rpath_list, ":");
+                 while (it.next()) |rpath| {
+                     var dir = fs.cwd().openDir(rpath, .{}) catch |err| switch (err) {
diff --git a/nixpkgs/pkgs/development/compilers/zig/001-0.9-bump-macos-supported-version.patch b/nixpkgs/pkgs/development/compilers/zig/001-0.9-bump-macos-supported-version.patch
new file mode 100644
index 000000000000..07b90e223553
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/001-0.9-bump-macos-supported-version.patch
@@ -0,0 +1,50 @@
+From 98285b17b3887de37b630da66f09a44f42ddbe01 Mon Sep 17 00:00:00 2001
+From: Jakub Konka <kubkon@jakubkonka.com>
+Date: Tue, 25 Oct 2022 11:46:42 +0200
+Subject: [PATCH] darwin: bump max macOS version to 13.0
+
+---
+ lib/std/target.zig | 4 ++--
+ src/target.zig     | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/std/target.zig b/lib/std/target.zig
+index d791e3b0350..7fbad5baa3c 100644
+--- a/lib/std/target.zig
++++ b/lib/std/target.zig
+@@ -277,13 +277,13 @@ pub const Target = struct {
+                         .aarch64 => VersionRange{
+                             .semver = .{
+                                 .min = .{ .major = 11, .minor = 6 },
+-                                .max = .{ .major = 12, .minor = 0 },
++                                .max = .{ .major = 13, .minor = 0 },
+                             },
+                         },
+                         .x86_64 => VersionRange{
+                             .semver = .{
+                                 .min = .{ .major = 10, .minor = 13 },
+-                                .max = .{ .major = 12, .minor = 0 },
++                                .max = .{ .major = 13, .minor = 0 },
+                             },
+                         },
+                         else => unreachable,
+diff --git a/src/target.zig b/src/target.zig
+index 9e2d26dac65..fc585912c45 100644
+--- a/src/target.zig
++++ b/src/target.zig
+@@ -18,6 +18,7 @@ pub const available_libcs = [_]ArchOsAbi{
+     .{ .arch = .aarch64, .os = .windows, .abi = .gnu },
+     .{ .arch = .aarch64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 11, .minor = 0 } },
+     .{ .arch = .aarch64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 12, .minor = 0 } },
++    .{ .arch = .aarch64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 13, .minor = 0 } },
+     .{ .arch = .armeb, .os = .linux, .abi = .gnueabi },
+     .{ .arch = .armeb, .os = .linux, .abi = .gnueabihf },
+     .{ .arch = .armeb, .os = .linux, .abi = .musleabi },
+@@ -73,6 +74,7 @@ pub const available_libcs = [_]ArchOsAbi{
+     .{ .arch = .x86_64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 10, .minor = 0 } },
+     .{ .arch = .x86_64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 11, .minor = 0 } },
+     .{ .arch = .x86_64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 12, .minor = 0 } },
++    .{ .arch = .x86_64, .os = .macos, .abi = .gnu, .os_ver = .{ .major = 13, .minor = 0 } },
+ };
+ 
+ pub fn libCGenericName(target: std.Target) [:0]const u8 {
diff --git a/nixpkgs/pkgs/development/compilers/zig/002-0.10-macho-fixes.patch b/nixpkgs/pkgs/development/compilers/zig/002-0.10-macho-fixes.patch
new file mode 100644
index 000000000000..95f0bdf701e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/002-0.10-macho-fixes.patch
@@ -0,0 +1,367 @@
+From 405801d8a8be734425eca4f3eebc56287804ac93 Mon Sep 17 00:00:00 2001
+From: Jakub Konka <kubkon@jakubkonka.com>
+Date: Sun, 5 Feb 2023 10:04:34 +0100
+Subject: [PATCH] macho: temp fix alignment and enable some logs
+
+---
+ src/link/MachO/Object.zig  | 80 ++++++++++++++++++++++++++------------
+ src/link/MachO/ZldAtom.zig | 29 +++++++-------
+ src/link/MachO/zld.zig     | 22 +++++------
+ 3 files changed, 79 insertions(+), 52 deletions(-)
+
+diff --git a/src/link/MachO/Object.zig b/src/link/MachO/Object.zig
+index 401184da515..05638c1f858 100644
+--- a/src/link/MachO/Object.zig
++++ b/src/link/MachO/Object.zig
+@@ -54,12 +54,18 @@ atom_by_index_table: []AtomIndex = undefined,
+ /// Can be undefined as set together with in_symtab.
+ globals_lookup: []i64 = undefined,
+ 
++/// All relocs sorted and flattened.
++relocs: std.ArrayListUnmanaged(macho.relocation_info) = .{},
++sect_relocs_lookup: std.ArrayListUnmanaged(u32) = .{},
++
+ atoms: std.ArrayListUnmanaged(AtomIndex) = .{},
+ 
+ pub fn deinit(self: *Object, gpa: Allocator) void {
+     self.atoms.deinit(gpa);
+     gpa.free(self.name);
+     gpa.free(self.contents);
++    self.relocs.deinit(gpa);
++    self.sect_relocs_lookup.deinit(gpa);
+     if (self.in_symtab) |_| {
+         gpa.free(self.source_symtab_lookup);
+         gpa.free(self.source_address_lookup);
+@@ -101,6 +107,10 @@ pub fn parse(self: *Object, allocator: Allocator, cpu_arch: std.Target.Cpu.Arch)
+         return error.MismatchedCpuArchitecture;
+     }
+ 
++    const nsects = self.getSourceSections().len;
++    try self.sect_relocs_lookup.resize(allocator, nsects);
++    mem.set(u32, self.sect_relocs_lookup.items, 0);
++
+     var it = LoadCommandIterator{
+         .ncmds = self.header.ncmds,
+         .buffer = self.contents[@sizeOf(macho.mach_header_64)..][0..self.header.sizeofcmds],
+@@ -110,13 +120,11 @@ pub fn parse(self: *Object, allocator: Allocator, cpu_arch: std.Target.Cpu.Arch)
+             .SYMTAB => {
+                 const symtab = cmd.cast(macho.symtab_command).?;
+                 self.in_symtab = @ptrCast(
+-                    [*]const macho.nlist_64,
+-                    @alignCast(@alignOf(macho.nlist_64), &self.contents[symtab.symoff]),
++                    [*]align(1) const macho.nlist_64,
++                    self.contents.ptr + symtab.symoff,
+                 )[0..symtab.nsyms];
+                 self.in_strtab = self.contents[symtab.stroff..][0..symtab.strsize];
+ 
+-                const nsects = self.getSourceSections().len;
+-
+                 self.symtab = try allocator.alloc(macho.nlist_64, self.in_symtab.?.len + nsects);
+                 self.source_symtab_lookup = try allocator.alloc(u32, self.in_symtab.?.len);
+                 self.strtab_lookup = try allocator.alloc(u32, self.in_symtab.?.len);
+@@ -192,6 +200,17 @@ const SymbolAtIndex = struct {
+         return mem.sliceTo(@ptrCast([*:0]const u8, ctx.in_strtab.?.ptr + off), 0);
+     }
+ 
++    fn getSymbolSeniority(self: SymbolAtIndex, ctx: Context) u2 {
++        const sym = self.getSymbol(ctx);
++        if (!sym.ext()) {
++            const sym_name = self.getSymbolName(ctx);
++            if (mem.startsWith(u8, sym_name, "l") or mem.startsWith(u8, sym_name, "L")) return 0;
++            return 1;
++        }
++        if (sym.weakDef() or sym.pext()) return 2;
++        return 3;
++    }
++
+     /// Performs lexicographic-like check.
+     /// * lhs and rhs defined
+     ///   * if lhs == rhs
+@@ -206,23 +225,15 @@ const SymbolAtIndex = struct {
+         if (lhs.sect() and rhs.sect()) {
+             if (lhs.n_value == rhs.n_value) {
+                 if (lhs.n_sect == rhs.n_sect) {
+-                    if (lhs.ext() and rhs.ext()) {
+-                        if ((lhs.pext() or lhs.weakDef()) and (rhs.pext() or rhs.weakDef())) {
+-                            return false;
+-                        } else return rhs.pext() or rhs.weakDef();
+-                    } else {
+-                        const lhs_name = lhs_index.getSymbolName(ctx);
+-                        const lhs_temp = mem.startsWith(u8, lhs_name, "l") or mem.startsWith(u8, lhs_name, "L");
+-                        const rhs_name = rhs_index.getSymbolName(ctx);
+-                        const rhs_temp = mem.startsWith(u8, rhs_name, "l") or mem.startsWith(u8, rhs_name, "L");
+-                        if (lhs_temp and rhs_temp) {
+-                            return false;
+-                        } else return rhs_temp;
+-                    }
++                    const lhs_senior = lhs_index.getSymbolSeniority(ctx);
++                    const rhs_senior = rhs_index.getSymbolSeniority(ctx);
++                    if (lhs_senior == rhs_senior) {
++                        return lessThanByNStrx(ctx, lhs_index, rhs_index);
++                    } else return lhs_senior < rhs_senior;
+                 } else return lhs.n_sect < rhs.n_sect;
+             } else return lhs.n_value < rhs.n_value;
+         } else if (lhs.undf() and rhs.undf()) {
+-            return false;
++            return lessThanByNStrx(ctx, lhs_index, rhs_index);
+         } else return rhs.undf();
+     }
+ 
+@@ -393,6 +404,16 @@ pub fn splitIntoAtoms(self: *Object, zld: *Zld, object_id: u31) !void {
+             zld.sections.items(.header)[out_sect_id].sectName(),
+         });
+ 
++        // Parse all relocs for the input section, and sort in descending order.
++        // Previously, I have wrongly assumed the compilers output relocations for each
++        // section in a sorted manner which is simply not true.
++        const start = @intCast(u32, self.relocs.items.len);
++        if (self.getSourceRelocs(section.header)) |relocs| {
++            try self.relocs.appendUnalignedSlice(gpa, relocs);
++            std.sort.sort(macho.relocation_info, self.relocs.items[start..], {}, relocGreaterThan);
++        }
++        self.sect_relocs_lookup.items[section.id] = start;
++
+         const cpu_arch = zld.options.target.cpu.arch;
+         const sect_loc = filterSymbolsBySection(symtab[sect_sym_index..], sect_id + 1);
+         const sect_start_index = sect_sym_index + sect_loc.index;
+@@ -559,7 +580,7 @@ pub fn getSourceSections(self: Object) []const macho.section_64 {
+     } else unreachable;
+ }
+ 
+-pub fn parseDataInCode(self: Object) ?[]const macho.data_in_code_entry {
++pub fn parseDataInCode(self: Object) ?[]align(1) const macho.data_in_code_entry {
+     var it = LoadCommandIterator{
+         .ncmds = self.header.ncmds,
+         .buffer = self.contents[@sizeOf(macho.mach_header_64)..][0..self.header.sizeofcmds],
+@@ -569,10 +590,7 @@ pub fn parseDataInCode(self: Object) ?[]const macho.data_in_code_entry {
+             .DATA_IN_CODE => {
+                 const dice = cmd.cast(macho.linkedit_data_command).?;
+                 const ndice = @divExact(dice.datasize, @sizeOf(macho.data_in_code_entry));
+-                return @ptrCast(
+-                    [*]const macho.data_in_code_entry,
+-                    @alignCast(@alignOf(macho.data_in_code_entry), &self.contents[dice.dataoff]),
+-                )[0..ndice];
++                return @ptrCast([*]align(1) const macho.data_in_code_entry, self.contents.ptr + dice.dataoff)[0..ndice];
+             },
+             else => {},
+         }
+@@ -632,11 +650,23 @@ pub fn getSectionAliasSymbolPtr(self: *Object, sect_id: u8) *macho.nlist_64 {
+     return &self.symtab[self.getSectionAliasSymbolIndex(sect_id)];
+ }
+ 
+-pub fn getRelocs(self: Object, sect: macho.section_64) []align(1) const macho.relocation_info {
+-    if (sect.nreloc == 0) return &[0]macho.relocation_info{};
++fn getSourceRelocs(self: Object, sect: macho.section_64) ?[]align(1) const macho.relocation_info {
++    if (sect.nreloc == 0) return null;
+     return @ptrCast([*]align(1) const macho.relocation_info, self.contents.ptr + sect.reloff)[0..sect.nreloc];
+ }
+ 
++pub fn getRelocs(self: Object, sect_id: u16) []const macho.relocation_info {
++    const sect = self.getSourceSection(sect_id);
++    const start = self.sect_relocs_lookup.items[sect_id];
++    const len = sect.nreloc;
++    return self.relocs.items[start..][0..len];
++}
++
++fn relocGreaterThan(ctx: void, lhs: macho.relocation_info, rhs: macho.relocation_info) bool {
++    _ = ctx;
++    return lhs.r_address > rhs.r_address;
++}
++
+ pub fn getSymbolName(self: Object, index: u32) []const u8 {
+     const strtab = self.in_strtab.?;
+     const sym = self.symtab[index];
+diff --git a/src/link/MachO/ZldAtom.zig b/src/link/MachO/ZldAtom.zig
+index 817aa816625..b42309598d7 100644
+--- a/src/link/MachO/ZldAtom.zig
++++ b/src/link/MachO/ZldAtom.zig
+@@ -465,7 +465,7 @@ pub fn resolveRelocs(
+     zld: *Zld,
+     atom_index: AtomIndex,
+     atom_code: []u8,
+-    atom_relocs: []align(1) const macho.relocation_info,
++    atom_relocs: []const macho.relocation_info,
+     reverse_lookup: []u32,
+ ) !void {
+     const arch = zld.options.target.cpu.arch;
+@@ -540,7 +540,7 @@ fn resolveRelocsArm64(
+     zld: *Zld,
+     atom_index: AtomIndex,
+     atom_code: []u8,
+-    atom_relocs: []align(1) const macho.relocation_info,
++    atom_relocs: []const macho.relocation_info,
+     reverse_lookup: []u32,
+     context: RelocContext,
+ ) !void {
+@@ -579,7 +579,6 @@ fn resolveRelocsArm64(
+         }
+ 
+         const target = parseRelocTarget(zld, atom_index, rel, reverse_lookup);
+-        const rel_offset = @intCast(u32, rel.r_address - context.base_offset);
+ 
+         log.debug("  RELA({s}) @ {x} => %{d} ('{s}') in object({?})", .{
+             @tagName(rel_type),
+@@ -589,6 +588,7 @@ fn resolveRelocsArm64(
+             target.file,
+         });
+ 
++        const rel_offset = @intCast(u32, rel.r_address - context.base_offset);
+         const source_addr = blk: {
+             const source_sym = zld.getSymbol(atom.getSymbolWithLoc());
+             break :blk source_sym.n_value + rel_offset;
+@@ -596,7 +596,7 @@ fn resolveRelocsArm64(
+         const is_tlv = is_tlv: {
+             const source_sym = zld.getSymbol(atom.getSymbolWithLoc());
+             const header = zld.sections.items(.header)[source_sym.n_sect - 1];
+-            break :is_tlv header.@"type"() == macho.S_THREAD_LOCAL_VARIABLES;
++            break :is_tlv header.type() == macho.S_THREAD_LOCAL_VARIABLES;
+         };
+         const target_addr = try getRelocTargetAddress(zld, rel, target, is_tlv);
+ 
+@@ -831,7 +831,7 @@ fn resolveRelocsX86(
+     zld: *Zld,
+     atom_index: AtomIndex,
+     atom_code: []u8,
+-    atom_relocs: []align(1) const macho.relocation_info,
++    atom_relocs: []const macho.relocation_info,
+     reverse_lookup: []u32,
+     context: RelocContext,
+ ) !void {
+@@ -877,7 +877,7 @@ fn resolveRelocsX86(
+         const is_tlv = is_tlv: {
+             const source_sym = zld.getSymbol(atom.getSymbolWithLoc());
+             const header = zld.sections.items(.header)[source_sym.n_sect - 1];
+-            break :is_tlv header.@"type"() == macho.S_THREAD_LOCAL_VARIABLES;
++            break :is_tlv header.type() == macho.S_THREAD_LOCAL_VARIABLES;
+         };
+ 
+         log.debug("    | source_addr = 0x{x}", .{source_addr});
+@@ -1015,27 +1015,24 @@ pub fn getAtomCode(zld: *Zld, atom_index: AtomIndex) []const u8 {
+     return code[offset..][0..code_len];
+ }
+ 
+-pub fn getAtomRelocs(zld: *Zld, atom_index: AtomIndex) []align(1) const macho.relocation_info {
++pub fn getAtomRelocs(zld: *Zld, atom_index: AtomIndex) []const macho.relocation_info {
+     const atom = zld.getAtomPtr(atom_index);
+     assert(atom.getFile() != null); // Synthetic atom shouldn't need to unique for relocs.
+     const object = zld.objects.items[atom.getFile().?];
+ 
+-    const source_sect = if (object.getSourceSymbol(atom.sym_index)) |source_sym| blk: {
+-        const source_sect = object.getSourceSection(source_sym.n_sect - 1);
+-        assert(!source_sect.isZerofill());
+-        break :blk source_sect;
++    const source_sect_id = if (object.getSourceSymbol(atom.sym_index)) |source_sym| blk: {
++        break :blk source_sym.n_sect - 1;
+     } else blk: {
+         // If there was no matching symbol present in the source symtab, this means
+         // we are dealing with either an entire section, or part of it, but also
+         // starting at the beginning.
+         const nbase = @intCast(u32, object.in_symtab.?.len);
+         const sect_id = @intCast(u16, atom.sym_index - nbase);
+-        const source_sect = object.getSourceSection(sect_id);
+-        assert(!source_sect.isZerofill());
+-        break :blk source_sect;
++        break :blk sect_id;
+     };
+-
+-    const relocs = object.getRelocs(source_sect);
++    const source_sect = object.getSourceSection(source_sect_id);
++    assert(!source_sect.isZerofill());
++    const relocs = object.getRelocs(source_sect_id);
+ 
+     if (atom.cached_relocs_start == -1) {
+         const indexes = if (object.getSourceSymbol(atom.sym_index)) |source_sym| blk: {
+diff --git a/src/link/MachO/zld.zig b/src/link/MachO/zld.zig
+index 3a2ea79c6ec..cee3f302c08 100644
+--- a/src/link/MachO/zld.zig
++++ b/src/link/MachO/zld.zig
+@@ -396,7 +396,7 @@ pub const Zld = struct {
+                 break :blk null;
+             }
+ 
+-            switch (sect.@"type"()) {
++            switch (sect.type()) {
+                 macho.S_4BYTE_LITERALS,
+                 macho.S_8BYTE_LITERALS,
+                 macho.S_16BYTE_LITERALS,
+@@ -1701,7 +1701,7 @@ pub const Zld = struct {
+                             break :outer;
+                         }
+                     }
+-                    switch (header.@"type"()) {
++                    switch (header.type()) {
+                         macho.S_NON_LAZY_SYMBOL_POINTERS => {
+                             try self.writeGotPointer(count, buffer.writer());
+                         },
+@@ -1718,7 +1718,7 @@ pub const Zld = struct {
+                                     break :outer;
+                                 }
+                             }
+-                            if (header.@"type"() == macho.S_SYMBOL_STUBS) {
++                            if (header.type() == macho.S_SYMBOL_STUBS) {
+                                 try self.writeStubCode(atom_index, count, buffer.writer());
+                             } else if (mem.eql(u8, header.sectName(), "__stub_helper")) {
+                                 try self.writeStubHelperCode(atom_index, buffer.writer());
+@@ -1802,7 +1802,7 @@ pub const Zld = struct {
+         for (slice.items(.header)) |*header, sect_id| {
+             if (header.size == 0) continue;
+             if (self.requiresThunks()) {
+-                if (header.isCode() and !(header.@"type"() == macho.S_SYMBOL_STUBS) and !mem.eql(u8, header.sectName(), "__stub_helper")) continue;
++                if (header.isCode() and !(header.type() == macho.S_SYMBOL_STUBS) and !mem.eql(u8, header.sectName(), "__stub_helper")) continue;
+             }
+ 
+             var atom_index = slice.items(.first_atom_index)[sect_id];
+@@ -1830,7 +1830,7 @@ pub const Zld = struct {
+         if (self.requiresThunks()) {
+             for (slice.items(.header)) |header, sect_id| {
+                 if (!header.isCode()) continue;
+-                if (header.@"type"() == macho.S_SYMBOL_STUBS) continue;
++                if (header.type() == macho.S_SYMBOL_STUBS) continue;
+                 if (mem.eql(u8, header.sectName(), "__stub_helper")) continue;
+ 
+                 // Create jump/branch range extenders if needed.
+@@ -1994,10 +1994,10 @@ pub const Zld = struct {
+         const section_precedence: u4 = blk: {
+             if (header.isCode()) {
+                 if (mem.eql(u8, "__text", header.sectName())) break :blk 0x0;
+-                if (header.@"type"() == macho.S_SYMBOL_STUBS) break :blk 0x1;
++                if (header.type() == macho.S_SYMBOL_STUBS) break :blk 0x1;
+                 break :blk 0x2;
+             }
+-            switch (header.@"type"()) {
++            switch (header.type()) {
+                 macho.S_NON_LAZY_SYMBOL_POINTERS,
+                 macho.S_LAZY_SYMBOL_POINTERS,
+                 => break :blk 0x0,
+@@ -2121,7 +2121,7 @@ pub const Zld = struct {
+ 
+         // Finally, unpack the rest.
+         for (slice.items(.header)) |header, sect_id| {
+-            switch (header.@"type"()) {
++            switch (header.type()) {
+                 macho.S_LITERAL_POINTERS,
+                 macho.S_REGULAR,
+                 macho.S_MOD_INIT_FUNC_POINTERS,
+@@ -2252,7 +2252,7 @@ pub const Zld = struct {
+         // Finally, unpack the rest.
+         const slice = self.sections.slice();
+         for (slice.items(.header)) |header, sect_id| {
+-            switch (header.@"type"()) {
++            switch (header.type()) {
+                 macho.S_LITERAL_POINTERS,
+                 macho.S_REGULAR,
+                 macho.S_MOD_INIT_FUNC_POINTERS,
+@@ -2707,10 +2707,10 @@ pub const Zld = struct {
+     }
+ 
+     fn filterDataInCode(
+-        dices: []const macho.data_in_code_entry,
++        dices: []align(1) const macho.data_in_code_entry,
+         start_addr: u64,
+         end_addr: u64,
+-    ) []const macho.data_in_code_entry {
++    ) []align(1) const macho.data_in_code_entry {
+         const Predicate = struct {
+             addr: u64,
+ 
+
diff --git a/nixpkgs/pkgs/development/compilers/zig/generic.nix b/nixpkgs/pkgs/development/compilers/zig/generic.nix
new file mode 100644
index 000000000000..220f3240f285
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/generic.nix
@@ -0,0 +1,72 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, llvmPackages
+, libxml2
+, zlib
+, coreutils
+, callPackage
+, ...
+}:
+
+args:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "zig";
+
+  src = fetchFromGitHub {
+    owner = "ziglang";
+    repo = "zig";
+    rev = finalAttrs.version;
+    inherit (args) hash;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    llvmPackages.llvm.dev
+  ];
+
+  buildInputs = [
+    libxml2
+    zlib
+  ] ++ (with llvmPackages; [
+    libclang
+    lld
+    llvm
+  ]);
+
+  env.ZIG_GLOBAL_CACHE_DIR = "$TMPDIR/zig-cache";
+
+  # Zig's build looks at /usr/bin/env to find dynamic linking info. This doesn't
+  # work in Nix's sandbox. Use env from our coreutils instead.
+  postPatch = ''
+    substituteInPlace lib/std/zig/system/NativeTargetInfo.zig \
+      --replace "/usr/bin/env" "${coreutils}/bin/env"
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    $out/bin/zig test --cache-dir "$TMPDIR/zig-test-cache" -I $src/test $src/test/behavior.zig
+
+    runHook postInstallCheck
+  '';
+
+  passthru = {
+    hook = callPackage ./hook.nix {
+      zig = finalAttrs.finalPackage;
+    };
+  };
+
+  meta = {
+    description = "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software";
+    homepage = "https://ziglang.org/";
+    changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ andrewrk ] ++ lib.teams.zig.members;
+    mainProgram = "zig";
+    platforms = lib.platforms.unix;
+  };
+} // removeAttrs args [ "hash" ])
diff --git a/nixpkgs/pkgs/development/compilers/zig/hook.nix b/nixpkgs/pkgs/development/compilers/zig/hook.nix
new file mode 100644
index 000000000000..0c099a4c0d11
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/hook.nix
@@ -0,0 +1,49 @@
+{ lib
+, makeSetupHook
+, zig
+}:
+
+makeSetupHook {
+  name = "zig-hook";
+
+  propagatedBuildInputs = [ zig ];
+
+  substitutions = {
+    # This zig_default_flags below is meant to avoid CPU feature impurity in
+    # Nixpkgs. However, this flagset is "unstable": it is specifically meant to
+    # be controlled by the upstream development team - being up to that team
+    # exposing or not that flags to the outside (especially the package manager
+    # teams).
+
+    # Because of this hurdle, @andrewrk from Zig Software Foundation proposed
+    # some solutions for this issue. Hopefully they will be implemented in
+    # future releases of Zig. When this happens, this flagset should be
+    # revisited accordingly.
+
+    # Below are some useful links describing the discovery process of this 'bug'
+    # in Nixpkgs:
+
+    # https://github.com/NixOS/nixpkgs/issues/169461
+    # https://github.com/NixOS/nixpkgs/issues/185644
+    # https://github.com/NixOS/nixpkgs/pull/197046
+    # https://github.com/NixOS/nixpkgs/pull/241741#issuecomment-1624227485
+    # https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653
+
+    zig_default_flags =
+      let
+        releaseType =
+          if lib.versionAtLeast zig.version "0.11" then
+            "-Doptimize=ReleaseSafe"
+          else
+            "-Drelease-safe=true";
+      in
+      [ "-Dcpu=baseline" releaseType ];
+  };
+
+  passthru = { inherit zig; };
+
+  meta = {
+    description = "A setup hook for using the Zig compiler in Nixpkgs";
+    inherit (zig.meta) maintainers platforms broken;
+  };
+} ./setup-hook.sh
diff --git a/nixpkgs/pkgs/development/compilers/zig/setup-hook.sh b/nixpkgs/pkgs/development/compilers/zig/setup-hook.sh
new file mode 100644
index 000000000000..689ebec8a307
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/setup-hook.sh
@@ -0,0 +1,70 @@
+# shellcheck shell=bash disable=SC2154,SC2086
+
+readonly zigDefaultFlagsArray=(@zig_default_flags@)
+
+function zigSetGlobalCacheDir {
+    ZIG_GLOBAL_CACHE_DIR=$(mktemp -d)
+    export ZIG_GLOBAL_CACHE_DIR
+}
+
+function zigBuildPhase {
+    runHook preBuild
+
+    local flagsArray=(
+        "${zigDefaultFlagsArray[@]}"
+        $zigBuildFlags "${zigBuildFlagsArray[@]}"
+    )
+
+    echoCmd 'zig build flags' "${flagsArray[@]}"
+    zig build "${flagsArray[@]}"
+
+    runHook postBuild
+}
+
+function zigCheckPhase {
+    runHook preCheck
+
+    local flagsArray=(
+        "${zigDefaultFlagsArray[@]}"
+        $zigCheckFlags "${zigCheckFlagsArray[@]}"
+    )
+
+    echoCmd 'zig check flags' "${flagsArray[@]}"
+    zig build test "${flagsArray[@]}"
+
+    runHook postCheck
+}
+
+function zigInstallPhase {
+    runHook preInstall
+
+    local flagsArray=(
+        "${zigDefaultFlagsArray[@]}"
+        $zigBuildFlags "${zigBuildFlagsArray[@]}"
+        $zigInstallFlags "${zigInstallFlagsArray[@]}"
+    )
+
+    if [ -z "${dontAddPrefix-}" ]; then
+        # Zig does not recognize `--prefix=/dir/`, only `--prefix /dir/`
+        flagsArray+=("${prefixKey:---prefix}" "$prefix")
+    fi
+
+    echoCmd 'zig install flags' "${flagsArray[@]}"
+    zig build install "${flagsArray[@]}"
+
+    runHook postInstall
+}
+
+addEnvHooks "$targetOffset" zigSetGlobalCacheDir
+
+if [ -z "${dontUseZigBuild-}" ] && [ -z "${buildPhase-}" ]; then
+    buildPhase=zigBuildPhase
+fi
+
+if [ -z "${dontUseZigCheck-}" ] && [ -z "${checkPhase-}" ]; then
+    checkPhase=zigCheckPhase
+fi
+
+if [ -z "${dontUseZigInstall-}" ] && [ -z "${installPhase-}" ]; then
+    installPhase=zigInstallPhase
+fi
diff --git a/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix b/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix
new file mode 100644
index 000000000000..d60f7950dcad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "zig-shell-completions";
+  version = "unstable-2023-11-18";
+
+  src = fetchFromGitHub {
+    owner = "ziglang";
+    repo = "shell-completions";
+    rev = "31d3ad12890371bf467ef7143f5c2f31cfa7b7c1";
+    hash = "sha256-ID/K0vdg7BTKGgozISk/X4RBxCVfhSkVD6GSZUoP9Ls=";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    installShellCompletion --bash --name zig.bash _zig.bash
+    installShellCompletion --zsh --name _zig _zig
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = unstableGitUpdater { };
+
+  meta = {
+    homepage = "https://github.com/ziglang/shell-completions";
+    description = "Shell completions for the Zig compiler";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ aaronjheng ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/zulu/11.nix b/nixpkgs/pkgs/development/compilers/zulu/11.nix
new file mode 100644
index 000000000000..afe33634820c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/11.nix
@@ -0,0 +1,42 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-11-lts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-linux = {
+      zuluVersion = "11.70.15";
+      jdkVersion = "11.0.22";
+      hash =
+        if enableJavaFX then "sha256-FxTHgng7/oDY3n3qy8j1ztbpBQeoGcEBJbEXqaE4Zr4="
+        else "sha256-V41ZRrJtkle3joKhwoID5bvWkN5I4gFjmbEnTD7no8U=";
+    };
+
+    aarch64-linux = {
+      zuluVersion = "11.70.15";
+      jdkVersion = "11.0.22";
+      hash =
+        if enableJavaFX then throw "JavaFX is not available for aarch64-linux"
+        else "sha256-u6XWMXAArUhMMb6j3KFOhkIxpVYR1oYLF0Wde7/tI0k=";
+    };
+
+    x86_64-darwin = {
+      zuluVersion = "11.70.15";
+      jdkVersion = "11.0.22";
+      hash =
+        if enableJavaFX then "sha256-JkJZwk+D28wHWqwUoLo7WW5ypwTrT5biSoP+70YI3eQ="
+        else "sha256-ca/ttkPe2tbcm1ruguDgPsxKWbEdKcICsKCDXaup9N4=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "11.70.15";
+      jdkVersion = "11.0.22";
+      hash =
+        if enableJavaFX then "sha256-bAgH4lCxPvvFOeif5gI2aoLt1aC4EXPzb2YmiS9bQsU="
+        else "sha256-PWQOF+P9djZarjAJaE3I0tuI1E4H/9584VN04BMzmvM=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/16.nix b/nixpkgs/pkgs/development/compilers/zulu/16.nix
new file mode 100644
index 000000000000..941a7e8d64f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/16.nix
@@ -0,0 +1,26 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-16-sts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-darwin = {
+      zuluVersion = "16.32.15";
+      jdkVersion = "16.0.2";
+      hash =
+        if enableJavaFX then "sha256-6URaSBNHQWLauO//kCuKXb4Z7AqyshWnoeJEyVRKgaY="
+        else "sha256-NXgBj/KixTknaCYbo3B+rOo11NImH5CDUIU0LhTCtMo=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "16.32.15";
+      jdkVersion = "16.0.2";
+      hash =
+        if enableJavaFX then "sha256-QuyhIAxUY3Vv1adGihW+LIsXtpDX2taCmFsMFj9o5vs="
+        else "sha256-3bUfDcLLyahLeURFAgLAVapBZHvqtam8GHbWTA6MQog=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/17.nix b/nixpkgs/pkgs/development/compilers/zulu/17.nix
new file mode 100644
index 000000000000..74e00df88c68
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/17.nix
@@ -0,0 +1,42 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-17-lts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-linux = {
+      zuluVersion = "17.48.15";
+      jdkVersion = "17.0.10";
+      hash =
+        if enableJavaFX then "sha256-YvuD/n84+DARPm+38TxIUB727SIhASFo+WX9+PtJqyw="
+        else "sha256-VyhNob2G1Tq/WCKT0g0Y//f+JD2hWgj6QU9idfvUj+I=";
+    };
+
+    aarch64-linux = {
+      zuluVersion = "17.48.15";
+      jdkVersion = "17.0.10";
+      hash =
+        if enableJavaFX then throw "JavaFX is not available for aarch64-linux"
+        else "sha256-9OZl8ruaLvjdpg42fC3IM5mC/9lmshCppNfUuz/Sf8E=";
+    };
+
+    x86_64-darwin = {
+      zuluVersion = "17.48.15";
+      jdkVersion = "17.0.10";
+      hash =
+        if enableJavaFX then "sha256-VOIcFtjQiYsA4AiP1TCa0Q76Ew5FdeJCICwsYGU+Dnw="
+        else "sha256-huSKGvOnrEUAiE2MJbdHWtF2saeLGaQkZllXzDo8o+g=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "17.48.15";
+      jdkVersion = "17.0.10";
+      hash =
+        if enableJavaFX then "sha256-fxBDhHMeL5IP4eRw9ykXrRRh7Nl9DnvDB1YLaQwFHLg="
+        else "sha256-kuEiHSkb4WFtPB3m0A968LPZw7Wl0sKquhbzDF8vQS8=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/18.nix b/nixpkgs/pkgs/development/compilers/zulu/18.nix
new file mode 100644
index 000000000000..cbee8ac6e5bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/18.nix
@@ -0,0 +1,26 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-18-sts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-darwin = {
+      zuluVersion = "18.32.13";
+      jdkVersion = "18.0.2.1";
+      hash =
+        if enableJavaFX then "sha256-ZVZ1gbpJwxTduq2PPOCKqbSl+shq2NTFgqG++OXvFcg="
+        else "sha256-uHPcyOgxUdTgzmIVRp/awtwve9zSt+1TZNef7DUuoRg=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "18.32.13";
+      jdkVersion = "18.0.2.1";
+      hash =
+        if enableJavaFX then "sha256-tNx0a1u9iamcN9VFOJ3eqDEA6C204dtIBJZvuAH2Vjk="
+        else "sha256-jAZDgxtWMq/74yKAxA69oOU0C9nXvKG5MjmZLsK04iM=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/19.nix b/nixpkgs/pkgs/development/compilers/zulu/19.nix
new file mode 100644
index 000000000000..28dbf5887616
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/19.nix
@@ -0,0 +1,26 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-19-sts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-darwin = {
+      zuluVersion = if enableJavaFX then "19.32.15" else "19.32.13";
+      jdkVersion = "19.0.2";
+      hash =
+        if enableJavaFX then "sha256-AwLcIId0gH5D6DUU8CgJ3qnKVQm28LXYirBeXBHwPYE="
+        else "sha256-KARXWumsY+OcqpEOV2EL9SsPni1nGSipjRji/Mn2KsE=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = if enableJavaFX then "19.32.15" else "19.32.13";
+      jdkVersion = "19.0.2";
+      hash =
+        if enableJavaFX then "sha256-/R2rrcBr64qPGEtvhruXBhPwnvurt/hiR1ICzZAdYxE="
+        else "sha256-F30FjZaLL756X/Xs6xjNwW9jds4pEATxoxOeeLL7Y5E=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/20.nix b/nixpkgs/pkgs/development/compilers/zulu/20.nix
new file mode 100644
index 000000000000..38083a881f51
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/20.nix
@@ -0,0 +1,26 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-20-sts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-darwin = {
+      zuluVersion = "20.32.11";
+      jdkVersion = "20.0.2";
+      hash =
+        if enableJavaFX then "sha256-hyxQAivZAXtqMebe30L+EYa7p+TdSdKNYj7Rl/ZwRNQ="
+        else "sha256-Ev9KG6DvuBnsZrOguLsO1KQzudHCBcJNwKh45Inpnfo=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "20.32.11";
+      jdkVersion = "20.0.2";
+      hash =
+        if enableJavaFX then "sha256-iPQzZS4CwaoqT8cSzg4kWCT1OyGBSJLq+NETcbucLo4="
+        else "sha256-15uNZ6uMfSASV3QU2q2oA/jBk2PCHOfSjn1GY7/7qIY=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/21.nix b/nixpkgs/pkgs/development/compilers/zulu/21.nix
new file mode 100644
index 000000000000..db2d3a397871
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/21.nix
@@ -0,0 +1,42 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-21-lts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-linux = {
+      zuluVersion = "21.32.17";
+      jdkVersion = "21.0.2";
+      hash =
+        if enableJavaFX then "sha256-CEM2lMjyZLWS1tBcS1tBTUxBwAyzW3vrpRWFVVSFVGY="
+        else "sha256-Wtcw++5rtJv/8QvznoQ5LnKNiRA9NHSn5d7w/RNLMAo=";
+    };
+
+    aarch64-linux = {
+      zuluVersion = "21.32.17";
+      jdkVersion = "21.0.2";
+      hash =
+        if enableJavaFX then throw "JavaFX is not available for aarch64-linux"
+        else "sha256-zn3xr11EqfRVYXxLiJFEP74+Syacd32Lgu1m93Fnz+A=";
+    };
+
+    x86_64-darwin = {
+      zuluVersion = "21.32.17";
+      jdkVersion = "21.0.2";
+      hash =
+        if enableJavaFX then "sha256-CbEKa9Z/ItFqVM4BqsWXyRf5ejQZXPK8OqkULr9Cpqk="
+        else "sha256-Otj+KI61fZdcJ4auRToDaqRuR6sqw9gVOOuuKlTTwCU=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "21.32.17";
+      jdkVersion = "21.0.2";
+      hash =
+        if enableJavaFX then "sha256-PK+cafgQsnK6acuQxun4IUiyYHQJsBfUawwfGV8OCfQ="
+        else "sha256-6CYFFt6LYGYUIqcl8d8sNu+Ij2+zU5NWawDnMl2z0E4=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/8.nix b/nixpkgs/pkgs/development/compilers/zulu/8.nix
new file mode 100644
index 000000000000..05411149da68
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/8.nix
@@ -0,0 +1,42 @@
+{ callPackage
+, enableJavaFX ? false
+, ...
+}@args:
+
+callPackage ./common.nix ({
+  # Details from https://www.azul.com/downloads/?version=java-8-lts&package=jdk
+  # Note that the latest build may differ by platform
+  dists = {
+    x86_64-linux = {
+      zuluVersion = "8.76.0.17";
+      jdkVersion = "8.0.402";
+      hash =
+        if enableJavaFX then "sha256-29aDAu8WVYQFSpMUFq4gG64BBz/ei/VDMg72xrpB9w4="
+        else "sha256-34DI6O7T8iqDHsX63S3xk+BKDu8IHRRWNvtxpsnUJEk=";
+    };
+
+    aarch64-linux = {
+      zuluVersion = "8.74.0.17";
+      jdkVersion = "8.0.392";
+      hash =
+        if enableJavaFX then throw "JavaFX is not available for aarch64-linux"
+        else "sha256-xESdKEmfkiE657X/xclwsJR5M+P72BpWErtAcYMcK0Y=";
+    };
+
+    x86_64-darwin = {
+      zuluVersion = "8.76.0.17";
+      jdkVersion = "8.0.402";
+      hash =
+        if enableJavaFX then "sha256-oqFpKeWwfiXr3oX78LGvAyDGAAS2GON2gAm6fHGH7Ow="
+        else "sha256-edZqDEsydQCDEwC1ZCDF/MjWVTnuQNWcKR2k/RjaIEI=";
+    };
+
+    aarch64-darwin = {
+      zuluVersion = "8.76.0.17";
+      jdkVersion = "8.0.402";
+      hash =
+        if enableJavaFX then "sha256-UCWRXCz4v381IWzWPDYzwJwbhsmZOYxKPLGJBQGjPmc="
+        else "sha256-0VPlOuNB39gDnU+pK0DGTSUjTHTtYoxaRg3YD2LyLXg=";
+    };
+  };
+} // builtins.removeAttrs args [ "callPackage" ])
diff --git a/nixpkgs/pkgs/development/compilers/zulu/common.nix b/nixpkgs/pkgs/development/compilers/zulu/common.nix
new file mode 100644
index 000000000000..75925ed81bec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/common.nix
@@ -0,0 +1,159 @@
+{ lib
+, stdenv
+, fetchurl
+, setJavaClassPath
+, enableJavaFX ? false
+, dists
+  # minimum dependencies
+, unzip
+, autoPatchelfHook
+, makeWrapper
+, alsa-lib
+, fontconfig
+, freetype
+, zlib
+, xorg
+  # runtime dependencies
+, cups
+  # runtime dependencies for GTK+ Look and Feel
+, gtkSupport ? stdenv.isLinux
+, cairo
+, glib
+, gtk3
+}:
+let
+  dist = dists.${stdenv.hostPlatform.system}
+    or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  arch = {
+    "aarch64" = "aarch64";
+    "x86_64" = "x64";
+  }.${stdenv.hostPlatform.parsed.cpu.name}
+    or (throw "Unsupported architecture: ${stdenv.hostPlatform.parsed.cpu.name}");
+
+  platform = {
+    "darwin" = "macosx";
+    "linux" = "linux";
+  }.${stdenv.hostPlatform.parsed.kernel.name}
+    or (throw "Unsupported platform: ${stdenv.hostPlatform.parsed.kernel.name}");
+
+  runtimeDependencies = [
+    cups
+  ] ++ lib.optionals gtkSupport [
+    cairo
+    glib
+    gtk3
+  ];
+
+  runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
+
+  jce-policies = fetchurl {
+    url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+    hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
+  };
+
+  javaPackage = if enableJavaFX then "ca-fx-jdk" else "ca-jdk";
+
+  isJdk8 = lib.versions.major dist.jdkVersion == "8";
+
+  jdk = stdenv.mkDerivation rec {
+    pname = "zulu-${javaPackage}";
+    version = dist.jdkVersion;
+
+    src = fetchurl {
+      url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-${javaPackage}${dist.jdkVersion}-${platform}_${arch}.tar.gz";
+      inherit (dist) hash;
+      curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
+    };
+
+    nativeBuildInputs = [
+      unzip
+    ] ++ lib.optionals stdenv.isLinux [
+      autoPatchelfHook
+      makeWrapper
+    ];
+
+    buildInputs = lib.optionals stdenv.isLinux [
+      alsa-lib # libasound.so wanted by lib/libjsound.so
+      fontconfig
+      freetype
+      stdenv.cc.cc # libstdc++.so.6
+      xorg.libX11
+      xorg.libXext
+      xorg.libXi
+      xorg.libXrender
+      xorg.libXtst
+      zlib
+    ];
+
+    installPhase = ''
+      mkdir -p $out
+      mv * $out
+
+      unzip ${jce-policies}
+      mv -f ZuluJCEPolicies/*.jar $out/${lib.optionalString isJdk8 "jre/"}lib/security/
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/${stdenv.hostPlatform.parsed.kernel.name}/*_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 ${if isJdk8 then "JRE" else "JDK"} so that
+      # any package that depends on the ${if isJdk8 then "JRE" else "JDK"} has $CLASSPATH set up
+      # properly.
+      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
+    '' + lib.optionalString stdenv.isLinux ''
+      # We cannot use -exec since wrapProgram is a function but not a command.
+      #
+      # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it
+      # breaks building OpenJDK (#114495).
+      for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
+        if patchelf --print-interpreter "$bin" &> /dev/null; then
+          wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
+        fi
+      done
+    ''
+    # FIXME: move all of the above to installPhase.
+    + lib.optionalString stdenv.isLinux ''
+      find "$out" -name libfontmanager.so -exec \
+        patchelf --add-needed libfontconfig.so {} \;
+    '';
+
+    # fixupPhase is moving the man to share/man which breaks it because it's a
+    # relative symlink.
+    postFixup = lib.optionalString stdenv.isDarwin ''
+      ln -nsf ../zulu-${lib.versions.major version}.jdk/Contents/Home/man $out/share/man
+    '';
+
+    passthru = (lib.optionalAttrs isJdk8 {
+      jre = jdk;
+    }) // {
+      home = jdk;
+    };
+
+    meta = (import ../openjdk/meta.nix lib version) // {
+      description = "Certified builds of OpenJDK";
+      longDescription = ''
+        Certified builds of OpenJDK that can be deployed across multiple
+        operating systems, containers, hypervisors and Cloud platforms.
+      '';
+      homepage = "https://www.azul.com/products/zulu/";
+      mainProgram = "java";
+      maintainers = [ ];
+      platforms = builtins.attrNames dists;
+      sourceProvenance = with lib.sourceTypes; [ binaryBytecode binaryNativeCode ];
+    };
+  };
+in
+jdk
diff --git a/nixpkgs/pkgs/development/compilers/zz/Cargo.lock b/nixpkgs/pkgs/development/compilers/zz/Cargo.lock
new file mode 100644
index 000000000000..8b72d6a3e404
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zz/Cargo.lock
@@ -0,0 +1,961 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+[[package]]
+name = "aho-corasick"
+version = "0.7.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "ansi_term"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "askama"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10a1fb9e41eb366cbcd267da2094be5b7e62fdbca9f82091e7503e80f885050d"
+dependencies = [
+ "askama_derive",
+ "askama_escape",
+ "askama_shared",
+]
+
+[[package]]
+name = "askama_derive"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1012c270085fa35ece6a48a569544fde85b6d9ee41074c7b706cc912a03f939"
+dependencies = [
+ "askama_shared",
+ "nom",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "askama_escape"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a577aeba5fec1aafb9f195d98cfcc38a78b588e4ebf9b15f62ca1c7aa33795a"
+
+[[package]]
+name = "askama_shared"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ee517f4e33c27b129928e71d8a044d54c513e72e0b72ec5c4f5f1823e9de353"
+dependencies = [
+ "askama_escape",
+ "humansize",
+ "num-traits",
+ "serde",
+ "toml",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
+
+[[package]]
+name = "backtrace"
+version = "0.3.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e"
+dependencies = [
+ "backtrace-sys",
+ "cfg-if",
+ "libc",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "backtrace-sys"
+version = "0.1.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+
+[[package]]
+name = "block-buffer"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
+dependencies = [
+ "block-padding",
+ "byte-tools",
+ "byteorder",
+ "generic-array",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
+dependencies = [
+ "byte-tools",
+]
+
+[[package]]
+name = "byte-tools"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
+
+[[package]]
+name = "byteorder"
+version = "1.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
+
+[[package]]
+name = "cc"
+version = "1.0.52"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d"
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+
+[[package]]
+name = "clap"
+version = "2.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
+dependencies = [
+ "ansi_term",
+ "atty",
+ "bitflags",
+ "strsim",
+ "textwrap",
+ "unicode-width",
+ "vec_map",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+ "maybe-uninit",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "lazy_static",
+ "maybe-uninit",
+ "memoffset",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-queue"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "lazy_static",
+]
+
+[[package]]
+name = "digest"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "either"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+
+[[package]]
+name = "env_logger"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
+dependencies = [
+ "atty",
+ "humantime",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "error-chain"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd"
+dependencies = [
+ "backtrace",
+ "version_check",
+]
+
+[[package]]
+name = "failure"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
+dependencies = [
+ "backtrace",
+]
+
+[[package]]
+name = "fake-simd"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
+
+[[package]]
+name = "fuchsia-cprng"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+
+[[package]]
+name = "generic-array"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
+dependencies = [
+ "typenum",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "humansize"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e"
+
+[[package]]
+name = "humantime"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
+dependencies = [
+ "quick-error",
+]
+
+[[package]]
+name = "idna"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
+dependencies = [
+ "matches",
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005"
+
+[[package]]
+name = "log"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "maplit"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
+
+[[package]]
+name = "matches"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
+
+[[package]]
+name = "maybe-uninit"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
+
+[[package]]
+name = "memchr"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
+
+[[package]]
+name = "memoffset"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "metrohash"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ba553cb19e2acbc54baa16faef215126243fe45e53357a3b2e9f4ebc7b0506c"
+
+[[package]]
+name = "nom"
+version = "5.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6"
+dependencies = [
+ "memchr",
+ "version_check",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "numtoa"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
+
+[[package]]
+name = "opaque-debug"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
+
+[[package]]
+name = "pathdiff"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34"
+
+[[package]]
+name = "pbr"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4403eb718d70c03ee279e51737782902c68cca01e870a33b6a2f9dfb50b9cd83"
+dependencies = [
+ "libc",
+ "termion",
+ "time",
+ "winapi",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+
+[[package]]
+name = "pest"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
+dependencies = [
+ "ucd-trie",
+]
+
+[[package]]
+name = "pest_derive"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"
+dependencies = [
+ "pest",
+ "pest_generator",
+]
+
+[[package]]
+name = "pest_generator"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55"
+dependencies = [
+ "pest",
+ "pest_meta",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "pest_meta"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d"
+dependencies = [
+ "maplit",
+ "pest",
+ "sha-1",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319"
+dependencies = [
+ "unicode-xid",
+]
+
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+
+[[package]]
+name = "quote"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
+dependencies = [
+ "fuchsia-cprng",
+ "libc",
+ "rand_core 0.3.1",
+ "rdrand",
+ "winapi",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
+dependencies = [
+ "rand_core 0.4.2",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
+
+[[package]]
+name = "rayon"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
+dependencies = [
+ "crossbeam-deque",
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-queue",
+ "crossbeam-utils",
+ "lazy_static",
+ "num_cpus",
+]
+
+[[package]]
+name = "rdrand"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
+dependencies = [
+ "rand_core 0.3.1",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.1.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
+
+[[package]]
+name = "redox_termios"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
+dependencies = [
+ "redox_syscall",
+]
+
+[[package]]
+name = "regex"
+version = "1.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+ "thread_local",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "rmp"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f10b46df14cf1ee1ac7baa4d2fbc2c52c0622a4b82fa8740e37bc452ac0184f"
+dependencies = [
+ "byteorder",
+ "num-traits",
+]
+
+[[package]]
+name = "rmp-serde"
+version = "0.14.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c1ee98f14fe8b8e9c5ea13d25da7b2a1796169202c57a09d7288de90d56222b"
+dependencies = [
+ "byteorder",
+ "rmp",
+ "serde",
+]
+
+[[package]]
+name = "rsmt2"
+version = "0.11.0"
+source = "git+https://github.com/kino-mc/rsmt2?rev=ebce2e4#ebce2e403d25ca739cfd717817be68844f80f13c"
+dependencies = [
+ "error-chain",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
+
+[[package]]
+name = "ryu"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "serde"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.52"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "sha-1"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
+dependencies = [
+ "block-buffer",
+ "digest",
+ "fake-simd",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha2"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0"
+dependencies = [
+ "block-buffer",
+ "digest",
+ "fake-simd",
+ "opaque-debug",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4"
+
+[[package]]
+name = "strsim"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+
+[[package]]
+name = "syn"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "tempdir"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
+dependencies = [
+ "rand",
+ "remove_dir_all",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "termion"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905"
+dependencies = [
+ "libc",
+ "numtoa",
+ "redox_syscall",
+ "redox_termios",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "time"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "typenum"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
+
+[[package]]
+name = "ucd-trie"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
+dependencies = [
+ "matches",
+]
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4"
+dependencies = [
+ "smallvec",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
+
+[[package]]
+name = "url"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb"
+dependencies = [
+ "idna",
+ "matches",
+ "percent-encoding",
+]
+
+[[package]]
+name = "vec_map"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
+
+[[package]]
+name = "version_check"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "which"
+version = "3.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724"
+dependencies = [
+ "failure",
+ "libc",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "zz"
+version = "0.1.1"
+dependencies = [
+ "askama",
+ "clap",
+ "env_logger",
+ "getrandom",
+ "lazy_static",
+ "log",
+ "metrohash",
+ "pathdiff",
+ "pbr",
+ "pest",
+ "pest_derive",
+ "rayon",
+ "rmp-serde",
+ "rsmt2",
+ "serde",
+ "serde_json",
+ "sha2",
+ "tempdir",
+ "toml",
+ "url",
+ "which",
+]
diff --git a/nixpkgs/pkgs/development/compilers/zz/default.nix b/nixpkgs/pkgs/development/compilers/zz/default.nix
new file mode 100644
index 000000000000..4ec5131bf74c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zz/default.nix
@@ -0,0 +1,51 @@
+{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3, pkgsHostTarget }:
+
+let
+  runtimeDeps = [
+    z3
+    pkgsHostTarget.targetPackages.stdenv.cc
+  ];
+in
+
+rustPlatform.buildRustPackage rec {
+  pname = "zz";
+  version = "unstable-2021-05-04";
+
+  # when updating, choose commit of the latest build on http://bin.zetz.it/
+  src = fetchFromGitHub {
+    owner = "zetzit";
+    repo = "zz";
+    rev = "18020b10b933cfe2fc7f2256b71e646889f9b1d2";
+    sha256 = "01nlyyk1qxk76dq2hw3wpbjwkh27zzp6mpczjnxdpv6rxs7mc825";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "rsmt2-0.11.0" = "sha256-RwNsS0zge8uOXmgzTvDwp8AD70NspIZq0LgW/v3yrpA=";
+    };
+  };
+
+  postPatch = ''
+    # remove search path entry which would reference /build
+    sed -i '/env!("CARGO_MANIFEST_DIR")/d' src/lib.rs
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/share/zz"
+    cp -r modules "$out/share/zz/"
+
+    wrapProgram $out/bin/zz \
+      --prefix PATH ":" "${lib.makeBinPath runtimeDeps}" \
+      --suffix ZZ_MODULE_PATHS ":" "$out/share/zz/modules"
+  '';
+
+  meta = with lib; {
+    description = "ZetZ a zymbolic verifier and tranzpiler to bare metal C";
+    homepage = "https://github.com/zetzit/zz";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}