From 505ad166ec55d361807f165ddecf88af1e730281 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 26 Mar 2024 08:28:15 +0100 Subject: [PATCH] python311Packages.llama-index-embeddings-google: 0.10.22 -> 0.1.4 No longer use mono repo for the source as the release cycle don't match any more. --- .../llama-index-embeddings-google/default.nix | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-embeddings-google/default.nix b/pkgs/development/python-modules/llama-index-embeddings-google/default.nix index 6cf2d1772163..eb378f7ca3af 100644 --- a/pkgs/development/python-modules/llama-index-embeddings-google/default.nix +++ b/pkgs/development/python-modules/llama-index-embeddings-google/default.nix @@ -1,30 +1,51 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , google-generativeai , llama-index-core , poetry-core +, pythonOlder +, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "llama-index-embeddings-google"; - - inherit (llama-index-core) version src meta; - + version = "0.1.4"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/embeddings/${pname}"; + disabled = pythonOlder "3.8"; - nativeBuildInputs = [ - poetry-core + src = fetchPypi { + pname = "llama_index_embeddings_google"; + inherit version; + hash = "sha256-jQYN/5XPCrMjvwXBARdRDLC+3JhqgZjlcVajmcRlVJw="; + }; + + pythonRelaxDeps = [ + "google-generativeai" ]; - propagatedBuildInputs = [ + build-system = [ + poetry-core + pythonRelaxDepsHook + ]; + + dependencies = [ google-generativeai llama-index-core ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.embeddings.google" ]; + + meta = with lib; { + description = "LlamaIndex Embeddings Integration for Google"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/embeddings/llama-index-embeddings-google"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; }