-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I'm running openclaw on a NixOS host specifically for deterministic, reproducible deployments. Currently there's no way to install agentmail through Nix, I have to fall back to pip, which breaks the reproducibility guarantees that Nix provides
Me and my friend claude put together a proof of concept flake that provides:
- packages.default - the agentmail package built from pyproject.toml using
buildPythonPackage - devShells.default - dev shell with pytest, mypy, and ruff
- overlays.default - nixpkgs overlay so agentmail can be composed into any Python
environment - default.nix - legacy nix-env support via flake-compat
All dependencies (httpx, pydantic, pydantic-core, typing-extensions, websockets) are sourced from nixpkgs and pinned via flake.lock, so builds are fully reproducible. Pinned to nixos-25.11 stable
Since the SDK is auto-generated, I believe there are two paths forward (and I've created a proof-of-concept for both):
- In-repo flake
Branch: https://github.com/agentmail-to/agentmail-python/tree/feat/nixify
Adds flake.nix and default.nix directly to this repository, building from local source.
- Separate packaging repo
Repo: https://github.com/andreabadesso/agentmail-nix
Standalone repo using fetchFromGitHub at a pinned tag. Includes a GitHub Actions workflow that checks for new releases every 6 hours and auto-updates the version, hash, and creates a matching tag/release
I'd recommend the separate repo approach. It keeps this repository unchanged, mirrors the version automatically via CI, and lets Nix users pin to agentmail-nix independently
The in-repo flake is available on the feat/nixify branch if you'd prefer to keep everything in one place instead