Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into relationalai-2023…
Browse files Browse the repository at this point in the history
…1201
  • Loading branch information
rbvermaa committed Dec 14, 2023
2 parents a8ff0ad + 163dbf7 commit b8acf7b
Show file tree
Hide file tree
Showing 18 changed files with 547 additions and 386 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $ nix-build
You can use the provided shell.nix to get a working development environment:
```
$ nix-shell
$ ./bootstrap
$ autoreconfPhase
$ configurePhase # NOTE: not ./configure
$ make
```
Expand Down
2 changes: 0 additions & 2 deletions bootstrap

This file was deleted.

14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 18 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "A Nix-based continuous build system";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
inputs.nix.url = "github:NixOS/nix/2.17.0";
inputs.nix.url = "github:NixOS/nix/2.19-maintenance";
inputs.nix.inputs.nixpkgs.follows = "nixpkgs";

outputs = { self, nixpkgs, nix }:
Expand Down Expand Up @@ -61,10 +61,11 @@

};

hydra = with final; let
perlDeps = buildEnv {
hydra = let
inherit (final) lib stdenv;
perlDeps = final.buildEnv {
name = "hydra-perl-deps";
paths = with perlPackages; lib.closePropagation
paths = with final.perlPackages; lib.closePropagation
[
AuthenSASL
CatalystActionREST
Expand Down Expand Up @@ -98,7 +99,7 @@
FileSlurper
FileWhich
final.nix.perl-bindings
git
final.git
IOCompress
IPCRun
IPCRun3
Expand Down Expand Up @@ -141,15 +142,20 @@

src = self;

buildInputs =
[
nativeBuildInputs =
with final.buildPackages; [
makeWrapper
autoconf
autoreconfHook
automake
libtool
unzip
nukeReferences
pkg-config
mdbook
];

buildInputs =
with final; [
unzip
libpqxx
top-git
mercurial
Expand All @@ -162,7 +168,6 @@
final.nix
perlDeps
perl
mdbook
pixz
boost
postgresql_13
Expand All @@ -172,7 +177,7 @@
prometheus-cpp
];

checkInputs = [
checkInputs = with final; [
cacert
foreman
glibcLocales
Expand All @@ -181,7 +186,7 @@
python3
];

hydraPath = lib.makeBinPath (
hydraPath = with final; lib.makeBinPath (
[
subversion
openssh
Expand All @@ -203,7 +208,7 @@
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]
);

OPENLDAP_ROOT = openldap;
OPENLDAP_ROOT = final.openldap;

shellHook = ''
pushd $(git rev-parse --show-toplevel) >/dev/null
Expand All @@ -218,8 +223,6 @@
popd >/dev/null
'';

preConfigure = "autoreconf -vfi";

NIX_LDFLAGS = [ "-lpthread" ];

enableParallelBuilding = true;
Expand Down
15 changes: 9 additions & 6 deletions src/hydra-eval-jobs/hydra-eval-jobs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#include "store-api.hh"
#include "eval.hh"
#include "eval-inline.hh"
#include "eval-settings.hh"
#include "signals.hh"
#include "terminal.hh"
#include "util.hh"
#include "get-drvs.hh"
#include "globals.hh"
Expand Down Expand Up @@ -53,7 +56,7 @@ using namespace nix;
static Path gcRootsDir;
static size_t maxMemorySize;

struct MyArgs : MixEvalArgs, MixCommonArgs
struct MyArgs : MixEvalArgs, MixCommonArgs, RootArgs
{
Path releaseExpr;
bool flake = false;
Expand Down Expand Up @@ -94,7 +97,7 @@ static std::string queryMetaStrings(EvalState & state, DrvInfo & drv, const std:
rec = [&](Value & v) {
state.forceValue(v, noPos);
if (v.type() == nString)
res.push_back(v.string.s);
res.emplace_back(v.string_view());
else if (v.isList())
for (unsigned int n = 0; n < v.listSize(); ++n)
rec(*v.listElems()[n]);
Expand Down Expand Up @@ -208,20 +211,20 @@ static void worker(
for (auto & c : context)
std::visit(overloaded {
[&](const NixStringContextElem::Built & b) {
job["constituents"].push_back(state.store->printStorePath(b.drvPath));
job["constituents"].push_back(b.drvPath->to_string(*state.store));
},
[&](const NixStringContextElem::Opaque & o) {
},
[&](const NixStringContextElem::DrvDeep & d) {
},
}, c.raw());
}, c.raw);

state.forceList(*a->value, a->pos, "while evaluating the `constituents` attribute");
for (unsigned int n = 0; n < a->value->listSize(); ++n) {
auto v = a->value->listElems()[n];
state.forceValue(*v, noPos);
if (v->type() == nString)
job["namedConstituents"].push_back(v->str());
job["namedConstituents"].push_back(v->string_view());
}
}

Expand Down Expand Up @@ -516,7 +519,7 @@ int main(int argc, char * * argv)
auto drvPath2 = store->parseStorePath((std::string) (*job2)["drvPath"]);
auto drv2 = store->readDerivation(drvPath2);
job["constituents"].push_back(store->printStorePath(drvPath2));
drv.inputDrvs[drvPath2] = {drv2.outputs.begin()->first};
drv.inputDrvs.map[drvPath2].value = {drv2.outputs.begin()->first};
}

if (brokenJobs.empty()) {
Expand Down
1 change: 1 addition & 0 deletions src/hydra-evaluator/hydra-evaluator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "hydra-config.hh"
#include "pool.hh"
#include "shared.hh"
#include "signals.hh"

#include <algorithm>
#include <thread>
Expand Down
Loading

0 comments on commit b8acf7b

Please sign in to comment.