cd /news/developer-tools/teaser-pluggable-cabal-backends-and-… · home › topics › developer-tools › article
[ARTICLE · art-181476] src=discourse.haskell.org ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Teaser: pluggable cabal backends and a Nix backend

Developers have prototyped a version of cabal-install that turns Cabal into a frontend for pluggable build-system backends, with the original behavior retained as one option and a new Nix backend, cabal-sandstone, published on GitHub. The cabal-sandstone backend builds on incremental Nix builds for GHC already implemented in sandstone, and the authors say it frees users from manually obtaining GHC and foreign library dependencies while providing a centralized persistent cache via the Nix store, though it still trails Simon Marlow's Buck2-based cabal-buck2 command in absolute performance. The authors plan to upstream the changes bottom-up, first fixing longstanding architectural issues in Cabal and then decoupling its backend, rather than submitting one large pull request.

key takeaway

Cabal can now run as a frontend over pluggable backends, and the cabal-sandstone Nix backend resolves GHC and foreign library dependencies automatically while caching intermediate build artifacts in the Nix store, at the cost of absolute speed versus cabal-buck2.

read2 min views6 publishedDec 4, 2026

As is the trend,@Ericson2314 and I have been doing some LLM-assisted prototyping of Haskell devX improvements. We changed Cabal (cabal-install) into a frontend for build systems, making the original behavior just one of many backend options. If all goes well, Cabal’s commands will just keep working as normal with any backend.

@simonmar’s Buck2 build system could become one of these (instead of an external command), and we’ve been implementing a Nix-backend as well. Incremental Nix builds for GHC had already been implemented in sandstone, so it was relatively easy to create this backend.

Here’s a little demo showing the behavior of the “classic” backend vs. the Nix (cabal-sandstone) backend:

The code for the backend is available for anyone caring to look: GitHub - parenthetical/cabal-sandstone: A Nix backend for Cabal · GitHub . The repository contains Git submodules linking to our Cabal fork (and many other forks ).

Although the cabal-sandstone backend shares many advantages with the cabal-buck2 command, it still loses out absolute performance.

However, in return you are freed from worrying about how to get GHC, foreign library dependencies, etc. Getting all your build tools and libraries just happens magically, as long as they are correctly declared in your project and your project’s dependencies’ cabal files.

You also get a centralized persistent cache for (intermediate) build artifacts through the Nix store (I always end up with gigabytes of dist-newstyle spread over my worktrees.)

For users who have tried building Haskell with Nix before, here are some differences from prior attempts to be aware of: cabal-sandstone in fact doesn’t use the Nix language at all, and certainly no “import from derivation”. All build plan are expressed with low-level “nix store layer” primitives, most notably We know our myriad Cabal changes are not going to go upstream in one giant PR. We have a plan to upstream the work “bottom-up”, first addressing some foundational longstanding architectural issues in Cabal, and then decoupling Cabal’s “backend” using that foundation. See some of @ericson2314’s open/draft Cabal PRs for a sneak preview of what that first step entails.

Happy to answer any questions

── more in #developer-tools 4 stories · sorted by recency
── more on @cabal 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/teaser-pluggable-cab…] indexed:0 read:2min 2026-12-04 · —