summaryrefslogtreecommitdiff
path: root/hadrian/bootstrap/generate_bootstrap_plans
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-08-05 16:53:52 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2021-08-05 16:58:28 +0100
commite8e19d66ba460676f7902fd4a97b2848b30d8d80 (patch)
tree1a530df536cf254a91c475604023a5e9acef0943 /hadrian/bootstrap/generate_bootstrap_plans
parentce7eeda5e30ce3cc037bbfc8dac26a91bbc5bc7d (diff)
downloadhaskell-wip/hadrian-bootstrap.tar.gz
hadrian: Add bootstrap scripts for building without cabal-installwip/hadrian-bootstrap
These scripts are originally from the cabal-install repo with a few small tweaks. This utility allows you to build hadrian without cabal-install, which can be useful for packagers. If you are a developer then build hadrian using cabal-install. If you want to bootstrap with ghc-8.10.5 then run the ./bootstrap script with the `plan-bootstrap-8.10.5.json` file. bootstrap.py -d plan-bootstrap-8.10.5.json -w /path/to-ghc The result of the bootstrap script will be a hadrian binary in `_build/bin/hadrian`. There is a script (using nix) which can be used to generate the bootstrap plans for the range of supported GHC versions using nix. generate_bootstrap_plans Otherwise you can run the commands in ./generate_bootstrap_plans directly. Fixes #17103
Diffstat (limited to 'hadrian/bootstrap/generate_bootstrap_plans')
-rwxr-xr-xhadrian/bootstrap/generate_bootstrap_plans18
1 files changed, 18 insertions, 0 deletions
diff --git a/hadrian/bootstrap/generate_bootstrap_plans b/hadrian/bootstrap/generate_bootstrap_plans
new file mode 100755
index 0000000000..167559aa53
--- /dev/null
+++ b/hadrian/bootstrap/generate_bootstrap_plans
@@ -0,0 +1,18 @@
+ghcs_nix="https://gitlab.haskell.org/bgamari/ghcs-nix/-/archive/master/ghcs-nix-master.tar.gz"
+
+run() {
+ local ver="$1"
+ local drv="ghc-$ver"
+ echo "$ver"
+ nix build -f "$ghcs_nix" $drv
+ (cd ../; rm -r dist-newstyle; cabal configure hadrian -w bootstrap/result/bin/ghc)
+ cp ../dist-newstyle/cache/plan.json "plan-$ver.json"
+ cabal run -v0 hadrian-bootstrap-gen -- "plan-$ver.json" | tee "plan-bootstrap-$ver.json"
+}
+
+run "8_10_1"
+# run "8_10_2" Broken
+run "8_10_3"
+run "8_10_4"
+run "8_10_5"
+run "9_0_1"