From 541b52294ce9a75bbbf7741cc0964f6df3ac184c Mon Sep 17 00:00:00 2001 From: Niten Date: Mon, 23 Nov 2020 14:02:36 -0800 Subject: [PATCH] Initial attempt at a lisp library repo for fudo --- backplane-server.nix | 26 +++++++++++++++++++++ cl-sasl.nix | 20 ++++++++++++++++ cl-xmpp.nix | 55 ++++++++++++++++++++++++++++++++++++++++++++ default.nix | 8 +++++++ 4 files changed, 109 insertions(+) create mode 100644 backplane-server.nix create mode 100644 cl-sasl.nix create mode 100644 cl-xmpp.nix create mode 100644 default.nix diff --git a/backplane-server.nix b/backplane-server.nix new file mode 100644 index 0000000..b256d1d --- /dev/null +++ b/backplane-server.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, fudoLispPackages, ... }: + +let + unstablePkgs = import {}; + + upstreamPackages = with pkgs.lispPackages; [ + alexandria + arrows + cl-json + cl-postgres + cl-ppcre + cl_plus_ssl + unstablePkgs.lispPackages.postmodern + trivia + ]; + + localPackages = with fudoLispPackages; [ + cl-xmpp + cl-xmpp-tls + ]; + +in lib.buildLisp.library { + name = "backplane-server"; + srcs = "./backplane-server.lisp"; + deps = upstreamPackages ++ localPackages; +} diff --git a/cl-sasl.nix b/cl-sasl.nix new file mode 100644 index 0000000..905d55b --- /dev/null +++ b/cl-sasl.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, fudoLispPackages, ... } + +let + cl-sasl-path = lib.fetchgit { + url = "https://github.com/legoscia/cl-sasl.git"; + rev = "64f195c0756cb80fa5961c072b62907be20a7380"; + sha256 = "0a05q8rls2hn46rbbk6w5km9kqvhsj365zlw6hp32724xy2nd98w"; + fetchSubmodules = false; + }; + +in lib.buildLisp.library { + name = "cl-sasl"; + srcs = [ + "${cl-sasl-path}/packages.lisp" + "${cl-sasl-path}/util.lisp" + "${cl-sasl-path}/client.lisp" + "${cl-sasl-path}/plain.lisp" + "${cl-sasl-path}/digest-md5.lisp" + ]; +} diff --git a/cl-xmpp.nix b/cl-xmpp.nix new file mode 100644 index 0000000..221457b --- /dev/null +++ b/cl-xmpp.nix @@ -0,0 +1,55 @@ +{ pkgs, lib, fudoLispPackages, ... }: + +let + unstablePkgs = import {}; + + cl-xmpp-path = lib.fetchgit { + url = "https://github.com/j4yk/cl-xmpp.git"; + rev = "a0f206e583c72d80523bdf108e7d507597555c6d"; + sha256 = "16qwm7yvwi73q07rsg0i5wrxbv44wm75m3710ph0vf1lzdkrsizk"; + fetchSubmodules = false; + }; + +in { + + cl-xmpp = lib.buildLisp.library { + name = "cl-xmpp"; + srcs = [ + "${cl-xmpp-path}/package.lisp" + "${cl-xmpp-path}/variable.lisp" + "${cl-xmpp-path}/utility.lisp" + "${cl-xmpp-path}/result.lisp" + "${cl-xmpp-path}/cl-xmpp.lisp" + "${cl-xmpp-path}/multi-user-chat.lisp" + "${cl-xmpp-path}/administration.lisp" + ]; + deps = with pkgs.lispPackages; [ + cxml + ironclad + usocket + ]; + }; + + cl-xmpp-sasl = lib.buildLisp.library { + name = "cl-xmpp-sasl"; + src = [ + "${cl-xmpp-path}/cl-xmpp-sasl.lisp" + ]; + deps = with pkgs.lispPackages; [ + cl-base64 + fudoLispPackages.cl-sasl + cl-xmpp + ]; + }; + + cl-xmpp-tls = lib.buildLisp.library { + name = "cl-xmpp-tls"; + src = [ + "${cl-xmpp-path}/cl-xmpp-tls.lisp" + ]; + deps = with pkgs.lispPackages; [ + cl_plus_ssl + cl-xmpp-sasl + ]; + }; +} diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..be7c3cb --- /dev/null +++ b/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +with lib; +{ + cl-sasl = import cl-sasl.nix {}; + cl-xmpp = import cl-xmpp.nix {}; + # backplane-server = import backplane-server.nix {}; +}