forked from lix-project/hydra
Fix build
This commit is contained in:
parent
c642f787ee
commit
eb5873ae53
|
@ -1,5 +1,5 @@
|
||||||
{ hydraSrc ? builtins.fetchGit ./.
|
{ hydraSrc ? builtins.fetchGit ./.
|
||||||
, nixpkgs ? builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-19.09-small"; }
|
, nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/release-19.09.tar.gz
|
||||||
, officialRelease ? false
|
, officialRelease ? false
|
||||||
, shell ? false
|
, shell ? false
|
||||||
}:
|
}:
|
||||||
|
@ -154,9 +154,7 @@ rec {
|
||||||
|
|
||||||
preConfigure = "autoreconf -vfi";
|
preConfigure = "autoreconf -vfi";
|
||||||
|
|
||||||
NIX_LDFLAGS = [
|
NIX_LDFLAGS = [ "-lpthread" ];
|
||||||
"-lpthread"
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ static void worker(
|
||||||
nlohmann::json reply;
|
nlohmann::json reply;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto v = findAlongAttrPath(state, attrPath, autoArgs, *vRoot).first;
|
auto v = findAlongAttrPath(state, attrPath, autoArgs, *vRoot);
|
||||||
|
|
||||||
state.forceValue(*v);
|
state.forceValue(*v);
|
||||||
|
|
||||||
|
@ -138,23 +138,23 @@ static void worker(
|
||||||
|
|
||||||
/* If this is an aggregate, then get its constituents. */
|
/* If this is an aggregate, then get its constituents. */
|
||||||
auto a = v->attrs->get(state.symbols.create("_hydraAggregate"));
|
auto a = v->attrs->get(state.symbols.create("_hydraAggregate"));
|
||||||
if (a && state.forceBool(*a->value, *a->pos)) {
|
if (a && state.forceBool(*(*a)->value, *(*a)->pos)) {
|
||||||
auto a = v->attrs->get(state.symbols.create("constituents"));
|
auto a = v->attrs->get(state.symbols.create("constituents"));
|
||||||
if (!a)
|
if (!a)
|
||||||
throw EvalError("derivation must have a ‘constituents’ attribute");
|
throw EvalError("derivation must have a ‘constituents’ attribute");
|
||||||
|
|
||||||
|
|
||||||
PathSet context;
|
PathSet context;
|
||||||
state.coerceToString(*a->pos, *a->value, context, true, false);
|
state.coerceToString(*(*a)->pos, *(*a)->value, context, true, false);
|
||||||
for (auto & i : context)
|
for (auto & i : context)
|
||||||
if (i.at(0) == '!') {
|
if (i.at(0) == '!') {
|
||||||
size_t index = i.find("!", 1);
|
size_t index = i.find("!", 1);
|
||||||
job["constituents"].push_back(string(i, index + 1));
|
job["constituents"].push_back(string(i, index + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
state.forceList(*a->value, *a->pos);
|
state.forceList(*(*a)->value, *(*a)->pos);
|
||||||
for (unsigned int n = 0; n < a->value->listSize(); ++n) {
|
for (unsigned int n = 0; n < (*a)->value->listSize(); ++n) {
|
||||||
auto v = a->value->listElems()[n];
|
auto v = (*a)->value->listElems()[n];
|
||||||
state.forceValue(*v);
|
state.forceValue(*v);
|
||||||
if (v->type == tString)
|
if (v->type == tString)
|
||||||
job["namedConstituents"].push_back(state.forceStringNoCtx(*v));
|
job["namedConstituents"].push_back(state.forceStringNoCtx(*v));
|
||||||
|
|
Loading…
Reference in a new issue