Closed dudebout closed 4 years ago
This is expected behavior since nixos
doesn't return a derivation (i.e. Hydra job) but a configuration. You'd have to select some attribute that you want to build (like system.build.toplevel
).
Thank you Eelco for looking into this. Could you point me at some documentation to grasp why nix-instantiate
and nix-build
are able to evaluate and build that expression but not hydra
? Do these tools have a default behavior that hydra does not have for configurations?
I think nix-build
doesn't recurse, so it only builds the top-level derivation attributes. nixos
is defined as c.config.system.build // c
, so nix-build
will build c.config.system.build.toplevel
but it won't recursive into all of c
.
I see. Thanks for the explanation.
Issue Evaluating NixOS system configurations built with
nixpkgs.nixos ARGS
works vianix-instantiate
but throwshydra-eval-jobs
in an infinite recursion loop.hydra-eval-jobs
generates a growing list of packages of the following form:nixpkgs or hydra issue I am not sure if this is a hydra issue, or an issue with nixpkgs.nixos. Opening an issue against hydra as a first step, but I can open one against nixpkgs if this is more appropriate.
Background I was trying to use
nixpkgs.nixos
based on the Mayflower blog post Building Customised NixOS Images. By switching to:I was able to build my configuration in and out of hydra.
Troubleshooting I tried and figure out what was going on, but was not able to get to the bottom of it. During my investigation, I found the following comment in splice.nix:
and I am wondering if
pkgs
andbuildPackages
are always different when usinghydra-eval-jobs
.Minimal reproducer Here is a minimal nix expression showing the behavior:
I saved this file under
/tmp/minimal-nixos.nix
and ran the following two commands:(As far as I understand, the
-I path1
and-I path2
options are required because hydra runs inrestricted mode
and does not want to consume paths which are not accessible viaNIX_PATH
) The second command generates output of the form:The lines showing the beginning of the infinite loop are: