Open adamlwgriffiths opened 3 years ago
Ok, I'm having more trouble with cffi
in a different shell where im trying to pull in poetry
.
Not sure what's going on.
Executing pipInstallPhase
/build/SecretStorage-3.3.1/dist /build/SecretStorage-3.3.1
Processing ./SecretStorage-3.3.1-py3-none-any.whl
Requirement already satisfied: cryptography>=2.0 in /nix/store/b09a13zp017h964rbq3pfsq6x83ka2xm-python3.8-cryptography-3.4.7/lib/python3.8/site-packages (from SecretStorage==3.3.1) (3.4.7)
Requirement already satisfied: jeepney>=0.6 in /nix/store/h4j7xgj69f61fz6y6yyrh771lljww59k-python3.8-jeepney-0.6.0/lib/python3.8/site-packages (from SecretStorage==3.3.1) (0.6.0)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of secretstorage to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement cffi>=1.12 (from cryptography)
ERROR: No matching distribution found for cffi>=1.12
builder for '/nix/store/g54fhzi2iyij6imjsywx35fw86rvxrb4-python3.8-secretstorage-3.3.1.drv' failed with exit code 1
Ok so this has been causing me a lot of trouble with anything that pulls in cffi
- which turns out to be quite a few libs (twine, poetry, etc).
The solution seems to be to explicitly specify the same dependency (cffi>=1.12
) in the mach-nix.mkPython.requirements field.
Eg:
custom-python = mach-nix.mkPython {
requirements = ''
setuptools
cffi>=1.12
twine
'';
...
Doing that seems to get mach-nix to understand what to do. But if left to its own devices the provided libraries dependencies seem to confuse mach-nix.
The problem seems to be caused by different provider settings passed to buildPythonPackage and mkPython.
I get a collision with
cffi
against itself when trying to install Python 3.8 andraylib-python-cffi
.As you can see, the same version has been pulled out twice, but with different hashes.
Here's my cut down shell.nix which demonstrates the issue