From 0d22c41938e16dba6a12e3f7584d2c70c36e24d7 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 11 Jun 2025 16:02:13 -0700 Subject: [PATCH 1/3] python3Packages.langgraph*: use `${src.tag}` in `meta.changelog` --- .../python-modules/langgraph-checkpoint-postgres/default.nix | 2 +- .../python-modules/langgraph-checkpoint-sqlite/default.nix | 2 +- .../python-modules/langgraph-checkpoint/default.nix | 2 +- .../development/python-modules/langgraph-prebuilt/default.nix | 2 +- pkgs/development/python-modules/langgraph-sdk/default.nix | 2 +- pkgs/development/python-modules/langgraph/default.nix | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix index 9471af6c6c94..2f12d567c74c 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix @@ -100,7 +100,7 @@ buildPythonPackage rec { 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==${src.tag}"; + changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ drupol diff --git a/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix b/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix index 54efb25d7ca8..718e30604188 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix @@ -61,7 +61,7 @@ buildPythonPackage rec { }; meta = { - changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpointsqlite==${version}"; + changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}"; description = "Library with a SQLite implementation of LangGraph checkpoint saver"; homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-sqlite"; license = lib.licenses.mit; diff --git a/pkgs/development/python-modules/langgraph-checkpoint/default.nix b/pkgs/development/python-modules/langgraph-checkpoint/default.nix index f2cfee22c69f..627c11977ef4 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint/default.nix @@ -61,7 +61,7 @@ buildPythonPackage rec { }; meta = { - changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpoint==${version}"; + changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}"; description = "Library with base interfaces for LangGraph checkpoint savers"; homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint"; license = lib.licenses.mit; diff --git a/pkgs/development/python-modules/langgraph-prebuilt/default.nix b/pkgs/development/python-modules/langgraph-prebuilt/default.nix index 5e41724eebb7..ef8057f62cc5 100644 --- a/pkgs/development/python-modules/langgraph-prebuilt/default.nix +++ b/pkgs/development/python-modules/langgraph-prebuilt/default.nix @@ -96,7 +96,7 @@ buildPythonPackage rec { meta = { description = "Prebuilt agents add-on for Langgraph. Should always be bundled with langgraph"; homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/prebuilt"; - changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}"; + changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sarahec ]; }; diff --git a/pkgs/development/python-modules/langgraph-sdk/default.nix b/pkgs/development/python-modules/langgraph-sdk/default.nix index a1728f03f5d2..28433fac5b82 100644 --- a/pkgs/development/python-modules/langgraph-sdk/default.nix +++ b/pkgs/development/python-modules/langgraph-sdk/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { meta = { description = "SDK for interacting with the LangGraph Cloud REST API"; homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/sdk-py"; - changelog = "https://github.com/langchain-ai/langgraph/releases/tag/sdk==${version}"; + changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sarahec ]; }; diff --git a/pkgs/development/python-modules/langgraph/default.nix b/pkgs/development/python-modules/langgraph/default.nix index 3acda2264623..5c0a9a79194e 100644 --- a/pkgs/development/python-modules/langgraph/default.nix +++ b/pkgs/development/python-modules/langgraph/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "langchain-ai"; repo = "langgraph"; - tag = "${version}"; + tag = version; hash = "sha256-bTxtfduuuyRITZqhk15aWwxNwiZ7TMTgBOEPat6zVIc="; }; @@ -138,7 +138,7 @@ buildPythonPackage rec { meta = { description = "Build resilient language agents as graphs"; homepage = "https://github.com/langchain-ai/langgraph"; - changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}"; + changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sarahec ]; }; From 5983c2d520bb1887c25af57a017cd2f3bd11f374 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 11 Jun 2025 16:06:35 -0700 Subject: [PATCH 2/3] python3Packages.langgraph: document `passthru.updateScript` and simplify --- pkgs/development/python-modules/langgraph/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/langgraph/default.nix b/pkgs/development/python-modules/langgraph/default.nix index 5c0a9a79194e..153206ad3c22 100644 --- a/pkgs/development/python-modules/langgraph/default.nix +++ b/pkgs/development/python-modules/langgraph/default.nix @@ -128,10 +128,11 @@ buildPythonPackage rec { "tests/test_pregel_async.py" ]; + # Since `langgraph` is the only unprefixed package, we have to use an explicit match passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex" - "^(\\d+\\.\\d+\\.\\d+)" + "([0-9.]+)" ]; }; From 9c4adc04e88c9d2b9c456104b8f6f87dbd609f71 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 11 Jun 2025 16:06:35 -0700 Subject: [PATCH 3/3] python3Packages.langgraph*: replace `nix-update-script` with `gitUpdater` --- .../langgraph-checkpoint-postgres/default.nix | 9 +++------ .../langgraph-checkpoint-sqlite/default.nix | 9 +++------ .../python-modules/langgraph-checkpoint/default.nix | 9 +++------ .../development/python-modules/langgraph-cli/default.nix | 9 +++------ .../python-modules/langgraph-prebuilt/default.nix | 9 +++------ .../development/python-modules/langgraph-sdk/default.nix | 9 +++------ 6 files changed, 18 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix index 2f12d567c74c..8a6b11d164e9 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix @@ -21,7 +21,7 @@ pytest-asyncio, # passthru - nix-update-script, + gitUpdater, }: buildPythonPackage rec { @@ -90,11 +90,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "langgraph.checkpoint.postgres" ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "checkpointpostgres==(\\d+\\.\\d+\\.\\d+)" - ]; + passthru.updateScript = gitUpdater { + rev-prefix = "checkpointpostgres=="; }; meta = { diff --git a/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix b/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix index 718e30604188..abe8da772df7 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix @@ -15,7 +15,7 @@ pytestCheckHook, # passthru - nix-update-script, + gitUpdater, }: buildPythonPackage rec { @@ -53,11 +53,8 @@ buildPythonPackage rec { pytestCheckHook ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "checkpoint-sqlite==(\\d+\\.\\d+\\.\\d+)" - ]; + passthru.updateScript = gitUpdater { + rev-prefix = "checkpointsqlite=="; }; meta = { diff --git a/pkgs/development/python-modules/langgraph-checkpoint/default.nix b/pkgs/development/python-modules/langgraph-checkpoint/default.nix index 627c11977ef4..865d68a2b4b6 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint/default.nix @@ -18,7 +18,7 @@ pytestCheckHook, # passthru - nix-update-script, + gitUpdater, }: buildPythonPackage rec { @@ -53,11 +53,8 @@ buildPythonPackage rec { pytestCheckHook ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "checkpoint==([0-9.]+)" - ]; + passthru.updateScript = gitUpdater { + rev-prefix = "checkpoint=="; }; meta = { diff --git a/pkgs/development/python-modules/langgraph-cli/default.nix b/pkgs/development/python-modules/langgraph-cli/default.nix index 89d1bdcc2089..10b1f19c9454 100644 --- a/pkgs/development/python-modules/langgraph-cli/default.nix +++ b/pkgs/development/python-modules/langgraph-cli/default.nix @@ -15,7 +15,7 @@ docker-compose, # passthru - nix-update-script, + gitUpdater, }: buildPythonPackage rec { @@ -59,11 +59,8 @@ buildPythonPackage rec { "test_dockerfile_command_with_docker_compose" ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "cli==(\\d+\\.\\d+\\.\\d+)" - ]; + passthru.updateScript = gitUpdater { + rev-prefix = "cli=="; }; meta = { diff --git a/pkgs/development/python-modules/langgraph-prebuilt/default.nix b/pkgs/development/python-modules/langgraph-prebuilt/default.nix index ef8057f62cc5..96694f77fbff 100644 --- a/pkgs/development/python-modules/langgraph-prebuilt/default.nix +++ b/pkgs/development/python-modules/langgraph-prebuilt/default.nix @@ -24,7 +24,7 @@ xxhash, # passthru - nix-update-script, + gitUpdater, }: # langgraph-prebuilt isn't meant to be a standalone package but is bundled into langgraph at build time. # It exists so the langgraph team can iterate on it without having to rebuild langgraph. @@ -86,11 +86,8 @@ buildPythonPackage rec { "tests/test_react_agent.py" ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "prebuilt==(\\d+\\.\\d+\\.\\d+)" - ]; + passthru.updateScript = gitUpdater { + rev-prefix = "prebuilt=="; }; meta = { diff --git a/pkgs/development/python-modules/langgraph-sdk/default.nix b/pkgs/development/python-modules/langgraph-sdk/default.nix index 28433fac5b82..8dc6e7c23fc0 100644 --- a/pkgs/development/python-modules/langgraph-sdk/default.nix +++ b/pkgs/development/python-modules/langgraph-sdk/default.nix @@ -13,7 +13,7 @@ typing-extensions, # passthru - nix-update-script, + gitUpdater, }: buildPythonPackage rec { @@ -43,11 +43,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "langgraph_sdk" ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "sdk==(\\d+\\.\\d+\\.\\d+)" - ]; + passthru.updateScript = gitUpdater { + rev-prefix = "sdk=="; }; meta = {