Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).defaultNix
78 changes: 78 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
description = "agentmail - Python SDK";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
};

outputs = { self, nixpkgs, flake-utils, flake-compat, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python3;

agentmail = python.pkgs.buildPythonPackage {
pname = "agentmail";
version = "0.2.10";
format = "pyproject";
src = ./.;

nativeBuildInputs = [
python.pkgs.poetry-core
];

propagatedBuildInputs = with python.pkgs; [
httpx
pydantic
pydantic-core
typing-extensions
websockets
];

pythonImportsCheck = [ "agentmail" ];

# Tests require network access / API keys
doCheck = false;
};
in
{
packages.default = agentmail;

devShells.default = pkgs.mkShell {
packages = [
(python.withPackages (ps: [
agentmail
ps.pytest
ps.pytest-asyncio
ps.pytest-xdist
ps.python-dateutil
ps.mypy
ps.ruff
]))
];
};
}
) // {
overlays.default = final: prev: {
pythonPackagesExtensions = (prev.pythonPackagesExtensions or []) ++ [
(python-final: python-prev: {
agentmail = python-final.buildPythonPackage {
pname = "agentmail";
version = "0.2.10";
format = "pyproject";
src = self;

nativeBuildInputs = [
python-final.poetry-core
];

propagatedBuildInputs = with python-final; [
httpx
pydantic
pydantic-core
typing-extensions
websockets
];

pythonImportsCheck = [ "agentmail" ];
doCheck = false;
};
})
];
};
};
}