Address feedback from alois31

- 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.
This commit is contained in:
jade 2024-11-09 12:46:21 -08:00
parent 43aaa943bf
commit 9160d40f80

View file

@ -348,20 +348,12 @@ int main(int argc, char **argv) {
myArgs.parseArgs(argv, argc);
/* FIXME: The build hook in conjunction with import-from-derivation is
* causing "unexpected EOF" during eval */
settings.builders.setDefault("");
/* Prevent access to paths outside of the Nix search path and
to the environment. */
evalSettings.restrictEval.setDefault(false);
/* When building a flake, use pure evaluation (no access to
'getEnv', 'currentSystem' etc. */
if (myArgs.impure) {
evalSettings.pureEval.setDefault(false);
evalSettings.pureEval.override(false);
} else if (myArgs.flake) {
evalSettings.pureEval.setDefault(true);
evalSettings.pureEval.override(true);
}
if (myArgs.releaseExpr == "")