# `haskell.nix` is infrastructure for building Haskell packages with Nix `haskell.nix` can automatically translate your Cabal or Stack project and its dependencies into Nix code. ## Documentation - [Introduction](https://input-output-hk.github.io/haskell.nix/index.html) - [Getting Started](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started) - [Troubleshooting](https://input-output-hk.github.io/haskell.nix/troubleshooting) - Explore the documentation from there to find further topics. ## Help! Something isn't working 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](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started#setting-up-the-binary-cache) and consult the corresponding [troubleshooting section](https://input-output-hk.github.io/haskell.nix/troubleshooting#why-am-i-building-ghc). The troubleshooting documentation also contains some help for other common issues. If you're still stuck open an issue. ## Compiler CI status `haskell.nix` publishes prebuilt GHCs (and boot libraries) to two binary caches: - **`cache.iog.io`** only holds the GHC versions currently in use by IOG's own projects, so it does not cover every compiler `haskell.nix` supports. - **`cache.zw3rk.com`** holds *all* the compiler versions currently tested in `haskell.nix` CI — 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`](https://ci.zw3rk.com/jobset/input-output-hk-haskell-nix/master) 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 · ⚠️ dependency failed · ❌ failed · ⚪ aborted/cancelled · 🕓 building | Nixpkgs | Host → Target | ghc914-sh | 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` → musl64 | ✅ | · | · | · | · | ✅ | · | | unstable | `aarch64-darwin` → aarch64-musl | ✅ | · | · | · | · | ✅ | · | | unstable | `aarch64-darwin` → javascript | ✅ | ✅ | ✅ | · | ✅ | ✅ | · | | unstable | `aarch64-darwin` → wasm | ✅ | · | · | · | ✅ | ✅ | · | ## Related repos The `haskell.nix` repository contains the runtime system for building Haskell packages in Nix. It depends on other repos, which are: - [`hackage.nix`](https://github.com/input-output-hk/hackage.nix) — the latest contents of the [Hackage](https://hackage.haskell.org/) databases, converted to Nix expressions. - [`stackage.nix`](https://github.com/input-output-hk/stackage.nix) — all of the [Stackage](https://www.stackage.org/) snapshots, converted to Nix expressions. > [!NOTE] > For commercial support, please don't hesitate to reach out at devx@iohk.io