Bump project version from 3.11 to 3.13
[cabal.git] / bootstrap / generate_bootstrap_plans
blobff5af4e85fb1d0d86aa2a697a79fbde1bd9e474a
1 nix build nixpkgs#jq.bin -o jq
2 PATH+=:$PWD/jq-bin/bin
4 ghcs_nix="https://gitlab.haskell.org/bgamari/ghcs-nix/-/archive/master/ghcs-nix-master.tar.gz"
6 nix build -f "$ghcs_nix" ghc-8_10_7 -o boot_ghc
8 run() {
9   local ver="$1"
10   local drv="ghc-$ver"
11   echo "$ver"
12   nix build -f "$ghcs_nix" $drv
13   (cd ../; rm -r dist-bootstrap; cabal --distdir=dist-bootstrap build --project-file=cabal.project.release --dry-run cabal-install:exe:cabal -w bootstrap/result/bin/ghc)
14   jq --sort-keys < ../dist-bootstrap/cache/plan.json > "plan-$ver.json"
15   cabal run --with-ghc-pkg $PWD/boot_ghc/bin/ghc-pkg -w $PWD/boot_ghc/bin/ghc -v0 cabal-bootstrap-gen -- "plan-$ver.json" | jq --sort-keys | tee "linux-$(echo $ver | tr "_" ".").json"
18 run "8_10_7"
19 run "9_0_2"
20 run "9_2_8"
21 run "9_4_8"
22 run "9_6_4"
23 run "9_8_2"