pkgs/top-level/config: add alwaysAllowSubstitutes#221048
Closed
lovesegfault wants to merge 1 commit intoNixOS:masterfrom
Closed
pkgs/top-level/config: add alwaysAllowSubstitutes#221048lovesegfault wants to merge 1 commit intoNixOS:masterfrom
lovesegfault wants to merge 1 commit intoNixOS:masterfrom
Conversation
This introduces a new nixpkgs config option, `alwaysAllowSubstitutes` which causes `allowSubstitutes` to always be `true`. This is extremely useful for users with fast connections to their cache, and who prefer to _always_ fetch something from cache. In particular, those using `nix-build-uncached` could benefit from this.
This was referenced Mar 13, 2023
Member
|
A Nix setting would be better, not only because of the rebuilds, but also because making sure to always set this config item is a pain, and it probably shouldn't be set by open source expressions. |
7 tasks
Member
Author
|
@roberth Good idea, done: NixOS/nix#4442 I'm going to leave this PR open until we get closure, but I agree my PR to nix is preferable. |
lovesegfault
added a commit
to lovesegfault/nix
that referenced
this pull request
May 22, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
lovesegfault
added a commit
to lovesegfault/nix
that referenced
this pull request
Jun 1, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
lovesegfault
added a commit
to lovesegfault/nix
that referenced
this pull request
Jun 1, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
Member
Author
|
We definitely don't want this, the correct solution is the PR to nix, which is stuck. |
Member
|
It is queued for discussion by the Nix team. So it's not entirely stuck, but it may take a while. |
lovesegfault
added a commit
to lovesegfault/nix
that referenced
this pull request
Jun 16, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
lovesegfault
added a commit
to lovesegfault/nix
that referenced
this pull request
Jul 26, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
lovesegfault
added a commit
to lovesegfault/nix
that referenced
this pull request
Sep 22, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
Ericson2314
pushed a commit
to obsidiansystems/nix
that referenced
this pull request
Oct 16, 2023
This adds a new configuration option to Nix, `always-allow-substitutes`, whose effect is simple: it causes the `allowSubstitutes` attribute in derivations to be ignored, and for substituters to always be used. This is extremely valuable for users of Nix in CI, where usually `nix-build-uncached` is used. There, derivations which disallow substitutes cause headaches as the inputs for building already-cached derivations need to be fetched to spuriously rebuild some simple text file. This option should be a good middle-ground, since it doesn't imply rebuilding the world, such as the approach I took in NixOS/nixpkgs#221048
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
This introduces a new nixpkgs config option,
alwaysAllowSubstituteswhich causes
allowSubstitutesto always betrue.This is extremely useful for users with fast connections to their cache,
and who prefer to always fetch something from cache. In particular,
those using
nix-build-uncachedcould benefit from this.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)