generalized pythonPackages

This commit is contained in:
TheK0tYaRa 2026-02-15 15:41:05 +02:00
parent 5791aa145d
commit 5ff377fc3f
4 changed files with 49 additions and 2 deletions

View file

@ -6,11 +6,11 @@
}:
let
categoryFolders = {
python3Packages = ./python3Packages;
pythonPackages = ./pythonPackages;
};
pyExts =
if categoryFolders ? python3Packages && builtins.pathExists categoryFolders.python3Packages then
if categoryFolders ? pythonPackages && builtins.pathExists categoryFolders.pythonPackages then
[
(pyFinal: _pyPrev: packagesFromTree categoryFolders.python3Packages pyFinal.callPackage)
]

View file

@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
wheel,
}:
buildPythonPackage rec {
pname = "raganything";
version = "1.2.9";
src = fetchFromGitHub {
owner = "HKUDS";
repo = "RAG-Anything";
rev = "v${version}";
hash = lib.fakeSha256; # replace with real hash after first build attempt
};
disabled = pythonOlder "3.10"; # upstream pyproject: requires-python >= 3.10
format = "setuptools";
nativeBuildInputs = [
setuptools
wheel
];
# Upstream's requirements.txt in this tag is a single line; make it parseable for setup.py.
# postPatch = ''
# cat > requirements.txt <<'EOF'
# huggingface_hub
# lightrag-hku
# mineru[core]
# tqdm
# EOF
# '';
# Minimal/viable: dont run tests, dont force import checks (runtime deps may be heavy / not packaged yet).
doCheck = false;
meta = with lib; {
description = "RAGAnything: All-in-One RAG System";
homepage = "https://github.com/HKUDS/RAG-Anything";
license = licenses.mit;
};
}