Skip to content

Commit 4b80eb6

Browse files
authored
python3Packages.langgraph*: switch to gitUpdater, use ${src.tag} (#415991)
2 parents ead4ef4 + 9c4adc0 commit 4b80eb6

File tree

7 files changed

+27
-44
lines changed

7 files changed

+27
-44
lines changed

pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
pytest-asyncio,
2222

2323
# passthru
24-
nix-update-script,
24+
gitUpdater,
2525
}:
2626

2727
buildPythonPackage rec {
@@ -90,17 +90,14 @@ buildPythonPackage rec {
9090

9191
pythonImportsCheck = [ "langgraph.checkpoint.postgres" ];
9292

93-
passthru.updateScript = nix-update-script {
94-
extraArgs = [
95-
"--version-regex"
96-
"checkpointpostgres==(\\d+\\.\\d+\\.\\d+)"
97-
];
93+
passthru.updateScript = gitUpdater {
94+
rev-prefix = "checkpointpostgres==";
9895
};
9996

10097
meta = {
10198
description = "Library with a Postgres implementation of LangGraph checkpoint saver";
10299
homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-postgres";
103-
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpointpostgres==${src.tag}";
100+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
104101
license = lib.licenses.mit;
105102
maintainers = with lib.maintainers; [
106103
drupol

pkgs/development/python-modules/langgraph-checkpoint-sqlite/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
pytestCheckHook,
1616

1717
# passthru
18-
nix-update-script,
18+
gitUpdater,
1919
}:
2020

2121
buildPythonPackage rec {
@@ -53,15 +53,12 @@ buildPythonPackage rec {
5353
pytestCheckHook
5454
];
5555

56-
passthru.updateScript = nix-update-script {
57-
extraArgs = [
58-
"--version-regex"
59-
"checkpoint-sqlite==(\\d+\\.\\d+\\.\\d+)"
60-
];
56+
passthru.updateScript = gitUpdater {
57+
rev-prefix = "checkpointsqlite==";
6158
};
6259

6360
meta = {
64-
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpointsqlite==${version}";
61+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
6562
description = "Library with a SQLite implementation of LangGraph checkpoint saver";
6663
homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-sqlite";
6764
license = lib.licenses.mit;

pkgs/development/python-modules/langgraph-checkpoint/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
pytestCheckHook,
1919

2020
# passthru
21-
nix-update-script,
21+
gitUpdater,
2222
}:
2323

2424
buildPythonPackage rec {
@@ -53,15 +53,12 @@ buildPythonPackage rec {
5353
pytestCheckHook
5454
];
5555

56-
passthru.updateScript = nix-update-script {
57-
extraArgs = [
58-
"--version-regex"
59-
"checkpoint==([0-9.]+)"
60-
];
56+
passthru.updateScript = gitUpdater {
57+
rev-prefix = "checkpoint==";
6158
};
6259

6360
meta = {
64-
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpoint==${version}";
61+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
6562
description = "Library with base interfaces for LangGraph checkpoint savers";
6663
homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint";
6764
license = lib.licenses.mit;

pkgs/development/python-modules/langgraph-cli/default.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
docker-compose,
1616

1717
# passthru
18-
nix-update-script,
18+
gitUpdater,
1919
}:
2020

2121
buildPythonPackage rec {
@@ -59,11 +59,8 @@ buildPythonPackage rec {
5959
"test_dockerfile_command_with_docker_compose"
6060
];
6161

62-
passthru.updateScript = nix-update-script {
63-
extraArgs = [
64-
"--version-regex"
65-
"cli==(\\d+\\.\\d+\\.\\d+)"
66-
];
62+
passthru.updateScript = gitUpdater {
63+
rev-prefix = "cli==";
6764
};
6865

6966
meta = {

pkgs/development/python-modules/langgraph-prebuilt/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
xxhash,
2525

2626
# passthru
27-
nix-update-script,
27+
gitUpdater,
2828
}:
2929
# langgraph-prebuilt isn't meant to be a standalone package but is bundled into langgraph at build time.
3030
# It exists so the langgraph team can iterate on it without having to rebuild langgraph.
@@ -86,17 +86,14 @@ buildPythonPackage rec {
8686
"tests/test_react_agent.py"
8787
];
8888

89-
passthru.updateScript = nix-update-script {
90-
extraArgs = [
91-
"--version-regex"
92-
"prebuilt==(\\d+\\.\\d+\\.\\d+)"
93-
];
89+
passthru.updateScript = gitUpdater {
90+
rev-prefix = "prebuilt==";
9491
};
9592

9693
meta = {
9794
description = "Prebuilt agents add-on for Langgraph. Should always be bundled with langgraph";
9895
homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/prebuilt";
99-
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}";
96+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
10097
license = lib.licenses.mit;
10198
maintainers = with lib.maintainers; [ sarahec ];
10299
};

pkgs/development/python-modules/langgraph-sdk/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
typing-extensions,
1414

1515
# passthru
16-
nix-update-script,
16+
gitUpdater,
1717
}:
1818

1919
buildPythonPackage rec {
@@ -43,17 +43,14 @@ buildPythonPackage rec {
4343

4444
pythonImportsCheck = [ "langgraph_sdk" ];
4545

46-
passthru.updateScript = nix-update-script {
47-
extraArgs = [
48-
"--version-regex"
49-
"sdk==(\\d+\\.\\d+\\.\\d+)"
50-
];
46+
passthru.updateScript = gitUpdater {
47+
rev-prefix = "sdk==";
5148
};
5249

5350
meta = {
5451
description = "SDK for interacting with the LangGraph Cloud REST API";
5552
homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/sdk-py";
56-
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/sdk==${version}";
53+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
5754
license = lib.licenses.mit;
5855
maintainers = with lib.maintainers; [ sarahec ];
5956
};

pkgs/development/python-modules/langgraph/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ buildPythonPackage rec {
4444
src = fetchFromGitHub {
4545
owner = "langchain-ai";
4646
repo = "langgraph";
47-
tag = "${version}";
47+
tag = version;
4848
hash = "sha256-bTxtfduuuyRITZqhk15aWwxNwiZ7TMTgBOEPat6zVIc=";
4949
};
5050

@@ -128,17 +128,18 @@ buildPythonPackage rec {
128128
"tests/test_pregel_async.py"
129129
];
130130

131+
# Since `langgraph` is the only unprefixed package, we have to use an explicit match
131132
passthru.updateScript = nix-update-script {
132133
extraArgs = [
133134
"--version-regex"
134-
"^(\\d+\\.\\d+\\.\\d+)"
135+
"([0-9.]+)"
135136
];
136137
};
137138

138139
meta = {
139140
description = "Build resilient language agents as graphs";
140141
homepage = "https://github.com/langchain-ai/langgraph";
141-
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}";
142+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
142143
license = lib.licenses.mit;
143144
maintainers = with lib.maintainers; [ sarahec ];
144145
};

0 commit comments

Comments
 (0)