diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
commit | aa4353b499e6950b7333578f936455a628145c31 (patch) | |
tree | c6332cedece2327a18d08794755b3fc0f9f1905b /nixpkgs/doc/languages-frameworks/chicken.section.md | |
parent | ac456d475f4e50818499b804359355c0f3b4bbf7 (diff) | |
parent | 52185f4d76c18d8348f963795dfed1de018e8dfe (diff) | |
download | nixlib-aa4353b499e6950b7333578f936455a628145c31.tar nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.gz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.bz2 nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.lz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.xz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.zst nixlib-aa4353b499e6950b7333578f936455a628145c31.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/chicken.section.md')
-rw-r--r-- | nixpkgs/doc/languages-frameworks/chicken.section.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/doc/languages-frameworks/chicken.section.md b/nixpkgs/doc/languages-frameworks/chicken.section.md index d329943dc3c2..72c2642a6478 100644 --- a/nixpkgs/doc/languages-frameworks/chicken.section.md +++ b/nixpkgs/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`. +# ... +``` |