Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
37452733
Commit
37452733
authored
2 years ago
by
andreas.abel
Committed by
Mergify
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bump cabal-bootstrap-gen to GHC 9.2.4 ecosystem.
Also polish README a bit.
parent
c1f490a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bootstrap/README.md
+8
-8
8 additions, 8 deletions
bootstrap/README.md
bootstrap/cabal-bootstrap-gen.cabal
+10
-5
10 additions, 5 deletions
bootstrap/cabal-bootstrap-gen.cabal
bootstrap/src/Main.hs
+9
-1
9 additions, 1 deletion
bootstrap/src/Main.hs
with
27 additions
and
14 deletions
bootstrap/README.md
+
8
−
8
View file @
37452733
...
...
@@ -5,29 +5,29 @@ on a new platform. If you already have a functional (if dated) cabal-install
please rather run
`cabal v2-install`
.
The typical usage is porting to a new linux architecture,
then the
`linux-
ghcvec
.json`
file is available in
`bootstrap/`
folder:
then the
`linux-
$GHCVER
.json`
file is available in
`bootstrap/`
folder:
On a (linux) system you are bootstrapping, run
./bootstrap/bootstrap.py -d ./bootstrap/linux-
ghcver
.json -w /path/to-ghc
./bootstrap/bootstrap.py -d ./bootstrap/linux-
$GHCVER
.json -w /path/to-ghc
from the top directory of the source checkout.
To generate the
`
platform-ghcver
`
files for other platforms, do:
To generate the
`
$PLATFORM-$GHCVER
`
files for other platforms, do:
1.
On a system with functional cabal-install, install the same GHC version
as you will use to bootstrap on the host system.
2.
Build a dependency description file (
`
platform-ghcver
.json`
, e.g.
`linux-8.8.
3
.json`
) by running:
2.
Build a dependency description file (
`
$PLATFORM-$GHCVER
.json`
, e.g.
`linux-8.8.
4
.json`
) by running:
```sh
cabal v2-build --with-compiler=/path/to/ghc --dry-run cabal-install:exe:cabal
cp dist-newstyle/cache/plan.json bootstrap/
platform-ghcver
.plan.json
cp dist-newstyle/cache/plan.json bootstrap/
$PLATFORM-$GHCVER
.plan.json
cd bootstrap
cabal v2-run -v0 cabal-bootstrap-gen --
platform-ghcver.plan.json | tee platform-ghcver
.json
cabal v2-run -v0 cabal-bootstrap-gen --
$PLATFORM-$GHCVER.plan.json | tee $PLATFORM-$GHCVER
.json
```
3.
You may need to tweak
`bootstrap/
platform-ghcver
.json`
file manually,
3.
You may need to tweak
`bootstrap/
$PLATFORM-$GHCVER
.json`
file manually,
for example toggle flags.
There are rules in top-level
`Makefile`
for generation of these files.
There are rules in
the
top-level
`Makefile`
for generation of these files.
This diff is collapsed.
Click to expand it.
bootstrap/cabal-bootstrap-gen.cabal
+
10
−
5
View file @
37452733
...
...
@@ -8,13 +8,18 @@ executable cabal-bootstrap-gen
ghc-options: -Wall
main-is: Main.hs
build-depends:
, aeson ^>=1.5.2.0
, base ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0
, bytestring ^>=0.10.8.2 || ^>= 0.11.0.0
, Cabal ^>=3.2.0.0
, cabal-install-parsers ^>=0.3.0.1
, aeson ^>=1.5.2.0 || ^>=2.0.3.0
-- Not yet picked up: (*) || ^>=2.1.0.0
, base ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0
, bytestring ^>=0.10.8.2 || ^>=0.11.0.0
, Cabal ^>=3.2.0.0 || ^>=3.4.1.0 || ^>=3.6.3.0
-- Not yet picked up: (*) || ^>=3.8.1.0
, cabal-install-parsers ^>=0.3.0.1 || ^>=0.4.5
, cabal-plan ^>=0.7.0.0
, containers ^>=0.6.0.1
, text ^>=1.2.3.0
-- Not yet picked up: (*) || ^>=2.0.1
, topograph ^>=1.0.0.1
, transformers ^>=0.5.6.2
-- Not yet picked up: (*) || ^>=0.6.0.4
-- (*) as of 2022-08-19
This diff is collapsed.
Click to expand it.
bootstrap/src/Main.hs
+
9
−
1
View file @
37452733
{-# LANGUAGE CPP #-}
module
Main
(
main
)
where
import
Control.Monad
(
when
)
...
...
@@ -34,9 +36,15 @@ main = do
main1
::
FilePath
->
IO
()
main1
planPath
=
do
meta
<-
I
.
cachedHackageMetadata
meta
<-
getMap
<$>
I
.
cachedHackageMetadata
plan
<-
P
.
decodePlanJson
planPath
main2
meta
plan
where
#
if
MIN_VERSION_cabal_install_parsers
(
0
,
4
,
0
)
getMap
=
snd
#
else
getMap
=
id
#
endif
main2
::
Map
.
Map
C
.
PackageName
I
.
PackageInfo
->
P
.
PlanJson
->
IO
()
main2
meta
plan
=
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment