# Packaging
This directory contains package definitions for distributing yaak through
several package managers in addition to Homebrew.
| AUR | Arch Linux | [`aur/yaak/PKGBUILD`](aur/yaak/PKGBUILD), [`aur/yaak-bin/PKGBUILD`](aur/yaak-bin/PKGBUILD) |
| Nix | Linux/macOS | [`nix/flake.nix`](nix/flake.nix), [`nix/default.nix`](nix/default.nix) |
| Debian | Debian/Ubuntu | built by CI via `cargo-deb`; config in [`Cargo.toml`](../Cargo.toml) `[package.metadata.deb]` |
| Scoop | Windows | generated by CI; published at [`hanneshapke/scoop-yaak`](https://github.com/hanneshapke/scoop-yaak) |
| Homebrew | macOS/Linux | published at [`hanneshapke/homebrew-yaak`](https://github.com/hanneshapke/homebrew-yaak) |
## AUR (Arch Linux)
Two packages are provided:
- **`yaak`** — builds from source using `cargo`. Install build-time dependencies
and run `makepkg -si` inside `packaging/aur/yaak`.
- **`yaak-bin`** — downloads the upstream prebuilt Linux `x86_64` tarball from
GitHub Releases and verifies it against `SHA256SUMS.txt`.
To publish to the AUR, push the `PKGBUILD` (together with a generated
`.SRCINFO`) to the respective AUR git repositories (`aur.archlinux.org/yaak.git`
and `aur.archlinux.org/yaak-bin.git`).
```sh
cd packaging/aur/yaak
makepkg --printsrcinfo > .SRCINFO
makepkg -si
```
## Nix
```sh
# From a flake-enabled system
nix run github:hanneshapke/yaak -- --help
nix profile install github:hanneshapke/yaak
# Or use the flake locally
cd packaging/nix
nix build
./result/bin/yaak --help
```
The flake exposes `packages.<system>.yaak` (also the default package) for
`x86_64-linux`, `aarch64-linux`, `x86_64-darwin`, and `aarch64-darwin`. A
`default.nix` shim is provided for non-flake users.
## Debian / Ubuntu (.deb)
```bash
curl -LO https://github.com/hanneshapke/yaak/releases/latest/download/yaak_0.1.3_amd64.deb
sudo dpkg -i yaak_0.1.3_amd64.deb
```
The `.deb` is built by CI using [`cargo-deb`](https://github.com/kornelski/cargo-deb).
The package metadata lives in `[package.metadata.deb]` in the root `Cargo.toml` —
there is no separate file under `packaging/`. The `.deb` includes the binary,
license, README, and shell completions for bash, zsh and fish.
## Scoop (Windows)
```powershell
# Add the bucket (one-time)
scoop bucket add yaak https://github.com/hanneshapke/scoop-yaak
# Install
scoop install yaak
```
The Scoop manifest is **not** stored in this directory. It is generated
entirely by the CI `scoop` job in `.github/workflows/ci.yml` and pushed to the
[`hanneshapke/scoop-yaak`](https://github.com/hanneshapke/scoop-yaak) bucket
repo on each tagged release. The manifest uses Scoop's built-in `autoupdate`
mechanism so future releases are picked up automatically.
## Keeping packages in sync with releases
When you tag a new release (`v*`), CI handles everything automatically:
1. `cargo set-version <new>` (or edit `Cargo.toml`).
2. Tag and push — CI publishes Linux/macOS/Windows archives and
`SHA256SUMS.txt` to the GitHub release.
3. CI then:
- **AUR:** patches `pkgver` and `sha256sums` in both PKGBUILDs, generates
`.SRCINFO`, and pushes to the AUR repos.
- **Debian:** builds a `.deb` via `cargo-deb` and attaches it to the GitHub
release.
- **Scoop:** generates a fresh manifest with the correct hash and pushes to
`hanneshapke/scoop-yaak`.
- **Nix:** verifies the flake still builds (no publish step needed — users
consume it directly from this repo).
- **Homebrew:** updates the formula in `hanneshapke/homebrew-yaak`.
Required secrets: `AUR_SSH_PRIVATE_KEY`, `SCOOP_BUCKET_TOKEN`, `HOMEBREW_TAP_TOKEN`.