on 3bdb12e help sign in
stackage/README.md
121 lines 6.0 kB history raw
1stackage
2========
4[![Build Status](https://travis-ci.org/fpco/stackage.svg?branch=master)](https://travis-ci.org/fpco/stackage)
6"Stable Hackage," tools for creating a vetted set of packages from Hackage.
8__NOTE__ This repository is for package authors to get their code into
9Stackage. If you simply want to use Stackage as an end user, please follow the
10instructions on [http://www.stackage.org/](http://www.stackage.org).
12The Stackage project consists of multiple repositories. This repository
13contains the metadata on packages to be included in future builds and some
14project information. In addition, we have the following repositories:
16* [stackage-server](https://github.com/fpco/stackage-server) [![Build Status](https://travis-ci.org/fpco/stackage-server.svg?branch=master)](https://travis-ci.org/fpco/stackage-server)
17* [stackage-curator](https://github.com/fpco/stackage-curator) [![Build Status](https://travis-ci.org/fpco/stackage-curator.svg?branch=master)](https://travis-ci.org/fpco/stackage-curator)
18* [stackage-types](https://github.com/fpco/stackage-types) [![Build Status](https://travis-ci.org/fpco/stackage-types.svg?branch=master)](https://travis-ci.org/fpco/stackage-types)
19* [lts-haskell](https://github.com/fpco/lts-haskell)
20* [stackage-nightly](https://github.com/fpco/stackage-nightly)
21* [stackage-cli](https://github.com/fpco/stackage-cli) [![Build Status](https://travis-ci.org/fpco/stackage-cli.svg?branch=master)](https://travis-ci.org/fpco/stackage-cli)
22* [stackage-update](https://github.com/fpco/stackage-update) [![Build Status](https://travis-ci.org/fpco/stackage-update.svg?branch=master)](https://travis-ci.org/fpco/stackage-update)
23* [stackage-upload](https://github.com/fpco/stackage-upload) [![Build Status](https://travis-ci.org/fpco/stackage-upload.svg?branch=master)](https://travis-ci.org/fpco/stackage-upload)
24* [stackage-install](https://github.com/fpco/stackage-install) [![Build Status](https://travis-ci.org/fpco/stackage-install.svg?branch=master)](https://travis-ci.org/fpco/stackage-install)
25* [stackage-build-plan](https://github.com/fpco/stackage-build-plan) [![Build Status](https://travis-ci.org/fpco/stackage-build-plan.svg?branch=master)](https://travis-ci.org/fpco/stackage-build-plan)
27Get your package included
28-------------------------
30In order to get your package included in the set of stable packages, you should
31send a pull request against this repository. In the [`build-constraints.yaml`](https://github.com/fpco/stackage/blob/master/build-constraints.yaml) file,
32there's a section called `packages`. In general, to add a set of
33packages, you would add:
35 "My Name myemail@example.com @mygithubuser":
36 - package1
37 - package2
38 - package3
40You can follow the examples of the other sets of packages in that function.
41Once you've done this, you can send a pull request to get your package
42included.
44__NOTE__: In order to ease the process of adding new packages, we no longer
45require new submissions to be tested on your own system before sending a pull
46request. If you believe your package works with the newest versions of all
47dependencies, you may send a pull request without testing first.
49You should also read the [maintainers
50agreement](https://github.com/fpco/stackage/wiki/Maintainers-Agreement).
52Package Author Guidelines
53-------------------------
55There are some basic rules to get your package to play nice with Stackage. Here
56are some quick guidelines to hopefully make this easier:
58* Make sure that your code is buildability and testable from Hackage. Often
59 times, authors test their builds locally, but the tarball that gets uploaded
60 to Hackage is missing some necessary files. The best way to do this is to
61 set up a Travis job to do it for you. We recommend the
62 [multi-ghc-travis](https://github.com/hvr/multi-ghc-travis) approach.
63* Make your code compatible with the newest versions of all dependencies.
64* Make your code compatible with the versions of libraries that ship with GHC ([more information on lenient lower bounds](https://www.fpcomplete.com/blog/2014/05/lenient-lower-bounds)).
66There are certainly many other tips that could be added here. If you think of
67any, please send a pull request!
69Build the package set
70---------------------
72Generally, building the package set should be done only by the Jenkins machine
73or by the official maintainers, as the process does require quite a bit of
74setup on the local machine. That said, you'll likely be able to get a stable
75build by running:
77 cabal update
78 cabal install stackage
79 stackage nightly
81### Docker
83Note: This method has been disabled for now, but may be enabled again in the future.
85If you'd like to check a build plan, or perform an entire build, without
86specially configuring your system, Docker may be a good approach. To check if
87some modifications to `build-constraints.yaml` are valid, try the following:
891. Create a local clone of the `stackage` repo
902. Make modifications to your local `build-constraints.yaml`
913. Inside the `stackage` working directory, run the following:
93 ```
94 $ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage check'
95 ```
97Similarly, if you'd like to perform an entire build, you can replace the last step with:
99```
100$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage nightly --skip-upload'
101```
103## Processing
105The following describes at a high level the series of steps for processing
107### Nightlies
1091. Get list of core packages
1102. Get build constraints from list of maintained packages
1113. Load up package index
1124. Calculate build plan using newest versions of packages
1135. Write out a YAML file with complete build plan
1146. Verify that the build plan can be compiled
1157. Perform the build
117### LTS
1191. Load up most recent build plan
1202. Convert build plan into constraints for next build
1213. Continue from step (3) above