- Remove restrict-eval stuff that did nothing
- Remove builders stuff that appears unnecessary:
/* FIXME: The build hook in conjunction with import-from-derivation is
* causing "unexpected EOF" during eval */
settings.builders.setDefault("");
We removed that line and then observed that it works, so idk:
ifdtest.nix:
let
ifd = builtins.derivation {
name = "wat2";
builder = "/bin/sh";
args = [ "-c" "echo meow > $out" ];
system = "aarch64-linux";
};
in
builtins.readFile ifd
» NIX_CONFIG="builders = @/etc/nix/machines" build/src/nix-eval-jobs ifdtest.nix
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified
building '/nix/store/xxnd5rb49n3anyla5v71lgdk0wmhmijp-wat2.drv' on 'ssh-ng://root@voracle.jade.fyi'...
copying 0 paths...
building '/nix/store/xxnd5rb49n3anyla5v71lgdk0wmhmijp-wat2.drv'...
copying 1 paths...
copying path '/nix/store/h2yxq9lb7l0nd9plgqrcgf7nvsg67gl7-wat2' from 'ssh-ng://root@voracle.jade.fyi'...
- Changed the impure/flake code to override the pureEval setting, which
it was definitely *supposed* to be doing in the first place.
Lix commit 4dbbd721e[1] changed the way settings are changed, removing
operator= in the process. This commit changes the places where we use
operator= to using either setDefault(), or override(). I *believe* I
have used the correct ones for each changed setting.
Fixes#13.
[1]: 4dbbd721eb9db75d4968a624b8cb9e75e979a144
We'd highly prefer using std::thread here; but this won't let us configure the stack
size. macOS uses 512KiB size stacks for non-main threads, and musl defaults to 128k.
While Nix configures a 64MiB size for the main thread, this doesn't propagate to the
threads we launch here. It turns out, running the evaluator under an anemic stack of
0.5MiB has it overflow way too quickly. Hence, we have our own custom Thread struct.
While the previous style seems more sensible to me (the header names
are quite generic), the pkg-config definitions both from upstream Nix
and from Lix specify -I${includedir}/nix in CFLAGS rather than
-I${includedir}. This may be worth changing, but for now I want
nix-eval-jobs to work and this does what I want.
writeLine will throw a SysError exception, which obfuscates out-of-memory events where the eval worker is killed by the OS.
readLine is suffering from the same problem and will be handled in a subsequent commit.
Currently, not a lot of things expose inputDrvs (except
`show-derivation`), which is a showstopper whenever you want to compute
popularity ranking based on the dependency relation.
Having `inputsDrvs` in the reply enable downstream users to perform such
computations in an efficient way.
Fixes#134
Use the `InstallableFlake` type in order to make use of it's `toValue`
method. This fixes the functor auto-call by including the work from
nixos/nix#6404.
Future work may make use of this object and its methods to employ the
flake based eval cache.