-
Notifications
You must be signed in to change notification settings - Fork 86
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
Should probably run with strictDeps = true
#403
Comments
Haven't used it myself before, what are the impacts of setting FWIW adding a new |
I'm not entirely sure. I've found:
It seems to me that without it Nix mkDerivation's infers some inputs transitively.
Yes, but it will not trigger
It does. I started using it and had to move certain things between |
Although I do agree that |
I think you're right. It is confusing, especially when it happens implicitly. |
It is generally recommended to use this option to avoid having unnecessary runtime dependencies [1]. Links: [1] ipetkov/crane#403
It is very easy to trigger needless rebuilds of dependencies between multiple cargo inheritance steps, by just introducing seamingly unrelated binary, only because by default
mkDerivation
seems to make dependencies of your build inputs also available in the derivation.So I had a one off test, imported some extra binary in
nativeBuildInputs
just for that one step, and I seeopenssl-sys
and downstream crates are rebuilding because of that. Turns out that binary was using a some library which is them being added toPKG_CONFIG_PATH
, which makes build.rs ofopenssl-sys
want to rebuild. Tricky to debug.I was told on NixOS Matrix channel that using
strictDeps = true;
is generally a good idea, so I'm going to do just that, but crane could do that by default, given how it is used. Might save some users lots of trouble, at the minor cost of having to list all direct build inputs.The text was updated successfully, but these errors were encountered: