git.iko.soy/typeable/stackage2nix
on master help sign in
Update README
97bbf27Dmitry Bushev
.gitignore+1
@@ -1 +1,2 @@
1.stack-work
1.stack-work
2+/*.nix
README.md+8−8
@@ -2,7 +2,8 @@
2
2
3[![Build Status](https://travis-ci.org/4e6/stack2nix.svg?branch=master)](https://travis-ci.org/4e6/stack2nix)
3[![Build Status](https://travis-ci.org/4e6/stack2nix.svg?branch=master)](https://travis-ci.org/4e6/stack2nix)
4
4
5−`stack2nix` converts a single Stack file into a Nix build expression.
5+`stack2nix` converts a Stack file into a Nix Haskell packages set.
6+It creates LTS Stackage packages set, and applies appropriate overrides on top of it.
6
7
7```
8```
8stack2nix \
9stack2nix \
@@ -13,13 +14,13 @@ stack2nix \
13
14
14`stack2nix` has three required arguments:
15`stack2nix` has three required arguments:
15- `--lts-haskell` - path to [fpco/lts-haskell](https://github.com/fpco/lts-haskell)
16- `--lts-haskell` - path to [fpco/lts-haskell](https://github.com/fpco/lts-haskell)
16−- `--all-cabal-hashes` - path to [commercialhaskell/all-cabal-hashes](https://github.com/commercialhaskell/all-cabal-hashes)
17+- `--all-cabal-hashes` - path to [commercialhaskell/all-cabal-hashes](https://github.com/commercialhaskell/all-cabal-hashes) checked out to `hackage` branch
17- `.` - path to stack.yaml file or directory
18- `.` - path to stack.yaml file or directory
18
19
19Produced Nix derivation split on following files:
20Produced Nix derivation split on following files:
20−- packages.nix - Stackage packages set
21+- packages.nix - Base Stackage packages set
21−- configuration-packages.nix - compiler configuration
22+- configuration-packages.nix - Compiler configuration
22−- default.nix - Haskell packages set
23+- default.nix - Final Haskell packages set with all overrides applied
23
24
24A particular package from result Haskell packages set can be built with:
25A particular package from result Haskell packages set can be built with:
25
26
@@ -47,11 +48,10 @@ in haskellPackages.override {
47nix-build -A stack2nix override.nix
48nix-build -A stack2nix override.nix
48```
49```
49
50
50−`stack2nix` result derivation is a Haskell packages set, constructed the same way as a default Nix `haskellPackages`.
51−For further details and examples 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)
51+For 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)
52
52
53
53
54## Examples
54## Examples
55
55
56For other examples of `stack2nix` usage, see [4e6/stack2nix-examples](https://github.com/4e6/stack2nix-examples) repository.
56For other examples of `stack2nix` usage, see [4e6/stack2nix-examples](https://github.com/4e6/stack2nix-examples) repository.
57−It checks `stack2nix` execution against different public projects.
57+It verifies `stack2nix` by running it on different public projects.