python312Packages.langgraph-checkpoint-postgres: init at 1.0.3
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
langgraph-checkpoint,
|
||||
orjson,
|
||||
psycopg,
|
||||
langgraph-sdk,
|
||||
poetry-core,
|
||||
pythonOlder,
|
||||
postgresql,
|
||||
postgresqlTestHook,
|
||||
pytestCheckHook,
|
||||
pytest-asyncio,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langgraph-checkpoint-postgres";
|
||||
version = "1.0.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langgraph";
|
||||
rev = "refs/tags/checkpointpostgres==${version}";
|
||||
hash = "sha256-U7Bymo+Nj82kwjxN33W2MT10jv+lioZUxIKUt8Yxh/s=";
|
||||
};
|
||||
|
||||
postgresqlTestSetupPost = ''
|
||||
substituteInPlace tests/conftest.py \
|
||||
--replace-fail "DEFAULT_URI = \"postgres://postgres:postgres@localhost:5441/postgres?sslmode=disable\"" "DEFAULT_URI = \"postgres:///$PGDATABASE\""
|
||||
'';
|
||||
|
||||
sourceRoot = "${src.name}/libs/checkpoint-postgres";
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
dependencies = [
|
||||
langgraph-checkpoint
|
||||
orjson
|
||||
psycopg
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "langgraph.checkpoint.postgres" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
postgresql
|
||||
postgresqlTestHook
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = langgraph-sdk.updateScript;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Library with a Postgres implementation of LangGraph checkpoint saver";
|
||||
homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-postgres";
|
||||
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpointpostgres==${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
drupol
|
||||
sarahec
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -6766,6 +6766,8 @@ self: super: with self; {
|
||||
|
||||
langgraph = callPackage ../development/python-modules/langgraph { };
|
||||
|
||||
langgraph-checkpoint-postgres = callPackage ../development/python-modules/langgraph-checkpoint-postgres { };
|
||||
|
||||
langgraph-checkpoint-sqlite = callPackage ../development/python-modules/langgraph-checkpoint-sqlite { };
|
||||
|
||||
langgraph-cli = callPackage ../development/python-modules/langgraph-cli { };
|
||||
|
||||
Reference in New Issue
Block a user