You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Since caching sources of a closure seems next-to-impossible at the moment[1], the next best thing is to at least to be able to cache the output of any derivation. But if allowSubstitutes is set (or left undefined?), it prevents that.
Describe the solution you'd like
Add option that allows user to override the behaviour set by allowSubstitutes. E.g. always-allow-substitutes = true|false
Describe alternatives you've considered
overrideAttrs is not always possible and would unnecessarily modify the derivation. If the documentation is correct [2] in that allowSubstitutes is only a build optimization it shouldn't introduce an impurity to allow the attribute to be overridden by an option.
allowSubstitutes
If this attribute is set to false, then Nix will always build this derivation; it will not try to substitute its outputs. This is useful for very trivial derivations (such as writeText in Nixpkgs) that are cheaper to build than to substitute from a binary cache.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Since caching sources of a closure seems next-to-impossible at the moment[1], the next best thing is to at least to be able to cache the output of any derivation. But if
allowSubstitutes
is set (or left undefined?), it prevents that.Describe the solution you'd like
Add option that allows user to override the behaviour set by
allowSubstitutes
. E.g.always-allow-substitutes = true|false
Describe alternatives you've considered
overrideAttrs
is not always possible and would unnecessarily modify the derivation. If the documentation is correct [2] in thatallowSubstitutes
is only a build optimization it shouldn't introduce an impurity to allow the attribute to be overridden by an option.Additional context
[1] https://discourse.nixos.org/t/using-nixos-in-an-isolated-environment/3369
[2] https://nixos.org/nix/manual/#sec-advanced-attributes
The text was updated successfully, but these errors were encountered: