mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
* Experimental feature: allow a derivation to tell the build hook that
it requires a certain feature on the build machine, e.g. requiredSystemFeatures = [ "kvm" ]; We need this in Hydra to make sure that builds that require KVM support are forwarded to machines that have KVM support. Probably this should also be enforced for local builds.
This commit is contained in:
parent
e41ecbf730
commit
766f708418
4 changed files with 43 additions and 12 deletions
|
@ -966,6 +966,17 @@ Strings tokenizeString(const string & s, const string & separators)
|
|||
}
|
||||
|
||||
|
||||
string concatStringsSep(const string & sep, const Strings & ss)
|
||||
{
|
||||
string s;
|
||||
foreach (Strings::const_iterator, i, ss) {
|
||||
if (s.size() != 0) s += sep;
|
||||
s += *i;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
string statusToString(int status)
|
||||
{
|
||||
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||
|
|
|
@ -280,6 +280,11 @@ MakeError(Interrupted, BaseError)
|
|||
Strings tokenizeString(const string & s, const string & separators = " \t\n\r");
|
||||
|
||||
|
||||
/* Concatenate the given strings with a separator between the
|
||||
elements. */
|
||||
string concatStringsSep(const string & sep, const Strings & ss);
|
||||
|
||||
|
||||
/* Convert the exit status of a child as returned by wait() into an
|
||||
error string. */
|
||||
string statusToString(int status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue