Open light4 opened 6 months ago
fyi @GaetanLepage
Thanks for the report.
This is a bit tricky indeed. rye
is downloading (at runtime) its own version of the uv
and python
binaries which are of course not patched for use with NixOS.
I don't see an easy way to fix this as the fundamental approach of rye
is orthogonal to how NixOS works. rye
adopts a "no asumption" approach by bundling everything "deterministically". Well, they are doing a single assumption: FHS compliance of the host system.
Maybe an FHS nix shell can work out.
An other alternative would be to operate changes upstream letting the user the freedom of providing its own paths/binaries for uv
/python
, but again, this is exactly the contrary of what rye
is trying to achieve.
I managed to work around this with patchelf
. I placed the following in my development environment flake. It must be run after rye has downloaded a dynamically linked binary:
patchelf --set-interpreter ${pkgs.glibc}/lib/ld-linux-x86-64.so.2 $HOME/.rye/uv/*/uv
patchelf --set-interpreter ${pkgs.glibc}/lib/ld-linux-x86-64.so.2 $HOME/.rye/py/cpython@*/bin/python3
Unfortunately you have to run rye sync
to download a binary, run the above, then rinse and repeat until all downloaded binaries have been patched.
Describe the bug
Package rye depends on libz
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
rye sync success
Screenshots
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.