A mise backend plugin that installs Haskell command-line tools from Hackage using cabal-install, the same way the built-in npm:, gem:, and cargo: backends install tools from their ecosystems.
mise use mise-cabal:pandoc-cli@latest
mise use mise-cabal:hlint@3.8
mise x mise-cabal:shellcheck -- --versionEach tool is referenced as mise-cabal:<hackage-package>@<version>.
Note:
mise-cabal:here is the backend prefix provided by this plugin. It is not the same as thecabalbinary tool (which you install separately, see below).
- mise
2026.10.17or newer
We compile tools from source, so a working Haskell toolchain is needed:
- Cabal
- GHC
The easiest way is to let mise manage everything, in conjunction with the mise-ghcup plugin. Add to your mise.toml:
min_version = "2026.10.17"
[tools]
"cabal" = "latest"
"ghcup" = "latest"
"mise-ghcup:ghc" = "latest"
[plugins]
"vfox-backend:mise-ghcup" = "packslip:wasp-lang/mise-ghcup#3.0.0"
[settings]
experimental = true # Needed for using backend plugins like mise-ghcup and mise-cabalAdd the plugin to your mise.toml, pinned to a release. Releases are signed packslip archives, so mise verifies the plugin before installing it:
[plugins]
"vfox-backend:mise-cabal" = "packslip:wasp-lang/mise-cabal#2.0.0"
[settings]
experimental = true # Needed for using backend plugins like mise-cabalOr install it from the command line:
mise plugins install vfox-backend:mise-cabal 'packslip:wasp-lang/mise-cabal#2.0.0'Then you can use it freely:
# Search Hackage for a package
mise search mise-cabal:lint
# List the versions available on Hackage
mise ls-remote mise-cabal:hlint
# Install a specific version
mise install mise-cabal:hlint@3.8
# Use it (in the current dir, or globally with -g)
mise use mise-cabal:hlint@latest
# Run it
mise x mise-cabal:hlint@latest -- --versionYou can also add tools directly to a mise.toml:
[tools]
"mise-cabal:pandoc-cli" = "latest"
"mise-cabal:hlint" = "3.8"- Searching (
mise search, shell completion) runscabal listagainst a Hackage package index shared by all tools, kept in mise's cache directory and refreshed withcabal update. It matches package names and shows each package's synopsis. - Listing (
ls-remote) reads the published versions from the same index, along with each version's upload date, sominimum_release_ageand--beforecan filter them. - If the shared index is unavailable (for example, cabal is not installed yet), searching and listing fall back to the Hackage API, whose versions are undated.
- Installing sets
CABAL_DIRto the tool version's own mise install directory and runscabal install <package>-<version>. BecauseCABAL_DIRrelocates cabal's whole home, the build store and binaries live inside that directory. The package index and source tarballs come from the shared cache (--remote-repo-cache), which the installed tool does not need afterwards. Without the shared cache, each install downloads its own index. - Data files (used by tools like
pandocandhlint) live in the store right next to the binary, so they resolve automatically. There is no copying out of the store and no need forembed_data_files. - Running simply puts the tool's
bindirectory onPATH.
- Compiles from source. First installs can be slow and require the Haskell toolchain. Each tool keeps its own
CABAL_DIR, so the build store is not shared across tools (more time and disk than a shared store, in exchange for fully self-contained, relocation-safe installs). - Large package index. The first search, listing, or install downloads the Hackage package index (about 140 MB, 1.2 GB on disk) into mise's cache directory, which takes about a minute. Later runs only fetch new uploads.
mise cache cleardeletes it. - Executables only. Library-only Hackage packages (no executable component) are not supported.
This repo is itself a mise project. mise install provisions the dev tooling and the Haskell toolchain.
# Link this checkout as the `mise-cabal` backend for local testing
mise plugin link --force mise-cabal .
# Lint and format (stylua + lua-language-server + actionlint via hk)
mise run lint
mise run lint-fixEnable pre-commit hooks (optional):
hk installDebug a single operation:
mise --debug install mise-cabal:hello@latestmetadata.lua- plugin metadata (name,depends, notes)hooks/backend_list_versions.lua- lists Hackage versionshooks/backend_search_tools.lua- searches Hackage packages formise searchhooks/backend_install.lua- builds and installs a packagehooks/backend_exec_env.lua- puts the tool's bin dir onPATHlib/cabal.lua- runs a command with the tool's isolatedCABAL_DIRlib/index.lua- searches and lists versions from the shared Hackage package indexlib/hackage.lua- Hackage API fallback for searching and listingmise.toml- dev tooling, Haskell toolchain, and tasksmise-tasks/test- end-to-end test task.github/workflows/ci.yml- CI on Linux, macOS, and Windows
MIT