chickadee » beaker » eggCache

eggCacheprocedure

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" 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";
  hash = "sha256-XbwSzGUJfKgiKcrYuu9Y3gwRTYmoesM9KZlIhdII2AU=";
  eggs = ./eggs.lock;
}

Alternatively, you can specify the list of eggs directly:

eggCache {
  name = "example-egg-cache";
  hash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
  eggs = [
    { name = "srfi-18"; version = "0.1"; }
    { name = "srfi-69"; version = "0.4"; }
  ];
}

You can print the hash for a set of eggs using the -command flag to the chicken-lock program, to hash the resulting egg cache:

# for the egg in the current directory
chicken-lock -command nix hash path

# for a few specific eggs and versions
chicken-lock srfi-18:0.1 srfi-69:0.4 -command nix hash path

# for the given override file
chicken-lock -from-list ./eggs.lock -command nix hash path