1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
72 lines
1.1 KiB
Nix
72 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
setuptools-scm,
|
|
setuptools,
|
|
pydantic,
|
|
openai,
|
|
tiktoken,
|
|
diskcache,
|
|
cohere,
|
|
google-auth,
|
|
typer,
|
|
pyyaml,
|
|
transformers,
|
|
fastapi,
|
|
uvicorn,
|
|
accelerate,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "llmx";
|
|
version = "0.0.21a0";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-OEo6wIaDTktzAsP0rOmhxjFSHygTR/EpcRI6AXsu+6M=";
|
|
};
|
|
|
|
build-system = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
dependencies = [
|
|
pydantic
|
|
openai
|
|
tiktoken
|
|
diskcache
|
|
cohere
|
|
google-auth
|
|
typer
|
|
pyyaml
|
|
];
|
|
|
|
optional-dependencies = {
|
|
web = [
|
|
fastapi
|
|
uvicorn
|
|
];
|
|
transformers = [
|
|
accelerate
|
|
transformers
|
|
]
|
|
++ transformers.optional-dependencies.torch;
|
|
};
|
|
|
|
# Tests of llmx try to access openai, google, etc.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "llmx" ];
|
|
|
|
meta = {
|
|
description = "Library for LLM Text Generation";
|
|
homepage = "https://github.com/victordibia/llmx";
|
|
mainProgram = "llmx";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ moraxyc ];
|
|
};
|
|
}
|