From 2fa7bf7bb078c757216a392578a19fd01d5726f6 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 22 Jan 2020 21:40:37 +0000 Subject: feat(third_party/lisp): Add 'lisp-binary' package and dependencies --- third_party/lisp/closer-mop.nix | 20 ++++++++++++++++++++ third_party/lisp/lisp-binary.nix | 30 ++++++++++++++++++++++++++++++ third_party/lisp/moptilities.nix | 14 ++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 third_party/lisp/closer-mop.nix create mode 100644 third_party/lisp/lisp-binary.nix create mode 100644 third_party/lisp/moptilities.nix (limited to 'third_party') diff --git a/third_party/lisp/closer-mop.nix b/third_party/lisp/closer-mop.nix new file mode 100644 index 0000000000..a63f520f22 --- /dev/null +++ b/third_party/lisp/closer-mop.nix @@ -0,0 +1,20 @@ +# Closer to MOP is a compatibility layer that rectifies many of the +# absent or incorrect CLOS MOP features across a broad range of Common +# Lisp implementations +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "pcostanza"; + repo = "closer-mop"; + rev = "e1d1430524086709a7ea8e0eede6849aa29d6276"; + sha256 = "1zda6927379pmrsxpg29jnj6azjpa2pms9h7n1iwhy6q9d3w06rf"; +}; +in pkgs.nix.buildLisp.library { + name = "closer-mop"; + + srcs = [ + "${src}/closer-mop-packages.lisp" + "${src}/closer-mop-shared.lisp" + "${src}/closer-sbcl.lisp" + ]; +} diff --git a/third_party/lisp/lisp-binary.nix b/third_party/lisp/lisp-binary.nix new file mode 100644 index 0000000000..6f340bfab9 --- /dev/null +++ b/third_party/lisp/lisp-binary.nix @@ -0,0 +1,30 @@ +# A library to easily read and write complex binary formats. +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "j3pic"; + repo = "lisp-binary"; + rev = "1aefc8618b7734f68697ddf59bc93cb8522aa0bf"; + sha256 = "1hflzn3mjp32jz9fxx9wayp3c3x58s77cgjfbs06nrynqkv0c6df"; +}; +in pkgs.nix.buildLisp.library { + name = "lisp-binary"; + + deps = with pkgs.third_party.lisp; [ + cffi + quasiquote_2 + moptilities + flexi-streams + closer-mop + ]; + + srcs = map (f: src + ("/" + f)) [ + "utils.lisp" + "integer.lisp" + "float.lisp" + "simple-bit-stream.lisp" + "reverse-stream.lisp" + "binary-1.lisp" + "binary-2.lisp" + ]; +} diff --git a/third_party/lisp/moptilities.nix b/third_party/lisp/moptilities.nix new file mode 100644 index 0000000000..df72de5ce3 --- /dev/null +++ b/third_party/lisp/moptilities.nix @@ -0,0 +1,14 @@ +# Compatibility layer for minor MOP implementation differences +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "gwkkwg"; + repo = "moptilities"; + rev = "a436f16b357c96b82397ec018ea469574c10dd41"; + sha256 = "1q12bqjbj47lx98yim1kfnnhgfhkl80102fkgp9pdqxg0fp6g5fc"; +}; +in pkgs.nix.buildLisp.library { + name = "moptilities"; + deps = [ pkgs.third_party.lisp.closer-mop ]; + srcs = [ "${src}/dev/moptilities.lisp" ]; +} -- cgit 1.4.1