Skip to content

kowainik/awesome-cabal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Cabal

Awesome

A curated list of awesome resources for the Haskell Cabal build tool.

Cabal — Common Architecture for Building Applications and Libraries — is the tool to build and maintain Haskell packages.

Table of Contents

Resources

Installation

There are various means of installing Cabal. Depending on your operating system and prefered method, you can choose a suitable way to do that.

  • ghcup: Haskell toolchain installer for Linux and macOS. Use ghcup install-cabal command to install Cabal. Refer to the documentation for more details.
  • HVR ppa: PPA for Ubuntu that includes releases of Cabal.
  • Windows setup: The easiest way to setup a Haskell environment on Windows using Chocolatey.
  • Download binary: Install Cabal on all operating systems from sources or by downloading the binary.
  • CabalChoco: Chocolatey sources for pure Cabal installs on Windows.
  • Debian packages: Install packages built specifically for Debian 9 (Stretch).
  • macOS setup: Python script to install Cabal on macOS.
  • ghcups: ghcup for PowerShell on Windows.

Blog posts

Introduction

Write-ups and examples that could help to get into Cabal and start using it.

Scaffolding

  • Quick start: Using cabal init command to create a project.
  • summoner: CLI tool for scaffolding fully configured batteries-included production-level Haskell projects.
  • summoner-tui: TUI tool for scaffolding fully configured batteries-included production-level Haskell projects.
  • hi: Generate scaffold for cabal project.
  • example-cabal-project: A simple example project using cabal-install, Nix, and direnv.

Cabal Configuration Format

.cabal files use a special format to specify package configurations.

  • Docs: Official documentation on the package description format.
  • CHANGELOG: Package description format specification history.
  • Minimal cabal files: Explanation of the minimal possible cabal configuration.
  • cabal-fmt: CLI tool to format .cabal files.
  • cabal-info: Simple command-line interface to read and output information from the .cabal file. (archived, Cabal-1.x only)

Components

Useful information on various Cabal components. These could be useful blog posts on specific features, or description of handy parts of the Cabal specification.

  • Common Stanzas: Blog post about Cabal's common stanzas feature.
  • Multiple Libraries: Blog post about Cabal's multiple libraries feature.
  • Foreign libraries: Blog post about Cabal's foreign libraries feature.
  • Foreign libraries example: Example usage of foreign libraries.
  • source-repository-package: Specifying packages from remote version control locations (e.g. how to use GitHub dependencies in the Cabal packages).
  • cabal gen-bounds: A command to generate lower and upper bounds for dependencies in the .cabal file.
  • cabal-bounds: A command line program for managing the bounds/versions of the dependencies in a cabal file.
  • cabal-cargs: A command line program for extracting compiler arguments from a cabal file.
  • Mix-ins: Usage of the Cabal's mixin feature to replace default Prelude.

Backpack

Backpack is a feature that allows implementing mix-in libraries in Haskell. Mix-in libraries can have signatures which permit implementations of values and types to be deferred, while allowing a library with missing implementations to still be type-checked.

Official documentation

Tutorials

Libraries

Talks

PVP

It is recommended for Haskell packages to follow PvP — Package versioning Policy.

  • PVP: Official Haskell documentation on versioning.
  • pvp: The GitHub repository to create issues against.
  • policeman (by Kowainik): Policeman assists to properly choose the next version number according to PVP (Packaging Version Policy) for the Haskell packages based on the semantical changes to the interface.
  • check-pvp: Check whether module and package imports conform to the PVP.

Cabal Assistants

CLI tools that provide additional interface to cabal-install.

  • cabal-install: The command-line interface for Cabal and Hackage.
  • vabal: The cabal companion that leverages Cabal's capabilities of working with different GHC versions.
  • hkgr: Tool to help make new releases of Haskell packages, with commands for git tagging, pristine sdist, and uploading to Hackage.
  • releaser: Automation of Haskell package release process.
  • iridium: This tool aims to automate several typical steps when uploading a new package version to Hackage.
  • Haskell package QA: New things in Haskell package QA.
  • cabal-plan: Library and utility for processing cabal's plan.json file.
  • cabal-extras: A tool suite to aid Haskell development using cabal-install.
  • cabal-helper: Give Haskell development tools access to the same environment which build tools such as Cabal normally provide to the compiler.
  • cabal-sort: Given a number of cabal package files, this program reads all those files and emits them topologically sorted according to their dependencies.
  • mafia: Lightweight but opinionated wrapper around Cabal that makes working on Haskell projects fun and easy.
  • cabal-scripts: Collection of Bash Shell scripts for support of Cabal package development.
  • cabalish: Provides access to the cabal file data for shell scripts.
  • cab: A MacPorts-like maintenance command of Haskell Cabal packages.
  • cabal-edit: A utility for managing Hackage dependencies from the command line.
  • cabal-clean: Removes compilation artefacts in dist-newstyle/build from older versions of the package or superseded minor versions of GHC.

