!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

322 Members
https://github.com/nix-community/poetry2nix62 Servers

Load older messages


SenderMessageTime
8 Nov 2023
@adis:blad.isadisbladishttps://github.com/MatthewCroughan/privateGPT/blob/main/flake.nix#L3422:08:09
@adis:blad.isadisbladisAt least that would explain the setup hook error22:09:11
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howDid I do something wrong there?22:10:03
@adis:blad.isadisbladisWhy are you adding cmake?22:10:14
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howit said cmake not found 22:10:24
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how

If I remove that override:

Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing wheel setup hook
Using wheelUnpackPhase
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
Executing wheelUnpackPhase
Finished executing wheelUnpackPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Relea>
/nix/store/nid28g9ivpg8lvc6wk8na8mzxzyhqw8m-python3.11-cmake-3.26.4/nix-support/setup-hook: line 126: cmake: command not found
lines 1-24/24 (END)
22:10:53
@adis:blad.isadisbladisIt's almost 100% doing that because you added the override22:11:11
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howwell I removed the override, and the above log is what I get 22:11:23
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how
diff --git a/flake.nix b/flake.nix
index 6ed975e..9425b45 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,12 +28,6 @@
                 chroma-hnswlib = super.chroma-hnswlib.override { preferWheel = true; };
                 chromadb = super.chromadb.override { preferWheel = true; };
                 cmake = pkgs.python3Packages.cmake;
-                triton = super.triton.overridePythonAttrs
-                  (
-                    old: {
-                      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cmake ];
-                    }
-                  );
                 gradio = super.gradio.overridePythonAttrs
                   (
                     old: {
22:11:33
@adis:blad.isadisbladisWhich you don't actually want to do, least of which because upstream doesn't actually ship sdists: https://github.com/imartinez/privateGPT/blob/main/poetry.lock#L4598-L461722:11:35
@adis:blad.isadisbladisOnly wheels22:11:37
@adis:blad.isadisbladisWe don't have any overrides in poetry2nix adding cmake to triton, so idk what you're doing22:12:41
@adis:blad.isadisbladisAlso this is 100% wrong https://github.com/MatthewCroughan/privateGPT/blob/main/flake.nix#L3022:12:47
@adis:blad.isadisbladisAnd will cause shit to explode22:12:53
@adis:blad.isadisbladisNever ever reference an outside python package set22:13:01
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howoh, it made everything else compile, hah 22:13:05
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how
python3.11-cmake>     obj = import_module(mod_path)
python3.11-cmake>           ^^^^^^^^^^^^^^^^^^^^^^^
python3.11-cmake>   File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/importlib/__init__.py", line 126, in import_module
python3.11-cmake>     return _bootstrap._gcd_import(name[level:], package, level)
python3.11-cmake>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
python3.11-cmake>   File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
python3.11-cmake> ModuleNotFoundError: No module named 'setuptools'
python3.11-cmake> 
python3.11-cmake> 
22:13:28
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howif I remove it, something depends on it, and cmake itself fails like this 22:13:37
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howI add setuptools, it requires cmake binary, etc22:13:44
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howhttps://github.com/nix-community/poetry2nix/pull/113222:13:53
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howit's depending on this PR 22:13:57
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howI copied what's in this PR, but was still unable to get anywhere, because I need a newer one, and the challenges I faced seemed too hard 22:14:29
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howso I referenced the outside python package set, and that made everything compile22:14:50
@adis:blad.isadisbladisYou need to start by fixing that, because with that there the whole thing is cursed22:15:13
@adis:blad.isadisbladis And for that cmake issue look into dontUseCmakeConfigure 22:16:56
@adis:blad.isadisbladisIdk where you're getting cmake from or how the hook enters the build22:17:28
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howit's in the poetry.lock of privateGPT22:18:13
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howhttps://github.com/imartinez/privateGPT/blob/main/poetry.lock#L551-L55622:18:35
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howso this is the current thing I'm dealing with, trying to build cmake without using the one from nixpkgs 22:19:41
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how
                cmake = super.cmake.overridePythonAttrs (
                  old: let
                    cmake-src = pkgs.fetchgit {
                      url = "https://gitlab.kitware.com/cmake/cmake.git";
                      rev = "v" + super.cmake.version;
                      sha256 = "sha256-Y5YagT0FhWQCi99T1FNQHEfxEct3qk/esL8msll5g1k=";
                    };
                  in{
                    nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.cmake pkgs.ninja pkgs.glibc ];
                    propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.cmake ];

                    CMAKE_ARGS = "-DCMakeProject_SOURCE_DIR='${cmake-src}'";
                    dontUseCmakeConfigure = true;
                  }
                );

22:19:44

Show newer messages


Back to Room ListRoom Version: 6