From f6ea0fff7bab3e3a0428f0675691ddea83a855f7 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 8 Apr 2023 18:27:41 +0000 Subject: lib/eval-config.nix: expose defaults to config It's quite likely that somebody doing a custom build of Spectrum might want to use a custom overlay without changing the underlying version of Nixpkgs. Signed-off-by: Alyssa Ross --- Documentation/development/build-configuration.adoc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'Documentation') diff --git a/Documentation/development/build-configuration.adoc b/Documentation/development/build-configuration.adoc index c9a8c99..4f7d8e9 100644 --- a/Documentation/development/build-configuration.adoc +++ b/Documentation/development/build-configuration.adoc @@ -23,17 +23,15 @@ custom Nixpkgs to evaluate Spectrum. [example] [source,nix] ---- +{ default, ... }: + { - pkgs = import { - overlays = [ - (final: super: { - weston = super.weston.overrideAttrs ({ patches ? [], ... }: { - patches = patches ++ [ - path/to/weston.patch - ]; - }); - }) - ]; - }; + pkgs = default.pkgs.extend (final: super: { + weston = super.weston.overrideAttrs ({ patches ? [], ... }: { + patches = patches ++ [ + path/to/weston.patch + ]; + }); + }); } ---- -- cgit 1.4.1