Nix python - argon2-cffi # error >Config error: Neither [project] nor [tool.flit.metadata] found in pyproject.toml

building '/nix/store/5d1359hg38z5p303nc3w7hbg0qjwv3qn-python3.9-argon2-cffi-20.1.0.drv'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing flit-build-hook
Using flitBuildPhase
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
unpacking sources
unpacking source archive /nix/store/19xjkd7kl1rccwfllg1cxhisjmgjyai7-argon2-cffi-20.1.0.tar.gz
source root is argon2-cffi-20.1.0
setting SOURCE_DATE_EPOCH to timestamp 1589175040 of file argon2-cffi-20.1.0/setup.cfg
patching sources
configuring
no configure script, doing nothing
building
Executing flitBuildPhase
>Config error: Neither [project] nor [tool.flit.metadata] found in pyproject.toml
error: builder for '/nix/store/5d1359hg38z5p303nc3w7hbg0qjwv3qn-python3.9-argon2-cffi-20.1.0.drv' failed with exit code 1;
       last 10 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/19xjkd7kl1rccwfllg1cxhisjmgjyai7-argon2-cffi-20.1.0.tar.gz
       > source root is argon2-cffi-20.1.0
       > setting SOURCE_DATE_EPOCH to timestamp 1589175040 of file argon2-cffi-20.1.0/setup.cfg
       > patching sources
       > configuring
       > no configure script, doing nothing
       > building
       > Executing flitBuildPhase
       > >Config error: Neither [project] nor [tool.flit.metadata] found in pyproject.toml
       For full logs, run 'nix log /nix/store/5d1359hg38z5p303nc3w7hbg0qjwv3qn-python3.9-argon2-cffi-20.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/j7ai2v72czwndna85hz93ia07mgfrcrp-python3-3.9.13-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3s3m1kj1cy087v1n45rv16cssx7l7rr5-buildEnvJL.drv' failed to build

Means what?

You are trying to build an old version (20.1.0) of the argon2-cffi source using a derivation designed for a newer version. The newer versions use flit as a build system, but the older version does not – which is causing the problem.

You can fix this by using a newer version of argon2-cffi, or you can try an override setting format = "setuptools".

If you post your .nix file here we can provide more help. :slight_smile:

1 Like