about summary refs log tree commit diff
path: root/nix/buildLisp
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-08-26T10·34+0200
committersterni <sternenseemann@systemli.org>2021-08-26T11·26+0000
commitea6ee1e2196516775a41adc6d698fe4f83e5cbb2 (patch)
tree93a1fcfe3e0d4e6a4a9791cab841b575a7524798 /nix/buildLisp
parent2dd8bc7977aae7c5f545f8f61415f0bcfc30e02b (diff)
docs(nix/buildLisp): move example further up r/2778
Make "Example" the second section again since it got a bit buried under
a lot of detailed documentation you won't necessarily need right away.

Change-Id: I481354d1761c590e5872dfce8c3cf9934e278673
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3421
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Diffstat (limited to 'nix/buildLisp')
-rw-r--r--nix/buildLisp/README.md58
1 files changed, 29 insertions, 29 deletions
diff --git a/nix/buildLisp/README.md b/nix/buildLisp/README.md
index 76fe5ca9e4..02435595ff 100644
--- a/nix/buildLisp/README.md
+++ b/nix/buildLisp/README.md
@@ -88,6 +88,35 @@ the `expression` parameter should be a Lisp expression and will be evaluated
 after loading all sources and dependencies (including library/program
 dependencies). It must return a non-`NIL` value if the test suite has passed.
 
+## Example
+
+Using buildLisp could look like this:
+
+```nix
+{ buildLisp, lispPkgs }:
+
+let libExample = buildLisp.library {
+    name = "lib-example";
+    srcs = [ ./lib.lisp ];
+
+    deps = with lispPkgs; [
+      (buildLisp.bundled "sb-posix")
+      iterate
+      cl-ppcre
+    ];
+};
+in buildLisp.program {
+    name = "example";
+    deps = [ libExample ];
+    srcs = [ ./main.lisp ];
+    tests = {
+      deps = [ lispPkgs.fiveam ];
+      srcs = [ ./tests.lisp ];
+      expression = "(fiveam:run!)";
+    };
+}
+```
+
 ## Development REPLs
 
 `buildLisp` builds loadable variants of both `program` and `library` derivations
@@ -195,35 +224,6 @@ This only influences `meta.targets` which is read by depot's CI to
 check which variants (see "Implementations") of the derivation to
 build, so it may not be useful outside of depot.
 
-## Example
-
-Using buildLisp could look like this:
-
-```nix
-{ buildLisp, lispPkgs }:
-
-let libExample = buildLisp.library {
-    name = "lib-example";
-    srcs = [ ./lib.lisp ];
-
-    deps = with lispPkgs; [
-      (buildLisp.bundled "sb-posix")
-      iterate
-      cl-ppcre
-    ];
-};
-in buildLisp.program {
-    name = "example";
-    deps = [ libExample ];
-    srcs = [ ./main.lisp ];
-    tests = {
-      deps = [ lispPkgs.fiveam ];
-      srcs = [ ./tests.lisp ];
-      expression = "(fiveam:run!)";
-    };
-}
-```
-
 [sbcl]: http://www.sbcl.org/
 [ccl]: https://ccl.clozure.com/
 [ecl]: https://common-lisp.net/project/ecl/