-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
feat: allow to split buildInputs in python derivations #684
Conversation
If my understanding is correct, and this is merely a build graph / closure size optimization, then I think it is unnecessary to put this complexity in the example. Concerning excluding all buildInputs from propagatedBuildInputs by default. I wonder if this can have undesired impacts when cross compiling. For the long term, it might be better if we had a python specific interface to differentiate between install and setup requirements. We can hot fix the issue, but I would like to know exactly what problem we are facing before doing so. If nothing is broken, there is no need to fix it. |
You could just add this to a d2n module: {config, ...}: {
...
mkDerivation.buildInputs = [config.deps.python.pkgs.poetry-core];
} However, very likely you'd get a conflict in some duplicated dependency, if the project you're building requires something that is also required by Dream2nix, instead, adds all inputs as The improvement I'm proposing here is that you can now do: {config, ...}: {
...
mkDerivation.buildInputs = [config.pip.drvs.poetry-core.public.out];
} And, by doing this, you're implicitly removing The separation of |
How about adding an option pip.setupDependencies = {
poetry-core = true
} With the effect that dependencies listed there will be put into buildInputs instead of propagatedBuildInputs. To me that feels better than manually having to As a follow up we could then make the locking script put that information into the lock file and populate these fields automatically. |
Looks good to me. I'd call it |
Sounds good |
7c2471b
to
4b50622
Compare
Refactored. |
Thanks and sorry for the broken CI. |
Follow-up of nix-community#676 (comment), now dependencies marked as buildInputs won't be included as propagatedBuildInputs for python derivations.
4b50622
to
089e4f6
Compare
Follow-up of #676 (comment), now dependencies marked as buildInputs won't be included as propagatedBuildInputs for python derivations.