-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
haskellSrc2nix: disallow substitutes #49829
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
haskellSrc2nix: disallow substitutes #49829
Conversation
Fix NixOS#49818. See the bug for more details. The work done by haskellSrc2nix is usually lightweight, but needs to be done each time a cabal file change. This triggers unexpected network activity for a cache query which results most of the time on a cache miss. By disabling substitutes we: - avoid the, mostly useless, binary cache query - avoid unexpected network failure when users change a cabal file and try to rebuild without connectivity.
cc @basvandijk in case the codeowners ping gets lost in the storm. :-) |
Shouldn't this already be covered by
|
@lheckemann The manual was misleading, but has been corrected: NixOS/nix@5a3f140 NixOS/nix@1109193 |
Aah, I see. Thanks! |
Good change! Thank you |
Is there a way to override this change easily? |
@akshaymankar you can just override all your
However, I'm curious you are raising this question right now. Maybe it is related to #194753 that I'm trying to merge now? |
Thanks for the pointer, I ended up with this: hself: hsuper: {
haskellSrc2nix = args: (hsuper.haskellSrc2nix args).overrideAttrs(_old: {allowSubstitutes = true;});
} But in all I gained almost no time for about 40 packages, so I removed it.
I never had to pin so many packages in any of my other projects, so I never even noticed that substitutes were not allowed for this derivation. So, it is not related. |
Fix #49818. See the bug for more details.
Motivation for this change
The work done by haskellSrc2nix is usually lightweight, but needs to
be done each time a cabal file change. This triggers unexpected
network activity for a cache query which results most of the time on a
cache miss.
By disabling substitutes we:
try to rebuild without connectivity.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)