[Nix-dev] Using the NixOS Hydra module leads to infinite recursion

Eelco Dolstra eelco.dolstra at logicblox.com
Mon Apr 20 13:24:37 CEST 2015


Hi,

On 19/04/15 01:20, Mateusz Kowalczyk wrote:

> For a while now I've been binding hydra = fetchgit… and then require = [
> ${hydra}/hydra-module.nix ] later down the file and using the module
> options that way. This worked fine but now I get infinite recursion when
> I try it. Does anyone know what changed and/or how to fix it?

This is probably due to the changes in
https://github.com/NixOS/nixpkgs/pull/6794. Basically, you can't use anything
from "pkgs" (such as fetchgit) on the "spine" of module evaluation (since "pkgs"
itself is the result from module system evaluation, hence the infinite
recursion). See https://github.com/NixOS/nixpkgs/issues/7354.

A possible workaround might be to do:

  hydra = (import <nixpkgs> {}).fetchgit { ... };

That way you're not depending on the "pkgs" module argument.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list