3[](https://travis-ci.org/typeable/stackage2nix)
5`stackage2nix` converts a Stack file into a Nix Haskell packages set.
6It creates LTS Stackage packages set, and applies appropriate overrides on top of it.
10 --lts-haskell "$LTS_HASKELL_REPO" \
11 --all-cabal-hashes "$ALL_CABAL_HASHES_REPO" \
15`stackage2nix` has three required arguments:
16- `--lts-haskell` - path to [fpco/lts-haskell](https://github.com/fpco/lts-haskell)
17- `--all-cabal-hashes` - path to [commercialhaskell/all-cabal-hashes](https://github.com/commercialhaskell/all-cabal-hashes) checked out to `hackage` branch
18- `.` - path to stack.yaml file or directory
20Produced Nix derivation split on following files:
21- packages.nix - Base Stackage packages set
22- configuration-packages.nix - Compiler configuration
23- default.nix - Final Haskell packages set with all overrides applied
25A particular package from result Haskell packages set can be built with:
28nix-build -A <package-name>
31## Runtime dependencies
33- `nix-env` is required to be on PATH by the
34 [distribution-nixpkgs](https://hackage.haskell.org/package/distribution-nixpkgs)
36- `nix-prefetch-git` is required on PATH if you have git dependencies in
39## Override result derivation
41Complex projects may require some extra customization.
42Snippet `override.nix` below shows a minimal example of how to apply additional
43overrides on top of Haskell packages set produced by `stackage2nix`.
46with import <nixpkgs> {};
48let haskellPackages = import ./. {};
49in haskellPackages.override {
50 overrides = self: super: {
51 stackage2nix = disableSharedExecutables super.stackage2nix;
57nix-build -A stackage2nix override.nix
60For more complex overrides and detailed information on how to work with Haskell packages in Nix, see Nixpkgs manual [User’s Guide to the Haskell Infrastructure](http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure)
65For other examples of `stackage2nix` usage, see [4e6/stackage2nix-examples](https://github.com/4e6/stackage2nix-examples) repository.
66It verifies `stackage2nix` by running it on different public projects.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list