about summary refs log tree commit diff
path: root/nix/buildLisp/example/default.nix
blob: 6add2676f10c19e321758f29839869c29b1a6b1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ 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
    ];
  };

  # 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 {
  name = "example";
  deps = [ libExample ];

  srcs = [
    ./main.lisp
  ];
}