[Nix-dev] Can't see the errror

Marco Maggesi maggesi at math.unifi.it
Fri May 18 11:06:47 CEST 2012


Hi,

I'm trying to configure a jobset on my hydra system, but I get the
following error

  at `system' [system = "i686-linux", nixosSrc = ..., nixpkgsSrc =
..., configurationSrc = ...]:
  user-thrown exception: Not defined.

and I can't understand why.

My release.nix is the following:

[root at elio:/etc/nixos/systems]# cat release.nix
{ nixpkgsSrc ? <nixpkgs>
, nixosSrc ? <nixos>
, configurationSrc ? <configuration>
, system ? "i686-linux"
}:

let
  pkgs = import nixpkgsSrc  { inherit system; };
  eval = import (nixosSrc + "/lib/eval-config.nix")
    { inherit pkgs system;
      modules = [ configurationSrc ];
    };
in
{
  system = eval.config.system.build.toplevel;
}

I manually tested this expression with the following script:

[root at elio:/etc/nixos/systems]# cat build-elio
#!/bin/sh

NIX_PATH=

exec nix-build \
  -o elio-sys \
  -A system \
  -I configuration=/etc/nixos/systems/elio.nix \
  -I nixpkgs=/etc/nixos/nixpkgs/ \
  -I nixos=/etc/nixos/nixos/ \
  release.nix \
  --show-trace

And I configured the jobset accordingly as follows:
Input name	Type	Values
configurationSrc	 Local path	 /etc/nixos/systems/elio.nix
nixosSrc	 Local path	 /etc/nixos/nixos/
nixpkgsSrc	 Local path	 /etc/nixos/nixpkgs/
system	 String value	 "i686-linux"
systems	 Local path	 /etc/nixos/systems/

I would expect that my script would be equivalent to the hydra invocation.
I suspect that I mixing paths and import expressions but I after many
attempts I was not able to find the right combination.

Can you help my to debug this.
Thanks in advance,
Marco


More information about the nix-dev mailing list