Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
1.6 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
pdm-backend,
# dependencies
langchain-core,
tokenizers,
httpx,
httpx-sse,
pydantic,
# tests
langchain-tests,
pytest-asyncio,
pytestCheckHook,
# passthru
gitUpdater,
}:
buildPythonPackage rec {
pname = "langchain-mistralai";
version = "0.2.12";
pyproject = true;
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
tag = "langchain-mistralai==${version}";
hash = "sha256-eZyoveKn4S0nkK/2q8+HK0bpFAQEez4PyRETQeZItMo=";
};
sourceRoot = "${src.name}/libs/partners/mistralai";
build-system = [ pdm-backend ];
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
];
};
}