From e25916d10c1c81f568f1a413e8b24704e9a81996 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 22 Jan 2020 00:50:05 +0000 Subject: [PATCH] feat(third_party/lisp): Check in dependencies of gemma --- third_party/lisp/cl-json.nix | 25 +++++++++++++++++++++++++ third_party/lisp/cl-prevalence.nix | 29 +++++++++++++++++++++++++++++ third_party/lisp/local-time.nix | 18 ++++++++++++++++++ third_party/lisp/s-sysdeps.nix | 17 +++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 third_party/lisp/cl-json.nix create mode 100644 third_party/lisp/cl-prevalence.nix create mode 100644 third_party/lisp/local-time.nix create mode 100644 third_party/lisp/s-sysdeps.nix diff --git a/third_party/lisp/cl-json.nix b/third_party/lisp/cl-json.nix new file mode 100644 index 000000000..0c77718ef --- /dev/null +++ b/third_party/lisp/cl-json.nix @@ -0,0 +1,25 @@ +# JSON encoder & decoder +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "hankhero"; + repo = "cl-json"; + rev = "6dfebb9540bfc3cc33582d0c03c9ec27cb913e79"; + sha256 = "0fx3m3x3s5ji950yzpazz4s0img3l6b3d6l3jrfjv0lr702496lh"; +}; +in pkgs.nix.buildLisp.library { + name = "cl-json"; + deps = [ pkgs.third_party.lisp.asdf ]; + + srcs = [ "${src}/cl-json.asd" ] ++ + (map (f: src + ("/src/" + f)) [ + "package.lisp" + "common.lisp" + "objects.lisp" + "camel-case.lisp" + "decoder.lisp" + "encoder.lisp" + "utils.lisp" + "json-rpc.lisp" + ]); +} diff --git a/third_party/lisp/cl-prevalence.nix b/third_party/lisp/cl-prevalence.nix new file mode 100644 index 000000000..1502f2e23 --- /dev/null +++ b/third_party/lisp/cl-prevalence.nix @@ -0,0 +1,29 @@ +# cl-prevalence is an implementation of object prevalence for CL (i.e. +# an in-memory database) +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "40ants"; + repo = "cl-prevalence"; + rev = "da3ed6c4594b1c2fca90c178c1993973c4bf16c9"; + sha256 = "0bq905hv1626dl6b7s0zn4lbdh608g1pxaljl1fda6pwp9hmj95a"; +}; +in pkgs.nix.buildLisp.library { + name = "cl-prevalence"; + + deps = with pkgs.third_party.lisp; [ + s-xml + s-sysdeps + ]; + + srcs = map (f: src + ("/src/" + f)) [ + "package.lisp" + "serialization/serialization.lisp" + "serialization/xml.lisp" + "serialization/sexp.lisp" + "prevalence.lisp" + "managed-prevalence.lisp" + "master-slave.lisp" + "blob.lisp" + ]; +} diff --git a/third_party/lisp/local-time.nix b/third_party/lisp/local-time.nix new file mode 100644 index 000000000..6f501a5fe --- /dev/null +++ b/third_party/lisp/local-time.nix @@ -0,0 +1,18 @@ +# Library for manipulating dates & times +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "dlowe-net"; + repo = "local-time"; + rev = "dc54f61415c76ee755a6f69d4154a3a282f2789f"; + sha256 = "1l9v07ghx7g9p2gp003fki4j8bsa1w2gbm40qc41i94mdzikc0ry"; +}; +in pkgs.nix.buildLisp.library { + name = "local-time"; + deps = [ pkgs.third_party.lisp.cl-fad ]; + + srcs = [ + "${src}/src/package.lisp" + "${src}/src/local-time.lisp" + ]; +} diff --git a/third_party/lisp/s-sysdeps.nix b/third_party/lisp/s-sysdeps.nix new file mode 100644 index 000000000..3b90f3a7e --- /dev/null +++ b/third_party/lisp/s-sysdeps.nix @@ -0,0 +1,17 @@ +# A Common Lisp abstraction layer over platform dependent functionality. +{ pkgs, ... }: + +let src = pkgs.third_party.fetchFromGitHub { + owner = "svenvc"; + repo = "s-sysdeps"; + rev = "d28246b5dffef9e73a0e0e6cfbc4e878006fe34d"; + sha256 = "14b69b81yrxmjlvmm3lfxk04x5v7hqz4fql121334wh72czznfh9"; +}; +in pkgs.nix.buildLisp.library { + name = "s-sysdeps"; + + srcs = [ + "${src}/src/package.lisp" + "${src}/src/sysdeps.lisp" + ]; +}