Skip to content

Commit 41ea261

Browse files
authored
nix: fix nix develop .#python-scripts (ggml-org#19218)
Without this I get: > * Getting build dependencies for wheel... > * Building wheel... > Successfully built gguf-0.17.1-py3-none-any.whl > Finished creating a wheel... > Finished executing pypaBuildPhase > Running phase: pythonRuntimeDepsCheckHook > Executing pythonRuntimeDepsCheck > Checking runtime dependencies for gguf-0.17.1-py3-none-any.whl > - requests not installed For full logs, run: nix log /nix/store/x0c4a251l68bvdgang9d8v2fsmqay8a4-python3.12-gguf-0.0.0.drv I changed a bit the style to make it more terse ~> more elegant in my opinion.
1 parent 89f10ba commit 41ea261

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

.devops/nix/package-gguf-py.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
llamaVersion,
44
numpy,
55
tqdm,
6+
requests,
67
sentencepiece,
78
pyyaml,
89
poetry-core,
@@ -20,6 +21,7 @@ buildPythonPackage {
2021
tqdm
2122
sentencepiece
2223
pyyaml
24+
requests
2325
];
2426
src = lib.cleanSource ../../gguf-py;
2527
pythonImportsCheck = [

.devops/nix/scope.nix

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77

88
let
99
pythonPackages = python3.pkgs;
10-
buildPythonPackage = pythonPackages.buildPythonPackage;
11-
numpy = pythonPackages.numpy;
12-
tqdm = pythonPackages.tqdm;
13-
sentencepiece = pythonPackages.sentencepiece;
14-
pyyaml = pythonPackages.pyyaml;
15-
poetry-core = pythonPackages.poetry-core;
16-
pytestCheckHook = pythonPackages.pytestCheckHook;
1710
in
1811

1912
# We're using `makeScope` instead of just writing out an attrset
@@ -23,17 +16,18 @@ in
2316
lib.makeScope newScope (self: {
2417
inherit llamaVersion;
2518
gguf-py = self.callPackage ./package-gguf-py.nix {
26-
inherit
27-
buildPythonPackage
19+
inherit (pythonPackages)
2820
numpy
2921
tqdm
3022
sentencepiece
31-
poetry-core
3223
pyyaml
3324
pytestCheckHook
25+
requests
26+
buildPythonPackage
27+
poetry-core
3428
;
3529
};
36-
python-scripts = self.callPackage ./python-scripts.nix { inherit buildPythonPackage poetry-core; };
30+
python-scripts = self.callPackage ./python-scripts.nix { inherit (pythonPackages) buildPythonPackage poetry-core; };
3731
llama-cpp = self.callPackage ./package.nix { };
3832
docker = self.callPackage ./docker.nix { };
3933
docker-min = self.callPackage ./docker.nix { interactive = false; };

0 commit comments

Comments
 (0)