build(nix): Refactor gguf-py derivation to take in exact deps
This commit is contained in:
parent
0b8ddf8694
commit
11e581b45d
2 changed files with 16 additions and 5 deletions
|
@ -1,15 +1,17 @@
|
|||
{
|
||||
lib,
|
||||
llamaVersion,
|
||||
python3,
|
||||
numpy,
|
||||
poetry-core,
|
||||
buildPythonPackage,
|
||||
}@inputs:
|
||||
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
buildPythonPackage {
|
||||
pname = "gguf";
|
||||
version = llamaVersion;
|
||||
pyproject = true;
|
||||
nativeBuildInputs = with python3.pkgs; [ poetry-core ];
|
||||
propagatedBuildInputs = with python3.pkgs; [ numpy ];
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
src = lib.cleanSource ../../gguf-py;
|
||||
doCheck = false;
|
||||
meta = with lib; {
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
newScope,
|
||||
python3,
|
||||
llamaVersion ? "0.0.0",
|
||||
}:
|
||||
|
||||
let
|
||||
pythonPackages = python3.pkgs;
|
||||
buildPythonPackage = pythonPackages.buildPythonPackage;
|
||||
numpy = pythonPackages.numpy;
|
||||
poetry-core = pythonPackages.poetry-core;
|
||||
in
|
||||
|
||||
# We're using `makeScope` instead of just writing out an attrset
|
||||
# because it allows users to apply overlays later using `overrideScope'`.
|
||||
# Cf. https://noogle.dev/f/lib/makeScope
|
||||
|
||||
lib.makeScope newScope (self: {
|
||||
inherit llamaVersion;
|
||||
gguf-py = self.callPackage ./package-gguf-py.nix { };
|
||||
pp = python3.pkgs;
|
||||
gguf-py = self.callPackage ./package-gguf-py.nix { inherit buildPythonPackage numpy poetry-core; };
|
||||
llama-cpp = self.callPackage ./package.nix { };
|
||||
docker = self.callPackage ./docker.nix { };
|
||||
docker-min = self.callPackage ./docker.nix { interactive = false; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue