Files
nixpkgs/pkgs/development/python-modules/manifest-ml/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
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
2026-01-11 09:34:20 -08:00

122 lines
2.1 KiB
Nix

{
lib,
accelerate,
aiohttp,
buildPythonPackage,
fastapi,
fetchFromGitHub,
flask,
numpy,
pg8000,
pillow,
pydantic,
pytestCheckHook,
redis,
requests,
sentence-transformers,
setuptools,
sqlalchemy,
sqlitedict,
tenacity,
tiktoken,
torch,
transformers,
uvicorn,
xxhash,
}:
buildPythonPackage rec {
pname = "manifest-ml";
version = "0.1.9";
pyproject = true;
src = fetchFromGitHub {
owner = "HazyResearch";
repo = "manifest";
tag = "v${version}";
hash = "sha256-6m1XZOXzflBYyq9+PinbrW+zqvNGFN/aRDHH1b2Me5E=";
};
__darwinAllowLocalNetworking = true;
pythonRelaxDeps = [ "pydantic" ];
build-system = [
setuptools
];
dependencies = [
numpy
pydantic
redis
requests
aiohttp
sqlitedict
tenacity
tiktoken
xxhash
];
optional-dependencies = {
api = [
accelerate
# deepspeed
# diffusers
flask
sentence-transformers
torch
transformers
];
app = [
fastapi
uvicorn
];
diffusers = [ pillow ];
gcp = [
pg8000
# cloud-sql-python-connector
sqlalchemy
];
};
nativeCheckInputs = [
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
preCheck = ''
export HOME=$TMPDIR
'';
disabledTestPaths = [
# this file tries importing `deepspeed`, which is not yet packaged in nixpkgs
"tests/test_huggingface_api.py"
];
disabledTests = [
# Tests require DB access
"test_init"
"test_key_get_and_set"
"test_get"
# Tests require network access
"test_abatch_run"
"test_batch_run"
"test_retry_handling"
"test_run_chat"
"test_run"
"test_score_run"
# Test is time-sensitive
"test_timing"
];
pythonImportsCheck = [ "manifest" ];
meta = {
description = "Manifest for Prompting Foundation Models";
homepage = "https://github.com/HazyResearch/manifest";
changelog = "https://github.com/HazyResearch/manifest/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ natsukium ];
};
}