Skip to content
Snippets Groups Projects

Horizon Haskell (Advance Package Set)

horizon-advance is a Package Set targetting GHC mainline. This package set extends horizon-core.

While horizon-core only contains packages required to bootstrap the horizon toolchain, horizon-advance contains packages required for canary testing any compatibility issues with GHC mainline. This includes a mix of things that make heavy use of system libraries, or perhaps template-haskell or type-checker plugins.

The following things are always expected to be here:

  • Agda
  • JuicyPixels
  • VulkanMemoryAllocator
  • brick
  • composite-base
  • hint
  • optics
  • polysemy
  • polysemy-plugin
  • servant-client
  • servant-server
  • pipes
  • pipes-attoparsec
  • pipes-bytestring
  • pipes-group
  • pipes-parse
  • sdl2
  • sdl2-gfx
  • sdl2-image
  • sdl2-mixer
  • sdl2-ttf
  • vulkan
  • vulkan-utils
  • wai-app-static

This is the master branch building against the GHC 9.12 pre-release.

For other ocmpiler versions, see the protected branches named lts/ghc-*.

Updating the Package Set

Generating the nix expressions for the package set is a two step process.

  1. Edit the horizon.dhall file.
  2. Generate the nix expressions with
nix run develop/#horizon-gen-nix -- -jN

You can edit the horizon.dhall file in one of two ways: manually using a text editor, or programatically using horizon-shell.

If you want to bumping everything listed in the horizon.dhall file to the latest bounds, run

nix run develop/#try-to-upgrade-everything

Using horizon-shell.

To use horizon-shell.

nix run develop/#horizon-shell

This is a haskell interpreter with a few shortcut functions available. Running tryToUpgradeEverything will poll hackage for any potential updates and add them to the dhall file. This will only modify the dhall, not the nix expressions. You must remember to run nix run develop/#horizon-gen-nix afterwards.

To quickly add a new package to the dhall, use the addHackage function. For example addHackage "optics".

Tweaking & Hacking

If you need to do additional manual overrides to the nix code, such as addPkgconfigDepends, edit the configuration/common.nix overlay, which is applied over the generated derivations.

Feedback

To build all packages, run

nix run develop/#feedback -- build

Hoogle

To get a hoogle instance for the entire package set, you can run:

nix run .#apps.x86_64-linux.run-hoogle