···11+# CHICKEN {#sec-chicken}
22+33+[CHICKEN](https://call-cc.org/) is a
44+[R⁵RS](https://schemers.org/Documents/Standards/R5RS/HTML/)-compliant Scheme
55+compiler. It includes an interactive mode and a custom package format, "eggs".
66+77+## Using Eggs
88+99+Eggs described in nixpkgs are available inside the
1010+`chickenPackages.chickenEggs` attrset. Including an egg as a build input is
1111+done in the typical Nix fashion. For example, to include support for [SRFI
1212+189](https://srfi.schemers.org/srfi-189/srfi-189.html) in a derivation, one
1313+might write:
1414+1515+```nix
1616+ buildInputs = [
1717+ chicken
1818+ chickenPackages.chickenEggs.srfi-189
1919+ ];
2020+```
2121+2222+Both `chicken` and its eggs have a setup hook which configures the environment
2323+variables `CHICKEN_INCLUDE_PATH` and `CHICKEN_REPOSITORY_PATH`.
2424+2525+## Updating Eggs
2626+2727+nixpkgs only knows about a subset of all published eggs. It uses
2828+[egg2nix](https://github.com/the-kenny/egg2nix) to generate a
2929+package set from a list of eggs to include.
3030+3131+The package set is regenerated by running the following shell commands:
3232+3333+```
3434+$ nix-shell -p chickenPackages.egg2nix
3535+$ cd pkgs/development/compilers/chicken/5/
3636+$ egg2nix eggs.scm > eggs.nix
3737+```
3838+3939+## Adding Eggs
4040+4141+When we run `egg2nix`, we obtain one collection of eggs with
4242+mutually-compatible versions. This means that when we add new eggs, we may
4343+need to update existing eggs. To keep those separate, follow the procedure for
4444+updating eggs before including more eggs.
4545+4646+To include more eggs, edit `pkgs/development/compilers/chicken/5/eggs.scm`.
4747+The first section of this file lists eggs which are required by `egg2nix`
4848+itself; all other eggs go into the second section. After editing, follow the
4949+procedure for updating eggs.