on 083e00a help sign in
stackage/README.md
134 lines 6.6 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": creating a vetted set of packages from Hackage.
8__NOTE__ This repository is for package authors and maintainers to get their packages 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)
22We strongly recommend using the Haskell tool stack for doing builds, which
23includes built-in Stackage support:
25* [stack](https://github.com/commercialhaskell/stack) [![Build Status](https://travis-ci.org/commercialhaskell/stack.svg?branch=master)](https://travis-ci.org/commercialhaskell/stack)
27We also support some add-on tools to cabal-install to make its usage with
28Stackage both easier and more secure:
30* [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)
31* [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)
32* [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)
33* [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)
34* [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)
36Get your package included
37-------------------------
39In order to get your package included in the set of stable packages, you should
40send a pull request against this repository. In the [`build-constraints.yaml`](https://github.com/fpco/stackage/blob/master/build-constraints.yaml) file,
41there's a section called `packages`. In general, to add a set of
42packages, you would add:
44 "My Name myemail@example.com @mygithubuser":
45 - package1
46 - package2
47 - package3
49You can follow the examples of the other sets of packages in that function.
50Once you've done this, you can send a pull request to get your package
51included.
53__NOTE__: In order to ease the process of adding new packages, we no longer
54require new submissions to be tested on your own system before sending a pull
55request. If you believe your package works with the newest versions of all
56dependencies, you may send a pull request without testing first.
58Please use commit messages like "add foo-bar" or "add johndev's packages"
59(`build-constraints.yaml` is the most frequently changed file in this git repo
60so commit messages like "update build-constraints.yaml" are not helpful).
62You should also read the [maintainers
63agreement](https://github.com/fpco/stackage/wiki/Maintainers-Agreement).
65Package Author Guidelines
66-------------------------
68There are some basic rules to get your package to play nice with Stackage. Here
69are some quick guidelines to hopefully make this easier:
71* Make sure that your code is buildability and testable from Hackage. Often
72 times, authors test their builds locally, but the tarball that gets uploaded
73 to Hackage is missing some necessary files. The best way to do this is to
74 set up a Travis job to do it for you. We recommend the
75 [multi-ghc-travis](https://github.com/hvr/multi-ghc-travis) approach.
76* Make your code compatible with the newest versions of all dependencies.
77* 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)).
79There are certainly many other tips that could be added here. If you think of
80any, please send a pull request!
82Build the package set
83---------------------
85Generally, building the package set should be done only by the Jenkins machine
86or by the official maintainers, as the process does require quite a bit of
87setup on the local machine. That said, you'll likely be able to get a stable
88build by running:
90 cabal update
91 cabal install stackage
92 stackage nightly
94### Docker
96Note: This method has been disabled for now, but may be enabled again in the future.
98If you'd like to check a build plan, or perform an entire build, without
99specially configuring your system, Docker may be a good approach. To check if
100some modifications to `build-constraints.yaml` are valid, try the following:
1021. Create a local clone of the `stackage` repo
1032. Make modifications to your local `build-constraints.yaml`
1043. Inside the `stackage` working directory, run the following:
106 ```
107 $ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage check'
108 ```
110Similarly, if you'd like to perform an entire build, you can replace the last step with:
112```
113$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage nightly --skip-upload'
114```
116## Processing
118The following describes at a high level the series of steps for processing
120### Nightlies
1221. Get list of core packages
1232. Get build constraints from list of maintained packages
1243. Load up package index
1254. Calculate build plan using newest versions of packages
1265. Write out a YAML file with complete build plan
1276. Verify that the build plan can be compiled
1287. Perform the build
130### LTS
1321. Load up most recent build plan
1332. Convert build plan into constraints for next build
1343. Continue from step (3) above