1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 fetchPypi,
6 hatchling,
7 llama-index-core,
8 pymupdf,
9 pypdf,
10 pythonOlder,
11 striprtf,
12}:
13
14buildPythonPackage rec {
15 pname = "llama-index-readers-file";
16 version = "0.4.8";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 pname = "llama_index_readers_file";
23 inherit version;
24 hash = "sha256-0oIbFkwRRTt5k0VjVabFRGMaCuhlamRt+fwAnxbPuZ8=";
25 };
26
27 pythonRelaxDeps = [
28 "pymupdf"
29 "pypdf"
30 "striprtf"
31 ];
32
33 build-system = [ hatchling ];
34
35 dependencies = [
36 beautifulsoup4
37 llama-index-core
38 pymupdf
39 pypdf
40 striprtf
41 ];
42
43 # Tests are only available in the mono repo
44 doCheck = false;
45
46 pythonImportsCheck = [ "llama_index.readers.file" ];
47
48 meta = with lib; {
49 description = "LlamaIndex Readers Integration for files";
50 homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-file";
51 license = licenses.mit;
52 maintainers = with maintainers; [ fab ];
53 };
54}