on 76ec5db help sign in
stackage/README.md
120 lines 5.8 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)
26Get your package included
27-------------------------
29In order to get your package included in the set of stable packages, you should
30send a pull request against this repository. In the [`build-constraints.yaml`](https://github.com/fpco/stackage/blob/master/build-constraints.yaml) file,
31there's a section called `packages`. In general, to add a set of
32packages, you would add:
34 "My Name myemail@example.com @mygithubuser":
35 - package1
36 - package2
37 - package3
39You can follow the examples of the other sets of packages in that function.
40Once you've done this, you can send a pull request to get your package
41included.
43__NOTE__: In order to ease the process of adding new packages, we no longer
44require new submissions to be tested on your own system before sending a pull
45request. If you believe your package works with the newest versions of all
46dependencies, you may send a pull request without testing first.
48You should also read the [maintainers
49agreement](https://github.com/fpco/stackage/wiki/Maintainers-Agreement).
51Package Author Guidelines
52-------------------------
54There are some basic rules to get your package to play nice with Stackage. Here
55are some quick guidelines to hopefully make this easier:
57* Make sure that your code is buildability and testable from Hackage. Often
58 times, authors test their builds locally, but the tarball that gets uploaded
59 to Hackage is missing some necessary files. The best way to do this is to
60 set up a Travis job to do it for you. We recommend the
61 [multi-ghc-travis](https://github.com/hvr/multi-ghc-travis) approach.
62* Make your code compatible with the newest versions of all dependencies.
63* 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)).
65There are certainly many other tips that could be added here. If you think of
66any, please send a pull request!
68Build the package set
69---------------------
71Generally, building the package set should be done only by the Jenkins machine
72or by the official maintainers, as the process does require quite a bit of
73setup on the local machine. That said, you'll likely be able to get a stable
74build by running:
76 cabal update
77 cabal install stackage
78 stackage nightly
80### Docker
82Note: This method has been disabled for now, but may be enabled again in the future.
84If you'd like to check a build plan, or perform an entire build, without
85specially configuring your system, Docker may be a good approach. To check if
86some modifications to `build-constraints.yaml` are valid, try the following:
881. Create a local clone of the `stackage` repo
892. Make modifications to your local `build-constraints.yaml`
903. Inside the `stackage` working directory, run the following:
92 ```
93 $ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage check'
94 ```
96Similarly, if you'd like to perform an entire build, you can replace the last step with:
98```
99$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage nightly --skip-upload'
100```
102## Processing
104The following describes at a high level the series of steps for processing
106### Nightlies
1081. Get list of core packages
1092. Get build constraints from list of maintained packages
1103. Load up package index
1114. Calculate build plan using newest versions of packages
1125. Write out a YAML file with complete build plan
1136. Verify that the build plan can be compiled
1147. Perform the build
116### LTS
1181. Load up most recent build plan
1192. Convert build plan into constraints for next build
1203. Continue from step (3) above