Skip to main content Link Search Menu Expand Document (external link)

Configuring the Build

Some aspects of a Spectrum build can be customised using a build configuration file.

By default, this configuration file should be called config.nix and located in the root of the Spectrum source tree, but this can be overridden by setting spectrum-config in the NIX_PATH to the path of the configuration file.

The configuration file should contain an attribute set. See lib/config.default.nix for supported configuration attributes and their default values.

config.nix to build Spectrum with a Nixpkgs overlay
{ default, ... }:

{
  pkgsArgs = default.pkgsArgs // {
    overlays = [
      (final: super: {
        weston = super.weston.overrideAttrs ({ patches ? [], ... }: {
          patches = patches ++ [
            path/to/weston.patch
          ];
        });
      })
    ] ++ default.pkgsArgs.overlays or [];
  };
}