# Install dune with Homebrew, apk, dnf, MacPorts, Nix, pacman

Composable build system for OCaml. Version 3.24.0 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:dune
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dune
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dune
```

  Evidence: MacPorts ports tree: shells/dune/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add dune
```

  Evidence: Alpine Linux edge package indexes: dune from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install ocaml-dune
```

  Evidence: Fedora Rawhide package metadata: ocaml-dune from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#dune
```

  Evidence: nixpkgs package indexes: pkgs/by-name/du/dune/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S dune
```

  Evidence: Arch Linux sync databases: dune from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:dune
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dune>
- **Version:** 3.24.0
- **Source summary:** Composable build system for OCaml
- **Homepage:** <https://dune.build/>
- **Repository:** <https://github.com/ocaml/dune>
- **Upstream docs:** <https://dune.readthedocs.io/en/stable>
- **License:** MIT
- **Source archive:** <https://github.com/ocaml/dune/releases/download/3.24.0/dune-3.24.0.tbz>
- **Last updated:** 2026-06-22T01:48:19Z
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- dune (cli)
- dune (alias)

## Build dependencies

- ocaml

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 3.24.0
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/ocaml/dune
- info: No cached GitHub release or tag data was available.
## Project history and usage

Dune is the dominant build system for OCaml projects, with support for OCaml, Reason, and Coq workflows. Its significance is that it standardized a large part of OCaml package building around declarative `dune`, `dune-project`, and `dune-workspace` files rather than per-project build scripts.

### Project history

Dune began as jbuilder, a build system derived from ideas used inside Jane Street and adapted for open-source OCaml projects. The upstream README still frames Dune as inspired by Jane Street's internal build scheme and matured through daily use by hundreds of developers.

The project was renamed from jbuilder to Dune during the 1.x era. The Dune project documented a staged deprecation of the `jbuilder` binary and `jbuild` files, with automatic `dune upgrade` support to migrate projects to `dune` files and `dune-project` metadata.

Dune's public repository is maintained under the OCaml GitHub organization. GitHub metadata records the repository as created in 2016, with OCaml as the main language, MIT licensing, and ongoing 3.x releases through 2026.

### Adoption history

Dune adoption spread through the OCaml packaging ecosystem because opam packages could use a common build invocation, and Dune itself documents recommended package builds such as `dune build -p name -j jobs` and `dune runtest -p name -j jobs`.

The package is distributed across Homebrew, Alpine, Fedora, MacPorts, Nix, and Arch, reflecting its role as a workstation and CI prerequisite for building many OCaml packages outside opam-only environments.

### How it is used

Typical users write `dune` files with S-expression stanzas and let Dune generate build rules, installation metadata, and editor-tool configuration. Dune also supports workspaces, multi-package repositories, multiple build contexts, tests, documentation targets, and cross-compilation workflows.

For package managers, the important interface is the `dune` executable plus the conventional project files it understands. The installed tool is often needed not because users run Dune directly as an application, but because downstream OCaml packages declare Dune as their build system.

### Why package nerds care

Dune is package-nerd important because it turned OCaml builds from a patchwork of ocamlbuild, oasis, makefiles, and custom scripts into a largely uniform package-manager target. A formula for Dune unlocks many other formulae.

Its jbuilder-to-dune migration is also a useful packaging case study: upstream kept compatibility for old names, emitted warnings, and shipped an upgrader, giving distributions and opam packages a path away from historical build files without a flag day.

### Timeline

- 2016: The public GitHub repository now used for Dune is created.
- 2018: Dune 1.0 is announced in the OCaml community after the jbuilder period.
- 2019: Dune enters the second stage of jbuilder deprecation and adds `dune upgrade` migration support.
- 2026: Dune 3.24.0 is published, showing continued active development.

### Related projects

- opam is closely related because Dune's recommended package build commands are designed for opam packaging.
- Merlin is related because Dune generates editor-tool configuration for OCaml development.
- Coq and Reason are related user communities called out in the existing package curation tags and supported by the Dune ecosystem.

### Sources

- <https://raw.githubusercontent.com/ocaml/dune/main/README.md documents Dune's purpose, Jane Street inspiration, project files, workspace features, opam-oriented installation, and build behavior.>
- <https://dune.build/blog/second-step-deprecation/ documents the jbuilder deprecation, `dune upgrade`, and migration of `jbuild` files to Dune files.>
- <https://api.github.com/repos/ocaml/dune documents repository creation, language, license, topics, and public activity.>
- <https://api.github.com/repos/ocaml/dune/releases documents recent 3.x release history.>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: dune, dune-project, dune-workspace
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** dune
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - dune: normalized package name match | nixpkgs package indexes: pkgs/by-name/du/dune/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - dune - 3.22.2-r0: normalized package name match | Alpine Linux edge package indexes: dune from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Composable build system for OCaml (formerly Jbuilder) | https://dune.build/
- apk - dune-configurator - 3.22.2-r0: normalized package name match | Alpine Linux edge package indexes: dune-configurator from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | System config helper for the Dune OCaml build system | https://dune.build/
- apk - dune-doc - 3.22.2-r0: normalized package name match | Alpine Linux edge package indexes: dune-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Composable build system for OCaml (formerly Jbuilder) (documentation) | https://dune.build/
- apk - dune-emacs - 3.22.2-r0: normalized package name match | Alpine Linux edge package indexes: dune-emacs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Emacs plugins for dune | https://dune.build/
- dnf - ocaml-dune - 3.23.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: ocaml-dune from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Composable build system for OCaml and Reason | https://dune.build
- pacman - dune - 3.22.2-1: normalized package name match | Arch Linux sync databases: dune from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A composable build system for OCaml (formerly jbuilder) | https://github.com/ocaml/dune
- MacPorts - dune: normalized package name match | MacPorts ports tree: shells/dune/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [ocaml](https://www.automicvault.com/pkg/brew/ocaml/) - Build dependency declared by Homebrew.
- [cabin](https://www.automicvault.com/pkg/brew/cabin/) - Shares av.db curated category or tags: build-system, cli, developer-tools.
- [muon](https://www.automicvault.com/pkg/brew/muon/) - Shares av.db curated category or tags: build-system, cli, developer-tools.
- [omake](https://www.automicvault.com/pkg/brew/omake/) - Shares av.db curated category or tags: build-system, cli, developer-tools, ocaml.
- [bsdmake](https://www.automicvault.com/pkg/brew/bsdmake/) - Shares av.db curated category or tags: build-system, cli, developer-tools.
- [fastbuild](https://www.automicvault.com/pkg/brew/fastbuild/) - Shares av.db curated category or tags: build-system, cli, developer-tools.
- [goredo](https://www.automicvault.com/pkg/brew/goredo/) - Shares av.db curated category or tags: build-system, cli, developer-tools.
- [litani](https://www.automicvault.com/pkg/brew/litani/) - Shares av.db curated category or tags: build-system, cli, developer-tools.
- [mk-configure](https://www.automicvault.com/pkg/brew/mk-configure/) - Shares av.db curated category or tags: build-system, cli, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/dune.yml](https://github.com/automic-vault/db/blob/main/combined/dune.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