Dependencies analysers

  • cabalgraph: Generate pretty graphs of module trees from .cabal files.
  • cabal-progdeps: Show dependencies of program being built in current directory.
  • weeder: Tool for detecting redundant Cabal package dependencies that uses .hie files introduced in GHC-8.8.
  • packdeps: A library and command line tool for checking if the upper bounds in your Cabal package's dependency list excludes the newest package available.
  • jailbreak-cabal: Strip version restrictions from build dependencies in the .cabal files.

CI

Information about how to set up Continious Integration on Haskell packages.

Travis

AppVeyor

GitHub Actions

  • Dead simple cross-platform GitHub Actions for Haskell: Blog post about cross-platform GitHub Actions CI settings for Haskell projects with Cabal and Stack.
  • haskell-ci: Cabal package script generator for GitHub Actions CI.
  • setup-haskell: Set up your GitHub Actions workflow with a specific version of Haskell (GHC and Cabal).
  • actions/cache: This action allows caching dependencies and build outputs to improve workflow execution time.
  • cabal-plan-bounds: Never write bounds manually, instead derive them from what CI is actually testing.

Circle CI

  • Circle CI orbs: Haskell Orb that Builds a Haskell application using Cabal on Circle CI.

Generic CI

  • packcheck: Universal build and CI testing for Haskell packages. Can produce configurations for Travis, AppVeyor and Circle CI.
  • cabal-cache: Tool for caching built cabal new-build packages.
  • hw-ci-assist: CI Assistant for Haskell projects which implements package caching.

Docker

Deployment

Integration

Cabal integration with other configuration languages and formats.

  • dhall-to-cabal: Compiles Dhall expressions to Cabal files.
  • cabal-to-dhall: The opposite of dhall-to-cabal. Compiles Cabal to Dhall expressions.
  • cabal2nix: Convert Cabal files into Nix build instructions.
  • nix2cabal: The opposite of cabal2nix. It lets you define a Haskell package in Nix and generate a Cabal file using that definition.
  • cabal2bazel: A tool to help with fetching Cabal packages from Hackage and importing them as packages into cabal2bazel.
  • cargo-cabal: A tool that helps you to turn in one command a Rust crate into a Haskell Cabal library.
  • jenga: Generate a cabal.freeze file from a stack.yaml.
  • stack2cabal: Convert stack projects to cabal.project + cabal.project.freeze.
  • shake-cabal: A library for using shake alongside Cabal.

Custom Setup

Setup.hs helpers to use in custom-setup stanzas with the Custom build type.

OS Manifests

Tools to generate system packages meta information from Haskell packages.

  • cabal-debian: Create a Debianization for a Cabal package.
  • cabal-flatpak: Generate a FlatPak manifest from a Cabal package description.
  • cabal-macosx: Cabal support for creating Mac OSX application bundles.
  • cabal-rpm: RPM packaging tool for Haskell Cabal-based packages.
  • cabal2spec: Convert Cabal files into rpm spec files.
  • cblrepo: Tool to simplify managing a consistent set of Haskell packages for distributions.
  • exherbo-cabal: Generates package description from .cabal files in format of exheres-0 for Exherbo Linux.
  • hackport: A command line tool to manage an overlay of Gentoo ebuilds that are generated from a hackage repo of Cabal packages.

IDE

Helper tools for Cabal support in various Integrated Development Environments.

Cross Compilation

Cabal for Development

Haskell libraries to parse and work with files in the Cabal format.

  • Cabal: Official library to parse and analyze .cabal files.
  • cabal-lenses: Lenses and traversals for the Cabal library.
  • cabal-install-parsers: Parsers for .cabal, cabal.project, cabal.config and 01-index.tar files.
  • cabal-file-th: Template Haskell expressions for reading fields from a project's cabal file.
  • cabal-test-quickcheck: QuickCheck for Cabal.
  • cabal-doctest: A Setup.hs helper for doctests running.
  • doctest-extract: Standalone extraction of doctest code. Optionally emits a list of Test modules for insertion in a Cabal package description.
  • simple-cabal: Find and read .cabal files, and a Cabal dependency compatibility layer.
  • cabal-file: Cabal file access.

Cabal in GSoC

Work on Cabal during Google Summer of Code.

  • GSoC 2018: cabal new-{install,repl,run,clean,sdist}, Cabal scripts: Description of work to finish bringing Cabal’s Nix-style local builds (the new- commands, at least for now) up to parity with the old stateful methodology of using cabal-install.
  • GSoC Cabal Nix: How bringing Nix-style package management facilities to cabal can solve various cabal problems and help in effective mitigation of cabal hell.

History

  • Old Cabal: Really old Cabal stuff.
  • Announcing New Cabal: cabal new-build, also known as “Nix-style local builds”, is a new command inspired by Nix that comes with cabal-install 1.24.
  • Cabal 2.0: What's new in Cabal and cabal-install 2.0.

Community

Contribute to this repository

Improvements to the Awesome Cabal list are more than welcome. Please read the contributing guidelines, go ahead and make the difference!

License

CC0