about summary refs log tree commit diff
path: root/common-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'common-lisp')
-rw-r--r--common-lisp/anaphora.nix17
-rw-r--r--common-lisp/cl-colors.nix20
-rw-r--r--common-lisp/default.nix13
-rw-r--r--common-lisp/let-plus.nix19
-rw-r--r--common-lisp/prove-asdf.nix15
-rw-r--r--common-lisp/prove.nix31
-rw-r--r--common-lisp/unit-testing.lisp13
7 files changed, 128 insertions, 0 deletions
diff --git a/common-lisp/anaphora.nix b/common-lisp/anaphora.nix
new file mode 100644
index 000000000000..f64d01a50eee
--- /dev/null
+++ b/common-lisp/anaphora.nix
@@ -0,0 +1,17 @@
+{ tpkgs ? (import (builtins.fetchGit "https://git.tazj.in/") {}), ... }:
+
+let
+  src = builtins.fetchGit {
+    url = "https://github.com/tokenrove/anaphora.git";
+    rev = "aeace4c68cf55098a67112750b28f8f2dc6d0e30";
+  };
+in tpkgs.nix.buildLisp.library {
+  name = "anaphora";
+  deps = [];
+  srcs = [
+    "${src}/packages.lisp"
+    "${src}/early.lisp"
+    "${src}/symbolic.lisp"
+    "${src}/anaphora.lisp"
+  ];
+}
diff --git a/common-lisp/cl-colors.nix b/common-lisp/cl-colors.nix
new file mode 100644
index 000000000000..cff40fef342d
--- /dev/null
+++ b/common-lisp/cl-colors.nix
@@ -0,0 +1,20 @@
+{ tpkgs ? (import (builtins.fetchGit "https://git.tazj.in/") {}), ... }:
+
+let
+  src = builtins.fetchGit {
+    url = "https://github.com/tpapp/cl-colors.git";
+    rev = "827410584553f5c717eec6182343b7605f707f75";
+  };
+in tpkgs.nix.buildLisp.library {
+  name = "cl-colors";
+  deps = with tpkgs.third_party.lisp; [
+    alexandria
+    (import ./let-plus.nix {})
+  ];
+  srcs = [
+    "${src}/package.lisp"
+    "${src}/colors.lisp"
+    "${src}/colornames.lisp"
+    "${src}/hexcolors.lisp"
+  ];
+}
diff --git a/common-lisp/default.nix b/common-lisp/default.nix
new file mode 100644
index 000000000000..b3c51eea704c
--- /dev/null
+++ b/common-lisp/default.nix
@@ -0,0 +1,13 @@
+{ tpkgs ? (import (builtins.fetchGit "https://git.tazj.in/") {}), ... }:
+
+tpkgs.nix.buildLisp.program {
+  name = "unit-testing";
+
+  deps = with tpkgs.third_party.lisp; [
+    (import ./prove.nix {})
+  ];
+
+  srcs = [
+    ./unit-testing.lisp
+  ];
+}
diff --git a/common-lisp/let-plus.nix b/common-lisp/let-plus.nix
new file mode 100644
index 000000000000..5b279477de1b
--- /dev/null
+++ b/common-lisp/let-plus.nix
@@ -0,0 +1,19 @@
+{ tpkgs ? (import (builtins.fetchGit "https://git.tazj.in/") {}), ... }:
+
+let
+  src = builtins.fetchGit {
+    url = "https://github.com/tpapp/let-plus.git";
+    rev = "7cf18b29ed0fe9c667a9a6a101b08ab9661a59e9";
+  };
+in tpkgs.nix.buildLisp.library {
+  name = "let-plus";
+  deps = with tpkgs.third_party.lisp; [
+    alexandria
+    (import ./anaphora.nix {})
+  ];
+  srcs = [
+    "${src}/package.lisp"
+    "${src}/let-plus.lisp"
+    "${src}/extensions.lisp"
+  ];
+}
diff --git a/common-lisp/prove-asdf.nix b/common-lisp/prove-asdf.nix
new file mode 100644
index 000000000000..8a692cf125ad
--- /dev/null
+++ b/common-lisp/prove-asdf.nix
@@ -0,0 +1,15 @@
+{ tpkgs ? (import (builtins.fetchGit "https://git.tazj.in/") {}), ... }:
+
+let
+  src = builtins.fetchGit {
+    url = "https://github.com/fukamachi/prove.git";
+    rev = "5d71f02795b89e36f34e8c7d50e69b67ec6ca2de";
+  };
+in tpkgs.nix.buildLisp.library {
+  name = "prove-asdf";
+  deps = [];
+  srcs = [
+    "${src}/src/output.lisp"
+    "${src}/src/asdf.lisp"
+  ];
+}
diff --git a/common-lisp/prove.nix b/common-lisp/prove.nix
new file mode 100644
index 000000000000..a4499dcea9bb
--- /dev/null
+++ b/common-lisp/prove.nix
@@ -0,0 +1,31 @@
+{ tpkgs ? (import (builtins.fetchGit "https://git.tazj.in/") {}), ... }:
+
+let
+  src = builtins.fetchGit {
+    url = "https://github.com/fukamachi/prove.git";
+    rev = "5d71f02795b89e36f34e8c7d50e69b67ec6ca2de";
+  };
+in tpkgs.nix.buildLisp.library {
+  name = "prove";
+  deps = with tpkgs.third_party.lisp; [
+    cl-ppcre
+    cl-ansi-text
+    (import ./cl-colors.nix {})
+    alexandria
+    uiop
+  ];
+  srcs = [
+    "${src}/src/asdf.lisp"
+    "${src}/src/suite.lisp"
+    "${src}/src/color.lisp"
+    "${src}/src/output.lisp"
+    "${src}/src/prove.lisp"
+    "${src}/src/report.lisp"
+    "${src}/src/reporter.lisp"
+    "${src}/src/test.lisp"
+    "${src}/src/reporter/dot.lisp"
+    "${src}/src/reporter/fiveam.lisp"
+    "${src}/src/reporter/list.lisp"
+    "${src}/src/reporter/tap.lisp"
+  ];
+}
diff --git a/common-lisp/unit-testing.lisp b/common-lisp/unit-testing.lisp
new file mode 100644
index 000000000000..c0b3be9b4515
--- /dev/null
+++ b/common-lisp/unit-testing.lisp
@@ -0,0 +1,13 @@
+(in-package #:cl-user)
+(defpackage #:my-test
+  (:documentation "Unit testing in Common Lisp.")
+  (:use #:cl))
+(in-package #:my-test)
+
+(plan 3)
+
+(ok (not (find 4 '(1 2 3))))
+(is 4 4)
+(isnt 1 #\1)
+
+(finalize)