Files
nixpkgs/pkgs/development/python-modules/langchain-mistralai/default.nix
T
2025-10-28 12:53:43 -07:00

83 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
langchain-core,
tokenizers,
httpx,
httpx-sse,
pydantic,
# tests
langchain-tests,
pytest-asyncio,
pytestCheckHook,
# passthru
gitUpdater,
}:
buildPythonPackage rec {
pname = "langchain-mistralai";
version = "1.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
tag = "langchain-mistralai==${version}";
hash = "sha256-khpZY6kttbgacnY1EKCyIPBR2ZiZHC3OA+0NpIBXg9s=";
};
sourceRoot = "${src.name}/libs/partners/mistralai";
build-system = [ hatchling ];
dependencies = [
langchain-core
tokenizers
httpx
httpx-sse
pydantic
];
pythonRelaxDeps = [
# Each component release requests the exact latest core.
# That prevents us from updating individual components.
"langchain-core"
];
nativeCheckInputs = [
langchain-tests
pytest-asyncio
pytestCheckHook
];
enabledTestPaths = [ "tests/unit_tests" ];
pythonImportsCheck = [ "langchain_mistralai" ];
passthru = {
# python updater script sets the wrong tag
skipBulkUpdate = true;
updateScript = gitUpdater {
rev-prefix = "langchain-mistralai==";
};
};
meta = {
changelog = "https://github.com/langchain-ai/langchain-mistralai/releases/tag/${src.tag}";
description = "Build LangChain applications with mistralai";
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/mistralai";
license = lib.licenses.mit;
maintainers = [
lib.maintainers.sarahec
];
};
}