Signed-off-by: Alyssa Ross <hi@alyssa.is> --- There's some documentation on reviewing patches for Spectrum here: :) https://spectrum-os.org/doc/reviewing-patches.html Documentation/build-configuration.adoc | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/build-configuration.adoc diff --git a/Documentation/build-configuration.adoc b/Documentation/build-configuration.adoc new file mode 100644 index 0000000..db68c34 --- /dev/null +++ b/Documentation/build-configuration.adoc @@ -0,0 +1,35 @@ += Configuring the Build +:page-parent: How-to Guides +:example-caption: Test + +// SPDX-FileCopyrightText: 2022 Unikie +// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0 + +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 path can be overridden by setting `spectrum-config` in the +https://nixos.org/manual/nix/stable/command-ref/env-common.html#env-NIX_PATH[NIX_PATH]. + +The configuration file should contain an attribute set. The only +currently allowed attribute name is `pkgs`, which allows using a +custom Nixpkgs to evaluate Spectrum. + +.config.nix to build Spectrum with a https://nixos.org/manual/nixpkgs/unstable/#sec-overlays-definition[Nixpkgs overlay] +[example] +[source,nix] +---- +{ + pkgs = import <nixpkgs> { + overlays = [ + (final: super: { + weston = super.weston.overrideAttrs ({ patches ? [], ... }: { + patches = patches ++ [ + path/to/weston.patch + ]; + }); + }) + ]; + }; +} +---- -- 2.37.1