2020-09-30 03:42:59 +00:00
|
|
|
{ depot, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (depot.nix) buildLisp;
|
|
|
|
|
|
|
|
# Example Lisp library.
|
|
|
|
#
|
|
|
|
# Currently the `name` attribute is only used for the derivation
|
|
|
|
# itself, it has no practical implications.
|
|
|
|
libExample = buildLisp.library {
|
|
|
|
name = "lib-example";
|
|
|
|
srcs = [
|
|
|
|
./lib.lisp
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-05-19 14:39:52 +00:00
|
|
|
# Example Lisp program.
|
|
|
|
#
|
|
|
|
# This builds & writes an executable for a program using the library
|
|
|
|
# above to disk.
|
|
|
|
#
|
|
|
|
# By default, buildLisp.program expects the entry point to be
|
|
|
|
# `$name:main`. This can be overridden by configuring the `main`
|
|
|
|
# attribute.
|
|
|
|
in
|
|
|
|
buildLisp.program {
|
2020-09-30 03:42:59 +00:00
|
|
|
name = "example";
|
|
|
|
deps = [ libExample ];
|
|
|
|
|
|
|
|
srcs = [
|
|
|
|
./main.lisp
|
|
|
|
];
|
|
|
|
}
|