From c3bc2f6ddf83e0f4f80c1f75207aafa71b70e98b Mon Sep 17 00:00:00 2001 From: ditsuke Date: Thu, 22 Feb 2024 21:02:44 +0530 Subject: [PATCH] build(nix): Package gguf-py --- .devops/nix/package.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index e065004af..f5a6c0d7d 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -70,6 +70,24 @@ let ) ", accelerated with ${strings.concatStringsSep ", " suffices}"; executableSuffix = effectiveStdenv.hostPlatform.extensions.executable; + + gguf-py = python3.pkgs.buildPythonPackage rec { + pname = "gguf"; + version = "0.0.0"; + pyproject = true; + nativeBuildInputs = with python3.pkgs; [ poetry-core ]; + # buildInputs = [ + # python3.pkgs.poetry-core + # ]; + propagatedBuildInputs = with python3.pkgs; [ numpy ]; + src = lib.cleanSource ../../gguf-py; + doCheck = false; + meta = with lib; { + description = "Python package for writing binary files in the GGU format"; + license = licenses.mit; + maintainers = [ maintainers.philiptaron ]; + }; + }; # TODO: package the Python in this repository in a Nix-like way. # It'd be nice to migrate to buildPythonPackage, as well as ensure this repo @@ -81,6 +99,7 @@ let llama-python = python3.withPackages (ps: [ ps.numpy ps.sentencepiece + gguf-py ]); # TODO(Green-Sky): find a better way to opt-into the heavy ml python runtime