~evhan/beaker

ca9604fc536c3ef91fd3f82d6e61895bc11f11de — Evan Hanson 4 months ago 01bb45c master
Add links to example uses of Nix helpers
1 files changed, 15 insertions(+), 3 deletions(-)

M nix.md
M nix.md => nix.md +15 -3
@@ 28,9 28,9 @@ pull into scope, for example:
A fixed-output derivation that fetches a set of eggs for installation.

The list of eggs to cache should be specified via `eggs`, which expects a path
to a file in "override" specifying a list of egg names and versions. This file
can be generated via `chicken-status -list` (for installed eggs) or
`chicken-lock` (for a specific egg's dependencies).
to a file in "override" format specifying a list of egg names and versions.
This file can be generated via `chicken-status -list` (for all installed eggs)
or `chicken-lock` (for a specific egg's dependencies).

    eggCache {
      name = "example-egg-cache";


@@ 84,3 84,15 @@ fail with the error message `"extension or version not found: <egg>"`.

Apart from `eggCache`, this derivation accepts all the same attributes as
`stdenv.mkDerivation`.

=== Examples

These eggs provide examples of using these Nix functions:

* [dust](https://git.sr.ht/~evhan/dust/tree/master/item/default.nix)
* [sourcehut](https://git.sr.ht/~evhan/chicken-sourcehut/tree/master/item/default.nix)
* [sq](https://hg.sr.ht/~evhan/sq/browse/default.nix?rev=tip)

In each of these projects, the lock file that's used to populate the `eggCache`
has been created by running `chicken-lock > ${name}.egg.lock`, and then
checking that file in to source control.