python3Packages.sqlite-vec: init at 0.1.6#420393
Conversation
|
@SuperSandro2000 Thanks for the help earlier. This has been rewritten to supply the missing files. Please take a look. P.S. |
534e6e2 to
b05341d
Compare
|
Apologies for all the little updates, it's been death-by-trailing-whitespace |
ec3f74b to
114b5ee
Compare
|
GaetanLepage
left a comment
There was a problem hiding this comment.
Can these additional files be upstreamed? Maintaining them in the nixpkgs tree seems quite annoying.
There was a problem hiding this comment.
| --replace "@libpath@" "${lib.getLib sqlite-vec-c}/lib/" | |
| --replace-fail "@libpath@" "${lib.getLib sqlite-vec-c}/lib/" |
|
I plan to replace these with the upstreamed files once the PR stabilizes. Until then, they're not difficult for me to maintain. |
|
could you fetch the additionnal files from your PR instead of vendoring them? |
Done. Hopefully using commits can survive future changes to the PR. (The upstream package is published using nonstandard tools and I had to reverse-engineer |
|
@GaetanLepage note the change to using the upstream PR instead of vendored files. |
There was a problem hiding this comment.
- Is it possible to use
sourceRoot? - Move the comment out of the shell script
There was a problem hiding this comment.
The patches apply to /bindings/python, but when applied with sourceRoot = "${src.name}/bindings/python", you get bindings/python/python:
> /private/tmp/nix-build-python3.12-sqlite-vec-0.1.6.drv-0/source/bindings/python
> total 4.0K
> drwxr-xr-x 4 _nixbld1 nixbld 128 Jul 7 20:35 .
> dr-xr-xr-x 5 _nixbld1 nixbld 160 Jan 1 1970 ..
> -rw-r--r-- 1 _nixbld1 nixbld 1.4K Jan 2 1980 extra_init.py
> drwxr-xr-x 5 _nixbld1 nixbld 160 Jul 7 20:35 pythonThe only working solution seems to be to set sourceRoot = "${src.name}/bindings", apply the patches with stripLen=1 (which alter bindings/python appropriately), then cd into the now-patched python directory for the build.
I've tried stripLen values from 1-3 with the full sourceRoot and it always fails as shown in ls above.
This is a known issue, see https://discourse.nixos.org/t/how-to-apply-patches-with-sourceroot/59727
@samuela did you ever find a satisfactory solution?
There was a problem hiding this comment.
@drupol moved the comment out and reworded. Went back and tested the various combinations of sourceRoot and stripLen again to no avail.
There was a problem hiding this comment.
Move all the comments :)
Our comments crossed in the mail. ;) Please take a look now.
|
this new package shadows the sqlite-vec from top-level pkgs. To pass this package in argument you bind it to sqlite-vec-c. It looks like python3.pkgs.txtai has the same problem and you should apply the same process to it. |
Done. |
|
|
|
@GaetanLepage this, hopefully, fixes the build error on aarch64-linux |
|
Maybe, let's add |
Done and pushed. |
There was a problem hiding this comment.
| badPlatforms = [ "x86_64-darwin" ]; | |
| badPlatforms = [ | |
| # Segfaults during tests | |
| "x86_64-darwin" | |
| ]; |
Sorry to be picky there, but I think that it is quite important to state why the package is disabled on this given platform.
There was a problem hiding this comment.
You're absolutely right.Fixed and pushed.
|
|
Reverted in #424873 due to the underlying cause being an ARM-related issue while Hydra builds on Rosetta. |
|
is it the correct link? |
That PR is still a work in progress if that's what you're asking. I only reverted the part that marks x86_64-darwin bad as it was a side-effect of another bug. |
sqlite-vecexists as a C library, this provides the Python interfaces.Building from PyPi wheels as the Github sources don't provide any mechanism for building. No tests in package.Added missing files needed for a source build plus a test.
P.S. This is a requirement for bringing
python3Packages.langgraph-checkpoint-sqliteup to dateThings done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.