Change:
The values of these options can easily be determined using and , so it should be very easy to just remove this part of the configuration from and generate it on demand in .

Discussion:
# Related scripts are update-hackage.sh, for updating the snapshot of the # Hackage database used by hackage2nix, and update-cabal2nix-unstable.sh, # for updating the version of hackage2nix used to perform this task. <ins> # # Note that this script doesn't gcroot anything, so it may be broken by an # unfortunately timed nix-store --gc. </ins> set -euo pipefail

# See: https://github.com/NixOS/nixpkgs/pull/122023 export LC_ALL=C.UTF-8 <ins> config_dir=pkgs/development/haskell-modules/configuration-hackage2nix echo "Obtaining Hackage data" </ins> extraction_derivation='with import ./. {}; runCommandLocal "unpacked-cabal-hashes" { } "tar xf ${all-cabal-hashes} --strip-components=1 --one-top-level=$out"' unpacked_hackage="$(nix-build -E "$extraction_derivation" --no-out-link)" <del> config_dir=pkgs/development/haskell-modules/configuration-hackage2nix </del> <ins> echo "Generating compiler configuration" compiler_config="$(nix-build -A haskellPackages.cabal2nix-unstable.compilerConfig --no-out-link)" </ins> echo "Starting hackage2nix to regenerate pkgs/development/haskell-modules/hackage-packages.nix ..." "$HACKAGE2NIX"  --hackage "$unpacked_hackage"  --preferred-versions <(for n in "$unpacked_hackage"/*/preferred-versions; do cat "$n"; echo; done)  --nixpkgs "$PWD"  <ins> --config "$compiler_config"  </ins> --config "$config_dir/main.yaml"  --config "$config_dir/stackage.yaml"  --config "$config_dir/broken.yaml" 

database-id-class = doJailbreak super.database-id-class; cabal2nix-unstable = overrideCabal { <del> passthru.updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-unstable.sh; </del> <ins> passthru = { updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-unstable.sh; # This is used by regenerate-hackage-packages.nix to supply the configuration # values we can easily generate automatically without checking them in. compilerConfig = pkgs.runCommand "hackage2nix-${self.ghc.haskellCompilerName}-config.yaml" { nativeBuildInputs = [ self.ghc ]; } '' cat > "$out" << EOF # generated by haskellPackages.cabal2nix-unstable.compilerConfig compiler: ${self.ghc.haskellCompilerName} core-packages: # Hack: The following package is a core package of GHCJS. If we don't declare # it, then hackage2nix will generate a Hackage database where all dependants # of this library are marked as "broken". - ghcjs-base-0 EOF ghc-pkg list  | tail -n '+2'  | sed -e 's/[()]//g' -e 's/s+/  - /'  >> "$out" ''; }; </ins> } super.cabal2nix-unstable; # Too strict version bounds on base

<del> # pkgs/development/haskell-modules/configuration-hackage2nix.yaml compiler: ghc-9.2.4 core-packages: - Cabal-3.6.3.0 - array-0.5.4.0 - base-4.16.3.0 - binary-0.8.9.0 - bytestring-0.11.3.1 - containers-0.6.5.1 - deepseq-1.4.6.1 - directory-1.3.6.2 - exceptions-0.10.4 - filepath-1.4.2.2 - ghc-9.2.4 - ghc-bignum-1.2 - ghc-boot-9.2.4 - ghc-boot-th-9.2.4 - ghc-compact-0.1.0.0 - ghc-heap-9.2.4 - ghc-prim-0.8.0 - ghci-9.2.4 - haskeline-0.8.2 - hpc-0.6.1.0 - integer-gmp-1.1 - libiserv-9.2.4 - mtl-2.2.2 - parsec-3.1.15.0 - pretty-1.1.3.6 - process-1.6.13.2 - rts-1.0.2 - stm-2.5.0.2 - template-haskell-2.18.0.0 - terminfo-0.4.1.5 - text-1.2.5.0 - time-1.11.1.1 - transformers-0.5.6.2 - unix-2.7.2.2 - xhtml-3000.2.2.1 # Hack: The following package is a core package of GHCJS. If we don't declare # it, then hackage2nix will generate a Hackage database where all dependants # of this library are marked as "broken". - ghcjs-base-0 </del> <ins> # pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml </ins> # This is a list of packages with versions from the latest Stackage LTS release. #