|
3 | 3 | * [All packages](https://input-output-hk.github.io/cardano-haskell-packages/all-packages/).
|
4 | 4 | * [All package versions](https://input-output-hk.github.io/cardano-haskell-packages/all-package-versions/).
|
5 | 5 |
|
6 |
| -IMPORTANT: If you're here because you need to publish a new version of your package, you |
7 |
| -probably want to read the section on [adding a package from GitHub](#-from-github). |
| 6 | +*Top How-Tos* |
| 7 | + |
| 8 | +* [Adding a package from GitHub](#-from-github) |
| 9 | +* [Making a metadata revision of an already-released package version](#how-to-add-a-new-package-metadata-revision) |
| 10 | +* [Adding a patched version of a Hackage package](#how-to-add-a-patched-versions-of-a-hackage-package) |
8 | 11 |
|
9 | 12 | This is a Cabal package repository ("CHaP") whose purpose is to contain all the Haskell
|
10 | 13 | packages used by the Cardano open-source project which are not on Hackage.
|
@@ -227,12 +230,12 @@ CHaP supports package metadata revisions just like Hackage. These allow you to p
|
227 | 230 | file for a package version. The primary use of this is to tweak the dependency bounds of a package.
|
228 | 231 | In principle you can change other things too, but this is generally frowned upon.
|
229 | 232 |
|
230 |
| -There is a convenience script for adding a revision to CHaP: |
| 233 | +This repository contains a convenience script for adding a revision to CHaP: |
231 | 234 | ```
|
232 | 235 | $ ./scripts/add-revision.sh _repo PACKAGE_NAME PACKAGE_VERSION
|
233 | 236 | ```
|
234 | 237 |
|
235 |
| -You need a [built package repository](#how-to-build-the-cabal-package-repository) in order to use the script. |
| 238 | +`_repo` needs to point to a [built package repository](#how-to-get-the-built-cabal-package-repository). |
236 | 239 | It will add a new revision and copy the _current_ cabal file in as the revised cabal file.
|
237 | 240 | You can then edit that file and commit the result.
|
238 | 241 |
|
@@ -275,9 +278,26 @@ For most contributors this section is not going to be necessary, and you can rel
|
275 | 278 |
|
276 | 279 | However if you are making a large number of changes (e.g. many revisions), it can be useful to test your work before making a PR.
|
277 | 280 |
|
278 |
| -### How to build the Cabal package repository |
| 281 | +### How to get the built Cabal package repository |
| 282 | + |
| 283 | +The Cabal package repository itself is built using the tool `foliage`. |
| 284 | +You can either fetch the latest version which is stored in git; or build it yourself locally, which can be convenient or necessary if you have local changes. |
| 285 | + |
| 286 | +### ... by downloading it from Github |
| 287 | + |
| 288 | +The built repository is stored in the `repo` branch of CHaP itself. |
| 289 | +You can get the contents of the `repo` branch from Github at https://github.com/input-output-hk/cardano-haskell-packages/archive/refs/heads/repo.zip . |
| 290 | + |
| 291 | +Or you can check out that branch and copy the contents, e.g. |
| 292 | +``` |
| 293 | +git checkout repo |
| 294 | +cp -aR . _repo |
| 295 | +git checkout - |
| 296 | +``` |
| 297 | + |
| 298 | +#### ... by building it locally |
279 | 299 |
|
280 |
| -The Cabal package repository itself is built using the tool `foliage`. `foliage` is available in the Nix dev shell, which you can get into using `nix develop`. |
| 300 | +`foliage` is available in the Nix dev shell, which you can get into using `nix develop`. |
281 | 301 |
|
282 | 302 | To build the repository, run `foliage build -j 0 --write-metadata`. This will build the repository and put it in `_repo`.
|
283 | 303 |
|
|
0 commit comments