haskell.nix can automatically translate your Cabal or Stack project and
its dependencies into Nix code.
- Introduction
- Getting Started
- Troubleshooting
- Explore the documentation from there to find further topics.
The #1 problem that people have when using haskell.nix is that they find themselves building GHC.
This should not happen, but you must follow the haskell.nix setup instructions properly to avoid it.
If you find this happening to you, please check that you have followed the
getting started instructions and
consult the corresponding troubleshooting section.
The troubleshooting documentation also contains some help for other common issues. If you're still stuck open an issue.
haskell.nix publishes prebuilt GHCs (and boot libraries) to two binary caches:
cache.iog.ioonly holds the GHC versions currently in use by IOG's own projects, so it does not cover every compilerhaskell.nixsupports.cache.zw3rk.comholds all the compiler versions currently tested inhaskell.nixCI — including cross-compilers — so configuring it as an extra substituter is the surest way to avoid building GHC yourself.
The table below is generated automatically from the latest master builds on
ci.zw3rk.com
and shows the build status of GHC itself (the roots.ghc job) for each
compiler and platform. A ✅ means that compiler/platform is built and cached
for the current master (a build only counts once it is part of the latest
evaluation, so a green never reflects a stale build).
Legend: ✅ built & cached ·
| Nixpkgs | Host → Target | ghc967 | ghc984 | ghc9103 | ghc9124 | ghc9141 | ghc9141llvm |
|---|---|---|---|---|---|---|---|
| unstable | x86_64-linux |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unstable | x86_64-linux → static |
✅ | ✅ | ✅ | ✅ | ✅ | · |
| unstable | x86_64-linux → musl64 |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unstable | x86_64-linux → musl32 |
✅ | ✅ | ✅ | ✅ | ✅ | · |
| unstable | x86_64-linux → aarch64 |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unstable | x86_64-linux → aarch64-musl |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unstable | x86_64-linux → android/aarch64 |
· | · | · | ✅ | ✅ | ✅ |
| unstable | x86_64-linux → android/armv7a |
· | · | · | ✅ | ✅ | ✅ |
| unstable | x86_64-linux → javascript |
✅ | ✅ | · | ✅ | ✅ | · |
| unstable | x86_64-linux → wasm |
· | · | · | ✅ | ✅ | · |
| unstable | x86_64-linux → windows/mingwW64 |
✅ | ✅ | ✅ | ✅ | ✅ | · |
| unstable | x86_64-linux → windows/ucrt64 |
✅ | ✅ | ✅ | ✅ | ✅ | · |
| unstable | aarch64-darwin |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unstable | aarch64-darwin → javascript |
✅ | ✅ | · | ✅ | ✅ | · |
| unstable | aarch64-darwin → wasm |
· | · | · | ✅ | ✅ | · |
| unstable | x86_64-darwin |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unstable | x86_64-darwin → javascript |
✅ | ✅ | · | ✅ | ✅ | · |
| R2511 | x86_64-linux |
✅ | ✅ | ✅ | ✅ | ✅ | · |
| R2511 | aarch64-darwin |
✅ | ✅ | ✅ | ✅ | ✅ | · |
| R2511 | x86_64-darwin |
✅ | ✅ | ✅ | ✅ | ✅ | · |
The haskell.nix repository contains the runtime system for building
Haskell packages in Nix. It depends on other repos, which are:
-
hackage.nix— the latest contents of the Hackage databases, converted to Nix expressions. -
stackage.nix— all of the Stackage snapshots, converted to Nix expressions.
Note
For commercial support, please don't hesitate to reach out at devx@iohk.io