From 7395e091c535df996f2dde3fb8170f2a211fbae5 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 3 Dec 2019 18:01:45 +0100 Subject: [PATCH] doc/manual: add note to `allowSubstitutes` advanced attribute --- doc/manual/expressions/advanced-attributes.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/manual/expressions/advanced-attributes.xml b/doc/manual/expressions/advanced-attributes.xml index 07b0d97d3..e1fbe6291 100644 --- a/doc/manual/expressions/advanced-attributes.xml +++ b/doc/manual/expressions/advanced-attributes.xml @@ -325,12 +325,23 @@ big = "a very long string"; allowSubstitutes - If this attribute is set to + + 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. + build than to substitute from a binary cache. + + You need to have a builder configured which satisfies + the derivation’s system attribute, since the + derivation cannot be substituted. Thus it is usually a good idea + to align system with + builtins.currentSystem when setting + allowSubstitutes to false. + For most trivial derivations this should be the case. + +