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/aspectj/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/assemblyscript/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/ballerina/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/c0/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/c3c/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/cakelisp/default.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix37
-rw-r--r--nixpkgs/pkgs/development/compilers/circt/default.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/8/deps.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/8/release-info.json6
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/8/release.json12
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/common.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/stage0.nix8
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix288
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix320
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix313
-rw-r--r--nixpkgs/pkgs/development/compilers/dtc/default.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/erg/default.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/flix/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/flutter.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_22/data.json1007
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update-shared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/versions/3_22/patches/gradle-flutter-tools-wrapper.patch44
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/wrapper.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix395
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.10.1.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix391
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix391
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix391
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix391
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix396
-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.fixme.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix77
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/common-make-native-bignum.nix (renamed from nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix)105
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/gnu-cim/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.21.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/idris2.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/inform6/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/default.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/kotlin/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix357
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix315
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/default.nix23
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix323
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix442
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix435
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix431
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/18/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/clang/default.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/llvm/default.nix (renamed from nixpkgs/pkgs/development/compilers/llvm/18/llvm/default.nix)335
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix3
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix435
-rw-r--r--nixpkgs/pkgs/development/compilers/nasm/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/default.nix8
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/5.2.nix7
-rw-r--r--nixpkgs/pkgs/development/compilers/odin/default.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/open-watcom/v2.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/orc/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/osl/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/rasm/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_77.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/default.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-feature.patch63
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-tests.patch104
-rw-r--r--nixpkgs/pkgs/development/compilers/terra/default.nix3
-rw-r--r--nixpkgs/pkgs/development/compilers/tvm/default.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/unison/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/default.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/shell-completions.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/22.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/zz/Cargo.lock961
-rw-r--r--nixpkgs/pkgs/development/compilers/zz/default.nix52
85 files changed, 2707 insertions, 7664 deletions
diff --git a/nixpkgs/pkgs/development/compilers/aspectj/default.nix b/nixpkgs/pkgs/development/compilers/aspectj/default.nix
index 50c54b66b73c..2b7ac5340111 100644
--- a/nixpkgs/pkgs/development/compilers/aspectj/default.nix
+++ b/nixpkgs/pkgs/development/compilers/aspectj/default.nix
@@ -6,7 +6,7 @@
 }:
 
 let
