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. As is the trend, @Ericson2314 https://discourse.haskell.org/u/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 https://discourse.haskell.org/u/simonmar ’s Buck2 build system https://discourse.haskell.org/t/buck2-build-system-for-cabal-projects/14770 could become one of these instead of an external command https://cabal.readthedocs.io/en/stable/external-commands.html , and we’ve been implementing a Nix-backend as well. Incremental Nix builds for GHC had already been implemented in sandstone https://github.com/obsidiansystems/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 https://github.com/parenthetical/cabal-sandstone . 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 https://github.com/simonmar/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 https://discourse.haskell.org/u/ericson2314 ’s open/draft Cabal PRs for a sneak preview of what that first step entails. Happy to answer any questions