From 85857bfbc201ecdbdd7b7befa7560ad13acaab00 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Fri, 14 Nov 2025 10:25:04 +0100 Subject: [PATCH] python313Packages.langchain: fix build Shell tool defaults to `/bin/bash`. --- pkgs/development/python-modules/langchain/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/langchain/default.nix b/pkgs/development/python-modules/langchain/default.nix index 77e77ce0e5e7..47e9dbbf61d7 100644 --- a/pkgs/development/python-modules/langchain/default.nix +++ b/pkgs/development/python-modules/langchain/default.nix @@ -21,6 +21,9 @@ sqlalchemy, tenacity, + # runtime + runtimeShell, + # tests blockbuster, freezegun, @@ -54,6 +57,11 @@ buildPythonPackage rec { sourceRoot = "${src.name}/libs/langchain_v1"; + postPatch = '' + substituteInPlace langchain/agents/middleware/shell_tool.py \ + --replace-fail '"/bin/bash"' '"${runtimeShell}"' + ''; + build-system = [ hatchling ]; pythonRelaxDeps = [