[Nix-dev] packageOverrides for tests

Mathijs Kwik mathijs at bluescreen303.nl
Sun Aug 11 09:27:01 CEST 2013


Hi all,

I wanted to try running some nixos tests locally when I noticed my
package overrides don't get applied. This leads to testing a different
system config than what would be installed.

With some tracing, I found that (nixos)/lib/build-vms imports nixpkgs
using "config = {}", but with that removed, it still doesn't work.

The easiest way to trigger an error is to change

pkgs = applyGlobalOverrides (config.packageOverrides or (pkgs: {}));

into

pkgs = applyGlobalOverrides config.packageOverrides;

in all-packages.nix, to find out when nixpkgs is being initialized
without consulting nixpkgs-config. Then run a test:

nix-build '<nixos/release-combined.nix>' -A nixos.tests.firefox.x86_64-linux

And see it fail (packageOverrides missing).
Unfortunately, the resulting trace does not help in revealing where
the config is being overwritten.

Does anyone know where this could be?

Thanks,
Mathijs


More information about the nix-dev mailing list