-  version = "1.9.21.2";
+  version = "1.9.22";
   versionSnakeCase = builtins.replaceStrings [ "." ] [ "_" ] version;
 in
 stdenvNoCC.mkDerivation {
@@ -17,7 +17,7 @@ stdenvNoCC.mkDerivation {
 
   src = fetchurl {
     url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
-    hash = "sha256-wqQtyopS03zX+GJme5YZwWiACqO4GAYFr3XAjzqSFnQ=";
+    hash = "sha256-kQsWu/rS7Qf7Fcg5VZ+QhggvK69aUVD3HCh0aJ2qhfw=";
   };
 
   dontUnpack = true;
diff --git a/nixpkgs/pkgs/development/compilers/assemblyscript/default.nix b/nixpkgs/pkgs/development/compilers/assemblyscript/default.nix
deleted file mode 100644
index b0fd15d47941..000000000000
--- a/nixpkgs/pkgs/development/compilers/assemblyscript/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ 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/ballerina/default.nix b/nixpkgs/pkgs/development/compilers/ballerina/default.nix
index 5a58d9afd9a8..2c64bb7b54f3 100644
--- a/nixpkgs/pkgs/development/compilers/ballerina/default.nix
+++ b/nixpkgs/pkgs/development/compilers/ballerina/default.nix
@@ -1,6 +1,6 @@
 { ballerina, lib, writeText, runCommand, makeWrapper, fetchzip, stdenv, openjdk }:
 let
-  version = "2201.8.6";
+  version = "2201.9.0";
   codeName = "swan-lake";
 in stdenv.mkDerivation {
   pname = "ballerina";
@@ -8,7 +8,7 @@ in stdenv.mkDerivation {
 
   src = fetchzip {
     url = "https://dist.ballerina.io/downloads/${version}/ballerina-${version}-${codeName}.zip";
-    hash = "sha256-/oYyYziUTt4OqQfYJdDuRVy9xmMDfhpj24lbisQFfAU=";
+    hash = "sha256-HLZqhVHBghVd52rbbsEoM4FxoEslxPSJ/oimBPNnmMM=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/nixpkgs/pkgs/development/compilers/c0/default.nix b/nixpkgs/pkgs/development/compilers/c0/default.nix
index de728cb32c9f..15b83980b9c6 100644
--- a/nixpkgs/pkgs/development/compilers/c0/default.nix
+++ b/nixpkgs/pkgs/development/compilers/c0/default.nix
@@ -15,7 +15,7 @@
 
 stdenv.mkDerivation rec {
   pname = "c0";
-  version = "unstable-2023-09-05";
+  version = "0-unstable-2023-09-05";
 
   src = fetchFromBitbucket {
     owner = "c0-lang";
diff --git a/nixpkgs/pkgs/development/compilers/c3c/default.nix b/nixpkgs/pkgs/development/compilers/c3c/default.nix
index b68ffc045f64..4310ad931792 100644
--- a/nixpkgs/pkgs/development/compilers/c3c/default.nix
+++ b/nixpkgs/pkgs/development/compilers/c3c/default.nix
@@ -3,38 +3,51 @@
 , fetchFromGitHub
 , cmake
 , python3
+, curl
+, libxml2
+, libffi
+, xar
 }:
 
 llvmPackages.stdenv.mkDerivation rec {
   pname = "c3c";
-  version = "unstable-2021-07-30";
+  version = "0.5.5";
 
   src = fetchFromGitHub {
     owner = "c3lang";
     repo = pname;
-    rev = "2246b641b16e581aec9059c8358858e10a548d94";
-    sha256 = "VdMKdQsedDQCnsmTxO4HnBj5GH/EThspnotvrAscSqE=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-iOljE1BRVc92NJZj+nr1G6KkBTCwJEUOadXHUDNoPGk=";
   };
 
-  nativeBuildInputs = [ cmake ];
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace-fail "\''${LLVM_LIBRARY_DIRS}" "${llvmPackages.lld.lib}/lib ${llvmPackages.llvm.lib}/lib"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
 
   buildInputs = [
     llvmPackages.llvm
     llvmPackages.lld
+    curl
+    libxml2
+    libffi
+  ] ++ lib.optionals llvmPackages.stdenv.isDarwin [
+    xar
   ];
 
   nativeCheckInputs = [ python3 ];
 
-  doCheck = true;
+  doCheck = llvmPackages.stdenv.system == "x86_64-linux";
 
   checkPhase = ''
+    runHook preCheck
     ( 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
+    runHook postCheck
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/compilers/cakelisp/default.nix b/nixpkgs/pkgs/development/compilers/cakelisp/default.nix
index c71f2dd48e21..4c5af8d26b45 100644
--- a/nixpkgs/pkgs/development/compilers/cakelisp/default.nix
+++ b/nixpkgs/pkgs/development/compilers/cakelisp/default.nix
@@ -3,12 +3,12 @@
 stdenv.mkDerivation {
   pname = "cakelisp";
   # using unstable as it's the only version that builds against gcc-13
-  version = "0.3.0-unstable-2024-04-18";
+  version = "0.3.0-unstable-2024-04-25";
 
   src = fetchgit {
     url = "https://macoy.me/code/macoy/cakelisp";
-    rev = "115ab436056602b7f3a1ca30be40edbfcc88299d";
-    hash = "sha256-rgBtT24aopXLTeDffjXGvJ3RgT+QLlr50Ju9a6ccyzc=";
+    rev = "eb4427f555c3def9d65612672ccfe59e11b14059";
+    hash = "sha256-wFyqAbHrBMFKqMYlBjS6flYHPn3Rxtaiqb1rRmlZrB4=";
   };
 
   buildInputs = [ gcc ];
diff --git a/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix b/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix
index a21b82d93376..0043702fd847 100644
--- a/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix
+++ b/nixpkgs/pkgs/development/compilers/circt/circt-llvm.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , cmake
 , ninja
 , circt
@@ -23,7 +24,7 @@
     "-DLLVM_BUILD_EXAMPLES=OFF"
     "-DLLVM_OPTIMIZED_TABLEGEN=ON"
     "-DLLVM_ENABLE_PROJECTS=mlir"
-    "-DLLVM_TARGETS_TO_BUILD="
+    "-DLLVM_TARGETS_TO_BUILD=Native"
 
     # This option is needed to install llvm-config
     "-DLLVM_INSTALL_UTILS=ON"
@@ -31,6 +32,14 @@
 
   outputs = [ "out" "lib" "dev" ];
 
+  # Get rid of ${extra_libdir} (which ends up containing a path to circt-llvm.dev
+  # in circt) so that we only have to remove the one fixed rpath.
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace llvm/llvm/cmake/modules/AddLLVM.cmake \
+      --replace-fail 'set(_install_rpath "@loader_path/../lib''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' \
+        'set(_install_rpath "@loader_path/../lib''${LLVM_LIBDIR_SUFFIX}")'
+  '';
+
   postInstall = ''
     # move llvm-config to $dev to resolve a circular dependency
     moveToOutput "bin/llvm-config*" "$dev"
@@ -50,6 +59,30 @@
       --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" # patch path for llvm-config
   '';
 
+  # Replace all references to @rpath with absolute paths and remove the rpaths.
+  #
+  # This is different from what the regular LLVM package does, which is to make
+  # everything absolute from the start: however, that doesn't work for us because
+  # we have `-DBUILD_SHARED_LIBS=ON`, meaning that many more things are
+  # dynamically rather than statically linked. This includes TableGen, which then
+  # fails to run halfway through the build because it tries to reference $lib when
+  # it hasn't been populated yet.
+  #
+  # Inspired by fixDarwinDylibNames.
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    local flags=(-delete_rpath @loader_path/../lib)
+    for file in "$lib"/lib/*.dylib; do
+      flags+=(-change @rpath/"$(basename "$file")" "$file")
+    done
+
+    for file in "$out"/bin/* "$lib"/lib/*.dylib; do
+      if [ -L "$file" ]; then continue; fi
+      echo "$file: fixing dylib references"
+      # note that -id does nothing on binaries
+      install_name_tool -id "$file" "''${flags[@]}" "$file"
+    done
+  '';
+
   # circt only use the mlir part of llvm, occasionally there are some unrelated failure from llvm,
   # disable the llvm check, but keep the circt check enabled.
   doCheck = false;
diff --git a/nixpkgs/pkgs/development/compilers/circt/default.nix b/nixpkgs/pkgs/development/compilers/circt/default.nix
index 58174f3fde0a..4b572a33bb85 100644
--- a/nixpkgs/pkgs/development/compilers/circt/default.nix
+++ b/nixpkgs/pkgs/development/compilers/circt/default.nix
@@ -7,6 +7,7 @@
 , fetchFromGitHub
 , ninja
 , lit
+, z3
 , gitUpdater
 , callPackage
 }:
@@ -17,18 +18,18 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "circt";
-  version = "1.73.0";
+  version = "1.74.0";
   src = fetchFromGitHub {
     owner = "llvm";
     repo = "circt";
     rev = "firtool-${version}";
-    hash = "sha256-C50PiToXrKf94Vg1yv++3xVhIuCW/KVPs0yLv5Fg0dY=";
+    hash = "sha256-RFvWUd98OiL2I3aFrP61LQRZr4FSKrrZ5YOblBKRCA4=";
     fetchSubmodules = true;
   };
 
   requiredSystemFeatures = [ "big-parallel" ];
 
-  nativeBuildInputs = [ cmake ninja git pythonEnv ];
+  nativeBuildInputs = [ cmake ninja git pythonEnv z3 ];
   buildInputs = [ circt-llvm ];
 
   cmakeFlags = [
@@ -66,6 +67,13 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" "dev" ];
 
+  # Copy circt-llvm's postFixup stage so that it can make all our dylib references
+  # absolute as well.
+  #
+  # We don't need `postPatch` because circt seems to be automatically inheriting
+  # the config somehow, presumably via. `-DMLIR_DIR`.
+  postFixup = circt-llvm.postFixup;
+
   postInstall = ''
     moveToOutput lib "$lib"
   '';
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/8/deps.nix b/nixpkgs/pkgs/development/compilers/dotnet/8/deps.nix
index c38b748b20b6..11e45f1d79c3 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/8/deps.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/8/deps.nix
@@ -1,10 +1,10 @@
 { fetchNuGet }: [
-  (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILAsm"; sha256 = "82be279b43a39011b6b4e3cbd46565a407ed6d263a037d2298e6401addafa9b9"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ilasm/8.0.3-servicing.24114.23/runtime.linux-arm64.microsoft.netcore.ilasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "773d55eb6a015a74328e9ed3b14821940b9fe4679ca43c837815891dfc3e2611"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ildasm/8.0.3-servicing.24114.23/runtime.linux-arm64.microsoft.netcore.ildasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILAsm"; sha256 = "0ckmdww2fcir6s91rj9yr4bfx5ix0xdv96yszipgcw23zlv2xkci"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ilasm/8.0.3-servicing.24114.23/runtime.linux-x64.microsoft.netcore.ilasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILDAsm"; sha256 = "0qqsbj61rw69l2idakbqfl55a44maklav1csdk8a2gcz6a32riab"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ildasm/8.0.3-servicing.24114.23/runtime.linux-x64.microsoft.netcore.ildasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILAsm"; sha256 = "b5d819e6bd3659ecc18b03c5ba0a425dc72645d7b14dcd768df914ae4348dd44"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ilasm/8.0.3-servicing.24114.23/runtime.osx-arm64.microsoft.netcore.ilasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "316473b799e05f6fb6e5f3aaf17fcb5842155cd3fa8853dc31882e0521747e9e"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ildasm/8.0.3-servicing.24114.23/runtime.osx-arm64.microsoft.netcore.ildasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILAsm"; sha256 = "191b604c2e06b6a7bc2706455df3cb8e38eb6168fa1433459eda61357821b73e"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ilasm/8.0.3-servicing.24114.23/runtime.osx-x64.microsoft.netcore.ilasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
-  (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILDAsm"; sha256 = "0f76a150908c05152314f4d3e591040de757983b7940cadac3fb3ead75fdb9cf"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ildasm/8.0.3-servicing.24114.23/runtime.osx-x64.microsoft.netcore.ildasm.8.0.3-servicing.24114.23.nupkg"; version = "8.0.3-servicing.24114.23"; })
+  (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILAsm"; sha256 = "4ceb7c65d355ac08753d7e255ded7261c9e3d6a3692c4641eda432d84cc5c2ef"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ilasm/8.0.4-servicing.24169.9/runtime.linux-arm64.microsoft.netcore.ilasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "467caa1c74ac499a0359b813a54fcf07f664f543e2b495f33213fe5500355494"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ildasm/8.0.4-servicing.24169.9/runtime.linux-arm64.microsoft.netcore.ildasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILAsm"; sha256 = "0q669pidvv27vll5xpap08c2askmaqggsky00ia1d00f3bnnfxbr"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ilasm/8.0.4-servicing.24169.9/runtime.linux-x64.microsoft.netcore.ilasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILDAsm"; sha256 = "03q3c45cn8vy3qb9q1b8m965j5z9cg9x9ja0l6271lkr4fq72qp4"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ildasm/8.0.4-servicing.24169.9/runtime.linux-x64.microsoft.netcore.ildasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILAsm"; sha256 = "5f84f02ef53e9e05fafddf0ef2a249d5a7990c458c90f42b365cd8b9397b2e8e"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ilasm/8.0.4-servicing.24169.9/runtime.osx-arm64.microsoft.netcore.ilasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "171f006df766e439a3080496dd6e4899649e52085ca6afdb375caa57d04eb998"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ildasm/8.0.4-servicing.24169.9/runtime.osx-arm64.microsoft.netcore.ildasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILAsm"; sha256 = "5e1652bd1d0194300849ffaf1ef3371795f8d63889e685c2ef74434c33608f1e"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ilasm/8.0.4-servicing.24169.9/runtime.osx-x64.microsoft.netcore.ilasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
+  (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILDAsm"; sha256 = "e3b4ef11f3f8f625730fad3f59aa84a82c63f1921eb4145109723cd9f458e20b"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a65e5cb4-26c0-410f-9457-06db3c5254be/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ildasm/8.0.4-servicing.24169.9/runtime.osx-x64.microsoft.netcore.ildasm.8.0.4-servicing.24169.9.nupkg"; version = "8.0.4-servicing.24169.9"; })
 ]
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/8/release-info.json b/nixpkgs/pkgs/development/compilers/dotnet/8/release-info.json
index 60992556a837..6b829ab65903 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/8/release-info.json
+++ b/nixpkgs/pkgs/development/compilers/dotnet/8/release-info.json
@@ -1,5 +1,5 @@
 {
-  "tarballHash": "sha256-GCzqK/3KGbwTRTwnwZFUCBIQnp8f0bjuUrDNTCghXyQ=",
-  "artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.103-servicing.24117.1.centos.8-x64.tar.gz",
-  "artifactsHash": "sha256-6t7vjX/MQVp7Mk1c9v5sjcwwLUImLPdD/bvnT5ZGBEs="
+  "tarballHash": "sha256-Hu3mq+cJpbS6Qzvt3PmRe4iRbWJDuMUaNmRlS6tuphw=",
+  "artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.104-servicing.24171.1.centos.8-x64.tar.gz",
+  "artifactsHash": "sha256-+ft4PIFOwfv5Z8VqW6bt71LP/HuvTWRTDYnB71Ti0O8="
 }
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/8/release.json b/nixpkgs/pkgs/development/compilers/dotnet/8/release.json
index 9a63353dcb4b..b1ea86dba79a 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/8/release.json
+++ b/nixpkgs/pkgs/development/compilers/dotnet/8/release.json
@@ -1,10 +1,10 @@
 {
-  "release": "8.0.4",
+  "release": "8.0.5",
   "channel": "8.0",
-  "tag": "v8.0.4",
-  "sdkVersion": "8.0.104",
-  "runtimeVersion": "8.0.4",
-  "aspNetCoreVersion": "8.0.4",
+  "tag": "v8.0.5",
+  "sdkVersion": "8.0.105",
+  "runtimeVersion": "8.0.5",
+  "aspNetCoreVersion": "8.0.5",
   "sourceRepository": "https://github.com/dotnet/dotnet",
-  "sourceVersion": "83659133a1aa2b2d94f9c4ecebfa10d960e27706"
+  "sourceVersion": "181780576f29353fd077b649e7624cf806e882e7"
 }
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix
index f6802e62c70d..11ece5397166 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix
@@ -26,6 +26,7 @@ assert if type == "sdk" then packages != null else true;
 , mkNugetDeps
 , callPackage
 , dotnetCorePackages
+, xmlstarlet
 }:
 
 let
@@ -47,6 +48,9 @@ let
 
   targetRid = dotnetCorePackages.systemToDotnetRid stdenv.targetPlatform.system;
 
+  sigtool = callPackage ./sigtool.nix {};
+  signAppHost = callPackage ./sign-apphost.nix {};
+
 in
 mkCommon type rec {
   inherit pname version;
@@ -54,7 +58,11 @@ mkCommon type rec {
   # Some of these dependencies are `dlopen()`ed.
   nativeBuildInputs = [
     makeWrapper
-  ] ++ lib.optional stdenv.isLinux autoPatchelfHook;
+  ] ++ lib.optional stdenv.isLinux autoPatchelfHook
+  ++ lib.optionals (type == "sdk" && stdenv.isDarwin) [
+    xmlstarlet
+    sigtool
+  ];
 
   buildInputs = [
     stdenv.cc.cc
@@ -71,6 +79,16 @@ mkCommon type rec {
 
   sourceRoot = ".";
 
+  postPatch = if type == "sdk" && stdenv.isDarwin then ''
+    xmlstarlet ed \
+      --inplace \
+      -s //_:Project -t elem -n Import \
+      -i \$prev -t attr -n Project -v "${signAppHost}" \
+      sdk/*/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets
+
+    codesign --remove-signature packs/Microsoft.NETCore.App.Host.osx-*/*/runtimes/osx-*/native/{apphost,singlefilehost}
+  '' else null;
+
   dontPatchELF = true;
   noDumpEnvVars = true;
 
@@ -108,6 +126,14 @@ mkCommon type rec {
       $out/packs/Microsoft.NETCore.App.Host.${targetRid}/*/runtimes/${targetRid}/native/*host
   '';
 
+  # fixes: Could not load ICU data. UErrorCode: 2
+  propagatedSandboxProfile = lib.optionalString stdenv.isDarwin ''
+    (allow file-read* (subpath "/usr/share/icu"))
+    (allow file-read* (subpath "/private/var/db/mds/system"))
+    (allow mach-lookup (global-name "com.apple.SecurityServer")
+                       (global-name "com.apple.system.opendirectoryd.membership"))
+  '';
+
   passthru = {
     inherit icu;
   } // lib.optionalAttrs (type == "sdk") {
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/common.nix b/nixpkgs/pkgs/development/compilers/dotnet/common.nix
index 49f3e3be4d77..e26fd0e33770 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/common.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/common.nix
@@ -50,9 +50,18 @@
           runtime ? finalAttrs.finalPackage,
           runInputs ? [],
           run ? null,
+          runAllowNetworking ? false,
         }:
         let
-          built = runCommand "dotnet-test-${name}" { buildInputs = [ finalAttrs.finalPackage ]; } (''
+          sdk = finalAttrs.finalPackage;
+          built = runCommand "dotnet-test-${name}" {
+            buildInputs = [ sdk ];
+            # make sure ICU works in a sandbox
+            propagatedSandboxProfile = toString sdk.__propagatedSandboxProfile + ''
+              (allow network-inbound (local ip))
+              (allow mach-lookup (global-name "com.apple.FSEvents"))
+            '';
+          } (''
             HOME=$PWD/.home
             dotnet new nugetconfig
             dotnet nuget disable source nuget
@@ -65,11 +74,19 @@
           if run == null
             then built
           else
-            runCommand "${built.name}-run" { src = built; nativeBuildInputs = runInputs; } (
-              lib.optionalString (runtime != null) ''
-                # TODO: use runtime here
-                export DOTNET_ROOT=${runtime}
-              '' + run);
+            runCommand "${built.name}-run" ({
+              src = built;
+              nativeBuildInputs = [ built ] ++ runInputs;
+            } // lib.optionalAttrs (stdenv.isDarwin && runAllowNetworking) {
+              sandboxProfile = ''
+                (allow network-inbound (local ip))
+                (allow mach-lookup (global-name "com.apple.FSEvents"))
+              '';
+              __darwinAllowLocalNetworking = true;
+            }) (lib.optionalString (runtime != null) ''
+              # TODO: use runtime here
+              export DOTNET_ROOT=${runtime}
+            '' + run);
 
       # Setting LANG to something other than 'C' forces the runtime to search
       # for ICU, which will be required in most user environments.
@@ -127,6 +144,7 @@
           expect <<"EOF"
             set status 1
             spawn $env(src)/test
+            proc abort { } { exit 2 }
             expect_before default abort
             expect -re {Now listening on: ([^\r]+)\r} {
               set url $expect_out(1,string)
@@ -138,11 +156,14 @@
               exit 1
             }
             send \x03
+            expect_before timeout abort
+            expect eof
             catch wait result
             exit [lindex $result 3]
           EOF
           touch $out
         '';
+        runAllowNetworking = true;
       };
     } // args.passthru.tests or {};
   } // args.passthru or {};
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/stage0.nix b/nixpkgs/pkgs/development/compilers/dotnet/stage0.nix
index e0caad3f9a67..5806a5ee6de8 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/stage0.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/stage0.nix
@@ -25,8 +25,6 @@ let
 
   patchNupkgs = pkgsBuildHost.callPackage ./patch-nupkgs.nix {};
 
-  signAppHost = callPackage ./sign-apphost.nix {};
-
   deps = mkNugetDeps {
     name = "dotnet-vmr-deps";
     sourceFile = depsFile;
@@ -51,12 +49,6 @@ let
         -s //Project -t elem -n Import \
         -i \$prev -t attr -n Project -v "${./patch-restored-packages.proj}" \
         src/*/Directory.Build.targets
-    '' + lib.optionalString stdenv.isDarwin ''
-      xmlstarlet ed \
-        --inplace \
-        -s //Project -t elem -n Import \
-        -i \$prev -t attr -n Project -v "${signAppHost}" \
-        src/runtime/Directory.Build.targets
     '';
 
     postConfigure = old.postConfigure or "" + ''
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix b/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix
index 1e4331ea4805..3e0694666f08 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/versions/6.0.nix
@@ -4,202 +4,202 @@
 
 let
   packages = { fetchNuGet }: [
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "6.0.29"; sha256 = "1ww2rsf46bm3mrgq590ky2q2qdxx9q63my661xff24f0s4h2iy7r"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "6.0.29"; sha256 = "1kkyqzlmhmms1nl08hlrss75lc8yy8qvb0kx23x0fg1dmyqnnzmw"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "6.0.29"; sha256 = "02yxbf6s8ncxl5gp2yq7dl08p2i3iy21bjahy9bpw44cqwcf9crs"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "6.0.29"; sha256 = "0wdy09kilnasa64jad3j2piggr7iad9z1jhxc24vchq9nalhdbxk"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.29"; sha256 = "0z359wbz3014rwz7cdcr60qr6mrcwsbwwh36g59a5hncxb1g73rj"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.29"; sha256 = "031kalc7mp8w35rwvnb13jbwwi8cgmny7nywsk3717iy6blxldih"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "6.0.29"; sha256 = "04zs1sgfxnlbd9csalxlzciwapz64mn4d284l6qr0yj12v6jjzyz"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "6.0.29"; sha256 = "0byixcrwj7ixz60lvg7c6r3f132br4pfrjv0w0fh99b3iwzrf114"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "6.0.29"; sha256 = "08s37g8x0m6ck862cy44g1khp3ncynk7z9czbknpa4fw8s24g4mz"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm"; version = "6.0.29"; sha256 = "0lbmyxancwikzhiqhyvlv8vd1868fj0yjchm6kby58b6x7h9fawb"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "6.0.29"; sha256 = "1ld7aipybxbhwnybimsnhv09ib9ib824zkj11qk3aq7ncz6pfazr"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "6.0.29"; sha256 = "0yl3i637jhp2si9dls0yd528q9w0cm59w079wyyxgyffyy2g2553"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "6.0.29"; sha256 = "0jhcjy60rjwbv2a8qcrkj2im3qv4mvg1ar9gza5199dciigsh968"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "6.0.29"; sha256 = "0wy5hs9h0214i2b2jj0yc3r8lr92ai6iszy3llvyzlb4jb5yzgzq"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "6.0.29"; sha256 = "1bxmnw7zmjv1wxggzv7qf27jjfb01f2x8440a67lkzxsnrl0cd4r"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "6.0.29"; sha256 = "0q6fwydh0rhm1p8q11zwi7l4qkvw7fh41s4rhfhwx9jn7vxw9adv"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "6.0.29"; sha256 = "1whzwlnh0cv184smn0ddhd9ssbrlqlj67a12yw4b0l15xsx51n78"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.29"; sha256 = "1g9qlb4k3i8zq5kn4y8v7lc9mqhy3ikh2bla30nqv86iwaclrwb7"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.29"; sha256 = "03rzclkvl2gc7wakh0xqhnj6zl32b91igrnyhd69pzr3mql5kdll"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "6.0.29"; sha256 = "18qk2ahkddzd34zwz4q0gg5cgrcdmg00hlkfxp4h18gyq8i5bc0d"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.29"; sha256 = "0kh3lrzpz7y42iqa4vdhw4mg51vf4y2x8l4lg767mzbx0sd4xllv"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "6.0.29"; sha256 = "15sz26wgpnfrp9gqspwdhj64lhlnjv8id8s6bblxxkkwa6040ls6"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "6.0.29"; sha256 = "0lnq5pqmsgh1fv0q5cxx1bn3lvxmrd4xvx6vsn2mjahzkvpzjgxr"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "6.0.29"; sha256 = "0jzzkdbqikwq96plmwrmjhpv7v6g0l0bz50swbs27vjf45msbj42"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "6.0.29"; sha256 = "0ggicsy3zija6v76mv0rddg0ga6spxn4i9skq9fr7s6a9xccbgqb"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "6.0.29"; sha256 = "17ma2g0j6klpbnxbv402f8hn1rrvq52f3s9wkz8zllh7zbsqin69"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.29"; sha256 = "0gv5dnd44xj1yidzd70b01s5a19khbq757llkfykgwf7wl4a89cf"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.29"; sha256 = "1bk2n7csgnvqma5yv550037xg4ph4j11gp4m5hn7s4sy23cfc5xp"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "6.0.29"; sha256 = "1k4jkjqrbgsnn8r220vh82s20b38h5hrks579a48bsv1288i0zhn"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.29"; sha256 = "0hhypwr4202n8nvpz10ac1q48ryjr7d4xj34r4c79mw49fvh1n61"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "6.0.29"; sha256 = "01d27mw1zsfx5wdw7515zg68wvwwl7ia579l7bkkbbzbmbb7n6r4"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "16cqxd6kh9dvxrbsjj3ls317ql7cwj036gdqnbg31dpcl9qmib47"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "1alfbxqjq7jyyh62lbw2szjfchmc32ywh10x48hcjkscnqvn32fv"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "1q9hbz6qv8gx2v0vpv21i6m0m2rw2jk1956gc0ybj5l5fppqfzqr"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1sf3jvbscph4yrljhpiiyyqgw70qcwcym0jb74ql3aw0cr3gqbh5"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "01dvbid18120g6fgxcb79qfz9628qwm0kr5j88mincvdzklz4k9n"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "15f5mscfmj6cn771wzxqszxfjqx93lvfa2dmdiyg9vx8nyciara5"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "05m50dprl9y1jq40z5wicizwdb669nbp942lmnk282rkvga79wh6"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "11dnr4r4sj9pzmayavs69f274ba4xvynxh4mj46ynkaiwf423imq"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "1f9m1rqfbz6p8h574f9ylw512w6njvdl1a52hcjcjf4y6wjvwm13"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "1sk1fdz3d6gm44qsaqavqc1zdl1kjc1m29sk2rlpw4lml1aa527x"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "1gly6h5vnmp2h3mj2jqym6nwg3swp8ihsq2s56j1b7mdxjnbhilk"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1hnbr15han7261jjnx6pkyhi3bklyd3sbg24x1yqxac36f7xcvwx"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "06ip2z9j02ak5nqrbm5vzs6lyv8d1g959xmx2h4b24ddj1zrkid0"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "0j089aayx9g653agaqbwk9101nxdiy278j1k4yaj20a78bw6cdsm"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "163b5p3mwy6v0lp00ardag41gn90vv25jfkrawwhqvzjx9i7gm6x"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "0j2dwpr1mzm43nvw1lqyqk23gxf0iwx2j6lpffq43dpx5n3bdi0a"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "1ax7sjajicibkz4zdvdx65vjpc4xdd6q88zgcqfi22hvfpcdgbni"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "1rxcxafv84lcmskdlhxa8pvm32fvcgn1vnmcrsksb3g1ibvh1bhv"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "03qxxkh1wk3rswssglnhrff6k8pajbjalzp95xyg9pyd0xaq5i4k"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "0wq6mjg0apqnvv9axdkvka8c0swap8r4n241kvm7xqrlg88dhlvz"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "0a63sh3i71nwwgw83194k903yc3j9z1wnlnfbcj60w5i3kwifnnp"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "1by4lbzv90lzl1zrgycrpgrq7b3dkc023npixsihx0sw0vc29s1m"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "1pvr7bh9hvg55r4d4yjm5zlqmdnpk5jbi76xjkhw7vdwkp9133rh"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "0k7k4rhq5d9d2rwpqppddhdw633509v1dxs9ii2cvk8pz0vcl2ll"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "0mvyfmmsn40cmn7n8mavspflrz2rahfzmqy4f8vnhdfb2pmirbkb"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "1hyyhbpvzvx56lbbk43vdlajz1x5mb17155j7k0lbnpp29gr2hn9"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "0012c5f6qmgvky5bff9gpcwmc9rydhrs9vd0j2hcqggdixcfv5f0"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1a1hvalw80kaw2prixzzjr6s4l2q2q73vibqh09cn0hp09zbsr1g"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "0agminm16ksiplxi3lb7csinzbr7r315wl0a32spyy0qbmzpfv4h"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "19x3w376180dh7l9rn82rv4jgcfl7rbrc1ckr9x6nbkmldgq8bxq"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "1jxxx3zh1hzkfxk9m1pawlcg5h5x8bb6jwj0vxb0cflj3yh9scjr"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "03zlldqxlc3ykbapmmvpifik2c3wy3w5k5fnrbjl6ak155iblszj"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "006pk987rmif8kv26l91wchj52r1qad673fdn2vbdmh8qmr4jgp9"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "13z4lgmkkfkw86d5x3pz80rv85h36sbixckbwja7fxc6wzx11a3h"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "0sqcrkdsdih5pjb30r9c4g5bdmvjak4i7s9ji1vx83h2hw71d9x9"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1mmkp6a8xhyfipnafj9nbwlnc3blpkgpbvcnq12znlbjg6wgxqz0"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "1hj6qqfy1vs88j2lksz2bd69ra1nk5vp1rnc9wbrd95qhzq0bg96"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "0y25zkmm2gwi6kmqyc7ajsjpwyb240x99ipfslxfihan9y8lsjg9"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "02l0adv6iy71pyf3j6r3vag8945avq30srwlpc1k0jdfwb0rp4ia"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1405a595p5zdsv0czd5fb75f3w6i4w7d4cxns7ar007dc4dnfzhw"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "6.0.29"; sha256 = "0hp585dlg26zbqgcla0bz8c26bhspnqwccwimyjg3gs0acymm5aa"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "6.0.29"; sha256 = "1al87br8qcdplm9j5n57mni5zbvw71jvwax4kjb4yfcq5c9qwdvy"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "6.0.29"; sha256 = "1n1sj94xzm3f6qx20hmw9zvz188iaxm76pd34zcyzs7izbw1jyq2"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "6.0.29"; sha256 = "00w4cw7blwkqhcg20q9xybs00mrcymgnmki393smn3bc439b8vpn"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "6.0.29"; sha256 = "0d0xy3zmrlfzc7zk6hpx69mr5b6p28aj944403c7akhzpg1zz2r1"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "6.0.29"; sha256 = "0n5zb3hghyqk1yizzznx0azdqg7rc19gvzrw5214rhf731jsm4rw"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "6.0.29"; sha256 = "110wd98zgddiw0znn6b4hrbsixc8shl9hsjd9gch4vxz1ivbsfm6"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "6.0.29"; sha256 = "0nrrv68px7xvg7291zsgyw9zzmi3kgcdb24p6cnywmyrrjf1ww0f"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "6.0.29"; sha256 = "0yviz7fjchd4jg71gbq52c3jpk9jpkcz042hhfpz9rj7wij7m7n6"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "6.0.29"; sha256 = "0d4sflclyqwx7p9qlb41xfjcpxhjqy0xgah3kr1wb030apr46ina"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "6.0.29"; sha256 = "1wl49lg346lhnvn5h2vlb393lasbvbh9hrhvzb1fsi9nnwk6v278"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "6.0.29"; sha256 = "192n0rbnwb13m619i70yiym38pdlsfkfh68qcq2pm7r4q1lhw5jm"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "6.0.29"; sha256 = "0r1sp7jjqz2lh92bfnz6xv2jp3q3m4fabq5m1zbw28q6h945q9mp"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "1lifcf96r5mqh4n8d7gcrnmql7vyj8q42sbd621yrqk68dg2gyz3"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "07hsmqrx6yk8rjr8270v1agqfqhl9lw8mgxfsyf6g7anrjc8skrz"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "0iqvqmhncmwl2df6lwlxs3anzpwwy1xhaci4zzq57f67qkiwfh57"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1ix3672jd5m5n93y6r9gkpvrkc9hpj1jzf0wlpwji25n75mjg2hg"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "1qxr84lqn6pzi1rh3941rgyaiv1shsjrj7pgdzmmd0r06ng49avd"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "065ih4wls3y3wlcwn61ywjmy08k4abz216kvzg7vhg511qlsi7a5"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "0mm7mybfvqymxcgdr9vwbxfdv83dp613gqhlpm4s8v38jy8ndx52"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "1gr26qlj7v3j3mf5dhizbmdh69y6rs9hnff0yf3pi1p1fc6pljf0"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "6.0.29"; sha256 = "0in1hpn7a2dmmrgdzh101idn9nb8x8al1kp2a7s9vx8sk42nvhnw"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "6.0.29"; sha256 = "1nzihwz9vyhfhjq2a6ws2kn651mlyq0ki675v9jwkcb0sgabagab"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "6.0.29"; sha256 = "1k7dcy3w7yjpykspcb3n1j8fjba4f7505gv0zs003dzx7379bnis"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "6.0.29"; sha256 = "13s195fgy7yymvc9qw71nr1vlphmvyq4gyr982bv1x0ci2mzybh9"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "6.0.29"; sha256 = "0vhd537vh7rakxzbgy6fmfr379k5fj8gq4s005fasripv0a8k98n"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "6.0.29"; sha256 = "12l5i81rqm8mvz1hj1hnrdzbdrv9fzxghcdj9mw7xlcynsmazazz"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "6.0.29"; sha256 = "1y3mzszv3qa0pqvjpn5y8jykww0pcpj97576gj6m63mw7rlk8vcn"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "6.0.29"; sha256 = "0z6lnhq0jmj759z99ph00wxwyvr5dh0mpkqp89mzqi98dpxwlnpb"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm"; version = "6.0.29"; sha256 = "1s1j8zivvkpkg088kmr9lfqqxz6zc4753hqhz3grxp850vhv1hzy"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm"; version = "6.0.29"; sha256 = "0la7fw19zj4aqa8dlp5pg4bvh1m3fsfa1cnzfw3fm1g17bpq210f"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.29"; sha256 = "1p4jxlqnc8kf18q005nhywj2ca1d3j3kk5234xbsfhr8j2wx211g"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.29"; sha256 = "096cldfkih3c3bs8bi7340yiz4ss0dqb3y90n3rshfhln1mik28y"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.29"; sha256 = "1k79s6rbxqhfqsh5yxznnfhhsxvgg1bbfsj5dwrpxwxlhcwg8p9k"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.29"; sha256 = "0inzz41s033hwd5splr0jrf5b4bnsqlyydrbxjcqxhk975fjfgxl"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Composite"; version = "6.0.29"; sha256 = "1k2k68hrxc3181439nipgv6pwci8x3l92lx26n7wzjqr20g7lknv"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "6.0.30"; sha256 = "00h28rynbg62abjgknxlq79b48qnjjjclib638wpxjaz96wih96n"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "6.0.30"; sha256 = "1n4v5przbrjhzj01b6qijpdc2jbsxr66ijvd0483qxh4s0b4jppr"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "6.0.30"; sha256 = "13cyagv2gxzdssy4kch80jalax0d905sqglibnp9ncswv5yv7af5"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "6.0.30"; sha256 = "01n58418vmvz3bxm3b175irfidp42vg71m5b7v0bf5mhifi40ji8"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.30"; sha256 = "18v0l07q74m5xxaf6y6dkmr6and8ivya0nslffnr4djrxcbiygdr"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.30"; sha256 = "009srl8vazkjnd93xr6k1m353spbki9gn1yzp4zgazgbrini6rqc"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "6.0.30"; sha256 = "105zskdc8d7papsi5b8pf76335j4slkm77jd6k5ha0mp6n39a1m2"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "6.0.30"; sha256 = "1ppl5zc8j6z3yfhq9wkcmjaa0yajjy4d4iiykh8yqsjypxg5pq95"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "6.0.30"; sha256 = "07yaxq68gjnc512nwvzj3h6xk3w1bj9gl25k0qpljnxfv1nmba8y"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm"; version = "6.0.30"; sha256 = "07jhykr9q5akxy2vcsp6w8646j78p636cn13qcbybcxapz7s0iji"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "6.0.30"; sha256 = "17k3l8xd5bsyk69bm5q4nxbpb4i0izw1kzmzi7j3p8pmm9prgrpy"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "6.0.30"; sha256 = "05ffs63h5f8qhxzrkhq0fwy40q88nf6672xgx5q1zm3pa0a4zpdz"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "6.0.30"; sha256 = "0p53lyqmr5n2ym202pbgmsd9b9aa6jar7ic04dcq86h2g77r5jqk"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "6.0.30"; sha256 = "0nzgcfvzxkkf9qgy18svjgwsfhhpv9zz44kcyv5qqv3hjnn59n77"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "6.0.30"; sha256 = "0l3gjhmnjd5n67w83smqyhmfcwzszafjgcbq8kdwxiwwh2m6nh2i"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "6.0.30"; sha256 = "08xwqfqhazjy1gwj2j060vcn1x429b37db1h20mjcszmr6j55bb8"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "6.0.30"; sha256 = "0kgpximwlw0ypjnpdvnrvgi3k72r032c44ik1vamka6ilir5gcsj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.30"; sha256 = "0ss3108c2h7afypvliyqixv4dll60sq9iwqy90k1p132znpszrmb"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.30"; sha256 = "02x38c68xan8hlr59mindcl4rcx49bbh4bibh6fw1l4rrijb38lw"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "6.0.30"; sha256 = "0qmma776whn57fnjqkpacj03vx6brcx6j51mh200v9gx8hm9h1gz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.30"; sha256 = "1000y4ap0k0iaidl8bqdais3dpcnccd7f4mp219qfcsbn7ma1g5m"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "6.0.30"; sha256 = "0dcmanh6bpkiix9nm516ybfd3jijr5f4m4pj2b0f4lzdhgnrg5bj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "6.0.30"; sha256 = "1aj6dljgqh7ivbbzzqisycklc3ffy5hav6rr78pi20kqr60hgv2d"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "6.0.30"; sha256 = "0xfhcig3gj3986rxp3dhnd8hvnj4nvyhz1fz7kpx342d3g53wb37"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "6.0.30"; sha256 = "11c5cirdzcmv1h88frjpdzknsafmpzxz6k3k5viqs8dj0pkrx9w4"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "6.0.30"; sha256 = "0yc0kx6nlfq2hj6392m8jq0gkkc8ayp6pndidwpdyrgxr6dcgx5p"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.30"; sha256 = "1s81sj8lnb8szqawxh3vc8wi815ln12cyhrl3f7hwcpay57xgswx"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.30"; sha256 = "0xybqg2wd240r1nm2vrbn2qbfqfnqsmxn1012zzwjn17wa2si9a1"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "6.0.30"; sha256 = "1f8jid6hzbgc69i3mrhr75g4yb8mxky1xddzsq6vm5bhzdi9x9dq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.30"; sha256 = "1iv7mxzyma90s2w6pgcr9gb4b0yab0qgd43ljbr776r45jfmhfgy"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "6.0.30"; sha256 = "0h63xlks92kmgmzi5vcciw46h9i982shqjsy5w64hxb2m28rrali"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "1nmcfcrhlvyyxgsiaa91ssp691yl3y4p87azsnmvy3p97xppn89w"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "1dl58ci5xl0np15mbya16zaipscmvhm3914l2f0pfv1k530c9j7m"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "1ik2aarvg0r7k5mm47y7z9lq1csx84k5sd55nrkl2bil0x2pwbzq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "1n711qbd40468l74fr5yjl92n38fsvcdxcl5i3vrqxxqw24rk2v6"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "141ik8krp675ra085b7w4kwslwxdfhpbgkwjwix0l3idkbbqx61x"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "1xj1g4j7khd54lk04wdii1mam6iwa61aijr43bwfrl3cwjlyk0s4"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0h419n0wzpl7g19g4vwf9s3c3n7vpshyqzfb28w7hy9jk7svvhs1"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "0d9g5yimjmvqgfm5ndyzb7v5xwi0ix0dq6wxinlfcv9jk933bxis"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "0v059yadlahda6ifb84rhpdf5lwd27pkgwfyqdgmqbvc55mvxbpj"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "048nxp4xckb367b016r0avzwkfc6acvw1y454466p9ib29kahc9i"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0ah5lzn0al0p73mv2ifaqfal38pq7v7cgjsh2byqpylg4fj00lgw"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "1d7vxq3cbqv36mpl1lv9xj6v6gg5x1brr2z0v16zb1sgc20c1py0"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "0im0444rnfdjb088mkgj5nwmlh4qqi7cg29dp7c7490h9b4si6sc"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "0zl6h8nq6c5jnm2a4sn39wsqy05iv1s8cwwxck1xxhc6xhvm7ssz"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "1b8h3clg8fhx2lg1znlidawlr6y230rh7fswz459p3y9a5m2g5rv"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "00zc5ym89ps8f000j3h7d7fqcsk8bs30hx91yd3q8aqcacwp5qwf"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "068y16a9966g5r6syznpi445z753h15dngw9dr5z8dr2rpzvjmdm"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "04i97cy9x3z0cs738li44s7zf73vspjmqiw70vi7bi6lsnf1n393"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0ra00mpz0m4wchxxay0mzk0r4dslkkjbkxfwv3agfldyl20hdh8v"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "1dmqagg5ygg6w2lmg5rh165chb06q5lalyz0aggd7d10dqyjqdys"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "01naz5yn790qd96pq00pb17s0cgl82ai9l4p0psgcj9hdazhh5d9"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "1pfl0sc6z14imjlxdmacs6yb9mfgf2pb0jqxiwsdxrc9yhvkcy4x"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "08vdq131yc70hb72dh9ira28c894b0fwg71ap8bkdwv3nlj92xcp"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "1b2nwjw1q8696j63rfr6b9v3czprj3vnydw5sb1c4dy8rmi037g1"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "1v4rc0zxiznmg3xzk0f9v780nzrycp7gcj10jpc5f1w7rw9007ch"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "01r6w4j991lzirvb9nznsjq0825j5pa6mfjvacy6izjqbivwcf53"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "060xdk3fazza196zgg5q3r10p7h9nna90zc0kffdabg6j2msr8rm"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "0z350zy4c4xz42ysac40sacvky7lp0n7lyl1kh393v0bnzqad5zm"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "0h7c58nx1l77n1s28ysqbsij9408g2vmyacxryp56k1l30aspnri"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "1nf8p7a8qghpgpyh5hq8f75w78vqy9airb3nkhp600ln0h3rzwsp"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0579hnk8xiclfzkfdb64628h0r49l8sac3mnv5yrq8sp3kkf8f4d"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "0flcc2vmy9sj40cc6igmb26zflsabp6vx9gzabhyns1lwnkwbljw"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "0zcsj0zqr2mf5134v74xwvsikxsr4g44qkh16qxkhdai1fi9z78n"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "0zwqi277hfiqj0yinmvakw6dvb4njj35yi618s96h94c4dz5f64y"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0bifshrxl0g2q3xby4vy4bfgjbhy28r1jcvfr7y2vl1ci0a7l7q6"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "17nj6zp7z65p1gbd0rpz0fgiwgh3sikd1b0lvj006gz9njldbkki"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "0yzrn1261ypm7y8l3klpyswkav8qxhnlxsv083nrw1z83sbs6a5f"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "0q5i9nzwjdl733vqx3rp5k9favjz83yrvpwr953wm0jmcddk8gz4"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "1dhd1zczam6s5r0lwdanm3mvvjrwi6l81izb5v2aq4h28g67ciz6"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "11lqxmcmlhxgj1d4ki1rng3ivs2fx8ny984vwzlmcyhc2y5rz63w"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "6.0.30"; sha256 = "0ljzirp7nx1xmglz9arfggjaxysg0iaqajck045z31s5dr7p70a5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "6.0.30"; sha256 = "08k5v35mvcs712kb0vcfjd1dsas5rgwrmv8rn87mzjb2p6ajl3n3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "6.0.30"; sha256 = "0p9qybbi7m797svki92ahsyxchd3ic6xw5dbd6h7j2zacgwwkdr7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "6.0.30"; sha256 = "0s71k92daakzwish65gmn4nniy6bf2hv34c0sb6m1hv3criqxmp4"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "6.0.30"; sha256 = "1wqqjhhlqz4dmijcx3kg3hnwq0s0jzqsddaksskzhq8avr4ziy18"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "6.0.30"; sha256 = "1zgspjf5qsl6nki9flfm5askgs2ryz6n3b5vz0sh0cygjk93mifr"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "6.0.30"; sha256 = "03gi4ckn2926am1m5i4pimxlwzb47s5bvqcarw8gchiw6ids27a8"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "6.0.30"; sha256 = "1vp1r5jsphj322dh441fs0723riijdqcai595xf7fgdlhr8kqgqj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "6.0.30"; sha256 = "1snjxdqm7bn9p87m8hbv125qbz2sgdy59cz5icld9qgyvx6c65p2"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "6.0.30"; sha256 = "1pdwyi7p71h8418qcjypl5fzvdj22grxiq9yjpnw1qma7d1251ny"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "6.0.30"; sha256 = "125qdpv0j0my2m47cdhqacdx3jnpm0f7xgyi60x539iadg9w5n17"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "6.0.30"; sha256 = "187nbyjgpj64ap3kql0msynrfrjkfxi7flap67nn3ly844l08h1x"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "6.0.30"; sha256 = "0j8rqm3rfl3x7azpkp3l651v4hdd3rchfm40vd291pcc90qicqd8"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "0c3iglyq21mwwlwjd942z2jxaxgh39lxnqkyna0wf4a895g2v4ia"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "0frimj5r3c2dzk3a0z8h80jlsyvckw57nzm2rj85x8c3ym7cfp7g"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "1viylidv5j5h6acikm02v3zrbjbqy78f5a9b5rm5hc74q9hajngw"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "1929s1w81h0y51r2qcywbm4zp700l75yswp5ii68k401861b8pmb"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "13kgffl4jhbq0dn7lx3hhd36r0vi0s3s8dhjq85lq3hrm8454p8r"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "10lny4j9yyla16bwpzvnr15gkf5d4n4la5smk4v8ncfxbj7lgbrm"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0kmxfvb10gfp4870mcrzgvymgzyb3l4yljnj105y8hr80jya2z2l"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "0passlm8ajlarnvvrczgxp0brgnbk4n8fig9xmangzsz43bys5dc"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "6.0.30"; sha256 = "1cxd3hshcb5m5651324svwqxfsimkz35kr9lx0m9s0h7r7hnrcck"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "6.0.30"; sha256 = "1adhb5qj1rz68l4dg87d2j1mbl263lvfry200fag6sfydb305kqh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "6.0.30"; sha256 = "0f8w8fjaigd2pj0gzc0h5qqm3j24mibprirx0iqaj1l7shgpi40n"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "6.0.30"; sha256 = "0iirjhd26am5kczss9z1jv0v9qjafassvqdm19jdlwrbfn3nzqvf"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "6.0.30"; sha256 = "0pvwpdjf5vnyx3kjq9p67hyzqbfq3yri2alxh2i93xjmdc8rmryv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "6.0.30"; sha256 = "0bkh3haf5ll5l0iiafv9ihzxqh2jqsqqi5325mkzq192lfkh3nrl"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "6.0.30"; sha256 = "1dfc7zdjb8m2ziy8rxwismfp6wjs32m4piqxw5w65sc2ryaf2gvq"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "6.0.30"; sha256 = "0f01cs742z821m1jds7p05jc085aryj7mjpdd04pwv1ql8axmyhw"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm"; version = "6.0.30"; sha256 = "0ns1zscka2fs0zdizir5malhxhgqryd5id87gjqa6y9k8vc6d0h3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm"; version = "6.0.30"; sha256 = "0pd1bwq2nzd705c65ckwxnayjlj7ahj2n5hwfnglmjvhi8dyzr15"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetAppHost"; version = "6.0.30"; sha256 = "06nrnbbaykg2w35bldyzyp9qxs8y7aa1mp4j3lswdjcly06rgvbm"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHost"; version = "6.0.30"; sha256 = "1h05dhpvycxjs17y3r7y929r07dswv7iq9lmwas1kjxhnzhbs6x2"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "6.0.30"; sha256 = "0jj3nxpbyb3vxh2jsa3qwwy46l6yls1z2n93mq2kyr3yi7lnghmg"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver"; version = "6.0.30"; sha256 = "0sbi0b0kck61fq99ipw6jrjrj378kzmk30z0czkj5cn3m59v3dgj"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Composite"; version = "6.0.30"; sha256 = "166xfyap4mgv5y6qa5bzq1r7rd8n2fy1f3gcy16i1fhlf52db5v8"; })
   ];
 in rec {
-  release_6_0 = "6.0.29";
+  release_6_0 = "6.0.30";
 
   aspnetcore_6_0 = buildAspNetCore {
-    version = "6.0.29";
+    version = "6.0.30";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/70ddd1ed-776d-41d2-b192-f02436ef3ca6/337d6dd35177408acb9889289a7743a7/aspnetcore-runtime-6.0.29-linux-x64.tar.gz";
-        sha512  = "6dc21e1a8dd597df9c1135065f7350bbde9cc040c3079ec7850b0e5f254051b883c6c6e0056682d2963ec74dadff8eb32d82c13b35c9088f3d7c055d3d3f0863";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/03d1bc71-2ad1-41b4-aa2f-9e4ef6d5c6ed/29b655655d626c590cb216e0c30bccb3/aspnetcore-runtime-6.0.30-linux-x64.tar.gz";
+        sha512  = "757d017db28b8e34c4b242c082aa51eb85bce8fca16af37a0beabedb271c9bd13e1631868faa131745d7784db48974567f82275da09041ba434dcb7abe821a2d";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/094fe5d6-0520-4c0a-9edf-b53d269f8b20/8c5e69ed04787815037ae373ffb77466/aspnetcore-runtime-6.0.29-linux-arm64.tar.gz";
-        sha512  = "6e4a504f37ba4bf7d0316d2a3077c5088962c8b8445b659fa05844697bd11427afabacb6fee34094aa4313dd6dca70c862c1c68b30731b12b4451bd59067bc8f";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/a4c8e994-c595-4698-8cfc-cf3ac166bbbf/9e6b514da011de5191d148d95601a7ec/aspnetcore-runtime-6.0.30-linux-arm64.tar.gz";
+        sha512  = "de0921903ba55e21195107b126e271457550543fd6a9698ab3c2b1e2b95f7fe2d6fb2f067e08ed10c9e56940c247733dd9a2f9775e7993e033a945899461e130";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/7b93130d-337d-46b8-8d61-cd702c4f2ae7/e198b8e68a06f1f1f5f46116f9976641/aspnetcore-runtime-6.0.29-osx-x64.tar.gz";
-        sha512  = "f4405bcf40a075a5acbd8f4ced424efb0b2de49a5f81481c708a1942c1e92e3a69ea8a4d59b55c025092a59e2715d260521fda56618f250d1484fe18dc4cadf4";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/15ab71c2-9230-4afb-87c5-36328af745ed/b859c077ed4d8c00985a2ee87009b6f1/aspnetcore-runtime-6.0.30-osx-x64.tar.gz";
+        sha512  = "0a0c4c9255ed29db1c1911fa0fc6c8a9083f777c04a3939b2087d80bba21fbd864e6c92c62aa566a930a2b30024b1fdbfdcf34d034e2734c0a9b3d45f7c63445";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/cbaf5637-d4ba-41e8-a16f-a66a063a30e2/205c5fd4005a47753549594370bd385d/aspnetcore-runtime-6.0.29-osx-arm64.tar.gz";
-        sha512  = "a9ecc77db6f0fd8e5ff70ac58ae3549b766694d30a93cfd41869ceaa298178fd2c0e86e4e763d8d7a5e2236d42faf2e87d798d2853f8391a73a40f5193f4fa71";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/0a61c065-2196-4a9f-a34a-9517b3ec9336/538e1624926840a66ef6963f57d44aa0/aspnetcore-runtime-6.0.30-osx-arm64.tar.gz";
+        sha512  = "a74d44c399e06c9ce19ec10d4be53444bf18d981fe7ede62a69efc24a5af5898d4ee63542ffbedc3b906cf1ac3f7101ecdb69e45dc0fbb1336bf151940fc2204";
       };
     };
   };
 
   runtime_6_0 = buildNetRuntime {
-    version = "6.0.29";
+    version = "6.0.30";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/a066873e-e4f6-4538-a225-4170e2950af2/7e3b369dee3fb19cf193823e158f3b6b/dotnet-runtime-6.0.29-linux-x64.tar.gz";
-        sha512  = "c9fc66d47e7c5ed77f13d03bd3a6d09f99560bd432aa308392e0604bdf2a378f66f836184dca4a678052989e6e51a5535225de337c32a4a4e17a67abdc554ffa";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/a80ab89d-9f64-47b9-bba5-907a4cdaf457/c5714a6e605ef86293a5145d8ea72f39/dotnet-runtime-6.0.30-linux-x64.tar.gz";
+        sha512  = "b43200ec3a8c74475f396becd21d22c6a78a6713585837707c2a84bbb869c7e551a05c4c1c1cdba8083baebdd09bc356de5d5a833b8bc84b83421d3ecfac71ca";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/633cbdd7-57e0-4101-9627-9bda4f29dc9d/93ad01d00720363b0c054f5d88d97a62/dotnet-runtime-6.0.29-linux-arm64.tar.gz";
-        sha512  = "27c7121a4953b51bf29a15ffac4155cf86609ded15948f91ecdd19970ff7e19276c528d875f547c2877245767adf1be1ca0eaeb45dc8db460070637bd5ee1ec8";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/27a21bdd-cad5-4f5a-b7a3-86942632a745/3d7aba7c0cfe0c28342a8f83b65e72b9/dotnet-runtime-6.0.30-linux-arm64.tar.gz";
+        sha512  = "75fa6de07e5d8e5485af910de522c1d0afed0532008ded1e80ec3f576c9a78c6e5759dd4d1331159263c02121a4d8f1e532f0533c11524c2d782cf861be13c09";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/ed218418-03fc-455b-ba08-6743dd753435/87ce2ccb4bd152e7e9435b891349ec9c/dotnet-runtime-6.0.29-osx-x64.tar.gz";
-        sha512  = "e04207993febbd8593eb5474016e90910491f4c5b23cfec39498bc6d5ca2c3ce427da4f5f14ff4160766daab1e35dd2d324d0cfd7ffa83c4741a25f9ac811f00";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/aee516fe-b6d8-40db-b284-1a287f7cd5ce/c217b7cdbcac883886169b82bcc2b7d8/dotnet-runtime-6.0.30-osx-x64.tar.gz";
+        sha512  = "8cffba5feca56bf11b38318564c45ae18a58ec48223963ee46105f71bc07661457e562d51ea0e8b626eb69b7635565244a5cd1575b6fbac52b776145c533e784";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/ca51758e-d614-4a55-97ce-bf60ec381931/c2e6633c67dcf4359666cdaa88f1eeae/dotnet-runtime-6.0.29-osx-arm64.tar.gz";
-        sha512  = "baf9b30ab7fcdb16878a05429a98c20079e8a5e081f910ddabaee70298dd3d976f3c56569af4efa544533534be50920258982cb97d98bc85f31ce44e6ccabf52";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/e78e6379-e47a-4e24-ac6b-1c3182f1d664/b8f47b2f04b15c78ac24a8bc88000131/dotnet-runtime-6.0.30-osx-arm64.tar.gz";
+        sha512  = "b33a38f4e41455cd88e23f6c0fa76797e05af25bcd94d500557fdd5ce10071ac16789ddef98ec9abef113f2aa487fc7d5c22f329b8a7941a79d7768ca176975d";
       };
     };
   };
 
   sdk_6_0_4xx = buildNetSdk {
-    version = "6.0.421";
+    version = "6.0.422";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/19144d78-6f95-4810-a9f6-3bf86035a244/23f4654fc5352e049b517937f94be839/dotnet-sdk-6.0.421-linux-x64.tar.gz";
-        sha512  = "aa2c1fdc06c477acbb8ca938895f22373a96e96bb75028b496ddf3d433a1e347f3f765b414e8e09fbf1da1cc50f575e28572e701693bad2a33f9b92437a7d3fc";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/316ad9ae-22cb-478b-b51e-47667f1e7027/7a13422c0951e9235b7692c610b83442/dotnet-sdk-6.0.422-linux-x64.tar.gz";
+        sha512  = "e0e6ea234a5aef29c2571784c22396115db292fae8f859f4642f80f873807140bb7bbc009be568e8e34288b46b2e3e7732115b5f02bbc8ca0aa723e183bc084a";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/30303304-04ea-4569-9f10-3919b4b3105c/5b689d8357866cc2637a021d16096256/dotnet-sdk-6.0.421-linux-arm64.tar.gz";
-        sha512  = "2713e16d70d9cb5bd6d3d2da385c75c8cfe6ed3187225efe6715d595b1b1b17d0a48fc7044cb514add8918875c5f281196f09686c11c7524fe9397d8bbe1f8aa";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/9f8f2c2c-e531-4a5d-b7ed-1e7e4b8bbc29/12e87ade15ce29558b40099d6c152b10/dotnet-sdk-6.0.422-linux-arm64.tar.gz";
+        sha512  = "c03c3708061f266a3d7fb5bf2240f5bdd00be4d877dc3dc62b95a857f2ad62c80dd4c54f5257737ef7bad3cb458685d7f2bcfe71c3562075ac3aed660df8ae41";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/270b615f-5281-4c58-980f-d9f7a08db642/3e874492a9cb0d5b87195c596b46d609/dotnet-sdk-6.0.421-osx-x64.tar.gz";
-        sha512  = "93570a4efc929050b36ad53adca2be803c4cd8ebd9f2553b0f3e325af0629f9854ed39ec8ed0bde4302985c74143763b3a7bef89b1bcecbcec99e137777181d6";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/818b0c97-95cc-4da8-b5af-05f6854c5e89/200ee246643a1d6a0436ad967ae705f1/dotnet-sdk-6.0.422-osx-x64.tar.gz";
+        sha512  = "a301982e64a18cf06577463fc3e2e179c06a31597b1b32127b1196dba755bcc3323edb618f6000c9f4f9ed902c671377a459e9ac90da2c761744fc1d57e220cf";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/ed341e9a-7848-4036-bf88-00cffa9fe535/52887ced41272bf177a9ef6ac04563a2/dotnet-sdk-6.0.421-osx-arm64.tar.gz";
-        sha512  = "83870fbe802cdea4ca014eb5dc0cd899deed952d8cfeb862f74bf68d80bfa81e814a3d90381615bb6e26dc39bfcbc82f975462665bf65294d25249e2ea365332";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/2f0c0bae-a26c-44c1-bd9e-9fcd42548066/c88dc835e8ac824d992696122c10d959/dotnet-sdk-6.0.422-osx-arm64.tar.gz";
+        sha512  = "7bb885b605f51cffcb235a6bb6f0eccef7a211e67480fa6243b0cb8899dfd60c4c0501579c0c1dc7fb267aea5db5a6d35cf9e2a35903772797a66360fa171b3b";
       };
     };
     inherit packages;
   };
 
   sdk_6_0_1xx = buildNetSdk {
-    version = "6.0.129";
+    version = "6.0.130";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/7bb40f2e-6ef7-43d6-b0cb-b74d974a5675/cf48bfe3825b1d419da055a8d8f16101/dotnet-sdk-6.0.129-linux-x64.tar.gz";
-        sha512  = "fb4991e5b0297ea0c65dd84300f0c11bef4589b19012556f67eb10970bd3ee50a58bad59023e1d266a8d9688a71c23458e0d21b8cd9adb75d21c47b59987aabe";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/3d0d3892-fec9-4764-8638-b579b1b9e222/dd4c14a3c27929671362c89fe3378677/dotnet-sdk-6.0.130-linux-x64.tar.gz";
+        sha512  = "dd4e3e5e24c0bc387dc6ed3fa833236d3f444efc0b12a256dcd73f5f4431488b516143d63019c6e9430173adebb07406b52e78a102f9e143a7e3f16361228b32";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/ceb30bb4-f3b9-4195-b549-76e49ace533b/60fb639b9c621ba00946765d1be575c0/dotnet-sdk-6.0.129-linux-arm64.tar.gz";
-        sha512  = "58185fa68b9a7bd373b8c4ad9f2d14d0379e6758007bfbe52a640cb432eec91267ff7df94fc57ec0d0d16b8ab5a0838a623c31d3cf36384b3a77697d3a8cfd86";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/b7e1a062-bd07-4aab-90c8-0d91994ce0c5/1d399c3f9cc73c767e6927ad4f60c5c5/dotnet-sdk-6.0.130-linux-arm64.tar.gz";
+        sha512  = "95767eb4da8e3fb50992ec48df178fba9e2a7beaae26c5fdd8ecd4dae605ec048b83180a2bcb72c836468a99607179f9193ce0e1980bc95484865f559cc91789";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/2e1ce563-4b66-4bed-b092-a411755b0101/e6abdcbec6cb93a3f3c74f3b25eb0dac/dotnet-sdk-6.0.129-osx-x64.tar.gz";
-        sha512  = "b4b70a211eaabc9b3a34fe197ca4c69e4a167484445fbbc6df326c972047c813a6ef9a89830d0105ffa00bc8754f8b728e102fba35f89fd9caafe139d45b4eef";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/fa013cb2-8b3c-4986-8863-dd526d13503e/ac0c886e8c9837784ff02db082ac4a53/dotnet-sdk-6.0.130-osx-x64.tar.gz";
+        sha512  = "8102f1432343538f45d0d49e518edb7ba0000d1ae7f7306611d2e17a205baa4215281250b45cf11900f45db0622fd190bf7d57f2b63cc8b1b4bd106128564522";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/bd5e3be9-a283-4cfe-afd8-b217d2429ad2/0339d0cf86b7b8fa5831d0788175c34a/dotnet-sdk-6.0.129-osx-arm64.tar.gz";
-        sha512  = "065a6b54fc5044d335371c6244c633d3a64d6813ebcef9db19fe0dce4f15c381109b537efab8ff1a9850d83721b0783b4f5f58c048cd6e8f05a32d12eebd430a";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/8c72ae1a-38b3-4a30-81d5-408073f96d64/2e3493ea5498d598193746232d4be684/dotnet-sdk-6.0.130-osx-arm64.tar.gz";
+        sha512  = "9d8273f73e842a3a1a71a2ba5c2f0dce74821e1302ef34843817a3f5c49df83d662bf6c7031dba7a8362903a870f759c7976176209781a3c4ade6c66e6824c41";
       };
     };
     inherit packages;
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix b/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix
index 21d7884c482d..dc2e5d704a33 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/versions/7.0.nix
@@ -4,232 +4,232 @@
 
 let
   packages = { fetchNuGet }: [
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "7.0.18"; sha256 = "001f6hj331sy712yq1p1yzdgpxmdz0zk8ikgyb18sxf2xflggrk5"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "7.0.18"; sha256 = "171ygqrbjza8d83awyrqpm1rhrdxmq3x5qdpc2w907nidf3h1nwz"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "7.0.18"; sha256 = "1b5zgxzg71jgr2rqgxqgnl9b98zq466g6l15nzkqwa4pj3y2i4s9"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "7.0.18"; sha256 = "0f9dhjgw35i9z96qgq3q7fn0csnd3f17z6db3vw1j126k8zy67yy"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "7.0.18"; sha256 = "0i90lp2pm3x39ypilrvf6v98j3pgj68palw1dimdf04vfi874s7l"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "7.0.18"; sha256 = "1z11qffsbnfdk2a5yk7q8ck12v0vck60nvcd2wrqawv87pxga033"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "7.0.18"; sha256 = "1awf0s6z1grny54s3lbi01978kywx0vdrif0vx6m75n11lps33g1"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "7.0.18"; sha256 = "0kq0l498p54314ajsjpsi0rkm17frhsagw60v0ldr7d6y3faw0yf"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "7.0.18"; sha256 = "19g4h724s358an75wksgcg2q2pp6qkll4rrrb36b174cwr265ahv"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm"; version = "7.0.18"; sha256 = "08d6fhhppdh2arzj9vp7qplsfr513p4fvzl190ybz5zrzxx3nayx"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "7.0.18"; sha256 = "034bccx7g5bn7kjfqsdvr95v7vw2c5cvnifna0v877lb3pbnml6x"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "7.0.18"; sha256 = "1likvj92lgfmbd4ccyff3byv2089wq7xijjcbgq28vp3zha0lr3a"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "7.0.18"; sha256 = "01axi419jqvnv1zpx0fv5ky7d1cdysnn800f6ix8jhrab9h9vlwq"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "7.0.18"; sha256 = "1lzmmirxivs9aldpi30j77mhm15fsnr5pi3r4i1nbarqz3jm6kbd"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "7.0.18"; sha256 = "0bwcny3bc7swh57isij2v5y4qbd08zvi126nwkvyw43piaqn77yy"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "7.0.18"; sha256 = "0php4saswya3ag0zjb95ybb4xj8z8vpbb3bp1gq4xf6kdmkzaz7n"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "7.0.18"; sha256 = "0864r2xnczssc4sfrqbvjdqnha0gblrkza4xjk0r0ndiwshyrg3x"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "7.0.18"; sha256 = "0a0f8icdzps5cjvgxw0pi26vjilnvii5dqljg1a874y9pazamk4q"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "7.0.18"; sha256 = "1h626c86379jsk2fndiqr3zhhrnz46vz7m4s5pp1kz02pss6wjrf"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "7.0.18"; sha256 = "1708v99wr4zgflnpjwpsl7dq3jc42mi03z18055p03vmpqrl25f8"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "7.0.18"; sha256 = "1xfi9h1gkjkssxnn5gdpa2idhrxcf7yfwgmsy30q227lql7z9hxv"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "7.0.18"; sha256 = "18r8vzsgwqnhppx8jw7x8ycamdpsrgfhph9b7s6cj7kzam8vihqn"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "7.0.18"; sha256 = "16r1dc61i96df158qk6295lrkpdqd9fy6yqj15027x76xxf234az"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "7.0.18"; sha256 = "098c1iaz3pbwha79vlfbl98cn6zfh3ynnlm2307z5mzb7i4lk7lr"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "7.0.18"; sha256 = "16aaf3137rpf93k4k24qdbvy8y0lfj9mqv3zym5ndfd3jw1jh1fh"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "7.0.18"; sha256 = "0fvb9s3z71pwmqag8zk2bl97dq8jjnpw45mh0gya49wvw15p1436"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "7.0.18"; sha256 = "1108sk0r71g2rz86yppz7fmlf69ij6gyrazyvyk9hkhl90lrfzyr"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "7.0.18"; sha256 = "0b0cl249p51pa36fcwng31g2cp2f8m1360g0cfizq4wb4zfa6a62"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "7.0.18"; sha256 = "1xn4v5avi78sww9a5n2ijf96sv7jixablpqr8fin21fsgg9clqs1"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "7.0.18"; sha256 = "03d8zp3f5md61kbawpiac4qrlsn5l4xj2k07kn4s6vkg4r3wz2ia"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "7.0.18"; sha256 = "0hz49hsrk389lmbz8hk057vsqg1m9x8r1p2vh9w1kc3y2ljp9gbn"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "0j5vjd20f492q6sj9i74cflyqzrxr4wbqwdz8yjlaimw00yyg07z"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "1nvlbkhp66zangjpzf5cj0gywkd5kv81hzbfk7igdfbpwmganw7b"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "0ng09aacwi2kxws1i695ri8kssn01wb7cd7i3rf3sx4bcyx4ax18"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "0x77z0kqs56jnr9yma21pdlpw2gjyxccjdk0cgybc7fg36rzpz5w"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "1ijq8jhvfsij3q4irb6a0mnlp57q3yw41qp3bsymi6pbvg9pwm7j"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "12rvs32ggwg4h8j2vgyx0aj8kl1yr17d6d7mw1x26qsaj4y0grzh"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "0mlaifk2xjh2w61zp2hqi4nnqlwzvzl2mn3k8p5q3d4zzjna8apy"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "1ccr55ps2z3vq5bl8mlsfh7ks608fygdrdrw5v7cgf2z7ihihlfh"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "02lj8ch0sq8avqd13p9gk8b7xfwm1rc6qg9q6vpwjdmi80f6zs28"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "14ap1ap85w17h1cq5dlkzp9wnmrr02gxaq8a33ri84gaknsigv41"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "0ipy0s2s54xr9zvy44k13wkk3dd347ks5nz4h27g958ilc9xz3xl"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "0w53iz43wrzyyy4rahvgbpc4xv4yrhxh1bqmcjsycvv5vf0svj2x"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "1x0b90pydgy0i0kbcbfipz4v0pmjd52862rx8d3r68vkfxym7ra1"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "0glgv2dxyf5k6rl7qd9df4s8vrh8wkx2nwv31hcphb3wsg959kax"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "00y32d2c64kkgrri248rp0api9d9xl80ggfhspfc9n08s3bmcknj"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "0s6g0jw99y1mv008q2mckqx0dkhjcpy49kmvm7kpzb20sw4hqqw5"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "190y1n6yv8xqsrmas96ragzvk54kc58mgr7yg0h50i8mq77f96pb"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "1f6dwf0al9ma9m2n63w1b3yrrl5zpqy2knhrcg76njmk2899w1sc"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "0q3qzh2ni435zygimvp35m3c745fafqa87c8gd6ps1fmc5iv9w1p"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "039sh5f8pq1nf1gj5w1ghrpqd3bci2a3ys2sh33r3skhys4k21y8"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "0a2vzgc5pgrv0hn6ijah7s0y2i7aw8nak6mai58mx307kwrawsh7"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "00gq0fgkz198461470gpmixl2b5lgz02yzyz7mz297d2lxixq54y"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "1k1ri4y8d49sqyayi3lg8gzybnb9bmgcqzm8qisi8cf2yrlypc23"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "1q5zg65jlnp0vv4j4ya3kl70843smzm5ljwx21cx3dlnl92d39v4"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "12hvpqgmil06z28ix5x51rbzm99vdxgqr1090c10b9gcy231bbhn"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "0n9hvj7a4f44g38x111ajcjmr3ixq2g2wh3yxr2jjpv45znk0nyz"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "02fd5il9bihnhmvhybw1sqsb31241kg035vwxgghr17bbyb9yx8r"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "1sad1x4sg06rfh2bjrrwy2gk5ik396p7rggcv3p9v9xfl3kbjkwp"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "1mql52lndslpqxb673cv02lif9jxahgm62977r3rdlypljynbymg"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "0gqnw3hvfpvy1lddl98y3jiv69x11ahkcxcnix9sdzlpf4vvshfl"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "1vwjqnyhskvmxnym65a48yh6w9l004a9xk6dfwdqmdxxlv3d14lc"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "006i3qylks25j3cirlafml07wrhlcb3pmpzknbx1vr4a8q29498d"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "05jf0dvxa1wqamdapclwrkfdxvll4cah2i81shaf9crhw3wlpmxq"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "1vyxww3kwz8dw92v0rd3f1phiif01pymbissm3pb9mrf977dkav9"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "1p2dbqwqflh9qnhq70m3jlycs9agyfy7ird9g83icav1v504vm89"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "1y0kka39xahz3a7fjdngd3bcqw6xv7wwypdnq3vq3agcadm1q0rn"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "1070gji2j2dkb9130c0s3pc5bns4xwkl7y2n4daqz2haqrc1lqr3"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "1qi51x84nn6b69gpqqxqngc9bp4y6z0r6sqirdgfg370vqly2qhi"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "1q6kxjzi300jkinp9dhnvwf84pj4kh11n3jv0vqkivlycbja92dh"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "0q97bwr9rrq5p6arziz9y31hliplydbkybp8r3ajrl6qh0xlfbd5"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "7.0.18"; sha256 = "0hlaxh06z9az86vd8w373hwb40fmz1x43jabl8qdz26cm8hlzngv"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "7.0.18"; sha256 = "13pdmcjd64g89wlgj2aiimi22z3nmy6s4wm890h0j3vfgj8q6yhj"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "7.0.18"; sha256 = "09zc0k8wv42par873a6gkyknbpgfsam7mmnva3yyxbpm7pxn945y"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "7.0.18"; sha256 = "0wj6413ijh62g3pbacirjb26qr38nghps29wcqkp4p56sybx24xf"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "7.0.18"; sha256 = "1vj04hfs9xwm2k3r2xgzrwbbr4mxb4n1ri4xsdds0vr0qbfgrb8p"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "7.0.18"; sha256 = "1i5an4bhlcwxqbdza35x6l1wmhlsw90nqg9kk9r4qfffyccnsz6y"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "7.0.18"; sha256 = "13i6kwkrbifsbjqjx5ik032s1plg1db6wwbvw10qrg82y4x9989g"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "7.0.18"; sha256 = "0328z9jvp0agf7wwwh8hhz5l1r0xpspx6rszdak6mxjqpgs0nlq3"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "7.0.18"; sha256 = "0gdvsig08gfcr5jw9a7prqwdm2lk5qz2cq4n0daw1k4572mg4qp2"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "7.0.18"; sha256 = "18vy1jkylb3842wc1wjki70rk5wvx3wxfgyvqf15mfgiaw5mp851"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "7.0.18"; sha256 = "1f98jankwxk9d99pmrdnaflydxcj3wc0wkxc13z6plvl63rprphs"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "7.0.18"; sha256 = "18sdls7flsdzbdd3jfrmlz0ssvzbfwj8ackx6p40mzr9w4hlnli6"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "7.0.18"; sha256 = "0j75anj33h6avdjhvdcqbfbaxj7l07n0850f906ral0mvgfd4ndg"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "0gqn98lic556yf57cgw2gsfrb31v6l5mn3z7kinnp9h25vhbc8wb"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "18gq0h1x6x41qpk754s0vwx6lxf9bhmr61hix3aizh1b3brxhmjw"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "0s0pmas9a344kn7srq0pfc8fgwn6p9qkmnhpcnh1yfkpj4k8nd0q"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "0adz0q7y6xqrg9s71vzwnv6cx871m5ya2kfaiqiff32f7296gcq3"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "1ifibwfypiyc9wl538ivlby5l0csisj5visqnfifwwxg4qhhy2vy"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "0abdf1319zyia7zxqfv32c4fb9rw0qw3qivlbs1ms8qk4c7a5w4j"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "1nf81ngbhr40d81hq6c2d21x0cjs7qh269z1ynwdiv3kslb79sf1"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "1cqv7vvf1v71r5ndwammwy9rvwrbmhmwwpfwpf9635mgnh0707ph"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "7.0.18"; sha256 = "0cdj0g3cyhpfbkpqzbxslhx7pc8a406c1w80y4bxd1dxmwi387p2"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "7.0.18"; sha256 = "0mhahzk11a5lziij0w5ahfapcf219zkwfihwqaymwlgyzxdzilq1"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "7.0.18"; sha256 = "01dc6m6hwv4zzbpxbib4338j7rhm6kxgz92f84idjnxc9mjrz823"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "7.0.18"; sha256 = "006s6a5xhkvpxm0f25g85xiks7cv5gb6zfqakw4hq4r9sisi5mvd"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "7.0.18"; sha256 = "1645i1pqd8a700hf7l0bj2hyflyllsrhvw9nc70fid6sin20nm5y"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "7.0.18"; sha256 = "0sabmz4ifqgc22hr1dp5ci7xlhlfxdzl2zvlf53mwkn79818liar"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "7.0.18"; sha256 = "1nda77r6bxa21zph5zymnnk1wym8sla2qrnrqrd0a9sqmq82v3bp"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "7.0.18"; sha256 = "1imi3c2g4mpc83ppbl4ipq9v73h2pd3497dcpz8mcv1z82ga0pdy"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm"; version = "7.0.18"; sha256 = "1iws4awg6ph7xblcckza1xd0wzq05s7fkx86j4acsxqmvi696fp7"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm"; version = "7.0.18"; sha256 = "1ix4j79k2azkanpnx63ifjrmfh3qx501rzk3bknf7vh2c0ds2p9d"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.18"; sha256 = "07n3npyw36jddvixnc89yhkj1nj70a1fxh7skq92720z5i76wwbd"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.18"; sha256 = "02girjrnralf4pdz4cv0pvvxvkakriqakgw95ci0ywqn5gv379b0"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.18"; sha256 = "1wbals50h7lnnqpgrinvq5hknl6mvfkgjd83i8c54cpimcy20myl"; })
-      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.18"; sha256 = "07n6jq7h5750zznv65jjasis010n4b70416mmnc0rn6vdnz3fsbn"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Composite"; version = "7.0.18"; sha256 = "14h8i3539ghggliix8b7gnzw1wx4cgb6qn7qqx7zaij6b34r9plz"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "1hmnw40zw3m1bwlb0xdnfl1gf66551cyq9vavvj3mnxpximwbc02"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "0a1ln258drgykx1x8hswbfy991mjh017j5f47avgbkq7gxbwvsjx"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "1j37aizp32bfdjs5p1grjdqzyci37gblgj4vxgr585v1whs5bvnx"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "1j7q7nbw887l7np3sy1snxyvwmlfq4kfhbrdx73ng721mv7bvkdd"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "0518w3ifl093jap27p2xhh923if5r01jg70sbkfh3sgc7vwqjsdd"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "1h2fkbva4ddaswkw3zq4bv7gvkxx811svdczxvjx2vhw2fyw3b45"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.18"; sha256 = "07sbkvvx4ixl0yxy91y0avbr7fv2j26p25c9cq42w4jkjzacfjc1"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "7.0.19"; sha256 = "0da47yabymn7q9viymv9g3apmmaibfddnlix67qpxwn9cikbq459"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "7.0.19"; sha256 = "0i8mhcy09lmjqhzqmwvp0n5qkizdqin3vap206b2ad28yl6963wz"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "7.0.19"; sha256 = "0gqwm6as0lyjawwvq7cgks0ji7cfld495h7hcl553f1vpy3wsn2q"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "7.0.19"; sha256 = "099yl2cpqmajdlax174z4bxzw2m4ry5abfx8s10q7h6d95fcnmrp"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "7.0.19"; sha256 = "1zypq8jgk9z3kn3mmkdijvc9h65iyy7gaif9p0vhnylmvvm89jzp"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "7.0.19"; sha256 = "1jmg7sxjnsmaa7ag6bgyhndlhvibswcmnrw0n6sr6crw2y0in2a3"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "7.0.19"; sha256 = "0dyk2x5jc3vdpfyl8q6q6wqz8hwzsgvyrjd3956mvs3mrp00brp6"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "7.0.19"; sha256 = "1g941bzffbdlqlxpgq356mv6n6g72d2yn0rhv0ix53834369367i"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "7.0.19"; sha256 = "0xz2lacyda09kxs2d7hasvh51dw6pa6xs7k0q809ni247v7bnab0"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm"; version = "7.0.19"; sha256 = "1kkkajxxdbcy1kgh80183l8v00fv1l81kx5wmxgypz15lqnpmv2l"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "7.0.19"; sha256 = "19pjhnx49srxp1qwknc390gapc44019wy4adz9caxpryw0ch4l1x"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "7.0.19"; sha256 = "184fjnln6bzg55xz1xc3bmgaanlrh7jxn48fccks163gnir0frjc"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "7.0.19"; sha256 = "1dqilsqwwymy7fq2pnvjggn5mfvizqsisla0c36w53mg6xx7vn78"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "7.0.19"; sha256 = "1pld28mqy2gy5rsy688y0n5lhzrqzhv1pszqq4bx2ki2rcqka4y6"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "7.0.19"; sha256 = "1dv4vk07a7kj53sk1nf63h51swzk9yl4j7jdvkc5w2v0z5a186hm"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "7.0.19"; sha256 = "03766ks38fir978qm6s958zzywvqlnfqsj4mq14ifq36dphmkp4a"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "7.0.19"; sha256 = "034v4p5w946yvfialqszaywjncqixv9bpc3x8v87wyr95pa3b7bv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "7.0.19"; sha256 = "0jcfmaq4ckcpywwxm1ack9xa001aic8pn85ggglidxgcfdr6mpzd"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "7.0.19"; sha256 = "1srx048x6nv88s308bfn2vsg9gyqvzmgn4xlzknm9yr89c5pm96q"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "7.0.19"; sha256 = "14l69l4fnvykmyq48i60xaipc7n72l5acjwvbvm2hg5sx848mnsv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "7.0.19"; sha256 = "0zs1jpj64wrjwkw3yqs3ryl08m9qlk3ksv74cy21g6bgx3xaq05y"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "7.0.19"; sha256 = "05x34bg48y4aas3yv88ksd84vjz2jj1y7hjkwddmcpd4ni90ixmh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "7.0.19"; sha256 = "1d84xdva4av8mv2msbi759fb13sxig0qzdr6a9pmlq8gb8hf7zma"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "7.0.19"; sha256 = "0m30aykrzl48i8589qn8z89hm9p1yl71cdigv1f09fmwb7c6jfm3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "7.0.19"; sha256 = "0akwsg0q1498ribamba3qkabp0rgn941dsrswb29sbpwfyyqmmgg"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "7.0.19"; sha256 = "06xcc29albls44invg5dfyjf3qzcn991h7sdlbhvc5v0xyk72fhx"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "7.0.19"; sha256 = "12zgh8pvbdl99zs0rq5ajbl91r976i47hdrrvxl2hbsxl2ws3brs"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "7.0.19"; sha256 = "1lwnwxscza5m7pk83fwjz5r9kms3ybag2rl07f3gqp3b203iyyxx"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "7.0.19"; sha256 = "1kgz4594742cd72vh23ra5gr4b9sgxfim2b608z9bmp0slnr08k1"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "7.0.19"; sha256 = "0njfv091dlc7aff6nj0v7g2b583ns14lkmjf93z184sgav37ynvp"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "7.0.19"; sha256 = "0hssqp21mjsacxf53g7jjc6ss3689199rxymlzp1sswjhhz8w9ci"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "1pja0r3p7n41hm0bjcdvmi4ymsd2jr7m2pcky4107dz8lf2l0axb"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "1yfy711lpgngy8qmzywjmc7bv0q9j1dz4c6g23vd7q25nw05jrr4"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "0ab5phjb7vs9rc2cynsn5wgxfdh4lnz97whw9n63dyqmi1zp6y7w"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "01v9j3j54m2ff7qdfvm5gk77vggjyfy42fjn8lcgz38gi6z57742"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "059qxvvyyqihxfmg21c3v6ykb0yf6ay88pc9r1dv27say4glr28q"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "09ra2dm7zqjm000rpz2l6jqsf05f97kkkd754djf337h0kskwfkg"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "1dbzmscgp2drqijl1rl8jkyn1bawfyzq0xlndk1knh7lwq1qhrwz"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "0w2gvwg8mipvvp9q88asvpaxg96v7k52c535sd70b2lxmwgaf5aw"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "10xjjhbivxb37yq7a417r3hmp5vvk75800jwlysfa241yq2x3ysk"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "0frf9xf70fh595m6hg9h5wivhvm229dd9w1zij4jwsl532n9s80i"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "1agbxkypvhcdwf2w3zfnsx7ncfi5nzhnays7b8ciawnjr3jp10gh"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "056v3fyc0bqad3kixcggzvjrvflxhiiivy90s1rd9gbcm79zyg0x"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "1zya7f9gp3rr31kshw3c53wmqz5f8qdr511wf2vyi2854b1gm96v"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "156zby9bxx1mcfnxjvgbcmlxx5zi5l3dys8kgb1wfy9ipbhcjh16"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "03z39bbpq5h9rvs9ixcrhvf18s3hsfap5zsi0j3yrkf8v5zqziil"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "0agdz3g1v33d8bxm7fk1c0mvlkyh5hvr17f0d5g3yzrzlnrxlc8s"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "0nkmj3hl0w5b8ndx0yb86dddq6w5qcknw0xvr40d6rlafsgbfdq2"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "0fkkcm9bd7kv87bwfi434ikh0an2n6g340vr3pdz8f292r9kq4d7"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "11sa38y72qi8v5pncw8j2ql89q3rl27nvmh1bpq4rbvnspl4pvqs"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "1hrd03lbk63p91fn0rf0fybqwqk2mv57q2g82qns0991cl61fvi8"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "0b4kq7c2rcngksq0xf12ijhjx9hch90hwrzw5icffqzhqys40v4f"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "0j1giclx2kn3mjwm8kbw1jsv0vhnd65jk692y1y1xvzz9jbqfs5b"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "143j9g5k661dqx9lwsgia215lr7rqz04xk2rk8g3vxckbnk7rzx5"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "0lf7i88b9mdb72dgzc9zk478gwws4saij721v2n6z5xx9ggn5hyp"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "012h4pb369y2wrb8rmvvklndsgphh6a6gd1gxqzl6bqfpl716njz"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "01d9xrh0wczpdyzm6zqym9w73his56lq455hc8nkz9ga5a2s058h"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "02wvkzmmnfj55vzanll95hl2pgg1ihfzarcwkhgnrxyx4j6qrh40"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "0kgd9xl4r39pr4kcpfxgc8s13gpjjzamrkiwhnsj5mqyphslgfp5"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "066wx7m5vj841xqqbdw4qshsjxzf0g6n7msgxjyqn2aw58w7kk9b"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "08h5fybyn1dfpsr5gqz7xkafavgaacbf6cijq1hiynvjw89cm7ch"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "1wvp2xlzh4arsnj7fz7p4714af8j19h7b847kzvafg31ns02ws5h"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "17dr9r8j5kqgkbpnj5j4s2hikk0aiv61xvqchr3vp1pjrpzfi231"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "14q5q312nz1i8q8ffiz4v0rp9fd52n3pv2p4vn71lavcplh3sfq1"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "1hfb76mkxkqc88km752irifbxjd745lncvy0a0zxxahq0hacj425"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "143abqzcq2s22gz32lj6z363fw6hll6mgm6kh530qr437rb8fvqh"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "01pxl7n3iygdnzj1b08vz87d43ysc5yqzy8yifriy96yf7c9syb2"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "15gr2dknc4g0dcg6zkml0f87i4hx7hjz7glmknkpy3bsbadlc075"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "1mfk457maqrmxi0rwj4fhchbj0yj65zsr072374idf61q9fp01wc"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "0qcsddvh4cjn8fkk8d8ndlxhlx7xs1799kqap192m5diip4ik0j0"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "1wkvap3pm7fa02agg9dbnr4xq60rd5hrcjizr4acn8xrljyxbli7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "7.0.19"; sha256 = "0afrmsv8qk0p8b5964fz38m07v0h89j16x5mlll3pm0a1ih3cshz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "7.0.19"; sha256 = "0xyc0mdd7nnmc9wjzq8nxwrqagmiqxds8qwghr2rgxw55b9slc33"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "7.0.19"; sha256 = "1ssgnfhgkly0h8dc5h9c8iyb3n75d7dgc4cxgxnslydwv3ygyh32"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "7.0.19"; sha256 = "08gs703rz3agmisy3vsdnyv5lyc32qb8kvfljzszbyqlaf5cxhd1"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "7.0.19"; sha256 = "1z9zfzccqn6yh9mcqrkiidjagzmnk4blrralzb8q0b7mnf1b1ww9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "7.0.19"; sha256 = "10i3rr8hig3cnnd1wf9isxgmbj6hn59ndsywbif5yhyflgw3fvqm"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "7.0.19"; sha256 = "1rby657hwrw4a26fljbxq7lanl4rhv7sijxcw746lifxx7mzfj6a"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "7.0.19"; sha256 = "0gg1rj848cfiyx9cvvddangww9h37586dr15d7l1c2zmk9nlisd7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "7.0.19"; sha256 = "1gvbnqayjc2nkb42f35d5gxc6ffszwg698z4dy8b75838jjqnwdl"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "7.0.19"; sha256 = "0xm8l6wbyx55p75wgpckmsn9brrymslgsr7rm2q1a8z003m86kx7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "7.0.19"; sha256 = "061lhndg6m4infwhnrb243sz3a8hvwvck6hpl106annxms760mq7"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "7.0.19"; sha256 = "1cm56g54fa18p9hvbmnkiwn7jf4f6bbcny3zd4vsqm9y348dag1i"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "7.0.19"; sha256 = "01391xxjmgcfgflc4fvrx74a8nr3y48db5m3r9qnj0m49rh60rxs"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "0my6x223z6mpwvw6614xzly6haxamnhn9w4a3q91l3ayq4q9crgg"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "1cklsjdk7rvnc2h9pfyq04asjpair2nsnbb002flwyq4nhh35af5"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "1awcriq95alz79xzd3g669l1wf23bs362z23xkyxmafiyn0h9jvj"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "1xbwsxaxq55azpj49jal50w8a2awd6aa5q5qbxhwv84rqlv8ixd0"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "1xb37xfkblby3gi0rg0hhmy66pcvsm9q0x6ypi0z9lbl64h7r919"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "0270v287dq263a4p34qxk8g09af4nr9sxn8m4jd192zfm9cggvw6"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "12wkp5y27ih8d5k4xrlbi4jd8wg7si9lw03bp2bvmp7grslqdnfp"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "1mz2y7s9gxj0jkrf8xyi9q2h5xaqily3vzd9b5bpmx69nbi1adip"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "7.0.19"; sha256 = "0anfp4mdsnkkjj398vnqjs5k07z6niriyqz10ccxjzzmkxaq5kb0"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "7.0.19"; sha256 = "0wj5p8hi9jqr9qn4gl0v367kv43vdh21p1kxsja49vvq98y6c7h9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "7.0.19"; sha256 = "0izy5gvkwa5a71aq8q9nsbwmy22sghk9x1b42lw97vn4h5ghwcnr"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "7.0.19"; sha256 = "1dsj2nhd8wa8m3w69cs4i89kd1b5812qbdjx14nagwgdazvvakbf"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "7.0.19"; sha256 = "1c9rzh8va957xvfb4w07409ncv8zps8692yp5dl7xh643djsgpwv"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "7.0.19"; sha256 = "01slq8bk8mk0a59abf6mcs4m39mqzvhb003w4abvqr9vghq8fzbr"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "7.0.19"; sha256 = "088yv3n9qghnw8fgbrkc90xnb0dlrr13j60wj6qhd8rsk53cvxig"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "7.0.19"; sha256 = "158pibija2rfnmxsrynypslknlr76h2vgpq4p0n9bfy79pb7krda"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm"; version = "7.0.19"; sha256 = "0qldfcpjid7a05b0sk7zznfz6xvpaz74hkyqs6ybs7ac1mkb5d3m"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm"; version = "7.0.19"; sha256 = "01rbx0phr7apkdkflsmbbzjzfzxl2ls3q6a00bqijabzb9brmfaf"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetAppHost"; version = "7.0.19"; sha256 = "1s1x47nkaxk4mg2k4a81g6c3i2lf6lzzqn5rhs67fsp2p7gam03x"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHost"; version = "7.0.19"; sha256 = "0m9s3fgmlcy1r5knfgm1qm4s9gskjvnpnscsv88hkczw8m4v8if2"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "7.0.19"; sha256 = "02sq95zkgqlksa47n7mgqkrbk44v20fc8k7slsyk3faplg0bzf60"; })
+      (fetchNuGet { pname = "runtime.win-arm.Microsoft.NETCore.DotNetHostResolver"; version = "7.0.19"; sha256 = "1pk7afp09ilzlinpbqjnbjnww6i7iykrhg822x8ggrmqm0bmxvyn"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Composite"; version = "7.0.19"; sha256 = "0mar4ls20prrj2b8vb2yaqgfz46gqsjll5amyacv92vgnyixhv9n"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "1934pv8q3jdnsj94lid10wc6xmicmqvg82cv480898hfcvwp25zb"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "0w0j7pmdm0x49yv4z96d6phmwqfj2sjm3aaa5k856g08b38kviyi"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "116yy1k23jhaibhqr2jjjxd0pbw3n6ps3y8mx6i7s6k2mdglys5y"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "14p7d7gb4bxi7vdzs0jajcblb3zbp8bg2168yl09jmqwyp3qwrrb"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "15k2sn69mph4cfrr90rpa803z1jx9bzjccn5z5q5cc7ywnrm8xcr"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "1gzmw2mp0pb9jj81784xfazxk6i4l9mgffd5k1ljbq4kp8i40wiq"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.DotNet.ILCompiler"; version = "7.0.19"; sha256 = "1lx6qydgvip8i7f3v93yn9ibdyl384hblbsk0hc384jai62hs444"; })
   ];
 in rec {
-  release_7_0 = "7.0.18";
+  release_7_0 = "7.0.19";
 
   aspnetcore_7_0 = buildAspNetCore {
-    version = "7.0.18";
+    version = "7.0.19";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/39baab6f-96c6-42bf-b772-29830158176b/cde064792e7f22506d692f54993fe5a5/aspnetcore-runtime-7.0.18-linux-x64.tar.gz";
-        sha512  = "d2c3af93b9b8280c4e519f052f443e0504ccf7a04b3eef60500b2e3a8874a60a3a545ca936f8433887bfa6388106c19283c5a6a2c78ffdc19889bde3edbefbda";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/d3d6c11a-a7d6-4be4-8b2b-11154b846100/69bd5fbe2621600e84bb191d0b13abdd/aspnetcore-runtime-7.0.19-linux-x64.tar.gz";
+        sha512  = "569fcc25f0c32df3b28c4569bbeabb6c20afc8865088f14a405d3847bbfd159cf291d2dc4810140b8f436f06c95ebb09214ac837b5ade6bd8121e9c0204eb217";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/119db743-de75-4bfd-ac51-f2a2bfd1dd1b/4e96dcef933e3787a34691a86f8972cf/aspnetcore-runtime-7.0.18-linux-arm64.tar.gz";
-        sha512  = "62bc42a8d094be8253be90acba02253c27afb1eb6b06976c3adea74f967f522bf7938eaed25c824d6e36a9fb71f7248ba315cc67577a3c7fb73b0d3d7a41ecac";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/78d9729a-9f05-49a6-81b7-b041452a2828/73214343fb60deddb7faf355ecbbaca3/aspnetcore-runtime-7.0.19-linux-arm64.tar.gz";
+        sha512  = "c71e6a756bdac7f68289fb6c67fcb8c347586e421cbf4345fb510686ff5948e25898759dc7ab30904ac07a7d595508e59d66b5b6dc88d30b54c141c82bd590cf";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/79433d6a-6ac8-4c1e-851b-a9335319d846/c91648d921bcec7bedebdaf83cfe0487/aspnetcore-runtime-7.0.18-osx-x64.tar.gz";
-        sha512  = "50cecd47a75498ffd2862b3a470c0e05848853b163925c0fb27a7912fc39f77aa27b91d4e780d7ef90e6bce22510714132cbdc06cee0db7547c9d79258d29895";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/e2bed645-39cb-4ea7-ba7c-503741d8d9e6/07bc37ec71cfe01a4187d94275580b3c/aspnetcore-runtime-7.0.19-osx-x64.tar.gz";
+        sha512  = "5f16d0cea6b637ad9835dabf23b37f47d8fe92fbd4cfb1ac046fb607beb380255759f14f3e80f9a49c3545afc47000c770394d4dacc5b7444ab0b6d87a5336b5";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/be772e15-f6f4-46a4-b0de-2365ccafa69d/fac2f4ae76ba20f7d16e07b60c2b8801/aspnetcore-runtime-7.0.18-osx-arm64.tar.gz";
-        sha512  = "3c56c17545d530a35cc13bad410da1caea33bbcc7c3a857b4d68f48a64f02cbba516d83cd0a3fea9a8ab463dac8140a6c079fb63887c176bdb2a44552dc71852";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/879c8cbe-37bd-4fc9-b8db-857a3fe09144/231cf7ae2bca959750144d08ad08d057/aspnetcore-runtime-7.0.19-osx-arm64.tar.gz";
+        sha512  = "10fdc9868efdd8cf25dbe10843ea17075747cc1bee52e495af7e1858ff556dac2802bfcc85fd474527f142672b45e7a1c5b63a927529036923671f6cb9092431";
       };
     };
   };
 
   runtime_7_0 = buildNetRuntime {
-    version = "7.0.18";
+    version = "7.0.19";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/9f48eeb2-ca25-4828-87d9-1114e751fa6e/df269cfd6b9661bcd776ed979541c0fe/dotnet-runtime-7.0.18-linux-x64.tar.gz";
-        sha512  = "9d2aaf11e798d8dbfa74a93cfc53c6bb631cfb041b5dc55c208f980f61808e872dfa9880c7d9d4b42aad934e5350c9e8f327664909054fa0109636158701b4b8";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/09ab2389-5bab-4d45-9a91-a56ff322e83c/2f8192a98b6887c7f12b0d2dc4a06247/dotnet-runtime-7.0.19-linux-x64.tar.gz";
+        sha512  = "4e556c1437a58d2325e3eeb5a5c4b718599dff206af957a80490ef2945b1a2f5114d25b808b4c9ea233cc4eb2e5ce40932bb249e198319e97f3b5cc443612e6f";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/e7dc89d5-3287-4f82-b1fa-e0a7f12f7736/3206b55ee6d717f4008a46e67048c100/dotnet-runtime-7.0.18-linux-arm64.tar.gz";
-        sha512  = "7cf7d3b0b12cec234227529c66f2a2ecab49e63af2c766d7539b6591f709342da4f2b846726630ab6104a19cd94c1eed5ec66e1a773e3477b344941bc1ee5f41";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/81616b49-6c82-4778-884d-caeca4c195a9/51a0a0bcdd17fdb77be7f1c5db52165e/dotnet-runtime-7.0.19-linux-arm64.tar.gz";
+        sha512  = "fde0a0190c77cd361722d2ce449b207b6a26c7f6462dcc9a2debfa1b0e670f7df0b538758ea5eb865f156df17a98722ed7e8f7a2bfceb0a486d1b06a2d436240";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/2bbb4960-9fb2-4bd9-a525-80e6260b5979/adecde0cf003ce421b06e76197627533/dotnet-runtime-7.0.18-osx-x64.tar.gz";
-        sha512  = "ba790572b8b37a33766dcdfae319c5021568e49be3d9a55c688655b1b4174faf6cf20b3077fefaf57fa2b12261b682a685345db77034412dc883cfa05b8e8ca9";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/92c2b6d8-783f-4a48-8575-e001296d4a54/c11d13f994d5016fc13d5c9a81e394f0/dotnet-runtime-7.0.19-osx-x64.tar.gz";
+        sha512  = "005828f1138cfce1f04741a478595186a1098185747ed0872099d7541d2bed16416f36d1214f6289f6ed1d3543e119733e4bba6dddf42db43150bc7bf2e980df";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/38526acb-1b20-4fd6-8a4d-09d72a48c9f8/8db4c13c722425ca9b82fed60d539815/dotnet-runtime-7.0.18-osx-arm64.tar.gz";
-        sha512  = "f9a5f09afd9c7cead985cda7db03fa6bd6b684aecedb2b8bfe3bb2569704c233501b1f9888e2e26f273d5ab124b0b9fecf3edf8c7d0b0908f5a499323c67515f";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/4b8da067-3b82-4636-8e0d-18583857e64b/fba7ceea0e014535a695ceb9259886c6/dotnet-runtime-7.0.19-osx-arm64.tar.gz";
+        sha512  = "394f0f068b1dcd8f116c41391baccb46fd1112578281b0d11edd6dc194b767850c8a2bb9e2bc041b1e872872afb130fa10f7c98fbac988dd80c0d788a0f23e7f";
       };
     };
   };
 
   sdk_7_0_4xx = buildNetSdk {
-    version = "7.0.408";
+    version = "7.0.409";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/a256265b-0ec6-4b63-b943-bc27bcfc98c0/47c8bbd54d7f6dbfe0ca4985c410282e/dotnet-sdk-7.0.408-linux-x64.tar.gz";
-        sha512  = "89d39601a27cbbc74a5dbbfc6dda6661220e76b73f7387fec6558222aa144734b44db5788bcb888c7f49d4659c8b0ea60794f93ad1223c86ceafdddf6e6b70e2";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/03e24745-90c7-4661-8ffe-e5a857b6e6a3/99038e4e48e403a17bcbe509bfe8d6b8/dotnet-sdk-7.0.409-linux-x64.tar.gz";
+        sha512  = "0b67d04621d7c2a1856fdb0cf6e081090b4e1df1075d2f881fb33655422f2f59f63f8324559dc207510485f77781cc20c7a407e3c04dc0b53246987164427671";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/460f951f-0944-442b-8474-555e20394ca8/5fcf6b1845d87d772f919737b3dd5f55/dotnet-sdk-7.0.408-linux-arm64.tar.gz";
-        sha512  = "7c5e18f165c2d74345102244a617b475b68c208434512211af154b28896ebe5487caeff96b278e877af384e6e0deb476d38be16d275ad88af1ae177afef561ac";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/f065c679-7039-4968-9a2f-dda7cda72f5f/702eb11e596f498a1cb23b636e1d83be/dotnet-sdk-7.0.409-linux-arm64.tar.gz";
+        sha512  = "ebf98115e3ef9a5388394443b8cec8aa104c2468fbcb6c964661115665645326abb0bce42786a98eef4ebffe42dedd36de8608e15538d191e934dc83fcd8b2f5";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/dff43b03-6ca6-413b-a48e-82f593c12d40/5760ef99163056c6850f0fe140e01958/dotnet-sdk-7.0.408-osx-x64.tar.gz";
-        sha512  = "b183b1a84b345f8e41701f0f1cdcc68d0bcf286d3aad53bf04d860bc6260bde87a6797f6c55ef807609680c10b6efea6bcdf6732d3fa097ffaa99b505bbea7a9";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/feee7b85-ddb2-4ff5-8927-5656ea1e0a6f/ecdfb330298d11e0d49c3b595ddea452/dotnet-sdk-7.0.409-osx-x64.tar.gz";
+        sha512  = "70efa550d6d78e17db0368e8500ddfd9a6343707e009247d00062613e8052463d3d83779af619128233e78a29f5b5a5f71f0eaba740c3c3f74be0c76145c892b";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/749ab69c-0726-4503-9e92-035f13753374/68cbf2a5d6c8e1184f5d8d8ca3bc49a6/dotnet-sdk-7.0.408-osx-arm64.tar.gz";
-        sha512  = "ce1b9f7bc67c80b8774b7a8071438027f322c35c330be2667bf15a80a8826a32d9f8a7d2762ba7f3c7417b31f3ac288f336956f6e701d282e80f02c68b805177";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/0025e3a3-0221-493e-90cf-a5baaedc3cfa/716e07c6342d6625dd9a04f632ca8d50/dotnet-sdk-7.0.409-osx-arm64.tar.gz";
+        sha512  = "bf234cc2c6e90abb891cbefc3eed35e63fae07d312f01193d8890dce03edbaa3fe5a095cc695bb03ef35fcfd1c2e45e7b9d54c3b483761d7b1653a019c55b53f";
       };
     };
     inherit packages;
   };
 
   sdk_7_0_3xx = buildNetSdk {
-    version = "7.0.315";
+    version = "7.0.316";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/e4cc9a2f-7fa1-4ac4-b839-3838d8762ee5/caef8745bcdaf1c089ade6cdb89eee5c/dotnet-sdk-7.0.315-linux-x64.tar.gz";
-        sha512  = "ffbaca47ee2a3b601abd1e8ccc99981e55d5f904072d5dc76e0c817940bf1ac1b71f5e652f649112bcee7328bcf0408d203b2f7c91d58a6aaa58c8ff553e49f7";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/28d800b7-e6c4-42a2-a27b-ff9de8979025/ef5dd5c9329e1789ab1dfd3a82e88677/dotnet-sdk-7.0.316-linux-x64.tar.gz";
+        sha512  = "1489f33f3314b93ac7b9411e4c884fb630622336bee6765b7f193aecda8798cfa201ae0b32d82ec401d5839601d79d6a854832502b08f6eea860fc47fc1da6f2";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/12286d30-5894-4ad5-8dfe-8bd03e9fa0ee/58973de54201a7f1963cb524ba421613/dotnet-sdk-7.0.315-linux-arm64.tar.gz";
-        sha512  = "a480e012760980121af4eda39dbd0640e824de13f10e916a95e77b7fb591a3c516d40da45fe56dc07cfcbdf24074f4579145d00d45c84ef299ca9ee779c43903";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/09e91afb-d0a7-4468-9aba-70484bd8cfe2/8ef2416d952b14ec9e00380025960b36/dotnet-sdk-7.0.316-linux-arm64.tar.gz";
+        sha512  = "c6c7d57f6ddcb26fae6cef846745bb151296d0f359526161a0e700d9b54ccaef6a24acf2485f2abae1b7305608bfe9204ab89842a712f2913caa092efb756833";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/32b714c0-96fd-4179-b2a5-34cd29061e5b/3db1ea8db28f706a8af10dd57d1cb590/dotnet-sdk-7.0.315-osx-x64.tar.gz";
-        sha512  = "7a7d3c32f71a89bf0d9e809b068252c2496109ae226acaef163f7221e4a8231a2faa2e81ba0a95e7aeef7780691cb59b993e999d45076a280da518941b9fd2ed";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/9a092178-2aa4-4c06-b73d-144327a4992d/4709a913d89feda462d9cccd508b4a5f/dotnet-sdk-7.0.316-osx-x64.tar.gz";
+        sha512  = "52a96edba93029283d555c13abd1c1b016870bcdbf10db4caaea6f4b18c46aff3b49355f8bf7b8b2548287c1bc31dbe38c6b7a27e40c1129c2eb010c697c002c";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/1586c0ec-bae9-450c-83fa-987499e2c9c7/8e2855e078b035404b5fea4f658af1d7/dotnet-sdk-7.0.315-osx-arm64.tar.gz";
-        sha512  = "f146ca3f530a96fbd14fe550cded99d36b35dfef4536f2a9174985c933db42c9a6d44708cab83c93a701f6482e0cf868e7aee92385cec201b9d0b5d5f348d642";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/8e2764ac-debb-4e46-a6f2-637f7c7d8e70/d3da856e4a7d4b45581ff405aee923fb/dotnet-sdk-7.0.316-osx-arm64.tar.gz";
+        sha512  = "7f59874fb1638f6f09a5538483ed1b39e482a90bc11555b07cac8fc8ea941dbd9419f57fec252810bb324b89d8647b6bf32d1bd4e6b720c568929d82297d260a";
       };
     };
     inherit packages;
   };
 
   sdk_7_0_1xx = buildNetSdk {
-    version = "7.0.118";
+    version = "7.0.119";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/4e25d320-2883-4b20-aee7-035d586e1426/fdbbb8209dd2ba57a87351c55ef80e0c/dotnet-sdk-7.0.118-linux-x64.tar.gz";
-        sha512  = "4f34257abcc013683c0747f5510cddf26013f5ea4cd068efd7591b0a6e809038395d57842f163489884046bcc54ac7ffb406fff91701c9e371920efe6396b710";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/03102e44-64d0-414c-9cfa-e212d0160ce8/aad0796ede4708933a4cd75bebd878dc/dotnet-sdk-7.0.119-linux-x64.tar.gz";
+        sha512  = "6be08bbbb9d961879b63943413b70e0ceff413e68af59c5c5f01120b02c605e83145a5a9f3417563f9b39159cc5ee149219e99e48ebc92ca2b25c2c0554dd5d6";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/eec4a58d-3546-4c40-bd82-b6533115b5ea/face73d99a1f01f655dfc3f9cfee2bf5/dotnet-sdk-7.0.118-linux-arm64.tar.gz";
-        sha512  = "8e5358e3824ec141ee8406e0a67b8d1bf6965a4f9e7487bdee4ff02344078e95bffe4c46c0f1ae975b1caf7164387d35763f1b81abd2e66593b77cc0470cc957";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/c0dd267e-4f6a-4a36-9f7d-19813033cb60/69a960be31caa92da70e68c9529ceeab/dotnet-sdk-7.0.119-linux-arm64.tar.gz";
+        sha512  = "187b1422f0ce4eb59c3f894cacb074abe285ad0346ce6cd95a240506167932f08c90ef2529492a8fe6a9abf8bd7cf3dd4c7258cc5972ee4fa630d75f03b42ccd";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/7ba2b1de-4494-4865-bd90-3931dd6ec41e/4897e62ba478d5f3b5c48ab0c98370b7/dotnet-sdk-7.0.118-osx-x64.tar.gz";
-        sha512  = "48081b4b53f7dd79aa9e11e362ab53d50b7efdb48f18fa8f0828c5e179c79b36b192b9b514e9effb04688838bf87a4d4b3763539fac34dd2f2570e1b8882d7b9";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/aea7635c-c965-4ee1-9f2d-496873e2c308/e9a800bff17679887458ec75e988fe82/dotnet-sdk-7.0.119-osx-x64.tar.gz";
+        sha512  = "dd70345a9093abfd0a839394e425c7b9907afc5884828127ee503ead5395338c1f1b013a481eabff6f1ea1e9e57ce76ef0875d5feb1540f3b05539e9afd129ff";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/b3541939-7484-4cc4-b8c3-abc2bea28799/610db5c984192e3710151de48f918d1c/dotnet-sdk-7.0.118-osx-arm64.tar.gz";
-        sha512  = "25b2fd5a26b870f5b0f407acb3b0cdabe9287d2f7b7c3db81f85e34cecb7a3211a72ee54d0e0adafbbee151387e1bfe51e3681b6a0a347509bddd14b589ba117";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/06970037-ff94-42b5-a640-16cc25e0ca30/628233310199d362e7af0fb25825f8ad/dotnet-sdk-7.0.119-osx-arm64.tar.gz";
+        sha512  = "c411bae746be15f270513412a38e8fde5a72795f876f26b7e5452eaecd3b4fb0e979f9391e0f5f652c692a4516741f2165d77afd5ef264bb24b8bda9cc1e4bf4";
       };
     };
     inherit packages;
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix b/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix
index a4d2dadfd7d3..a6468f685cf0 100644
--- a/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix
+++ b/nixpkgs/pkgs/development/compilers/dotnet/versions/8.0.nix
@@ -4,206 +4,229 @@
 
 let
   packages = { fetchNuGet }: [
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "8.0.4"; sha256 = "0d0sgy8rczy78l0inaymcldmw1h742407c7q5y37hbnrw7p8ix7c"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "8.0.4"; sha256 = "0acxp6p5ln9sym8w65lz32ywpxvzpm78j09xd6bcjcz8n9224az8"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "8.0.4"; sha256 = "1plwp944v4a6hj12cg2g378bdl0dwr2jwv22hs7bd2gq56226mjs"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "8.0.4"; sha256 = "1mhbxrj2d2xqp7lkl7129alhppjfma1a5z9jdp0pcik2dw6qd4xn"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "8.0.4"; sha256 = "0g2sjwgkgni797p6ay51brvc9snbnrbsmv88002lnvqnz9zgbifr"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "8.0.4"; sha256 = "07iw2h06awcvlicw0cdvvsrllln72jv3wihvpzp89jyfnjibv4xv"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "8.0.4"; sha256 = "108rwwmv331w8maspamfq3hpv1azajnfwxcj9mr4r7xn1137z5y9"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "8.0.4"; sha256 = "0fhiimqaqr9nf1d6snbni1g38472pzzb21pjsjkcvb9l4z51hbbl"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "8.0.4"; sha256 = "13s2ycyph5p2nddz6crny7zvkaz5f1xylcc8qg24nbwwmrl9539m"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "8.0.4"; sha256 = "1s30dsd5ifv4yfdcjb9nm9gsm1wv3jkhy6b7a5xnk9pblpkizv1g"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "8.0.4"; sha256 = "02d9xv1mzr88lvc7vpn7xpnm2jhbb87bl7jkmaj34fr1r52xg045"; })
-      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "8.0.4"; sha256 = "040pfyazmii6vyp5jp45c9sw1vqxlrlbhaj6in7vscwd0s67cyi3"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "8.0.4"; sha256 = "0pd4v31dfk4z5bbdb29477d2k9jxsg0zslba19vzk7azv1p6zcxs"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "8.0.4"; sha256 = "0qbm26aqlyj12wiiy7hpinxammv1a9dzryq3wkm3ij65vfx8r62s"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "8.0.4"; sha256 = "0gix41xc788xs8mcdssf4xrpp697h0n159a9j9sdg274cxj8vjhx"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "8.0.4"; sha256 = "0wf4bmkw90lmwcp9158j4ywsqvik6hryj53zmm1hbaxpfxkjb1bz"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "8.0.4"; sha256 = "0dji6ypar30bqzba9hvsbqf4wsk2zmp2blzg3czfnfbs3034wl2a"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "8.0.4"; sha256 = "11rd1hbisjzqyrfz4raj0sl9ip4yznbm7in36j6z41awba2gai9q"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "8.0.4"; sha256 = "06k1wbyhphmlqrdfzwhg8pr6nd2mbm47jidzy38mqf4n4qqqb64j"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "8.0.4"; sha256 = "1wvyjsr6yd8ajv8726x7h3fp5kdk6cmgfzyrh0h0vpkn9padac5z"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "8.0.4"; sha256 = "00hp5n92a383rkn54n041r8092y3r7hs50bn3zazn5ngcfh2a02z"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "8.0.4"; sha256 = "0fz5hmnfl21a7izs02p3hm6k15f6icnnxhb06wv8fb7fncv2qnjl"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "8.0.4"; sha256 = "00ql8vy9mpf3k3s1j0gd0ykb9zn98qpzibrf1sm4hyg1xmvarj8y"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "8.0.4"; sha256 = "00s7an056z82k14aq809264nhxwr3kmj34rwzch8v3kyl4pm955d"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "8.0.4"; sha256 = "14y5nljc6fcbxz48f2m01kyfc9vqxpqwflh9927s77zfr9w2lid5"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "8.0.4"; sha256 = "0pi459crkny9bwjl2z4znj9kgnkwl00bnc54jq9asi8zvssvcbfm"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "8.0.4"; sha256 = "01apjs90laa069qxns2c5mh0fahrhx1771d0iqifbhwbgvcahz9j"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "8.0.4"; sha256 = "0f291zqarfa1c1gn4ih05gspr2mdv55rvzr2kdjql5vjk3qkjmh2"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "8.0.4"; sha256 = "128ghs7lkibpiw3i1kszigffcmwwdj3raak1dqli375qmgpafifk"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "8.0.4"; sha256 = "1fgm2q8hj43n6573pbcnj565kx5qshkkh9mfji49pswsva6g475v"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "1k9n0yjp1jsskacl14avbkjnp1a42dn30vhmvnmlp7bi0hirm451"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "1iqrvg36b2as1maik7b7ls1kwszl30njpp4pjkdljhswlh75c9lz"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "1is3dr4m30shxbgqd2g916z192cx2gqvx8iijf05b976qyy0hnvd"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "0056k3y221g13l62fb1cdghijhvml8aynn7lax40ark5rxplam3m"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "1qy3zbvfjqa0gw80jxqd9va58zsf1gp5b6phibsi5da3mw6ybc8k"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "0qpva0m8wn8g7l33ws166s4wr84cl8wd6q3zyp78pc7k309bdfjp"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "02fqkrq74c2rra33spcym05vl378xc8iyzamfpm6gjmkq4vfsca6"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1k7f79x7yd066b0hhnbq1l183c4v5yw7lysbydfwng14z5x6x7h7"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "1sv4yzx5bagrzqjb3wnb9wqw75ihblsdgdvhd3n7dfhckrssxlnx"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "0brwpdv25lrh6vvq466k25vlhrvgiw7mv61jilm4ngdiyx3261br"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "0c9qjlzwr2y3h98xwmf3ql5kh4x8pp4k16brfx82n8ml8js4g5x5"; })
-      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1qy2n7n35wvc5nbik1s5pfirhbp332zbgzs1b3xlnhwdk6nmpcnj"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "0lgd5nxlz8na182n90y935hmcpry813nakg93ixk2cm5k3i0hy37"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "1ig0h7b0rasqrg8hv7j7wqh2n6rxs8wzqllbspk88dyjf64mpvif"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "0lm7a3k7ll1m13clkicnw9smnw29m493w6syvwaada67lxndvdqh"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1v8yf67dk51paqqvjmljf7x2cc127aykl2ylgqimvs7pn6xajrqb"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "1i1xifc3nrfl5y7xv7iahfw3y9k2w8p8d6qd3p4pkv8rm1i1qqdb"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "0irkqhm47wqj1g32m7pbfyi1igs6js8c7m5xkkfm11a8d3ryy87g"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "0zhw9dxss2zql0qrr4jkj0kr9691b02aav01z2cqn0zbfxc5m5ig"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1h5kzx741pgzl5p0lsfzmqi1qa3c4yad1p11l54k2dxcbg08nzgv"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "06l874c98i3dac7zyv5y416k6lm477733i4pf6205lamw95hgci9"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "1ciiai9i9cac2fppd5x7whxblgg9jj0n7p5ff83dmylnb04gg0vp"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "168nnns2ppjij3bmbfvnfdpwijf689m6ryrhcbbnram1hxzr2ki5"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1syw6863rb8p2g6a9r54hflz0dj750fkzm9dv18vib064r7x1lgc"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "07y30dx317kwj089z5laxlw9dwllv27rbh8yhym2ljqajjknaxrs"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "060z3c7iqqjy4p9chm7b18z8j6439dwb71cahpwxb1y0xm6y4hmr"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "0pf30jg23iymn5vvg1vsn6aibdqv26i11cl0zypfmq1bgh3cjh3f"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "0kmbglad3xp643b82qy6gsydib77i3rmlq23vvvm8i8pg6whzflc"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "0x7pvxvl0vfc9lk6kb70v9rj0i5mc5xk9w1cp382npr1lc6l51m6"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "0725n81lawhjlhqs7rhj00fx3ymz10xy4bpj5pmvwx78qrfja8bj"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "18kr4l7vbndvbq2k332axywk0jagci8892r0wxdxyqa9n0pa311c"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "03ng08sx2nvpkvk3nfcp5f4zh85h7lpq0d272d75n0axhffqmwd6"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "0riwadg1qhqdr50js8jx6diaq4g302xwz1an9ngxd22p8xyy1dj7"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "08j2dbg06vg09xz6r6jsqm4k6749z4bbpaaligx7zhrqihszvm41"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "02nkdqf0hi3f6720d0mqv27mr98wxycryy74grrbgabjjylawazg"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "08y3vckrv8njar2v02igsqm4lbcf31fk8f2ld8c74s219nmd2c64"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "12vlqrllhgbg6n43yv8vav0bmj0xy0cvw4p1rg7knc63x83jf2rr"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "1d1yxlyk2yjh5i4aidzc155j11qyjfly2vyhvsdxkh0arh41n96x"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "0pwq5vzm34wascaj77h2bhc6rrzbygx2vavr8qn2adz6pia1zvf0"; })
-      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "00qr1ydbyvjxi57k0ig9kv1ngn84n0b48hznvwa8n86iqqk886q7"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "8.0.4"; sha256 = "07mn92340nv63ld5r3ch8hc71p8kjk5zb7bh6n3n43qxmakr3ysc"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "8.0.4"; sha256 = "1lgvwyypl2l64qz23p1qdxzap73v3118pjkh0wh8g5qw54nfd3ck"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "8.0.4"; sha256 = "1hdyb154xmapm4bw1bxs433k2sigjkb663cnxzhsgxwwxf8jd0z7"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "8.0.4"; sha256 = "08z2bhm5zva61ddb3psmlrwpi9snr37s96xyf6iqc4gl8pki65h8"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "8.0.4"; sha256 = "0xi99c6gqhwxgz2yivihs9rxjnfl9h1nwgq4w5v15bjln1blmq9x"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "8.0.4"; sha256 = "0a02aa93wx92rzy3lmyxpm9qns6g35wfzdf8zks4sm1f7l2jlxhp"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "8.0.4"; sha256 = "0m6sqgr37m0228jkkp89dyr6s2iidnrs9xaffhpaq7yhk578y61v"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "8.0.4"; sha256 = "1ws5zchg550sn6rfadrjfc9aqs62qz10pyqw7ddrgygffvb1sfji"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "8.0.4"; sha256 = "1xd1zdb5d2cb4ivw3mj9gf3r02i52hmx7jiswbk2dx8q2k79hv6i"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "8.0.4"; sha256 = "05gp1385441wwmjf7j08z4gkirzws06rxvwr7k1hj144ix0nyy9l"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "8.0.4"; sha256 = "1l9yahli9dan9szins7sckmjpwnpm3w9ic5qvwzdzzljn8pp16kl"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "8.0.4"; sha256 = "05j3n1a5r5gh75mvw5pcj8my3l77kh7hdparl2cv030kk7cc401s"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "8.0.4"; sha256 = "05rl747ahxqyvkcdmbcnn5rjr6pg6bc65h0vwc56vwrfd9nif6vq"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "1i7q1fjf07hpnd9hi9z0bavp9kqkk3z5ny8id8yfcansgf4j9bj7"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "01vknc74yy1b36yip1gdcjcr7wij0p9kmglj1lidh6mr676mmi87"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "1qms7i24h9rrzljfmw1vrj3ivfagr0lhr3xaack7vcq7n5mqdcf2"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1qjzkqm0ra6yhazygw8ypzqcaq6ryvcw19b0msfnw3bkaiip0l7k"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.4"; sha256 = "0m37df28wji42cg3696acbrcq6k67y76rsvlr0gfx5qzgy1nfy8s"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.4"; sha256 = "0g7qb58r0jd17xbfvhbpd2pwvnmzmpq8jvd5m08xdq9krrx0cvcc"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.4"; sha256 = "1b4ihr11yj3zjy7s9zhhailryrlkwrlnpa18z603gic157cbzz2j"; })
-      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.4"; sha256 = "1fr33r7cgiww338xad3n2f5xhjrq31chx4nj5kqwdh6gszx3ifj9"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "8.0.4"; sha256 = "16148vl576zmc336q98a975zzqxz0xjwqkwh87ibxrlyz3w78qw2"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "8.0.4"; sha256 = "13gwa8ifir2frmsk88swg778lrjf2l0ij0x7pdlihhywy7gly9wi"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "8.0.4"; sha256 = "1b1ml4mppgfl85lz8s34dk2b3s5j8vdql8k2233zhbcs26d401na"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "8.0.4"; sha256 = "1d3yfjqnar7g1fzr6005n43q5frkihkgmpwy91m40jjzbivlid6c"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "8.0.4"; sha256 = "0qz21s5v01fls5y1n1zjbc0fylk5lynf5yw9fmgabh2s8gi05wxz"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "8.0.4"; sha256 = "0bbw2v83aask0w18ir0i6q3xhmhxa5rahbcd5a1c6cy3hmj3mkx9"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "8.0.4"; sha256 = "1kb1y62mgzdyh11qcvb8mk7i2lmxbil7nwnyv2nys2fwqqkp0zdm"; })
-      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "8.0.4"; sha256 = "15yhasq3q0dhw1ssldgxwjdnf8q7az55bly4nmg198ngkw6aiikg"; })
-      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "18z2lz3rbas3p0k9jahmdas72p5klfwzhqpky044wyp4knwh62dl"; })
-      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "1ia6kl7v2gmrm52417n4b3h61zvnc7pvyfwa0ighyb16p67zw8rm"; })
-      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "012phpsracmrpgrv74ajyx0sva2rzbklz7a5pmi2m656j2mqnx1n"; })
-      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "0pkdlqjpv15x0d87z85w7n40n804nzzdzjbjbhr9arijhl8ykd24"; })
-      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "1bgwban9h8paav98v8m7bpfsqq85k52vhar4w50wv6kag81dradc"; })
-      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "1anp4wazxx42r9hzqbyqdsg01pg344wgp36ksd03dvhkdn51dnyy"; })
-      (fetchNuGet { pname = "runtime.win-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.4"; sha256 = "1ppa0jcfwl0g7w71i90wjdfg72gm52pjp9izr5qig0sxfg266jsg"; })
-      (fetchNuGet { pname = "Microsoft.NET.ILLink.Tasks"; version = "8.0.4"; sha256 = "055jpbwd3309lplrczs14yfvfhznr4k6cc7b50rdnlrhjvxmhgf3"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "8.0.5"; sha256 = "0zfpmawx2pc1mjdjkadch2ycqfsvjxz6zr4r5lb2s9w8ywafyqcf"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "8.0.5"; sha256 = "0vn6kq3svv9kbgwdfa3lswc4pwsqxplg7kc3srd1a07k4jkz9qn5"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"; version = "8.0.5"; sha256 = "0cvzrnqizdccrajfznjgwj6qra8kbqqln5z6x2l9gqklawk4ncdl"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"; version = "8.0.5"; sha256 = "0phhkwilyhh764m8pf403d3qv072ld0z7jg6x9sywqlb4q6za443"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "8.0.5"; sha256 = "1m9gp68z0wyv0xxr4aqc1c2v6v8grml3jxkiqabddn46d6gsisqh"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "8.0.5"; sha256 = "0mdcrzpj17g8xkk5j3flk5xkgp2dx44gamyfn9x5lf9siyi4812p"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-arm64"; version = "8.0.5"; sha256 = "1r2hcmi5l05n1s84gdpiqys0bc4lik1fmp8085dlqz5pc5kg0ibh"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "8.0.5"; sha256 = "1118p6981b74zzm3p1nr2kwd5db35y21z3xif940xahh52zc887n"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x86"; version = "8.0.5"; sha256 = "1bd0spskxlc4kwqd260ycxxvysxq19hrz6z0chlbc8kxfwf3kf9z"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "8.0.5"; sha256 = "0s62x5cv1bw6g4jmmg7vyfpj4nha3bpsanhwpbk1vwgkridwxfgi"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-musl-arm"; version = "8.0.5"; sha256 = "0b50abmhp8l8qjiwqxd1i1zw1kfddpr25nxl061kxb319zp5qslb"; })
+      (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "8.0.5"; sha256 = "1m29wm2i6666cl6jlv5r5y75v98qidqjsc74sl2xazxsd105p7iw"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm"; version = "8.0.5"; sha256 = "1f37i0f227lns4x2zxw670f7lj8lkxhpn805dk07xd2a70w3h54p"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "8.0.5"; sha256 = "1b4js7g35nq5kx50cjbncrpychrhxqysic46x082g50kvkn877zy"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm64"; version = "8.0.5"; sha256 = "18ln96i7md0b3p00gyaka8jr9hly47gkbyqsmyzvvp4b98z5lda9"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-x64"; version = "8.0.5"; sha256 = "14mipnqvw6h7pw58sqjjc7013znz9wgcdklfcj6nbpr3cvb297xm"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "8.0.5"; sha256 = "1004mzihgamdrv66nd9bv44kk0qxbmzbqgjlrq54k8fxwy1602ps"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "8.0.5"; sha256 = "1wv6sqhf77x5iac6h64sr1ip8qyz9w79wlvs82h5wxn84hjrb97h"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-arm64"; version = "8.0.5"; sha256 = "0vz07rfkl7jday1qgjrgvqf47pgzqajx75fz9v3z55n94wdrsrk3"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "8.0.5"; sha256 = "0176paxswr5phr8x29xir3sd4rxygp4w107anpwx14a2fbm01wmc"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x86"; version = "8.0.5"; sha256 = "1rl8f4bgx6hmh4q7lgr4nvx6fb044rg96ja128m22v925wx3wq9q"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm"; version = "8.0.5"; sha256 = "0j09zajb36z3gyv6f7gw9d80kvcjc8z9qw52x4cs5bynakx97563"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "8.0.5"; sha256 = "00m2f6fi9nagcv9s0f9nd0wkcq9qs6dmwchdp0khfsl3xj1hv99g"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm64"; version = "8.0.5"; sha256 = "0jn3rpk6xcndrlkjvr0s8wlk4vgakvc18js0psmlrswrq9crq4ix"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-x64"; version = "8.0.5"; sha256 = "0l1shrv0rshx527dy90wq1w5x3rvx3kzqj1mslx4ysjzf8841q6r"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "8.0.5"; sha256 = "15vadqfi0w7sdq0rh35rb9ph4h4qbal2i5m5ifabbfwjp7348z9c"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "8.0.5"; sha256 = "0f5ya9gb16wi6jff586g67icwshsca22afx4k6vnssr2p38xvh7v"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-arm64"; version = "8.0.5"; sha256 = "09wjap5ykxsyyxfplhjn7jpxbx8qnks6cbc0200nfx3xqi5hyj6c"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "8.0.5"; sha256 = "03nin18sqjc79b4dwwfzd620vr0ph1jnj462sfaszhyrcxs41vz1"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x86"; version = "8.0.5"; sha256 = "0f9pw81cc2z6jir7nfr0nn211857ac9ix0dq7rpib0ld0bzf9naz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "0b8bdyckb4l2z4byxlw84pz4nfahp8kfx5valbll8sj0f9357apn"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "0wv2c8cf1fi7pm42by9dhyrld48cl5mssm70aq7fwa2hgnvy5kaz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1yg53pnw2an4vmw9aqmhdnrk54ir16i3q95lv44p3vfdx8az582b"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "0zjh0ang18sxayr3imidda99bbcna3iwml77f77fyw7cq5xm57xd"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "0bvnc073s7g9pap6cl0v18xp7shpmck6mfmcwryjzpj98za8fiz3"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1lnxgpd66psjciafhgwm37lzd8a5n980m77bbmaclcmx1jf5knv6"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1r753a0bhlz9iiw1k47drjmwckwjzzixzgggji8glp3a22p2d8bp"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "08wcywhnjl2pw5w2ybswnwwzgmyanxm4bma80rbz86xchlqakk5z"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "12r3is7ddra45yvkwqcrm63lhpya5l9g912xw4rqbnfz4pbmr8dz"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1m3vglk8q3bycg6k5x3v29ylrb62kih56hn63dfzb7f20qb8xv8z"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1pxw3wxak4x2pm2mqsz9fipzx98d3blma8y0cz03nqqcmxfq2lnr"; })
+      (fetchNuGet { pname = "runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "1m60wsv54czd55qw770mcnv8m7lnn5s99dya38is7szvgjgq0zx1"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "1xdpipcybj54phsm1xn8ycfrwd6xaa8d67jxdakfiyzdwgbdqnam"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "17xj4qrmmb6yxd3w0xi5x9la1ywrzczbmyx975p0z97yx5js719d"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "01wq0zf646c87yz1zgf1vzvwd5kxjv8dfd0vvqq2w6af8670vxwa"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "1s85bhrhyq7sjks0frj4mkh8g1pd0j0bifd0wj3qnlagrbxmq33b"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "1qcnnshmqj6i6xf34pfi6ampvgcissclfs547yxjzgjizxgkkhy4"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1ar9jssv4njgk6gy3nh81d0p81as8ff5vmgzranshyr6djrmshna"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "0d0yl060my0f9z3qbkzbks9jhw3zsms5issfa94rnkpgw9is40fh"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "11v1bk0wsdx87rdk32cx63118bqmrvl054ai6h231yqw75q680sv"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "0j4g9n88vdss1qzslr11pf49jxdv6pkbchdmsnis4nypp4nc4vk9"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1gmgj6h9nhzdcmn4mq2vfv8a69ncwcaix0vyyk8rrzzcrypvizpy"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "04ihcgls7w20g8v3s47fyxc6cxx554mcmmfynkwp0206l6mfka78"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "1lr79q6bpmggmm1kpgr195662r47mnl4infva84w51daw6hkdkq2"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "0rz6d960kxc4c1nc31w46l76lkpzmrh74qf0l4qy1cmsdylkbsby"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1cczas7zmdc8wal2n9axgz5kb5ccmh4i94k94jfma3p0c7s69msy"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1p9hi32ibv12dyiwgysj60as2g53an0dqidgxl93pazmmg1v25fd"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "1l4cbxlw33grx3pyf08079c8f2cmwnvdxkqpnw0072sb50s8yqk3"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "1bzw2w73glg96mnf9cjjdk1bwz4z5rf8pgn1rmnpb3ldlawhz4g1"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "02jz8kvs30d9vnxnv20dc3w8q9vhzff6n6r1qcyym3zfalmc4maz"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1hwfn3yy9iprikfvc0wz99fvb000w5nya2hmkix2fx3nydxd1gl3"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "18havx9c3m2py0zzccxh1jmj8wb2hq28vqixib0kcicgvdl3rwis"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "1lvp94im006cgi17mj26c9yhhzz6js0lxmdpqas9vh7qxlikj7nx"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "12bc6r867izzb6s092wwj1cfmi09qmyy7q6l1d8r48jq3p14v0np"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1x6xwq8n9y0n2sj5rfh4pqzhkz62qxaa2g6y4s089f4bcg721l3d"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "06a37cr1pg1nmzw07nbxsvfs3q8wn5p4xiglzg1b4fdpcwr0xpl6"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "1wlrapi8928jd9yfck7kfjdzgrzkylw8d7k4faaxrkbxpzn687br"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1q4wbircp3dcbhgc7vdxm2m81ywpw3ls44jv6i3j7hkvh83v7kms"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1rrrfig168zv5hznv19b1pb8k5r6j9smfxg4jn4vcr8qmy0vnfi1"; })
+      (fetchNuGet { pname = "runtime.win-x86.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "118558hm53ix8fr7lib2h4vgp6vmf1gmaxph75220c3v966wbbz6"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-musl-arm"; version = "8.0.5"; sha256 = "1sjyap9avwq1p5gk2iw11zmqlh3bh1ch02phvmqp0s9pawwa6mvs"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "8.0.5"; sha256 = "1s2n57qjggyznf23gf9gk7dzsr8nr8ypsv3gyacn8fvy42fvq9v2"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-musl-arm"; version = "8.0.5"; sha256 = "04g6vriblgzhaf960pfjbxhql9xdqkwx778pklim0kck4prn39f6"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "8.0.5"; sha256 = "18fxpdzlb9kqq754hs67aabklq7k13b1gxyjmbi7mldcn7yjw0wg"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "8.0.5"; sha256 = "0mjwyl4ywakvzqgiy5gm0rld8fwxw7gp81qa1cn8ns2yn7ll2zhl"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm"; version = "8.0.5"; sha256 = "0805yfy47fz5348ydi54546g43qr7fp4wpb2xzry5nfh0sn0693s"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-arm64"; version = "8.0.5"; sha256 = "0rwjw6ahinci3bajky0m421cg7a0h6rjdnx389cd3wan3ij5l8bk"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-musl-x64"; version = "8.0.5"; sha256 = "08j0xrfp7b2vj9hxrjf8zdp0agj2jvwyr5xii9wbkhnq4cwikjgn"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "8.0.5"; sha256 = "0vag2bgllay20fmyvvjbckjircry690sr2fykf010kzb4zmywiaz"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-arm64"; version = "8.0.5"; sha256 = "1pf1m7miy6r430z5fbja0p38ixr4pj9jbh7mzqj6fqm4vqxbfiqg"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.osx-x64"; version = "8.0.5"; sha256 = "186q4jy948hy128271rhsjy1z8isc45snvss37pnz5r0wq68vy3b"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x64"; version = "8.0.5"; sha256 = "0njzarmfay3jhqmjr1qmhgsldsff0rhb5lnl6zp0c337i85yd7xh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.win-x86"; version = "8.0.5"; sha256 = "0fwpmdw5d89mkmzfq16659mlswjp9fnd0cqdyfy5frgb3mi3g10a"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "0j68y9gp3ci4982imhdri513in9sldicx8xn6kvg3czqanc34n9j"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "1frixdwdpxjzkzlwrfkxrx6qnf4vpb7flhl7r1z2wi8m2x8xyami"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "1wmf8b422s3l6rld07zr5qyg43wp6cd3xnz80j45zmny6sl1ksd9"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "1yp69lwz1yj89258sq0pznr037ihng9444d06893vajyn86x2ys3"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetAppHost"; version = "8.0.5"; sha256 = "1r1bzbisjxqkl310yfqjrsivjg55l61rlw60xm77nr4iww4av6l9"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHost"; version = "8.0.5"; sha256 = "0gc6kmqvqmgzf22fgsimfybdj7yp889nc50jnlskm20hp6mia4wi"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostPolicy"; version = "8.0.5"; sha256 = "0ymnh483ds18699mvcg0k2j1an8xrknsb4zb3nxj97246wgdh9hp"; })
+      (fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.DotNetHostResolver"; version = "8.0.5"; sha256 = "1r3cn282p3qv4fzsq5cwd5lkjjrv5dfqp54ffgh6yi9j9s2h0j99"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm"; version = "8.0.5"; sha256 = "1xkzzn8vg4h4nf63nbzvd5pk19y5cg3k0ljzkblva4knppaxx6k5"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-arm64"; version = "8.0.5"; sha256 = "00dbmjlcfckpgbl4f44p8vfr5aqabx21jllsqkqcy1qnp8a504h0"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-musl-x64"; version = "8.0.5"; sha256 = "1syiaqw9dmqm5n5fvwhaycip1d7mj14dcivjwbhyf5nyd67zy8bp"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm"; version = "8.0.5"; sha256 = "0jpf2axjfv8nwd4yiib25agfx2y1mmksxz8laf6akac33gf6swgh"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-arm64"; version = "8.0.5"; sha256 = "02mpnyyklhwyysjz8rhk42cnl5v1gb64la8zm95nldrsgv1viw70"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "8.0.5"; sha256 = "1ky9whq5k3a1x0amailp1kd5926lx3kpir2ji68wj80w7c4kpr72"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-x64"; version = "8.0.5"; sha256 = "1jaw4mgzsf7jjkqlzkxjbpj3jszpg86fgjjvkc2vyk91p15dsgll"; })
+      (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.osx-arm64"; version = "8.0.5"; sha256 = "1jw06my5ds295lap3q35pg4hqcqmrx2bjqjaxgxhm6vyaif756nx"; })
+      (fetchNuGet { pname = "runtime.linux-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "1iq19frhagk99a9wjgb10059mh0k5wp28inwy7diivj4lpi7wr24"; })
+      (fetchNuGet { pname = "runtime.linux-musl-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "1qrmwr0vvl49slnjf5r63lyyl7zlli98lbn0g44n6ra8drbhdyp6"; })
+      (fetchNuGet { pname = "runtime.linux-musl-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "17i0cgs6w8vlr7fnypj4c6188rpc3sgkr80ly453nb2qrmkyhzh4"; })
+      (fetchNuGet { pname = "runtime.linux-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "1x80i4rbkdanana8hhbhkw47410bpryinry2axxwaw6yyk5gyr3g"; })
+      (fetchNuGet { pname = "runtime.osx-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "1psh3vxfp37xx6bdhgj7l7d9r6p0kkxwfi98i89l1s407nj6cwvc"; })
+      (fetchNuGet { pname = "runtime.win-arm64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "0msnc3iqrlslipar5zbjhz7v4f27lc7rkyy1fv18rqv787a87bbx"; })
+      (fetchNuGet { pname = "runtime.win-x64.Microsoft.DotNet.ILCompiler"; version = "8.0.5"; sha256 = "1q6vx9d2z57idkickjfxf9jf90x9x7jmxz7lrhyxcrprnf7sscgw"; })
+      (fetchNuGet { pname = "Microsoft.NET.ILLink.Tasks"; version = "8.0.5"; sha256 = "06siqqihzhmxbkryrw3x3xvmv5fr6gw5qdyb6y8z3l9bzd5qdf7r"; })
   ];
 in rec {
-  release_8_0 = "8.0.4";
+  release_8_0 = "8.0.5";
 
   aspnetcore_8_0 = buildAspNetCore {
-    version = "8.0.4";
+    version = "8.0.5";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/0b0bc7f4-c6e5-4cec-a7ed-45c2fac0da4b/ae2090564274152b5a4be9f1e66c5d30/aspnetcore-runtime-8.0.4-linux-x64.tar.gz";
-        sha512  = "8ab281977116bf59a672afe5463bce4433378cc8a67d332c564a012939b7dbdd8756df82a115a5ab93f8186c22700a6dc0272b99a0f484db837da96820c78e79";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/ccccfeb7-0af4-4713-b4f1-cf49b5c8bd6c/5b04c0188dfcf78b70da78ae3bd7f3ab/aspnetcore-runtime-8.0.5-linux-x64.tar.gz";
+        sha512  = "ffe6a534ed7dffe031e7d687b153f09a743792fad6ddcdf70fcbdbe4564462d5db71a8c9eb52036b817192386ef6a8fc574d995e0cdf572226302e797a6581c4";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/80ec12e5-b26f-466c-a20c-f96772ea709d/606e7203912400b44cb35d6fcecf60bf/aspnetcore-runtime-8.0.4-linux-arm64.tar.gz";
-        sha512  = "0b0b3dffe678211afcaeca5d7e381f2218f156421c79dd06e083b1abd92ceb2b5c04c8a159b7d67b866393b8169de826ede70240226e0164451b329b7d46b570";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/208a57a8-fcc0-4801-a337-79095304d2af/d1ffa79af24735af4bd748229778c1a9/aspnetcore-runtime-8.0.5-linux-arm64.tar.gz";
+        sha512  = "54ad859a3307a4ccce6aa794df20dab3fc38cb4a8fc9f1c2cb41636d6d19fed1e82f88a0099bdc9f30e08c919ae5653da828ae54b0299291dafcc755575f02db";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/8edd447c-bd4a-4677-ba33-8bdac6088dc8/a17a23a5d47642eb050288dea0322350/aspnetcore-runtime-8.0.4-osx-x64.tar.gz";
-        sha512  = "544257738cd7265a6c3c99e83f331c20c631ee8064e47bd925e37191627223e2f39f19a025360de1f95915bde1a26eede757bea4ffbd115309d186d81d7d6b61";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/77cd03cb-5575-48c9-8714-6498ee88694b/8bfba2913a4db23e3dffdff779fb7866/aspnetcore-runtime-8.0.5-osx-x64.tar.gz";
+        sha512  = "d214a8b6a60547acb1a7f879e7a82348585b699f714b73b168918ebc60ee580ca5ff973f64e7738063f79dd04f0807bef0d73e90ce42c3b4464b87b768ccd789";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/172cfd62-a126-4375-9a48-84cfbcf1b718/959ce27a010020f0e5d393578574bca9/aspnetcore-runtime-8.0.4-osx-arm64.tar.gz";
-        sha512  = "15e8a7535e0b4d2deeccec32e6373cc2d79fe1156c2490ec263790723c5f660c03a61978826d825a427ebbad02cd0eef12a14e11cb8fcd9744c5ce2ef7176011";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/c264657c-7a93-4ba5-b6e0-91bf41341e1e/90fb45ed7d2f92c374899b1c7a5254b2/aspnetcore-runtime-8.0.5-osx-arm64.tar.gz";
+        sha512  = "b1a47d2ae3b528f5c32b57e3a03b46d12a14126b9768f9dd5dd979d49dc6543c6aafe55684eae3890ffe6b867aa664805b920ae1514f67cc841b882d5da7c091";
       };
     };
   };
 
   runtime_8_0 = buildNetRuntime {
-    version = "8.0.4";
+    version = "8.0.5";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/a3ca3d31-f45b-4e53-ab4d-0f2f221cbc5b/47382078b4b72a66387d0fd6ed9ff963/dotnet-runtime-8.0.4-linux-x64.tar.gz";
-        sha512  = "5c23889d3e6effa85d46c0e1969ce876c686723ae47bddf2cf9c0b1d99affde3f60c04063c2467027aa4163e9a981ef601250a7e8d14ddc6b365c89b24029c80";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/baeb5da3-4b77-465b-8816-b29f0bc3e1a9/b04b17a2aae79e5f5635a3ceffbd4645/dotnet-runtime-8.0.5-linux-x64.tar.gz";
+        sha512  = "3efff49feb2e11cb5ec08dcee4e1e8ad92a4d2516b721a98b55ef2ada231cad0c91fd20b71ab5e340047fc837bd02d143449dd32f4f95288f6f659fa6c790eaa";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/761b252b-a0d9-41cd-b1ec-2dc33159c11c/b8285cf82db4ef340a191bfba9a9a73e/dotnet-runtime-8.0.4-linux-arm64.tar.gz";
-        sha512  = "d11ce8867dc91d9e9b333753cc7b9677204898485d044dfbbfabe5c5eee43091580a11c3029fca4138cfa9576f84e23fc11bcffa44fcaf5c3d8e617a3cd18802";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/00ca4d7a-e529-4384-8ad4-acb8237d540f/a7df4c26e3c0e1dcf8e17d2abb79aad5/dotnet-runtime-8.0.5-linux-arm64.tar.gz";
+        sha512  = "cd6c0ac051c3a8b6f3452a5a93600e664e30b9ba14c33948fbbfc21482fe55a8b16268035dd0725c85189d18c83860ea7a7bc96c87d6a4ee6a6083130c5586c3";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/c999e42b-38c9-4d9a-9816-9a0ebece8afe/8e4471db5aa0756d812af23817b14259/dotnet-runtime-8.0.4-osx-x64.tar.gz";
-        sha512  = "bb303991154582e1aee0b4850bec2ed92b5c4253bed08d76da0c9687c90c46c9ddddd7ffb9050fb7a4d8db6be6e8cd552156589679a3a169341a167952d76407";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/0dabe69f-fa99-4b53-96d1-9f9791bb0b6b/f72acbfd3b0e60528d9494b43bcf21ca/dotnet-runtime-8.0.5-osx-x64.tar.gz";
+        sha512  = "29a8be6dd738d634cc33857dc1f1f6cc2c263177d78eb1c4585c96b5bf568f8f2689f1a30eec728ccb96a2d005049936abbfd44daca1962caf4f6d53325ba42f";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/d2cd56cc-5a78-460d-a45d-3893b020949d/8cf9653a23c91ac2b10c70f58edae60e/dotnet-runtime-8.0.4-osx-arm64.tar.gz";
-        sha512  = "7aa4ea587348984ca959945a9e52bade7cb9cbcb8c5a32dbcdf0836d2da4148ca68fcf9815b0b274964b5164c9266b1891afc9406c1c7337642f09300efd7649";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/fac90ccb-5864-4d4a-a116-67387aaee61e/df82eea80efffad3c9ec8b0522847e68/dotnet-runtime-8.0.5-osx-arm64.tar.gz";
+        sha512  = "5401135b8871d85ca6f774958e6a644ef2bf85a88d2358f15c3bdc928b21a700be428efede677d83640085461d000e55a28bfbacdc9f01af0334a6e8b257efbd";
       };
     };
   };
 
+  sdk_8_0_3xx = buildNetSdk {
+    version = "8.0.300";
+    srcs = {
+      x86_64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/4a252cd9-d7b7-41bf-a7f0-b2b10b45c068/1aff08f401d0e3980ac29ccba44efb29/dotnet-sdk-8.0.300-linux-x64.tar.gz";
+        sha512  = "6ba966801ad3869275469b0f7ee7af0b88b659d018a37b241962335bd95ef6e55cb6741ab77d96a93c68174d30d0c270b48b3cda21b493270b0d6038ee3fe79e";
+      };
+      aarch64-linux = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/54e5bb2e-bdd6-496d-8aba-4ed14658ee91/34fd7327eadad7611bded51dcda44c35/dotnet-sdk-8.0.300-linux-arm64.tar.gz";
+        sha512  = "b38d34afe6d92f63a0e5b6fc37c88fbb5a1c73fba7d8df41d25432b64b2fbc31017198a02209b3d4343d384bc352834b9ee68306307a3f0fe486591dd2f70efd";
+      };
+      x86_64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/e05a3055-c987-4127-a315-51d6b982fd67/fbda30d8e461b2c5098f3c405378b559/dotnet-sdk-8.0.300-osx-x64.tar.gz";
+        sha512  = "12ed6044dad31c65d6894d7e1cf861a6c330c23761fed90ca2fe0c7d2700433fb8b8541c35bb235b044762f5fd33496cd6e92dbd70deeeb7b9e59423d9d49f5e";
+      };
+      aarch64-darwin = {
+        url     = "https://download.visualstudio.microsoft.com/download/pr/4d7af168-9a20-40a3-8744-b2f1c10c0227/3d6d8d16545d6c05125c51ef8142296f/dotnet-sdk-8.0.300-osx-arm64.tar.gz";
+        sha512  = "98a9b56b2795bf6faa848062ed34d917b187eda220db50c8e73de1bfa37244dd68d8c3cbc598b5fc5be4620a2b92724f95d7c13299f8b873fdefe880890a1bbb";
+      };
+    };
+    inherit packages;
+  };
+
   sdk_8_0_2xx = buildNetSdk {
-    version = "8.0.204";
+    version = "8.0.205";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/0a1b3cbd-b4af-4d0d-9ed7-0054f0e200b4/4bcc533c66379caaa91770236667aacb/dotnet-sdk-8.0.204-linux-x64.tar.gz";
-        sha512  = "b45d3e3bc039d50764bfbe393b26cc929d93b22d69da74af6d35d4038ebcbc2f8410b047cdd0425c954d245e2594755c9f293c09f1ded3c97d33aebfaf878b5f";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/7cdbcd68-c4e8-4212-b4a2-f30ae2ffdb19/48a359550fd7eab1f03ea18eb2689eb3/dotnet-sdk-8.0.205-linux-x64.tar.gz";
+        sha512  = "2ec774350ca3192e1c68c9c8ee62d0c089f9bd03fe1aaebb118fbe7625f2e0960f5dbd800ea3f974cc7ac7fba32830f41faec9ee1bae736497ba05d9c7addb59";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/1e449990-2934-47ee-97fb-b78f0e587c98/1c92c33593932f7a86efa5aff18960ed/dotnet-sdk-8.0.204-linux-arm64.tar.gz";
-        sha512  = "7000b559efe502e9a799e9fccb6bccc2e39eb21331d6cb2be54f389e357436b84f5ccbcc73245df647749ee32d27f7fb8b7737d449312f0db7dd3409f8e12443";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/96b5cb76-37e3-4514-a8c5-bb4834e275d3/b541205fa6efc3bd223b3201dcb7735c/dotnet-sdk-8.0.205-linux-arm64.tar.gz";
+        sha512  = "092ce55cc45ab5109c9d991382e7ed7f40bc0281e94766738dbf179d618f03dbf8ba38e43c418a3d5cac0377afc5e5b82a969e36832e386b851f3679a2e988e3";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/9548c95b-8495-4b69-b6f0-1fdebdbbf9ff/30827786409718c5a9604711661da3b5/dotnet-sdk-8.0.204-osx-x64.tar.gz";
-        sha512  = "a49c3dc8f364dcf2f88353b80267062b557ef4afff333fa4494e84d01234d38c57619aaf7a3e2cacfb16d066ab1523b6e5953cf864e5e8f411dd38855408bb5d";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/0dcb3b2f-6bbe-4dc0-a42a-283826d8b9ce/16767a67d602bd267122a26f4c4c2935/dotnet-sdk-8.0.205-osx-x64.tar.gz";
+        sha512  = "15f410ae81027f4537a03a00114873fe9bacf799d5ddc24663fefc3b1d977d237269fef48c80334bcaf7230495f304bb123f310692f880fea8cb8e0072abb4a3";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/8746698c-596d-406e-b672-49a53d77eea7/74c28673e54213d058eec2c9151714cc/dotnet-sdk-8.0.204-osx-arm64.tar.gz";
-        sha512  = "db06baa1d076549e393a9a402c03e81834e15641d2b5fdbd5beb7c4a55b5ed979f5e58ac6baa2048bc55a3a7b3aabe0e3c518310c66a17ecd107b7bf0aaaf2b0";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/c8126855-4f38-4d01-8e22-b7f93452a9d7/725dda9ebd1ae3486febf496217ba0b9/dotnet-sdk-8.0.205-osx-arm64.tar.gz";
+        sha512  = "2792e9b0cd4fd69373022c5e4c17bd128dd8e31db773f51b39c8696f37e72af8c4b67d0c017ee068587c0f664efa8bbd9a0bc4472b072a7897d2ff4ef8fafa58";
       };
     };
     inherit packages;
   };
 
   sdk_8_0_1xx = buildNetSdk {
-    version = "8.0.104";
+    version = "8.0.105";
     srcs = {
       x86_64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/fd4a16ac-5322-4308-b6b0-afa1821e63f6/0abd2e63358335f2235d22fd84b32a60/dotnet-sdk-8.0.104-linux-x64.tar.gz";
-        sha512  = "cb7b5e509c16a7e27ccfc03b3a217460b9eac151ca973f262f82d4b4a494f7bdff3229e9aee91df1c110582ee8dd3d310dad39528c3bd292c5d9b7746ba3b6fd";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/e898e5ae-041a-4e64-95c7-751479f40df5/9e36a84d3e1283e1932d7f82f6980cd8/dotnet-sdk-8.0.105-linux-x64.tar.gz";
+        sha512  = "60ff271ee7851ff9ab851f9dc3e3d0abc87ac9b982959abfc8f0a3b58301fb6a0ff7b9f07f8df18668e1e8182c688d0d661bb9cb1771a2d40a0015d02009fce8";
       };
       aarch64-linux = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/92652bc8-b312-4f77-ad95-cbbcbc9330ed/549869e13f1bf66b0b089b4e976e96ea/dotnet-sdk-8.0.104-linux-arm64.tar.gz";
-        sha512  = "71f5fb65c88bfd14ebc13c5eec04d08b4f7461d1b9f3f5f08c31351a377e08cd002072a4487bfc2496ac7b4d5ba83c97eb979a5732de394c1a02a4528877002f";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/ffadc6b9-6f16-4671-866d-4c150f2888d1/256d5909ff60dae42cbd251347cc14df/dotnet-sdk-8.0.105-linux-arm64.tar.gz";
+        sha512  = "8f04afa385676d2ec879ad22734a4c869d931ba4bc7507d0aa5889561d0230e382598057bdf75792048b28bd9a1c8eb187e80691f603309a46d6c50d71373381";
       };
       x86_64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/5f790cbf-88b3-4619-b083-178e1eb6c16f/ab21721125a05ec751b22d689e19a353/dotnet-sdk-8.0.104-osx-x64.tar.gz";
-        sha512  = "b451731c7fe151316df57d1e6a23129732ebc0dc3dd53479421b881652bd042d5fb9890c2c8e229fc578b3b05542a8e08986955154e590d8c1e274c5821a5666";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/54b48c6e-1a50-4dd5-9592-8ae5dfbe9d2f/913341d866eaf3149a6158cabf9ce2ad/dotnet-sdk-8.0.105-osx-x64.tar.gz";
+        sha512  = "052fd0783bd0901876a29b57a0f15e9f9cf859373bf4f3867a8f3e00b4edac5f3814b066be81c76d6bc74a20bd696e4ec65db48dc19703bbb4ee56d60aedd96d";
       };
       aarch64-darwin = {
-        url     = "https://download.visualstudio.microsoft.com/download/pr/73d8ccae-9bcf-42e4-9a57-b6a4480eea2b/52e136f08e967c6ea9617be542921286/dotnet-sdk-8.0.104-osx-arm64.tar.gz";
-        sha512  = "376fda994997e3ebbf15cafbc910ff25a71debd2d31d088cf7947f813ff013568f3f47514ec53d2c02a3e3f8432a5ca9344dab3ee07cc0df650761a3dbc6be68";
+        url     = "https://download.visualstudio.microsoft.com/download/pr/8d741dd4-ab83-4bd8-8667-998cc1c6d345/c7ac6cf87561262db36b18e505150e89/dotnet-sdk-8.0.105-osx-arm64.tar.gz";
+        sha512  = "f910adb274065fef581728e7d043bc3f0c105a939f659865753c11a0dd0b550bdc4c0bc01e2ce6f710efcdebb3966ef138986113f595af4d6a9be8b15008abc6";
       };
     };
     inherit packages;
   };
 
-  sdk_8_0 = sdk_8_0_2xx;
+  sdk_8_0 = sdk_8_0_3xx;
 }
diff --git a/nixpkgs/pkgs/development/compilers/dtc/default.nix b/nixpkgs/pkgs/development/compilers/dtc/default.nix
index 60bce2f6e458..9548f8fe06f8 100644
--- a/nixpkgs/pkgs/development/compilers/dtc/default.nix
+++ b/nixpkgs/pkgs/development/compilers/dtc/default.nix
@@ -47,6 +47,12 @@ stdenv.mkDerivation (finalAttrs: {
       url = "https://github.com/dgibson/dtc/commit/35f26d2921b68d97fefbd5a2b6e821a2f02ff65d.patch";
       sha256 = "sha256-cO4f/jJX/pQL7kk4jpKUhsCVESW2ZuWaTr7z3BuvVkw=";
     })
+
+    (fetchpatch {
+      name = "static.patch";
+      url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=3fbfdd08afd2a7a25b27433f6f5678c0fe694721";
+      hash = "sha256-skK8m1s4xkK6x9AqzxiEK+1uMEmS27dBI1CdEXNFTfU=";
+    })
   ];
 
   env.SETUPTOOLS_SCM_PRETEND_VERSION = finalAttrs.version;
diff --git a/nixpkgs/pkgs/development/compilers/ecl/default.nix b/nixpkgs/pkgs/development/compilers/ecl/default.nix
index 26f1ec471a59..c11f471641da 100644
--- a/nixpkgs/pkgs/development/compilers/ecl/default.nix
+++ b/nixpkgs/pkgs/development/compilers/ecl/default.nix
@@ -19,11 +19,11 @@
 
 stdenv.mkDerivation rec {
   pname = "ecl";
-  version = "23.9.9";
+  version = "24.5.10";
 
   src = fetchurl {
     url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
-    sha256 = "107q6gmxlsya4yv38r1x1axrgyyfgdrfkkz97zfp64bcrasdl6y5";
+    hash = "sha256-5Opluxhh4OSVOGv6i8ZzvQFOltPPnZHpA4+RQ1y+Yis=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/development/compilers/erg/default.nix b/nixpkgs/pkgs/development/compilers/erg/default.nix
index 9d02f1f4a996..6a8741be0581 100644
--- a/nixpkgs/pkgs/development/compilers/erg/default.nix
+++ b/nixpkgs/pkgs/development/compilers/erg/default.nix
@@ -9,16 +9,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "erg";
-  version = "0.6.35";
+  version = "0.6.36";
 
   src = fetchFromGitHub {
     owner = "erg-lang";
     repo = "erg";
     rev = "v${version}";
-    hash = "sha256-aDYT2bXd2OcRRgYd6ycjeLPQ1LuRxejivhEFkiqZoGw=";
+    hash = "sha256-fwuAlIUPEzc2ZjKJ+4gdzXM679MAAJpg9Mh0d7LAt5s=";
   };
 
-  cargoHash = "sha256-I5g+Nqdr/UYS/+F9sGelOSnb2vnT5vHc0/VeRASBsQY=";
+  cargoHash = "sha256-MfetCaYK5bBsV6EszNkwqlBFMykmLW7jX4gZWuIbHek=";
 
   nativeBuildInputs = [
     makeWrapper
diff --git a/nixpkgs/pkgs/development/compilers/flix/default.nix b/nixpkgs/pkgs/development/compilers/flix/default.nix
index 926c98d68043..3499b7390f69 100644
--- a/nixpkgs/pkgs/development/compilers/flix/default.nix
+++ b/nixpkgs/pkgs/development/compilers/flix/default.nix
@@ -2,11 +2,11 @@
 
 stdenvNoCC.mkDerivation rec {
   pname = "flix";
-  version = "0.46.0";
+  version = "0.47.0";
 
   src = fetchurl {
     url = "https://github.com/flix/flix/releases/download/v${version}/flix.jar";
-    sha256 = "sha256-jj8h30QsIF5HlunrqUktHY6bCUq9gMNVlAVsAH0F0U0=";
+    sha256 = "sha256-HlVJR8SPwhOFn3yuxJzUWSS+xascf4pGsoKCqzBDG6Y=";
   };
 
   dontUnpack = true;
diff --git a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
index bce45f200c2d..aa73a62fab14 100644
--- a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
+++ b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
@@ -141,7 +141,9 @@ let
         homepage = "https://flutter.dev";
         license = licenses.bsd3;
         platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
-        maintainers = with maintainers; [ babariviere ericdallo FlafyDev hacker1024 ];
+        maintainers = teams.flutter.members ++ (with maintainers; [
+          babariviere ericdallo
+        ]);
       };
     };
 in
diff --git a/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/data.json b/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/data.json
new file mode 100644
index 000000000000..66bc68aaff66
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/data.json
@@ -0,0 +1,1007 @@
+{
+  "version": "3.22.0",
+  "engineVersion": "f6344b75dcf861d8bf1f1322780b8811f982e31a",
+  "dartVersion": "3.4.0",
+  "dartHash": {
+    "x86_64-linux": "sha256-oDqmWPHx7EwP4EOopZ4/pAG4kuW+CUCq1T/bHDrw2Z8=",
+    "aarch64-linux": "sha256-FRhGusQMp2noDnV4iE8t06sayGMInYCj7VxfrQxoV7U=",
+    "x86_64-darwin": "sha256-dJe18+sfgHsE2CQf05vBkynXp4Pf2otoVM/Kf5m11rU=",
+    "aarch64-darwin": "sha256-HC7/m3zYY98TnqIreOHixwJBxXCpFIof03TZ80xblfs="
+  },
+  "flutterHash": "sha256-UcpprC40itt3nbvENJVytD8M1EYSjKMlpAWJ+GmN7Pg=",
+  "artifactHashes": {
+    "android": {
+      "aarch64-darwin": "sha256-kpcfApS/KcyV1XMGw1YSHBSjJxNfl2WT5JVCe6eMcs8=",
+      "aarch64-linux": "sha256-FL7AYU/fULoX8lvllbUGiG5+RroOwf6bolzsvLmLePA=",
+      "x86_64-darwin": "sha256-kpcfApS/KcyV1XMGw1YSHBSjJxNfl2WT5JVCe6eMcs8=",
+      "x86_64-linux": "sha256-FL7AYU/fULoX8lvllbUGiG5+RroOwf6bolzsvLmLePA="
+    },
+    "fuchsia": {
+      "aarch64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "aarch64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
+      "x86_64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
+    },
+    "ios": {
+      "aarch64-darwin": "sha256-tulW5ybnOCiIcUSLEXRlIgSmgZGA8NQHgFmLIpEvPUo=",
+      "aarch64-linux": "sha256-tulW5ybnOCiIcUSLEXRlIgSmgZGA8NQHgFmLIpEvPUo=",
+      "x86_64-darwin": "sha256-tulW5ybnOCiIcUSLEXRlIgSmgZGA8NQHgFmLIpEvPUo=",
+      "x86_64-linux": "sha256-tulW5ybnOCiIcUSLEXRlIgSmgZGA8NQHgFmLIpEvPUo="
+    },
+    "linux": {
+      "aarch64-darwin": "sha256-eOBMqZkUTeFOfQHtrnx5KlERY2RLtqwDi9WOv0xcmVk=",
+      "aarch64-linux": "sha256-eOBMqZkUTeFOfQHtrnx5KlERY2RLtqwDi9WOv0xcmVk=",
+      "x86_64-darwin": "sha256-r6trOed2FniMMGLqoqiDKeaPUyAY9o2H63Oh4fPlW/c=",
+      "x86_64-linux": "sha256-r6trOed2FniMMGLqoqiDKeaPUyAY9o2H63Oh4fPlW/c="
+    },
+    "macos": {
+      "aarch64-darwin": "sha256-TRwbutJABHyPUxNb2CBijc3sd3RTtnE/CgasVhKNj3g=",
+      "aarch64-linux": "sha256-TRwbutJABHyPUxNb2CBijc3sd3RTtnE/CgasVhKNj3g=",
+      "x86_64-darwin": "sha256-TRwbutJABHyPUxNb2CBijc3sd3RTtnE/CgasVhKNj3g=",
+      "x86_64-linux": "sha256-TRwbutJABHyPUxNb2CBijc3sd3RTtnE/CgasVhKNj3g="
+    },
+    "universal": {
+      "aarch64-darwin": "sha256-05p8hCOMaZlrtsBp+t2Iw0DGLeGiD23NhB42LnoEFrs=",
+      "aarch64-linux": "sha256-y4NwCN+W0EjEpEwuU4u2Yg2hJB4GAdLv95nXUGZ1nWo=",
+      "x86_64-darwin": "sha256-l1M9+ODVGdBfJyt9Ew01vKRE/n2CjimwvcBohOAq/ns=",
+      "x86_64-linux": "sha256-SXCT9jDqFwES6wA8VyGzILbHFlDuslQ+ByOFZgRapVs="
+    },
+    "web": {
+      "aarch64-darwin": "sha256-urzQGJADfBUgYfo0i1WqMMsz75jZPrs1hn9ZMsEK9u0=",
+      "aarch64-linux": "sha256-urzQGJADfBUgYfo0i1WqMMsz75jZPrs1hn9ZMsEK9u0=",
+      "x86_64-darwin": "sha256-urzQGJADfBUgYfo0i1WqMMsz75jZPrs1hn9ZMsEK9u0=",
+      "x86_64-linux": "sha256-urzQGJADfBUgYfo0i1WqMMsz75jZPrs1hn9ZMsEK9u0="
+    },
+    "windows": {
+      "x86_64-darwin": "sha256-vIFhEB7bMewDEu90rTVp/rrHtpijc5iKWCmnlKm52sA=",
+      "x86_64-linux": "sha256-vIFhEB7bMewDEu90rTVp/rrHtpijc5iKWCmnlKm52sA="
+    }
+  },
+  "pubspecLock": {
+    "packages": {
+      "_fe_analyzer_shared": {
+        "dependency": "direct main",
+        "description": {
+          "name": "_fe_analyzer_shared",
+          "sha256": "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "67.0.0"
+      },
+      "analyzer": {
+        "dependency": "direct main",
+        "description": {
+          "name": "analyzer",
+          "sha256": "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.4.1"
+      },
+      "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": "fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "8.9.1"
+      },
+      "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": "ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.2.0"
+      },
+      "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": "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.7.2"
+      },
+      "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": "fb7c8a64857d90bedf5c51954b83bee9304b607bcb8a03a89ec37afbf2d683a7",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.2.0"
+      },
+      "dds": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dds",
+          "sha256": "6228ad1e591ee9c54f7f0de3d679d328fb15a7f8d20984a02db2430c3e83816f",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.4.0"
+      },
+      "dds_service_extensions": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dds_service_extensions",
+          "sha256": "299ebf18d340693a7705a56aa2cc2d41df4081a6496b43b04163406496cea6d3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.7.0"
+      },
+      "devtools_shared": {
+        "dependency": "direct main",
+        "description": {
+          "name": "devtools_shared",
+          "sha256": "8d3452f1ca40d8bbe77db4851dd6f08ea12fc17624c037bfc355587cb8b321be",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "8.1.0"
+      },
+      "dtd": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dtd",
+          "sha256": "0d4a51ab223090d2d6b86477f414052db78cad1b2de020619f454a2a39369fec",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.0"
+      },
+      "dwds": {
+        "dependency": "direct main",
+        "description": {
+          "name": "dwds",
+          "sha256": "5e7e6d645447ccccd3931340d6e6676608aebc0d64a9a28f370e3b2f4e4eea8a",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "23.3.0"
+      },
+      "extension_discovery": {
+        "dependency": "direct main",
+        "description": {
+          "name": "extension_discovery",
+          "sha256": "20735622d0763865f9d94c3ecdce4441174530870760253e9d364fb4f3da8688",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.0.0"
+      },
+      "fake_async": {
+        "dependency": "direct main",
+        "description": {
+          "name": "fake_async",
+          "sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.3.1"
+      },
+      "ffi": {
+        "dependency": "direct main",
+        "description": {
+          "name": "ffi",
+          "sha256": "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.1.2"
+      },
+      "file": {
+        "dependency": "direct main",
+        "description": {
+          "name": "file",
+          "sha256": "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "7.0.0"
+      },
+      "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": "d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.19.0"
+      },
+      "io": {
+        "dependency": "direct main",
+        "description": {
+          "name": "io",
+          "sha256": "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.4"
+      },
+      "js": {
+        "dependency": "direct dev",
+        "description": {
+          "name": "js",
+          "sha256": "c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.7.1"
+      },
+      "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": "d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.12.16+1"
+      },
+      "meta": {
+        "dependency": "direct main",
+        "description": {
+          "name": "meta",
+          "sha256": "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.12.0"
+      },
+      "mime": {
+        "dependency": "direct main",
+        "description": {
+          "name": "mime",
+          "sha256": "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.5"
+      },
+      "multicast_dns": {
+        "dependency": "direct main",
+        "description": {
+          "name": "multicast_dns",
+          "sha256": "316cc47a958d4bd3c67bd238fe8b44fdfb6133bad89cb191c0c3bd3edb14e296",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.3.2+6"
+      },
+      "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": "32beacac1b465c63554eee65e5f1379bd0c7b98f5dcf8a9ac86f014ce450a832",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.6.1"
+      },
+      "native_assets_cli": {
+        "dependency": "direct main",
+        "description": {
+          "name": "native_assets_cli",
+          "sha256": "aa257d7c8d2e4bee8339a077d0ddef97f01b28fadb7a379074142782928ab1c3",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.5.3"
+      },
+      "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": "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.9.0"
+      },
+      "petitparser": {
+        "dependency": "direct main",
+        "description": {
+          "name": "petitparser",
+          "sha256": "c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.0.2"
+      },
+      "platform": {
+        "dependency": "direct main",
+        "description": {
+          "name": "platform",
+          "sha256": "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.1.4"
+      },
+      "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": "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.0.2"
+      },
+      "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": "fdce3a4ac3ae1c01083d05ded0bcdb7e02857ca2323823548e9e76d2f61638f0",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "4.1.5"
+      },
+      "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": "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.25.2"
+      },
+      "test_api": {
+        "dependency": "direct main",
+        "description": {
+          "name": "test_api",
+          "sha256": "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.7.0"
+      },
+      "test_core": {
+        "dependency": "direct main",
+        "description": {
+          "name": "test_core",
+          "sha256": "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.6.0"
+      },
+      "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": "57f594f2eff970a74e43aedc9bdec8eb8e3d3c860da8e9e6bcdf7594a07dba6b",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "5.8.8+1"
+      },
+      "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": "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "14.2.1"
+      },
+      "vm_service_interface": {
+        "dependency": "direct main",
+        "description": {
+          "name": "vm_service_interface",
+          "sha256": "28c7c2c2531d94f827cb9ab5f4eacd5864013b559a302b50566b1fab1d9fb1bb",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "1.0.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": {
+        "dependency": "direct main",
+        "description": {
+          "name": "web",
+          "sha256": "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "0.5.1"
+      },
+      "web_socket_channel": {
+        "dependency": "direct main",
+        "description": {
+          "name": "web_socket_channel",
+          "sha256": "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.4.4"
+      },
+      "webdriver": {
+        "dependency": "direct main",
+        "description": {
+          "name": "webdriver",
+          "sha256": "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "3.0.3"
+      },
+      "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": "b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "6.5.0"
+      },
+      "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": "c566f4f804215d84a7a2c377667f546c6033d5b34b4f9e60dfb09d17c4e97826",
+          "url": "https://pub.dev"
+        },
+        "source": "hosted",
+        "version": "2.2.0"
+      }
+    },
+    "sdks": {
+      "dart": ">=3.3.0 <4.0.0"
+    }
+  }
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update-shared.patch b/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update-shared.patch
new file mode 100644
index 000000000000..961b41f7327c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/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/versions/3_22/patches/gradle-flutter-tools-wrapper.patch b/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/patches/gradle-flutter-tools-wrapper.patch
new file mode 100644
index 000000000000..de6080efbba8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/versions/3_22/patches/gradle-flutter-tools-wrapper.patch
@@ -0,0 +1,44 @@
+This patch introduces an intermediate Gradle build step to alter the behavior
+of flutter_tools' Gradle project, specifically moving the creation of `build`
+and `.gradle` directories from within the Nix Store to somewhere in `$HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev`.
+
+Without this patch, flutter_tools' Gradle project tries to generate `build` and `.gradle`
+directories within the Nix Store. Resulting in read-only errors when trying to build a
+Flutter Android app at runtime.
+
+This patch takes advantage of the fact settings.gradle takes priority over settings.gradle.kts to build the intermediate Gradle project
+when a Flutter app runs `includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")`
+
+`rootProject.buildFileName = "/dev/null"` so that the intermediate project doesn't use `build.gradle.kts` that's in the same directory.
+
+The intermediate project makes a `settings.gradle` file in `$HOME/.cache/flutter/nix-flutter-tools-gradle/<short engine rev>/` and `includeBuild`s it.
+This Gradle project will build the actual `packages/flutter_tools/gradle` project by setting
+`rootProject.projectDir = new File("$settingsDir")` and `apply from: new File("$settingsDir/settings.gradle.kts")`.
+
+Now the `.gradle` will be built in `$HOME/.cache/flutter/nix-flutter-tools-gradle/<short engine rev>/`, but `build` doesn't.
+To move `build` to `$HOME/.cache/flutter/nix-flutter-tools-gradle/<short engine rev>/` as well, we need to set `buildDirectory`.
+diff --git a/packages/flutter_tools/gradle/settings.gradle b/packages/flutter_tools/gradle/settings.gradle
+new file mode 100644
+index 0000000000..b2485c94b4
+--- /dev/null
++++ b/packages/flutter_tools/gradle/settings.gradle
+@@ -0,0 +1,19 @@
++rootProject.buildFileName = "/dev/null"
++
++def engineShortRev = (new File("$settingsDir/../../../bin/internal/engine.version")).text.take(10)
++def dir = new File("$System.env.HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev")
++dir.mkdirs()
++def file = new File(dir, "settings.gradle")
++
++file.text = """
++rootProject.projectDir = new File("$settingsDir")
++apply from: new File("$settingsDir/settings.gradle.kts")
++
++gradle.allprojects { project ->
++  project.beforeEvaluate {
++    project.layout.buildDirectory = new File("$dir/build")
++  }
++}
++"""
++
++includeBuild(dir)
diff --git a/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix b/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix
index 4a7aedf97d38..f5b8b2e2059d 100644
--- a/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix
+++ b/nixpkgs/pkgs/development/compilers/flutter/wrapper.nix
@@ -20,7 +20,7 @@
 , makeWrapper
 , runCommandLocal
 , writeShellScript
-, wrapGAppsHook
+, wrapGAppsHook3
 , git
 , which
 , pkg-config
@@ -123,7 +123,7 @@ in
 
   nativeBuildInputs = [ makeWrapper ]
     ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ]
-    ++ lib.optionals supportsLinuxDesktopTarget [ glib wrapGAppsHook ];
+    ++ lib.optionals supportsLinuxDesktopTarget [ glib wrapGAppsHook3 ];
 
   passthru = flutter.passthru // {
     inherit (flutter) version;
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix b/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix
index 77179d739768..75f59163bdac 100644
--- a/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix
@@ -38,31 +38,6 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
   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:
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix b/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix
index 175d1fe2450b..987821830504 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix
@@ -1,393 +1,4 @@
-{ 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "140e42b96346322d1a39eb17602bcdc76e292028ad4a69286b230bab188a9197";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.10.1.nix b/nixpkgs/pkgs/development/compilers/ghc/9.10.1.nix
new file mode 100644
index 000000000000..7955661f50e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.10.1.nix
@@ -0,0 +1,4 @@
+import ./common-hadrian.nix rec {
+  version = "9.10.1";
+  sha256 = "bf386a302d4ee054791ffd51748900f15d71760fd199157922d120cc1f89e2f7";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix
index 6c86e05ebbd4..366b25441bbb 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix
@@ -1,389 +1,4 @@
-{ 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "0606797d1b38e2d88ee2243f38ec6b9a1aa93e9b578e95f0de9a9c0a4144021c";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix
index 6ff58f087f8a..4490cd6f5b31 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix
@@ -1,389 +1,4 @@
-{ 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "7a54cf0398ad488b4ed219e15d1d1e64c0b6876c43a0564550dd11f0540d7305";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix
index f605bfda1981..ad840dd0a32f 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix
@@ -1,389 +1,4 @@
-{ 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "a253567a17b734a4c0dd0ffa296d33c2a5b5a54a77df988806a2a1e1ca7e88b8";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix
index 72cfdd242f42..dc2bd89b3174 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix
@@ -1,389 +1,4 @@
-{ 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "sha256-XxPReGv0/RL0tF+qN6vttbs/NtXlj32lMH6L/oilZ6E=";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix
index 298af6596e71..cffbfef1524e 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix
@@ -1,396 +1,6 @@
 # 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "6256cf9caf6d6dc7b611dcfbb247df2d528e85aa39d22a698e870e5a590e8601";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix
index 310787e477b2..0d37ba97fdb6 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.6.nix
@@ -1,392 +1,6 @@
 # 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "1b705cf52692f9d4d6707cdf8e761590f5f56ec8ea6a65e36610db392d3d24b9";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix
index e87f8fc3a907..2be8c9f092fb 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.7.nix
@@ -1,388 +1,6 @@
 # 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) ''
-    BUILD_PROF_LIBS = NO
-  '' +
-  # -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 {
+import ./common-make-native-bignum.nix {
   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;
-})
+  sha256 = "06775a52b4d13ac09edc6dabc299fd11e59d8886bbcae450af367baee2684c8f";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.8.fixme.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.8.fixme.nix
new file mode 100644
index 000000000000..a98d7404b7ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.8.fixme.nix
@@ -0,0 +1,6 @@
+# DO NOT port this expression to hadrian. It is not possible to build a GHC
+# cross compiler with 9.4.* and hadrian.
+import ./common-make-native-bignum.nix {
+  version = "9.4.8";
+  sha256 = "0bf407eb67fe3e3c24b0f4c8dea8cb63e07f63ca0f76cf2058565143507ab85e";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix b/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix
index 522bcb10222b..5db97cc0d976 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix
@@ -29,6 +29,7 @@
 , xattr
 , autoSignDarwinBinariesHook
 , bash
+, srcOnly
 
 , libiconv ? null, ncurses
 , glibcLocales ? null
@@ -145,25 +146,60 @@
         return $ verbosity >= Verbose
   ''
 
-, ghcSrc ? (if rev != null then fetchgit else fetchurl) ({
-    inherit url sha256;
-  } // lib.optionalAttrs (rev != null) {
-    inherit rev;
-  } // lib.optionalAttrs (postFetch != null) {
-    inherit postFetch;
-  })
+, ghcSrc ?
+    srcOnly {
+      name = "ghc-${version}"; # -source appended by srcOnly
+      src =
+        (if rev != null then fetchgit else fetchurl) ({
+          inherit url sha256;
+        } // lib.optionalAttrs (rev != null) {
+          inherit rev;
+        } // lib.optionalAttrs (postFetch != null) {
+          inherit postFetch;
+        });
+
+      patches =
+        let
+          # Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
+          enableHyperlinkedSource =
+            lib.versionAtLeast version "9.8" ||
+            !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
+        in
+        [
+          # 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
+        ]
+        # Prevents passing --hyperlinked-source to haddock. This is a custom
+        # workaround as we wait for this to be configurable via userSettings or
+        # similar. https://gitlab.haskell.org/ghc/ghc/-/issues/23625
+        ++ lib.optionals (!enableHyperlinkedSource) [
+          # TODO(@sternenseemann): Doesn't apply for GHC >= 9.8
+          ../../tools/haskell/hadrian/disable-hyperlinked-source.patch
+        ]
+        # Incorrect bounds on Cabal in hadrian
+        # https://gitlab.haskell.org/ghc/ghc/-/issues/24100
+        ++ lib.optionals (lib.elem version [ "9.8.1" "9.8.2" ]) [
+          ../../tools/haskell/hadrian/hadrian-9.8.1-allow-Cabal-3.10.patch
+        ];
+    }
 
   # 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;
+    inherit 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.
@@ -269,21 +305,6 @@ stdenv.mkDerivation ({
 
   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 .
   '';
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix b/nixpkgs/pkgs/development/compilers/ghc/common-make-native-bignum.nix
index 5ac2b60b1cd7..b2f6b1606265 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.4.8.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/common-make-native-bignum.nix
@@ -1,5 +1,8 @@
-# DO NOT port this expression to hadrian. It is not possible to build a GHC
-# cross compiler with 9.4.* and hadrian.
+{ version
+, sha256
+, url ? "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"
+}:
+
 { lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages
 
 # build-tools
@@ -17,7 +20,7 @@
 , useLLVM ? !(stdenv.targetPlatform.isx86
               || stdenv.targetPlatform.isPower
               || stdenv.targetPlatform.isSparc
-              || stdenv.targetPlatform.isAarch64)
+              || (lib.versionAtLeast version "9.2" && 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.
@@ -173,19 +176,70 @@ assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
 assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
 
 stdenv.mkDerivation (rec {
-  version = "9.4.8";
   pname = "${targetPrefix}ghc${variantSuffix}";
+  inherit version;
 
   src = fetchurl {
-    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
-    sha256 = "0bf407eb67fe3e3c24b0f4c8dea8cb63e07f63ca0f76cf2058565143507ab85e";
+    inherit url sha256;
   };
 
   enableParallelBuilding = true;
 
   outputs = [ "out" "doc" ];
 
-  patches = [
+  # FIXME(@sternenseemann): This can be simplified a lot (causing a rebuild)
+  patches = (if lib.versions.majorMinor version == "9.0" then [
+    # 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=";
+    })
+  ] else if lib.versions.majorMinor version == "9.2" then [
+    # 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=";
+    })
+  ] else if lib.versions.majorMinor version == "9.4" then [
     # 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 {
@@ -194,17 +248,36 @@ stdenv.mkDerivation (rec {
       extraPrefix = "libraries/Cabal/";
       sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
     })
+  ]
+  ++ lib.optionals (version == "9.4.5") [
+    # 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) [
+  ]
+  ++ lib.optionals (version == "9.4.6") [
+    # 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
+  ] else [ ])
+  ++ 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
+    (if lib.versionAtLeast version "9.2"
+     then ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
+     else ./Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch)
   ];
 
   postPatch = "patchShebangs .";
@@ -239,10 +312,15 @@ stdenv.mkDerivation (rec {
   '' + 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 (version == "9.0.2" || lib.versionAtLeast version "9.4") ''
 
+  '' + ''
     echo -n "${buildMK}" > mk/build.mk
+  '' + lib.optionalString (lib.versionAtLeast version "9.4") ''
 
+  ''
+  + lib.optionalString (lib.versionOlder version "9.2" || lib.versionAtLeast version "9.4") ''
     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"
@@ -250,6 +328,7 @@ stdenv.mkDerivation (rec {
     export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
   '' + lib.optionalString stdenv.isDarwin ''
     export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast version "9.2") ''
 
     # 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
@@ -274,7 +353,7 @@ stdenv.mkDerivation (rec {
   ''
   # 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.
-  + ''
+  + lib.optionalString (lib.versions.majorMinor version == "9.4") ''
     substituteInPlace configure --replace \
       'MinBootGhcVersion="9.0"' \
       'MinBootGhcVersion="8.10"'
@@ -321,6 +400,10 @@ stdenv.mkDerivation (rec {
     autoSignDarwinBinariesHook
   ] ++ lib.optionals enableDocs [
     sphinx
+  ] ++ lib.optionals (stdenv.isDarwin && lib.versions.majorMinor version == "9.0") [
+    # TODO(@sternenseemann): backport addition of XATTR env var like
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447
+    xattr
   ];
 
   # For building runtime libs
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/default.nix b/nixpkgs/pkgs/development/compilers/ghdl/default.nix
index 84109f7436fa..96f1db0e6492 100644
--- a/nixpkgs/pkgs/development/compilers/ghdl/default.nix
+++ b/nixpkgs/pkgs/development/compilers/ghdl/default.nix
@@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: {
     description = "VHDL 2008/93/87 simulator";
     license = lib.licenses.gpl2Plus;
     mainProgram = "ghdl";
-    maintainers = with lib.maintainers; [ eclairevoyant lucus16 thoughtpolice ];
+    maintainers = with lib.maintainers; [ lucus16 thoughtpolice ];
     platforms = lib.platforms.linux;
   };
 })
diff --git a/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix b/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix
index 54ba6cffff13..f689517196a1 100644
--- a/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix
+++ b/nixpkgs/pkgs/development/compilers/gnu-cim/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  CFLAGS = lib.optionalString stdenv.cc.isClang "-Wno-return-type";
+  env.CFLAGS = lib.optionalString stdenv.cc.isClang "-Wno-return-type -Wno-error=implicit-function-declaration -Wno-error=implicit-int";
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/compilers/go/1.21.nix b/nixpkgs/pkgs/development/compilers/go/1.21.nix
index b9694f7d4baa..4d9982f2b265 100644
--- a/nixpkgs/pkgs/development/compilers/go/1.21.nix
+++ b/nixpkgs/pkgs/development/compilers/go/1.21.nix
@@ -47,11 +47,11 @@ let
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "go";
-  version = "1.21.9";
+  version = "1.21.10";
 
   src = fetchurl {
     url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
-    hash = "sha256-WPDFztRaABK84v96nfA+Eoq8yIGOur5QJ7uSuv4g5CE=";
+    hash = "sha256-kA4K/okAwe5lqKjE8MWjygLc+FwdHLE6ZSviLCE5k5Q=";
   };
 
   strictDeps = true;
diff --git a/nixpkgs/pkgs/development/compilers/idris2/idris2.nix b/nixpkgs/pkgs/development/compilers/idris2/idris2.nix
index 421fb93cf03b..452e9da97c35 100644
--- a/nixpkgs/pkgs/development/compilers/idris2/idris2.nix
+++ b/nixpkgs/pkgs/development/compilers/idris2/idris2.nix
@@ -17,10 +17,12 @@
 # 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
+  platformChez =
+    if (stdenv.system == "x86_64-linux") || (lib.versionAtLeast chez.version "10.0.0")
+      then
+        chez
+      else
+        chez-racket;
 in stdenv.mkDerivation rec {
   pname = "idris2";
   version = "0.7.0";
diff --git a/nixpkgs/pkgs/development/compilers/inform6/default.nix b/nixpkgs/pkgs/development/compilers/inform6/default.nix
index 49af7e6676e3..ccbf8ef5da34 100644
--- a/nixpkgs/pkgs/development/compilers/inform6/default.nix
+++ b/nixpkgs/pkgs/development/compilers/inform6/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "inform6";
-  version = "6.41-r11";
+  version = "6.42-r1";
 
   src = fetchurl  {
     url = "https://ifarchive.org/if-archive/infocom/compilers/inform6/source/inform-${version}.tar.gz";
-    sha256 = "sha256-kfFfjJL03f3af1h/JdvkItuDFu8aGlM3BRa2eBB+ddY=";
+    sha256 = "sha256-JZaMhA4M+fDgk52tWCJokG9J/a1+FQHL7+VxAT4PgQo=";
   };
 
   buildInputs = [ perl ];
diff --git a/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix
index d2075d79543c..02bc670f26cd 100644
--- a/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix
+++ b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix
@@ -20,8 +20,8 @@ let
   vc_intrinsics_src = fetchFromGitHub {
     owner = "intel";
     repo = "vc-intrinsics";
-    rev = "v0.16.0";
-    hash = "sha256-d197m80vSICdv4VKnyqdy3flzbKLKmB8jroY2difA7o=";
+    rev = "v0.18.0";
+    hash = "sha256-F2GR3TDUUiygEhdQN+PsMT/CIYBATMQX5wkvwrziS2E=";
   };
 
   inherit (llvmPackages_14) lld llvm;
@@ -31,7 +31,7 @@ in
 
 stdenv.mkDerivation rec {
   pname = "intel-graphics-compiler";
-  version = "1.0.16238.4";
+  version = "1.0.16695.4";
 
   src = fetchFromGitHub {
     owner = "intel";
diff --git a/nixpkgs/pkgs/development/compilers/julia/default.nix b/nixpkgs/pkgs/development/compilers/julia/default.nix
index b1437804287c..130b65158cec 100644
--- a/nixpkgs/pkgs/development/compilers/julia/default.nix
+++ b/nixpkgs/pkgs/development/compilers/julia/default.nix
@@ -30,12 +30,12 @@ in
     { });
   julia_110-bin = wrapJulia (callPackage
     (import ./generic-bin.nix {
-      version = "1.10.2";
+      version = "1.10.3";
       sha256 = {
-        x86_64-linux = "51bccc9bb245197f24e6b2394e6aa69c0dc1e41b4e300b796e17da34ef64db1e";
-        aarch64-linux = "f319ff2812bece0918cb9ea6e0df54cc9412fc5ef8c0589b6a4fea485c07535d";
-        x86_64-darwin = "52679b9285b9aa8354afade8cc5a6c98d30af31ee72e4e879d17cef5dd4d4213";
-        aarch64-darwin = "c7392237725b54d2d145bf56ce362e502596ea4338523a91bf20ce02379cea80";
+        x86_64-linux = "81b910c922fff0e27ae1f256f2cc803db81f3960215281eddd2d484721928c70";
+        aarch64-linux = "2d52a61826872b3170c65f99a954bd9d21a31211cb50948056d924f811a0024f";
+        x86_64-darwin = "af61600db0abdc56fffb1b47cd18c30213b8925796546b53b657e164126082b4";
+        aarch64-darwin = "9ea32daa1bef34c8e48d6c76187f48fd2bf1054cc921fb8c374b737b51c9ffdd";
       };
     })
     { });
@@ -50,8 +50,8 @@ in
     { });
   julia_110 = wrapJulia (callPackage
     (import ./generic.nix {
-      version = "1.10.2";
-      hash = "sha256-YkaHIK+8QQ608mLtJDOpITJieHLJ9pC3BNwEXMsVVAE=";
+      version = "1.10.3";
+      hash = "sha256-2JKyEjvmTaz50F5My61/F5f2v4fDl6dIBLARyHUPbI8=";
       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/kotlin/default.nix b/nixpkgs/pkgs/development/compilers/kotlin/default.nix
index e2fc481d3bc3..68b648846ea4 100644
--- a/nixpkgs/pkgs/development/compilers/kotlin/default.nix
+++ b/nixpkgs/pkgs/development/compilers/kotlin/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "kotlin";
-  version = "1.9.23";
+  version = "1.9.24";
 
   src = fetchurl {
     url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
-    sha256 = "125yb2yzah7laf38m78pysvcd5a16b129a06rckrpylsmcx7s4wk";
+    sha256 = "sha256-63to4BAp+me8jQYO5UwSAY8sYN3EOM8h2xRRcimqaTs=";
   };
 
   propagatedBuildInputs = [ jre ] ;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/default.nix
index 45955dc5e1b3..82a9d63ab330 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/12/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/12/default.nix
@@ -58,7 +58,52 @@ let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      src = fetch "llvm" "1pzx9zrmd7r3481sbhwvkms68fwhffpp4mmz45dgrkjpyl2q96kx";
+      polly_src = fetch "polly" "1yfm9ixda4a2sx7ak5vswijx4ydk5lv1c1xh39xmd2kh299y4m12";
+      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.
+        ../common/llvm/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
+        ./llvm/fix-llvm-issue-49955.patch
+
+        ./llvm/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;
+        })
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix
deleted file mode 100644
index 4745345a3f71..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix
+++ /dev/null
@@ -1,357 +0,0 @@
-{ 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.
-    ../../common/llvm/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 ${../../common/llvm/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
-  '' + ''
-    # gcc-13 fix
-    sed -i '/#include <string>/i#include <cstdint>' \
-      include/llvm/DebugInfo/Symbolize/DIPrinter.h
-  '';
-
-  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";
-
-  hardeningDisable = [ "trivialautovarinit" ];
-
-  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/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix
index 018fb0c63850..9348e19e6de3 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/13/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix
@@ -84,7 +84,47 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      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.
+        ../common/llvm/llvm-config-link-static.patch
+
+        ./llvm/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;
+        })
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix
deleted file mode 100644
index 58e742b9b41e..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix
+++ /dev/null
@@ -1,315 +0,0 @@
-{ 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.
-    ../../common/llvm/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 ${../../common/llvm/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";
-
-  hardeningDisable = [ "trivialautovarinit" ];
-
-  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/14/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/default.nix
index 588dc8fffefd..f7368050d614 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/14/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/14/default.nix
@@ -1,6 +1,6 @@
 { lowPrio, newScope, pkgs, lib, stdenv, cmake
 , preLibcCrossHeaders
-, libxml2, python3, fetchFromGitHub, substitute, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
+, libxml2, python3, fetchFromGitHub, substitute, substituteAll, fetchpatch, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
 , targetLlvmLibraries # libraries, but from the next stage, for cross
 , targetLlvm
@@ -80,7 +80,26 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      patches = [
+        ./llvm/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=";
+        })
+        # fix RuntimeDyld usage on aarch64-linux (e.g. python312Packages.numba tests)
+        (fetchpatch {
+          url = "https://github.com/llvm/llvm-project/commit/2e1b838a889f9793d4bcd5dbfe10db9796b77143.patch";
+          relative = "llvm";
+          hash = "sha256-Ot45P/iwaR4hkcM3xtLwfryQNgHI6pv6ADjv98tgdZA=";
+        })
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix
deleted file mode 100644
index 124d07e4bb2b..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix
+++ /dev/null
@@ -1,323 +0,0 @@
-{ 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=";
-    })
-    # fix RuntimeDyld usage on aarch64-linux (e.g. python312Packages.numba tests)
-    (fetchpatch {
-      url = "https://github.com/llvm/llvm-project/commit/2e1b838a889f9793d4bcd5dbfe10db9796b77143.patch";
-      relative = "llvm";
-      hash = "sha256-Ot45P/iwaR4hkcM3xtLwfryQNgHI6pv6ADjv98tgdZA=";
-    })
-  ] ++ 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 ${../../common/llvm/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";
-
-  hardeningDisable = [ "trivialautovarinit" ];
-
-  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/15/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/default.nix
index bfcbe2b86e24..5003ef32d1ee 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/15/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/15/default.nix
@@ -86,7 +86,64 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      patches = [
+        ./llvm/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/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)..
+        ./llvm/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=";
+        })
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+
+        # Just like the `llvm-lit-cfg` patch, but for `polly`.
+        ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix
deleted file mode 100644
index d7ebcbcf8b76..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix
+++ /dev/null
@@ -1,442 +0,0 @@
-{ 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 ${../../common/llvm/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";
-
-  hardeningDisable = [ "trivialautovarinit" ];
-
-  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/16/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
index 5dd07d77cf8c..79d5f8589044 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
@@ -87,7 +87,57 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      patches = [
+        ./llvm/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/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)..
+        ./llvm/lit-shell-script-runner-set-dyld-library-path.patch
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+
+        # Just like the `llvm-lit-cfg` patch, but for `polly`.
+        ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix
deleted file mode 100644
index 0a8d877ba83c..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix
+++ /dev/null
@@ -1,435 +0,0 @@
-{ 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
-
-    # Fails in the presence of anti-virus software or other intrusion-detection software that
-    # modifies the atime when run. See #284056.
-    rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
-
-    # timing-based tests are trouble
-    rm utils/lit/tests/googletest-timeout.py
-  '' + optionalString stdenv.hostPlatform.isMusl ''
-    patch -p1 -i ${../../common/llvm/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";
-
-  hardeningDisable = [ "trivialautovarinit" ];
-
-  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/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/default.nix
index 9f4be2261b0c..b4039540badf 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/17/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/17/default.nix
@@ -82,7 +82,57 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      patches = [
+        ./llvm/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/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)..
+        ./llvm/lit-shell-script-runner-set-dyld-library-path.patch
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+
+        # Just like the `llvm-lit-cfg` patch, but for `polly`.
+        ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix
deleted file mode 100644
index a045bea9f472..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/17/llvm/default.nix
+++ /dev/null
@@ -1,431 +0,0 @@
-{ lib, stdenv, llvm_meta
-, pkgsBuildBuild
-, monorepoSrc
-, runCommand
-, 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
-  ] ++ 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
-
-    # Fails in the presence of anti-virus software or other intrusion-detection software that
-    # modifies the atime when run. See #284056.
-    rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
-  '' + optionalString stdenv.hostPlatform.isMusl ''
-    patch -p1 -i ${../../common/llvm/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/18/default.nix b/nixpkgs/pkgs/development/compilers/llvm/18/default.nix
index 3c78cd44fdf5..3c0e551791e5 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/18/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/18/default.nix
@@ -25,7 +25,7 @@
   #   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 = "18.1.4"; sha256 = "sha256-LyQEb4ZJXm2hkPOM9XITIploMT2VKIQWxUFio7SXrc0="; }
+, officialRelease ? { version = "18.1.5"; sha256 = "0n44chqn96xsa00ryhwk8g0vv3zx908xjakkgjsa14sjr9mcsq8q"; }
   # i.e.:
   # {
   #   version = /* i.e. "15.0.0" */;
@@ -82,7 +82,57 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      patches = [
+        ./llvm/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/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)..
+        ./llvm/lit-shell-script-runner-set-dyld-library-path.patch
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+
+        # Just like the `llvm-lit-cfg` patch, but for `polly`.
+        ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/common/clang/default.nix
index 2373795b49fd..58af0340a139 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/common/clang/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/clang/default.nix
@@ -71,7 +71,11 @@ let
       "-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
     ]);
 
-    postPatch = (if lib.versionOlder release_version "13" then ''
+    postPatch = ''
+      # Make sure clang passes the correct location of libLTO to ld64
+      substituteInPlace lib/Driver/ToolChains/Darwin.cpp \
+        --replace-fail 'StringRef P = llvm::sys::path::parent_path(D.Dir);' 'StringRef P = "${lib.getLib libllvm}";'
+    '' + (if lib.versionOlder release_version "13" then ''
       sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
              -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
              lib/Driver/ToolChains/*.cpp
diff --git a/nixpkgs/pkgs/development/compilers/llvm/18/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/common/llvm/default.nix
index a9732763e9d7..705dfed8a249 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/18/llvm/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/llvm/default.nix
@@ -1,6 +1,12 @@
-{ lib, stdenv, llvm_meta
+{ lib
+, stdenv
+, llvm_meta
 , pkgsBuildBuild
-, monorepoSrc
+, pollyPatches ? []
+, patches ? []
+, polly_src ? null
+, src ? null
+, monorepoSrc ? null
 , runCommand
 , cmake
 , darwin
@@ -8,6 +14,8 @@
 , python3
 , python3Packages
 , libffi
+  # TODO: Can this memory corruption bug still occur?
+  # <https://github.com/llvm/llvm-project/issues/61350>
 , enableGoldPlugin ? libbfd.hasPluginAPI
 , libbfd
 , libpfm
@@ -20,7 +28,9 @@
 , sysctl
 , buildLlvmTools
 , debugVersion ? false
-, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
+, doCheck ? !stdenv.isAarch32 && (if lib.versionOlder release_version "15" then stdenv.isLinux else true)
+  && (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
+  && !(stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isBigEndian)
   && (stdenv.hostPlatform == stdenv.buildPlatform)
 , enableManpages ? false
 , enableSharedLibraries ? !stdenv.hostPlatform.isStatic
@@ -28,7 +38,7 @@
   # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
   # broken for the armv7l builder
   && !stdenv.hostPlatform.isAarch
-, enablePolly ? true
+, enablePolly ? lib.versionAtLeast release_version "14"
 }:
 
 let
@@ -64,27 +74,36 @@ let
     in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
   else python3;
 
+  pname = "llvm";
+
+  src' = if monorepoSrc != null then
+    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"
+    '') else src;
+
+  patches' = patches ++ lib.optionals enablePolly pollyPatches;
 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"
-  '');
+  inherit pname version;
 
-  sourceRoot = "${src.name}/${pname}";
+  src = src';
+  patches = patches';
+
+  sourceRoot = if lib.versionOlder release_version "13" then null
+    else "${src.name}/${pname}";
 
   outputs = [ "out" "lib" "dev" "python" ];
 
-  nativeBuildInputs = [ cmake ninja python ]
+  nativeBuildInputs = [ cmake ]
+    ++ (lib.optional (lib.versionAtLeast release_version "15") ninja)
+    ++ [ python ]
     ++ optionals enableManpages [
     # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
     # splicing does *not* work with the latter. (TODO: fix)
@@ -98,66 +117,14 @@ stdenv.mkDerivation (rec {
   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
-  ];
+  propagatedBuildInputs = (lib.optional (lib.versionAtLeast release_version "14" || stdenv.buildPlatform == stdenv.hostPlatform) ncurses)
+    ++ [ zlib ];
 
-  postPatch = optionalString stdenv.isDarwin ''
+  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})' ""
+  '' + (optionalString (lib.versionAtLeast release_version "15") (''
 
     # 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
@@ -165,8 +132,13 @@ stdenv.mkDerivation (rec {
 
     # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
     # and thus fails under the sandbox:
+  '' + (if lib.versionAtLeast release_version "16" then ''
     substituteInPlace unittests/TargetParser/Host.cpp \
       --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
+  '' else ''
+    substituteInPlace unittests/Support/Host.cpp \
+      --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
+  '') + optionalString (lib.versionAtLeast release_version "16") ''
 
     # This test tries to call the intrinsics `@llvm.roundeven.f32` and
     # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
@@ -179,11 +151,32 @@ stdenv.mkDerivation (rec {
     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.hostPlatform.isx86 && lib.versionAtLeast release_version "18") ''
 
     # fails when run in sandbox
     substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \
       --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure"
-  '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
+  ''))) + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "15") (optionalString (lib.versionOlder release_version "16") ''
+    # 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)" ""
+
+  '' + ((optionalString (lib.versionAtLeast release_version "18") ''
+
+    # fails when run in sandbox
+    substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \
+      --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure"
+  '') + ''
     # 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
@@ -212,13 +205,18 @@ stdenv.mkDerivation (rec {
     # not clear to me when/where/for what this even gets used in LLVM.
     #
     # TODO(@rrbutani): fix/follow-up
+  '' + (if lib.versionAtLeast release_version "16" then ''
     substituteInPlace unittests/TargetParser/Host.cpp \
       --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
+  '' else ''
+    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" ""
@@ -226,13 +224,23 @@ stdenv.mkDerivation (rec {
     substituteInPlace unittests/IR/CMakeLists.txt \
       --replace "PassBuilderCallbacksTest.cpp" ""
     rm unittests/IR/PassBuilderCallbacksTest.cpp
+  '' + lib.optionalString (lib.versionAtLeast release_version "13") ''
     rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+  '' + lib.optionalString (lib.versionOlder release_version "13") ''
+    # TODO: Fix failing tests:
+    rm test/DebugInfo/X86/vla-multi.ll
+  '' + lib.optionalString (lib.versionAtLeast release_version "16") (''
 
     # Fails in the presence of anti-virus software or other intrusion-detection software that
     # modifies the atime when run. See #284056.
     rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
+  '' + lib.optionalString (lib.versionOlder release_version "17") ''
+
+  '') + lib.optionalString (lib.versionAtLeast release_version "15" && lib.versionOlder release_version "17") ''
+    # timing-based tests are trouble
+    rm utils/lit/tests/googletest-timeout.py
   '' + optionalString stdenv.hostPlatform.isMusl ''
-    patch -p1 -i ${../../common/llvm/TLI-musl.patch}
+    patch -p1 -i ${./TLI-musl.patch}
     substituteInPlace unittests/Support/CMakeLists.txt \
       --replace "add_subdirectory(DynamicLibrary)" ""
     rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
@@ -245,61 +253,59 @@ stdenv.mkDerivation (rec {
     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
+    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
-  '';
+  '' + (lib.optionalString (lib.versionOlder release_version "13") ''
+    # 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
+    # gcc-13 fix
+    sed -i '/#include <string>/i#include <cstdint>' \
+      include/llvm/DebugInfo/Symbolize/DIPrinter.h
+  '');
 
-  preConfigure = ''
+  preConfigure = if lib.versionAtLeast release_version "15" then ''
     # 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}
+  '' else ''
+    # Workaround for configure flags that need to have spaces
+    cmakeFlagsArray+=(
+      -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar'
+    )
   '';
 
   # E.g. mesa.drivers use the build-id as a cache key (see #93946):
   LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
 
-  hardeningDisable = [ "trivialautovarinit" ];
-
   cmakeBuildType = if debugVersion then "Debug" else "Release";
 
   cmakeFlags = with stdenv; let
@@ -310,8 +316,11 @@ stdenv.mkDerivation (rec {
     #
     # Some flags don't need to be repassed because LLVM already does so (like
     # CMAKE_BUILD_TYPE), others are irrelevant to the result.
-    flagsForLlvmConfig = [
+    flagsForLlvmConfig = (if lib.versionOlder release_version "15" then [
+      "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+    ] else [
       "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
+    ]) ++ [
       "-DLLVM_ENABLE_RTTI=ON"
     ] ++ optionals enableSharedLibraries [
       "-DLLVM_LINK_LLVM_DYLIB=ON"
@@ -327,7 +336,6 @@ stdenv.mkDerivation (rec {
     # 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
@@ -338,7 +346,7 @@ stdenv.mkDerivation (rec {
     "-DSPHINX_OUTPUT_MAN=ON"
     "-DSPHINX_OUTPUT_HTML=OFF"
     "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
-  ] ++ optionals enableGoldPlugin [
+  ] ++ optionals (enableGoldPlugin) [
     "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
   ] ++ optionals isDarwin [
     "-DLLVM_ENABLE_LIBCXX=ON"
@@ -382,8 +390,15 @@ stdenv.mkDerivation (rec {
     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"
+  '' + (if lib.versionOlder release_version "15" then ''
+    substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+      --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+  '' else ''
     substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
       --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
+  '')
+  + optionalString (stdenv.isDarwin && enableSharedLibraries && lib.versionOlder release_version "18") ''
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
   ''
   + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
@@ -418,14 +433,11 @@ stdenv.mkDerivation (rec {
       under the "Apache 2.0 License with LLVM exceptions".
     '';
   };
-} // lib.optionalAttrs enableManpages {
+} // lib.optionalAttrs enableManpages ({
   pname = "llvm-manpages";
 
   propagatedBuildInputs = [];
 
-  ninjaFlags = [ "docs-llvm-man" ];
-  installTargets = [ "install-docs-llvm-man" ];
-
   postPatch = null;
   postInstall = null;
 
@@ -436,4 +448,79 @@ stdenv.mkDerivation (rec {
   meta = llvm_meta // {
     description = "man pages for LLVM ${version}";
   };
+} // (if lib.versionOlder release_version "15" then {
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  installPhase = ''
+    make -C docs install
+  '';
+} else {
+  ninjaFlags = [ "docs-llvm-man" ];
+  installTargets = [ "install-docs-llvm-man" ];
+
+  postPatch = null;
+  postInstall = null;
+})) // lib.optionalAttrs (lib.versionOlder release_version "13") {
+  inherit polly_src;
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${release_version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+} // lib.optionalAttrs (lib.versionAtLeast release_version "13") {
+  nativeCheckInputs = [ which ] ++ lib.optional (stdenv.isDarwin && lib.versionAtLeast release_version "15") sysctl;
+} // lib.optionalAttrs (lib.versionOlder release_version "15") {
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+} // lib.optionalAttrs (lib.versionAtLeast release_version "15") {
+  # 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}
+  '';
+} // lib.optionalAttrs (lib.versionOlder release_version "17" || lib.versionAtLeast release_version "18") {
+  hardeningDisable = [ "trivialautovarinit" ];
 })
diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix b/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix
index 044e5c673108..891e66b1d57c 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix
@@ -48,7 +48,8 @@ stdenv.mkDerivation rec {
     "-DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF"
     "-DMLIR_TOOLS_INSTALL_DIR=${placeholder "out"}/bin/"
     "-DLLVM_ENABLE_IDE=OFF"
-    "-DMLIR_INSTALL_PACKAGE_DIR=${placeholder "out"}/lib/cmake/mlir"
+    "-DMLIR_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/mlir"
+    "-DMLIR_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/mlir"
     "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
     "-DLLVM_ENABLE_FFI=ON"
     "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/default.nix
index 1a34130679db..c995845fb6b3 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/git/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/default.nix
@@ -87,7 +87,57 @@ in let
 
   in {
 
-    libllvm = callPackage ./llvm {
+    libllvm = callPackage ../common/llvm {
+      patches = [
+        ./llvm/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/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)..
+        ./llvm/lit-shell-script-runner-set-dyld-library-path.patch
+      ];
+      pollyPatches = [
+        ./llvm/gnu-install-dirs-polly.patch
+
+        # Just like the `llvm-lit-cfg` patch, but for `polly`.
+        ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
+      ];
       inherit llvm_meta;
     };
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix
deleted file mode 100644
index 8987103e22fe..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix
+++ /dev/null
@@ -1,435 +0,0 @@
-{ lib, stdenv, llvm_meta
-, pkgsBuildBuild
-, monorepoSrc
-, runCommand
-, 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
-  ] ++ 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)" ""
-
-    # fails when run in sandbox
-    substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \
-      --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure"
-  '' + 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"
-  '' + ''
-    # 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
-
-    # Fails in the presence of anti-virus software or other intrusion-detection software that
-    # modifies the atime when run. See #284056.
-    rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
-  '' + optionalString stdenv.hostPlatform.isMusl ''
-    patch -p1 -i ${../../common/llvm/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";
-
-  hardeningDisable = [ "trivialautovarinit" ];
-
-  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-${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/nasm/default.nix b/nixpkgs/pkgs/development/compilers/nasm/default.nix
index 64abd3a1e322..2ba33b2c6833 100644
--- a/nixpkgs/pkgs/development/compilers/nasm/default.nix
+++ b/nixpkgs/pkgs/development/compilers/nasm/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "nasm";
-  version = "2.16.02";
+  version = "2.16.03";
 
   src = fetchurl {
     url = "https://www.nasm.us/pub/nasm/releasebuilds/${version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-HhuULqiPIu2uiWWeFb4m+gJ+rgdH9RQTVA9S1OrEeQ0=";
+    hash = "sha256-FBKhx2C70F2wJrbA0WV6/9ZjHNCmPN229zzG1KphYUg=";
   };
 
   nativeBuildInputs = [ perl ];
diff --git a/nixpkgs/pkgs/development/compilers/nim/default.nix b/nixpkgs/pkgs/development/compilers/nim/default.nix
index 1b5f21ddef79..089043dc6dee 100644
--- a/nixpkgs/pkgs/development/compilers/nim/default.nix
+++ b/nixpkgs/pkgs/development/compilers/nim/default.nix
@@ -76,12 +76,12 @@ in {
 
   nim-unwrapped-2 = stdenv.mkDerivation (finalAttrs: {
     pname = "nim-unwrapped";
-    version = "2.0.2";
+    version = "2.0.4";
     strictDeps = true;
 
     src = fetchurl {
       url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
-      hash = "sha256-ZPUdO/Vt6dDueeLKapzpRFSvmmOhQaaWnOjFmmC4LM8=";
+      hash = "sha256-cVJr0HQ53I43j6Gm60B+2hKY8fPU30R23KDjyjy+Pwk=";
     };
 
     buildInputs = [ boehmgc openssl pcre readline sqlite ]
@@ -161,10 +161,10 @@ in {
   });
 
   nim-unwrapped-1 = nim-unwrapped-2.overrideAttrs (finalAttrs: prevAttrs: {
-    version = "1.6.18";
+    version = "1.6.20";
     src = fetchurl {
       url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
-      hash = "sha256-UCQaxyIpG6ljdT8EWqo1h7c8GqKK4pxXPBWluKYCoss=";
+      hash = "sha256-/+0EdQTR/K9hDw3Xzz4Ce+kaKSsMnFEWFQTC87mE/7k=";
     };
 
     patches = [
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/5.2.nix b/nixpkgs/pkgs/development/compilers/ocaml/5.2.nix
index 8df6f1d5d48e..5a0c2783207a 100644
--- a/nixpkgs/pkgs/development/compilers/ocaml/5.2.nix
+++ b/nixpkgs/pkgs/development/compilers/ocaml/5.2.nix
@@ -1,9 +1,6 @@
 import ./generic.nix {
   major_version = "5";
   minor_version = "2";
-  patch_version = "0-beta2";
-  src = fetchTarball {
-    url = "https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0~beta2.tar.xz";
-    sha256 = "sha256:1cyw0w79j7kyr3x0ivsqm1si704b29ic33yj621dq7f125jabk00";
-  };
+  patch_version = "0";
+  sha256 = "sha256-L0v0efUUefm/jH8WlKbqcza793T0rW2mtZ0a1JOd2Kc=";
 }
diff --git a/nixpkgs/pkgs/development/compilers/odin/default.nix b/nixpkgs/pkgs/development/compilers/odin/default.nix
index 9168ad485e27..44a215496e7a 100644
--- a/nixpkgs/pkgs/development/compilers/odin/default.nix
+++ b/nixpkgs/pkgs/development/compilers/odin/default.nix
@@ -12,13 +12,13 @@ let
   inherit (llvmPackages) stdenv;
 in stdenv.mkDerivation rec {
   pname = "odin";
-  version = "dev-2024-04a";
+  version = "dev-2024-05";
 
   src = fetchFromGitHub {
     owner = "odin-lang";
     repo = "Odin";
     rev = version;
-    hash = "sha256-jFENpWUosNNTctYiHdKqDg7ENAoEtigz87pTfYJDj5Q=";
+    hash = "sha256-JGTC+Gi5mkHQHvd5CmEzrhi1muzWf1rUN4f5FT5K5vc=";
   };
 
   nativeBuildInputs = [
@@ -30,13 +30,11 @@ in stdenv.mkDerivation rec {
   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/'
+    substituteInPlace src/linker.cpp \
+        --replace-fail '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' ${MacOSX-SDK}
+    '' + ''
+    substituteInPlace build_odin.sh \
+        --replace-fail '-framework System' '-lSystem'
     patchShebangs build_odin.sh
   '';
 
diff --git a/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix b/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix
index 37503496c917..de4aad453c38 100644
--- a/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix
+++ b/nixpkgs/pkgs/development/compilers/open-watcom/v2.nix
@@ -13,7 +13,7 @@
 stdenv.mkDerivation rec {
   pname = "${passthru.prettyName}-unwrapped";
   # nixpkgs-update: no auto update
-  version = "unstable-2023-11-24";
+  version = "0-unstable-2023-11-24";
 
   src = fetchFromGitHub {
     owner = "open-watcom";
@@ -89,6 +89,8 @@ stdenv.mkDerivation rec {
     prettyName = "open-watcom-v2";
     updateScript = unstableGitUpdater {
       url = "https://github.com/open-watcom/open-watcom-v2.git";
+      # no numerical releases, monthly "YYYY-MM-DD-Build" tags and daily "Current-build", "Last-CI-build" & "Coverity-scan" retagging
+      hardcodeZeroVersion = true;
     };
   };
 
diff --git a/nixpkgs/pkgs/development/compilers/orc/default.nix b/nixpkgs/pkgs/development/compilers/orc/default.nix
index 07bee8ecd278..9841fd94f2d0 100644
--- a/nixpkgs/pkgs/development/compilers/orc/default.nix
+++ b/nixpkgs/pkgs/development/compilers/orc/default.nix
@@ -60,6 +60,6 @@ in stdenv.mkDerivation rec {
     # under the 3-clause BSD license. The rest is 2-clause BSD license.
     license = with licenses; [ bsd3 bsd2 ];
     platforms = platforms.unix;
-    maintainers = [ ];
+    maintainers = with maintainers; [ lilyinstarlight ];
   };
 }
diff --git a/nixpkgs/pkgs/development/compilers/osl/default.nix b/nixpkgs/pkgs/development/compilers/osl/default.nix
index c9c849f0a68a..d05d01bc6c07 100644
--- a/nixpkgs/pkgs/development/compilers/osl/default.nix
+++ b/nixpkgs/pkgs/development/compilers/osl/default.nix
@@ -24,13 +24,13 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "openshadinglanguage";
-  version = "1.13.8.0";
+  version = "1.13.9.0";
 
   src = fetchFromGitHub {
     owner = "AcademySoftwareFoundation";
     repo = "OpenShadingLanguage";
     rev = "v${version}";
-    hash = "sha256-AixN3cj6r/PUGvAhVN4wGfpuLiBt5LglgJp68hFfJMo=";
+    hash = "sha256-3HSmiIvGk+C5rnHzCXnYlFVeOWYa5M0WZRLTSb8Zsh8=";
   };
 
   cmakeFlags = [
diff --git a/nixpkgs/pkgs/development/compilers/rasm/default.nix b/nixpkgs/pkgs/development/compilers/rasm/default.nix
index 3246e014145f..c131e4b79980 100644
--- a/nixpkgs/pkgs/development/compilers/rasm/default.nix
+++ b/nixpkgs/pkgs/development/compilers/rasm/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     mainProgram = "rasm";
     # use -n option to display all licenses
     license = licenses.mit; # expat version
-    maintainers = [ ];
+    maintainers = with lib.maintainers; [ sigmanificient ];
     platforms = platforms.all;
   };
 }
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_77.nix b/nixpkgs/pkgs/development/compilers/rust/1_77.nix
index 24c1b7bcb534..ab501aba8ffb 100644
--- a/nixpkgs/pkgs/development/compilers/rust/1_77.nix
+++ b/nixpkgs/pkgs/development/compilers/rust/1_77.nix
@@ -19,8 +19,8 @@
 } @ args:
 
 import ./default.nix {
-  rustcVersion = "1.77.1";
-  rustcSha256 = "7hBuTFafUtujtbKCsQWCD4a9j2s9CcBrjc6C+xuzpKE=";
+  rustcVersion = "1.77.2";
+  rustcSha256 = "xhRX749ZZjj928dxZ3iy9rmf8SUTo7DxOZTDvFIWOMM=";
 
   llvmSharedForBuild = pkgsBuildBuild.llvmPackages_17.libllvm.override { enableSharedLibraries = true; };
   llvmSharedForHost = pkgsBuildHost.llvmPackages_17.libllvm.override { enableSharedLibraries = true; };
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/default.nix b/nixpkgs/pkgs/development/compilers/sbcl/default.nix
index 411695219971..75ead6184aa8 100644
--- a/nixpkgs/pkgs/development/compilers/sbcl/default.nix
+++ b/nixpkgs/pkgs/development/compilers/sbcl/default.nix
@@ -113,6 +113,15 @@ stdenv.mkDerivation (self: rec {
     # have it block a release.
     "futex-wait.test.sh"
   ];
+  patches = [
+    # Support the NIX_SBCL_DYNAMIC_SPACE_SIZE envvar. Upstream SBCL didn’t want
+    # to include this (see
+    # "https://sourceforge.net/p/sbcl/mailman/sbcl-devel/thread/2cf20df7-01d0-44f2-8551-0df01fe55f1a%400brg.net/"),
+    # but for Nix envvars are sufficiently useful that it’s worth maintaining
+    # this functionality downstream.
+    ./dynamic-space-size-envvar-feature.patch
+    ./dynamic-space-size-envvar-tests.patch
+  ];
   postPatch = lib.optionalString (self.disabledTestFiles != [ ]) ''
     (cd tests ; rm -f ${lib.concatStringsSep " " self.disabledTestFiles})
   ''
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-feature.patch b/nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-feature.patch
new file mode 100644
index 000000000000..f1596958a6f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-feature.patch
@@ -0,0 +1,63 @@
+From ac15f9f7c75c1fb5767514e64b609e2a75e6fe9d Mon Sep 17 00:00:00 2001
+From: Hraban Luyat <hraban@0brg.net>
+Date: Sat, 13 Apr 2024 14:04:57 -0400
+Subject: [PATCH] feat: NIX_SBCL_DYNAMIC_SPACE_SIZE envvar
+
+Read SBCL dynamic space size configuration from env if available.
+---
+ src/runtime/runtime.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c
+index 274687c8f..970caa8f4 100644
+--- a/src/runtime/runtime.c
++++ b/src/runtime/runtime.c
+@@ -422,6 +422,29 @@ static int is_memsize_arg(char *argv[], int argi, int argc, int *merge_core_page
+     return 0;
+ }
+ 
++/**
++ * Read memory options from the environment, if present.
++ *
++ * Memory settings are read in the following priority:
++ *
++ * 1. command line arguments
++ * 2. environment variable
++ * 3. embedded options in core
++ * 4. default
++ */
++static void
++read_memsize_from_env(void) {
++  const char *val = getenv("NIX_SBCL_DYNAMIC_SPACE_SIZE");
++  // The distinction is blurry between setting an envvar to the empty string and
++  // unsetting it entirely. Depending on the calling environment it can even be
++  // tricky to properly unset an envvar in the first place. An empty envvar is
++  // practically always intended to just mean “unset”, so let’s interpret it
++  // that way.
++  if (val != NULL && (strcmp(val, "") != 0)) {
++    dynamic_space_size = parse_size_arg(val, "NIX_SBCL_DYNAMIC_SPACE_SIZE");
++  }
++}
++
+ static struct cmdline_options
+ parse_argv(struct memsize_options memsize_options,
+            int argc, char *argv[], char *envp[], char *core)
+@@ -462,6 +485,7 @@ parse_argv(struct memsize_options memsize_options,
+         dynamic_space_size = memsize_options.dynamic_space_size;
+         thread_control_stack_size = memsize_options.thread_control_stack_size;
+         dynamic_values_bytes = memsize_options.thread_tls_bytes;
++        read_memsize_from_env();
+         int stop_parsing = 0; // have we seen '--'
+         int output_index = 1;
+ 
+@@ -488,6 +512,7 @@ parse_argv(struct memsize_options memsize_options,
+         }
+         sbcl_argv[output_index] = 0;
+     } else {
++        read_memsize_from_env();
+         bool end_runtime_options = 0;
+         /* Parse our any of the command-line options that we handle from C,
+          * stopping at the first one that we don't, and leave the rest */
+-- 
+2.44.0
+
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-tests.patch b/nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-tests.patch
new file mode 100644
index 000000000000..1a507cc90381
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/dynamic-space-size-envvar-tests.patch
@@ -0,0 +1,104 @@
+From 9d4a886a8a76ea8be51bcf754cefacdf30986f46 Mon Sep 17 00:00:00 2001
+From: Hraban Luyat <hraban@0brg.net>
+Date: Sat, 13 Apr 2024 15:39:58 -0400
+Subject: [PATCH 2/2] test: dynamic space size envvar and precedence
+
+---
+ tests/memory-args.test.sh | 22 ++++++++++++++++++++++
+ tests/save7.test.sh       | 37 ++++++++++++++++++++++++++++++++-----
+ 2 files changed, 54 insertions(+), 5 deletions(-)
+ create mode 100755 tests/memory-args.test.sh
+
+diff --git a/tests/memory-args.test.sh b/tests/memory-args.test.sh
+new file mode 100755
+index 000000000..72ef0cc79
+--- /dev/null
++++ b/tests/memory-args.test.sh
+@@ -0,0 +1,22 @@
++#!/bin/sh
++
++. ./subr.sh
++
++use_test_subdirectory
++
++set -e
++
++# Allow slight shrinkage if heap relocation has to adjust for alignment
++NIX_SBCL_DYNAMIC_SPACE_SIZE=234mb run_sbcl_with_args --script <<EOF
++(assert (<= 0 (- (* 234 1024 1024) (sb-ext:dynamic-space-size)) 65536))
++EOF
++
++NIX_SBCL_DYNAMIC_SPACE_SIZE=555mb run_sbcl_with_args --dynamic-space-size 234mb --script <<EOF
++(assert (<= 0 (- (* 234 1024 1024) (sb-ext:dynamic-space-size)) 65536))
++EOF
++
++run_sbcl_with_args --dynamic-space-size 234mb --script <<EOF
++(assert (<= 0 (- (* 234 1024 1024) (sb-ext:dynamic-space-size)) 65536))
++EOF
++
++exit $EXIT_TEST_WIN
+diff --git a/tests/save7.test.sh b/tests/save7.test.sh
+index f9225543b..3c35e7b31 100644
+--- a/tests/save7.test.sh
++++ b/tests/save7.test.sh
+@@ -59,9 +59,9 @@ run_sbcl_with_core "$tmpcore" --noinform --control-stack-size 640KB \
+   (assert (eql (extern-alien "dynamic_values_bytes" (unsigned 32))
+                (* 5000 sb-vm:n-word-bytes)))
+   ; allow slight shrinkage if heap relocation has to adjust for alignment
+-  (defun dynamic-space-size-good-p ()
+-    (<= 0 (- (* 260 1048576) (dynamic-space-size)) 65536))
+-  (assert (dynamic-space-size-good-p))
++  (defun dynamic-space-size-good-p (expected-mb)
++    (<= 0 (- (* expected-mb 1024 1024) (dynamic-space-size)) 65536))
++  (assert (dynamic-space-size-good-p 260))
+   (save-lisp-and-die "${tmpcore}2" :executable t :save-runtime-options t)
+ EOF
+ chmod u+x "${tmpcore}2"
+@@ -70,15 +70,42 @@ echo "::: INFO: prepared test core"
+   (when (and (eql (extern-alien "thread_control_stack_size" unsigned) (* 640 1024))
+              (eql (extern-alien "dynamic_values_bytes" (unsigned 32))
+                   (* 5000 sb-vm:n-word-bytes))
+-             (dynamic-space-size-good-p))
++             (dynamic-space-size-good-p 260))
+     (exit :code 42))
+ EOF
+ status=$?
+-rm "$tmpcore" "${tmpcore}2"
+ if [ $status -ne 42 ]; then
+     echo "re-saved executable used wrong memory size options"
+     exit 1
+ fi
+ echo "::: Success"
+ 
++echo "::: Running :DYNAMIC-SPACE-SIZE-ENV"
++NIX_SBCL_DYNAMIC_SPACE_SIZE=432MB ./"${tmpcore}2" --no-userinit --no-sysinit --noprint <<EOF
++  (when (dynamic-space-size-good-p 432)
++    (exit :code 42))
++EOF
++status=$?
++if [ $status -ne 42 ]; then
++    echo "re-saved executable should have prioritized memory specification from env"
++    exit 1
++fi
++echo "::: Success"
++
++echo "::: Running :DYNAMIC-SPACE-SIZE-PRECEDENCE"
++NIX_SBCL_DYNAMIC_SPACE_SIZE=432MB ./"${tmpcore}2" --dynamic-space-size 333MB \
++  --no-userinit --no-sysinit --noprint <<EOF
++  (when (dynamic-space-size-good-p 333))
++    (exit :code 42))
++EOF
++status=$?
++rm "$tmpcore" "${tmpcore}2"
++if [ $status -ne 42 ]; then
++    echo "re-saved executable should have prioritized memory specification from arg"
++    exit 1
++fi
++echo "::: Success"
++
++
++
+ exit $EXIT_TEST_WIN
+-- 
+2.44.0
+
diff --git a/nixpkgs/pkgs/development/compilers/terra/default.nix b/nixpkgs/pkgs/development/compilers/terra/default.nix
index 3f6934f04212..ae81adf5f5b0 100644
--- a/nixpkgs/pkgs/development/compilers/terra/default.nix
+++ b/nixpkgs/pkgs/development/compilers/terra/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, llvmPackages, ncurses, cmake, libxml2
+{ lib, stdenv, fetchFromGitHub, llvmPackages_16, ncurses, cmake, libxml2
 , symlinkJoin, breakpointHook, cudaPackages, enableCUDA ? false
 , libffi, libobjc, libpfm, Cocoa, Foundation
 }:
@@ -14,6 +14,7 @@ let
     sha256 = "1g87pl014b5v6z2nnhiwn3wf405skawszfr5wdzyfbx00j3kgxd0";
   };
 
+  llvmPackages = llvmPackages_16;
   llvmMerged = symlinkJoin {
     name = "llvmClangMerged";
     paths = with llvmPackages; [
diff --git a/nixpkgs/pkgs/development/compilers/tvm/default.nix b/nixpkgs/pkgs/development/compilers/tvm/default.nix
index 3613ed55e084..1f714f1b2dea 100644
--- a/nixpkgs/pkgs/development/compilers/tvm/default.nix
+++ b/nixpkgs/pkgs/development/compilers/tvm/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "tvm";
-  version = "0.15.0";
+  version = "0.16.0";
 
   src = fetchFromGitHub {
     owner = "apache";
     repo = "incubator-tvm";
     rev = "v${version}";
     fetchSubmodules = true;
-    sha256 = "sha256-VbJptTUi12pJh1wz4I+xL6HVo/rSiUHCkvgEMPe1F6o=";
+    sha256 = "sha256-g8Z5MRM3KIgCjGxtU9JLEsFUjFxPKmc6OwY17C59cxg=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/development/compilers/unison/default.nix b/nixpkgs/pkgs/development/compilers/unison/default.nix
index 7afdd45c459d..2ba6a65c7afc 100644
--- a/nixpkgs/pkgs/development/compilers/unison/default.nix
+++ b/nixpkgs/pkgs/development/compilers/unison/default.nix
@@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
     homepage = "https://unisonweb.org/";
     license = with licenses; [ mit bsd3 ];
     mainProgram = "ucm";
-    maintainers = [ maintainers.virusdave ];
+    maintainers = with maintainers; [ ceedubs sellout virusdave ];
     platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-darwin" ];
     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
   };
diff --git a/nixpkgs/pkgs/development/compilers/vala/default.nix b/nixpkgs/pkgs/development/compilers/vala/default.nix
index 86caf243a559..a7041bfc6a29 100644
--- a/nixpkgs/pkgs/development/compilers/vala/default.nix
+++ b/nixpkgs/pkgs/development/compilers/vala/default.nix
@@ -1,10 +1,10 @@
 { stdenv, lib, fetchurl, fetchpatch, pkg-config, flex, bison, libxslt, autoconf, autoreconfHook
-, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll, vala
+, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll, vala, gobject-introspection
 }:
 
 let
   generic = lib.makeOverridable ({
-    version, sha256,
+    version, hash,
     extraNativeBuildInputs ? [],
     extraBuildInputs ? [],
     withGraphviz ? false
@@ -30,7 +30,7 @@ let
 
     src = fetchurl {
       url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-      inherit sha256;
+      inherit hash;
     };
 
     postPatch = ''
@@ -49,7 +49,7 @@ let
     outputs = [ "out" "devdoc" ];
 
     nativeBuildInputs = [
-      pkg-config flex bison libxslt
+      pkg-config flex bison libxslt gobject-introspection
     ] ++ lib.optional (stdenv.isDarwin) expat
       ++ lib.optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure
       ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ vala ]
@@ -86,8 +86,8 @@ let
 
 in rec {
   vala_0_56 = generic {
-    version = "0.56.14";
-    sha256 = "k4LCaMqb3AKq7cgVKpgYvzk1JzBB9inFbeQQ42Cj9Vc=";
+    version = "0.56.17";
+    hash = "sha256-JhAMTk7wBJxhknXxQNl89WWIPQDHVDyCvM5aQmk07Wo=";
   };
 
   vala = vala_0_56;
diff --git a/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix b/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix
index d60f7950dcad..44773cf9a553 100644
--- a/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix
+++ b/nixpkgs/pkgs/development/compilers/zig/shell-completions.nix
@@ -7,7 +7,7 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "zig-shell-completions";
-  version = "unstable-2023-11-18";
+  version = "0-unstable-2023-11-18";
 
   src = fetchFromGitHub {
     owner = "ziglang";
diff --git a/nixpkgs/pkgs/development/compilers/zulu/22.nix b/nixpkgs/pkgs/development/compilers/zulu/22.nix
index 96b0e6805a5a..93891d6511c7 100644
--- a/nixpkgs/pkgs/development/compilers/zulu/22.nix
+++ b/nixpkgs/pkgs/development/compilers/zulu/22.nix
@@ -11,7 +11,7 @@ callPackage ./common.nix ({
       zuluVersion = "22.28.91";
       jdkVersion = "22.0.0";
       hash =
-        if enableJavaFX then "sha256-HvMiODsz+puu1xtxG2RRXH/PWCk91PGNZ7UcOd9orqQ="
+        if enableJavaFX then "sha256-+qUrZ+GlspSP3RLTAbgEtFm0B0fzX/VD1WUl6mk2c/0="
         else "sha256-HvMiODsz+puu1xtxG2RRXH/PWCk91PGNZ7UcOd9orqQ=";
     };
 
@@ -27,7 +27,7 @@ callPackage ./common.nix ({
       zuluVersion = "22.28.91";
       jdkVersion = "22.0.0";
       hash =
-        if enableJavaFX then "sha256-Y6PSNQjHRXukwux2sVbvpTIqT+Cg+KeG1C0iSEwyKZw="
+        if enableJavaFX then "sha256-QkFwbc2YFEWb5rddhH4a+zmtsrXxUBSuS8yg9qUb728="
         else "sha256-Y6PSNQjHRXukwux2sVbvpTIqT+Cg+KeG1C0iSEwyKZw=";
     };
 
@@ -35,7 +35,7 @@ callPackage ./common.nix ({
       zuluVersion = "22.28.91";
       jdkVersion = "22.0.0";
       hash =
-        if enableJavaFX then "sha256-o0VkWB4+PzBmNNWy+FZlyjTgukBTe6owfydb3YNfEE0="
+        if enableJavaFX then "sha256-256UP6MtUReQYqCKVt0ThN9BVDyKLAMXQTdpcDB9t24="
         else "sha256-o0VkWB4+PzBmNNWy+FZlyjTgukBTe6owfydb3YNfEE0=";
     };
   };
diff --git a/nixpkgs/pkgs/development/compilers/zz/Cargo.lock b/nixpkgs/pkgs/development/compilers/zz/Cargo.lock
deleted file mode 100644
index 8b72d6a3e404..000000000000
--- a/nixpkgs/pkgs/development/compilers/zz/Cargo.lock
+++ /dev/null
@@ -1,961 +0,0 @@
-# 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
deleted file mode 100644
index bd26c78e626a..000000000000
--- a/nixpkgs/pkgs/development/compilers/zz/default.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ 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";
-    mainProgram = "zz";
-    homepage = "https://github.com/zetzit/zz";
-    license = licenses.mit;
-    maintainers = [ ];
-  };
-}