diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-08-31 00:01:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 00:01:54 +0000 |
commit | ce84b1371f33b0f2ae965de9211c1a3dfa661f8b (patch) | |
tree | 0428fd7f9777d0c57a93c944f3208f04eeab3854 /doc | |
parent | e3e1b16eb650cf80f4fb743358a0c2a308751012 (diff) | |
parent | 30c071bebb01ce521ce6a2b02ea1ca035b03214b (diff) |
Merge master into staging-next
Diffstat (limited to 'doc')
-rw-r--r-- | doc/languages-frameworks/chicken.section.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/languages-frameworks/chicken.section.md b/doc/languages-frameworks/chicken.section.md index d329943dc3c24..72c2642a6478c 100644 --- a/doc/languages-frameworks/chicken.section.md +++ b/doc/languages-frameworks/chicken.section.md @@ -47,3 +47,32 @@ To include more eggs, edit `pkgs/development/compilers/chicken/5/eggs.scm`. The first section of this file lists eggs which are required by `egg2nix` itself; all other eggs go into the second section. After editing, follow the procedure for updating eggs. + +## Override Scope {#sec-chicken-override-scope} + +The chicken package and its eggs, respectively, reside in a scope. This means, +the scope can be overridden to effect other packages in it. + +This example shows how to use a local copy of `srfi-180` and have it affect +all the other eggs: + +```nix +let + myChickenPackages = pkgs.chickenPackages.overrideScope' (self: super: { + # The chicken package itself can be overridden to effect the whole ecosystem. + # chicken = super.chicken.overrideAttrs { + # src = ... + # }; + + chickenEggs = super.chickenEggs.overrideScope' (eggself: eggsuper: { + srfi-180 = eggsuper.srfi-180.overrideAttrs { + # path to a local copy of srfi-180 + src = ... + }; + }); + }); +in +# Here, `myChickenPackages.chickenEggs.json-rpc`, which depends on `srfi-180` will use +# the local copy of `srfi-180`. +# ... +``` |