diff --git a/packages/lisp/arrows.nix b/packages/lisp/arrows.nix new file mode 100644 index 0000000..71df65a --- /dev/null +++ b/packages/lisp/arrows.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "arrows"; + packageName = "arrows"; + description = "Clojure-style arrows for Common Lisp"; + + buildSystems = [ "arrows" ]; + + deps = with pkgs.lispPackages; []; + + src = pkgs.fetchgit { + url = "https://gitlab.com/Harleqin/arrows.git"; + rev = "df7cf0067e0132d9697ac8b1a4f1b9c88d4f5382"; + sha256 = "042k9vkssrqx9nhp14wdzm942zgdxvp35mba0p2syz98i75im2yy"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "arrows.asd" ]; +} diff --git a/packages/lisp/backplane-dns.nix b/packages/lisp/backplane-dns.nix new file mode 100644 index 0000000..2f3345e --- /dev/null +++ b/packages/lisp/backplane-dns.nix @@ -0,0 +1,28 @@ +{ pkgs, backplane-server, arrows, ip-utils, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "backplane-dns"; + packageName = "backplane-dns"; + description = "XMPP Backplane DNS Server"; + + buildSystems = [ "backplane-dns" ]; + + deps = with pkgs.lispPackages; [ + arrows + alexandria + backplane-server + cl-ppcre + ip-utils + postmodern + trivia + ]; + + src = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/backplane-dns.git"; + rev = "d9e13bae165b08976fd025053bb2dde44bb4278d"; + sha256 = "0b4y75hq5753v8pk47c4pwpyc95igpjl7md7f29jjvqaviys66xh"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "backplane-dns.asd" ]; +} diff --git a/packages/lisp/backplane-server.nix b/packages/lisp/backplane-server.nix new file mode 100644 index 0000000..f23f621 --- /dev/null +++ b/packages/lisp/backplane-server.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, arrows, cl-xmpp, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "backplane-server"; + packageName = "backplane-server"; + description = "XMPP Backplane Server"; + + buildSystems = [ "backplane-server" ]; + + deps = with pkgs.lispPackages; [ + alexandria + arrows + cl-json + cl-xmpp + ]; + + src = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/backplane-server.git"; + rev = "665f362ce1a0a22bc10d3bbe95d5a8adec2df653"; + sha256 = "0lzq0vlqjymcwxbc80x6wp5mij80am12w9fi7abs5wnqcs68lwnf"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "backplane-server.asd" ]; +} diff --git a/packages/lisp/cl-sasl.nix b/packages/lisp/cl-sasl.nix new file mode 100644 index 0000000..be4af4f --- /dev/null +++ b/packages/lisp/cl-sasl.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + description = "SASL package for common lisp"; + baseName = "cl-sasl"; + packageName = "cl-sasl"; + + buildSystems = [ "cl-sasl" ]; + + deps = with pkgs.lispPackages; [ + ironclad + ]; + + src = pkgs.fetchFromGitHub { + owner = "legoscia"; + repo = "cl-sasl"; + rev = "64f195c0756cb80fa5961c072b62907be20a7380"; + sha256 = "0a05q8rls2hn46rbbk6w5km9kqvhsj365zlw6hp32724xy2nd98w"; + }; + + asdFilesToKeep = [ "cl-sasl.asd" ]; +} diff --git a/packages/lisp/cl-xmpp.nix b/packages/lisp/cl-xmpp.nix new file mode 100644 index 0000000..54fb5e5 --- /dev/null +++ b/packages/lisp/cl-xmpp.nix @@ -0,0 +1,35 @@ +{ pkgs, cl-sasl, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "cl-xmpp"; + packageName = "cl-xmpp"; + description = "XMPP library for Common Lisp"; + + buildSystems = [ + "cl-xmpp" + "cl-xmpp-sasl" + "cl-xmpp-tls" + ]; + + deps = with pkgs.lispPackages; [ + cl-base64 + cl_plus_ssl + cl-sasl + cxml + ironclad + usocket + ]; + + src = pkgs.fetchFromGitHub { + owner = "j4yk"; + repo = "cl-xmpp"; + rev = "a0f206e583c72d80523bdf108e7d507597555c6d"; + sha256 = "16qwm7yvwi73q07rsg0i5wrxbv44wm75m3710ph0vf1lzdkrsizk"; + }; + + asdFilesToKeep = [ + "cl-xmpp.asd" + "cl-xmpp-sasl.asd" + "cl-xmpp-tls.asd" + ]; +} diff --git a/packages/lisp/default.nix b/packages/lisp/default.nix new file mode 100644 index 0000000..2397ce9 --- /dev/null +++ b/packages/lisp/default.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, ... }: + +rec { + arrows = import ./arrows.nix { inherit pkgs; }; + cl-sasl = import ./cl-sasl.nix { inherit pkgs; }; + cl-xmpp = import ./cl-xmpp.nix { inherit pkgs cl-sasl; }; + backplane-dns = import ./backplane-dns.nix { + inherit pkgs arrows backplane-server ip-utils; + }; + backplane-server = import ./backplane-server.nix { + inherit pkgs lib arrows cl-xmpp; + }; + ip-utils = import ./ip-utils.nix { inherit pkgs; }; +} diff --git a/packages/lisp/ip-utils.nix b/packages/lisp/ip-utils.nix new file mode 100644 index 0000000..bac706c --- /dev/null +++ b/packages/lisp/ip-utils.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "ip-utils"; + packageName = "ip-utils"; + description = "Simple Common Lisp utility functions for working with IPs"; + + buildSystems = [ "ip-utils" ]; + + deps = with pkgs.lispPackages; [ + cl-ppcre + split-sequence + trivia + ]; + + src = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/ip-utils.git"; + rev = "bf590d0eeab9496bc47db43c997dfe9f0151163a"; + sha256 = "19n17pdzyl8j0fw82dr8lrjy6hkcagszm8kbyv8qbv2jl80176hp"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "ip-utils.asd" ]; +} diff --git a/packages/local.nix b/packages/local.nix index 08d6226..b392b06 100644 --- a/packages/local.nix +++ b/packages/local.nix @@ -1,6 +1,7 @@ { pkgs, lib, ... }: let + unstablePkgs = import {}; in { nixpkgs.config.packageOverrides = pkgs: rec { @@ -110,5 +111,10 @@ in { platforms = platforms.linux ++ platforms.darwin; }; }; + + localLispPackages = import ./lisp { + inherit lib; + pkgs = unstablePkgs; + }; }; }