dream2nix
dream2nix copied to clipboard
python egg_info requires read-write filesystem.
For setyp.py python packages that include a wheel, the egg_info step tries to write to a directory $package_name.egg-info. Unfortunately this isn't directly managed by pip so pip's --dry-run flag doesn't really control this.
$ ./result/bin/refresh
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
running egg_info
creating crossbar.egg-info
error: could not create 'crossbar.egg-info': Read-only file system
[end of output]
I started a branch/PR to first copy requirementList entry from the nix store to the TemporaryDirectory created in fetch_pip_metadata(). However, a latter check in lock_info_from_path() restricts requirementsList and requirementsFiles to top level paths in /nix/store.
Exception: fatal: requirement '/tmp/tmp.h5aBnHOLCz/tmpd6id8mfm/nix/store/<hash>-source' refers to something outside /nix/store and our local repo '<path>'
I think the best solution is to just relax the lock_info_from_path() to allow paths where previously copied out of the nix store. However, I just wanted to check if anyone else has seen this issue before and has a better solution.
You could whitelist the temporary directory in lock_info_from_path
Any chance this can be looked into? Hitting this as well, but not able to find a workaround myself.