about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix36
1 files changed, 23 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix b/nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix
index 4c5503c66071..f4b441142bfb 100644
--- a/nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/llama-index-readers-file/default.nix
@@ -1,27 +1,30 @@
 { lib
 , beautifulsoup4
 , buildPythonPackage
-, fetchFromGitHub
+, fetchPypi
 , llama-index-core
 , poetry-core
 , pymupdf
 , pypdf
-, pytestCheckHook
+, pythonOlder
 , pythonRelaxDepsHook
+, striprtf
 }:
 
 buildPythonPackage rec {
   pname = "llama-index-readers-file";
-  version = "0.1.7";
-
-  inherit (llama-index-core) src meta;
-
+  version = "0.1.12";
   pyproject = true;
 
-  sourceRoot = "${src.name}/llama-index-integrations/readers/${pname}";
+  disabled = pythonOlder "3.8";
+
+  src = fetchPypi {
+    pname = "llama_index_readers_file";
+    inherit version;
+    hash = "sha256-YGXL+AsPtdGJVYuLkK273JKsuGFH/KGS2I/MJwStKvM=";
+  };
 
   pythonRelaxDeps = [
-    "beautifulsoup4"
     "pymupdf"
     "pypdf"
   ];
@@ -30,23 +33,30 @@ buildPythonPackage rec {
     "bs4"
   ];
 
-  nativeBuildInputs = [
+  build-system = [
     poetry-core
     pythonRelaxDepsHook
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     beautifulsoup4
     llama-index-core
     pymupdf
     pypdf
+    striprtf
   ];
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
+  # Tests are only available in the mono repo
+  doCheck = false;
 
   pythonImportsCheck = [
     "llama_index.readers.file"
   ];
+
+  meta = with lib; {
+    description = "LlamaIndex Readers Integration for files";
+    homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-file";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
 }