on lts3 help sign in
stackage/README.md
130 lines 6.4 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)
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.
58You should also read the [maintainers
59agreement](https://github.com/fpco/stackage/wiki/Maintainers-Agreement).
61Package Author Guidelines
62-------------------------
64There are some basic rules to get your package to play nice with Stackage. Here
65are some quick guidelines to hopefully make this easier:
67* Make sure that your code is buildability and testable from Hackage. Often
68 times, authors test their builds locally, but the tarball that gets uploaded
69 to Hackage is missing some necessary files. The best way to do this is to
70 set up a Travis job to do it for you. We recommend the
71 [multi-ghc-travis](https://github.com/hvr/multi-ghc-travis) approach.
72* Make your code compatible with the newest versions of all dependencies.
73* 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)).
75There are certainly many other tips that could be added here. If you think of
76any, please send a pull request!
78Build the package set
79---------------------
81Generally, building the package set should be done only by the Jenkins machine
82or by the official maintainers, as the process does require quite a bit of
83setup on the local machine. That said, you'll likely be able to get a stable
84build by running:
86 cabal update
87 cabal install stackage
88 stackage nightly
90### Docker
92Note: This method has been disabled for now, but may be enabled again in the future.
94If you'd like to check a build plan, or perform an entire build, without
95specially configuring your system, Docker may be a good approach. To check if
96some modifications to `build-constraints.yaml` are valid, try the following:
981. Create a local clone of the `stackage` repo
992. Make modifications to your local `build-constraints.yaml`
1003. Inside the `stackage` working directory, run the following:
102 ```
103 $ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage check'
104 ```
106Similarly, if you'd like to perform an entire build, you can replace the last step with:
108```
109$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage nightly --skip-upload'
110```
112## Processing
114The following describes at a high level the series of steps for processing
116### Nightlies
1181. Get list of core packages
1192. Get build constraints from list of maintained packages
1203. Load up package index
1214. Calculate build plan using newest versions of packages
1225. Write out a YAML file with complete build plan
1236. Verify that the build plan can be compiled
1247. Perform the build
126### LTS
1281. Load up most recent build plan
1292. Convert build plan into constraints for next build
1303. Continue from step (3) above