-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAQ: Clarify poetry2nix does not use nixpkgs for Python packages #1193
Conversation
This is not strictly true. Many packages that aren't explicitly defined in the lock file are actually obtained from nixpkgs. This mostly applies to overrides, things like when package needs setuptools, flit, poetry, hatch and of course non python dependencies like openssl etc. |
Interesting, I wrote this up after a comment by @adisbladis, but I might've interpreted it too broadly. But in the end, this was my goal with this PR, to help spell out the architecture so we can document it somewhere visible.
@takeda can you point to locations where this is handled? |
I see. The context matters. The question was about package (pillow) listed as a dependency to author's application. In that context pillow defined in poetry is used after applying overrides. The nixpkgs version is totally tossed away. But then to install pillow poetry2nix adds setuptools dependency: poetry2nix/overrides/build-systems.json Lines 11369 to 11371 in a98ecb4
That dependency is not defined in poetry.lock file and is pulled from nixpkgs. You might think "oh this is a special case and it only happens at build time", but then there are broken packages like ansible, where all its dependencies are pulled from nixpkgs because it doesn't define any: poetry2nix/overrides/default.nix Lines 111 to 129 in a98ecb4
So the answer to this question is much more complex. |
So a better answer is that everything declared in a Is this accurate? |
The thing is that what is clear to me often is not clear to others, but this is what I would write:
|
I'm sure this could be expanded upon, and maybe this PR can provide the impetus for that.