cl-gemini working again
This commit is contained in:
parent
f25ada0c71
commit
18bddb7e45
|
@ -6,7 +6,7 @@ let
|
|||
|
||||
lisp-helper = import ../lisp.nix { inherit pkgs; };
|
||||
|
||||
feedOpts = with types; {
|
||||
feedOpts = { ... }: with types; {
|
||||
options = {
|
||||
url = mkOption {
|
||||
type = str;
|
||||
|
@ -28,13 +28,6 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
register-feed = name: opts: ''
|
||||
(cl-gemini:register-feed :name "${name}" :title "${opts.title}" :path "${opts.path}" :base-uri "${opts.url}")'';
|
||||
|
||||
register-feeds = feeds:
|
||||
concatStringsSep "\n"
|
||||
(mapAttrsToList register-feed feeds);
|
||||
|
||||
ensure-certificates = hostname: user: key: cert: pkgs.writeShellScript "ensure-gemini-certificates.sh" ''
|
||||
if [[ ! -e ${key} ]]; then
|
||||
TARGET_CERT_DIR=$(${pkgs.coreutils}/bin/dirname ${cert})
|
||||
|
@ -49,6 +42,12 @@ let
|
|||
fi
|
||||
'';
|
||||
|
||||
generate-feeds = feeds:
|
||||
let
|
||||
feed-strings = mapAttrsToList (feed-name: opts:
|
||||
"(cl-gemini:register-feed :name \"${feed-name}\" :title \"${opts.title}\" :path \"${opts.path}\" :base-uri \"${opts.url}\")") feeds;
|
||||
in pkgs.writeText "gemini-local-feeds.lisp" (concatStringsSep "\n" feed-strings);
|
||||
|
||||
in {
|
||||
options.informis.cl-gemini = with types; {
|
||||
enable = mkEnableOption "Enable the cl-gemini server.";
|
||||
|
@ -162,8 +161,9 @@ in {
|
|||
GEMINI_LISTEN_PORT = toString cfg.port;
|
||||
GEMINI_DOCUMENT_ROOT = cfg.document-root;
|
||||
GEMINI_TEXTFILES_ROOT = cfg.textfiles-archive;
|
||||
GEMINI_FEEDS = "${generate-feeds cfg.feeds}";
|
||||
|
||||
CL_SOURCE_REGISTRY = lisp-helper.lisp-source-registry pkgs.cl-gemini;
|
||||
CL_SOURCE_REGISTRY = "${lisp-helper.lisp-source-registry pkgs.cl-gemini}";
|
||||
};
|
||||
|
||||
path = with pkgs; [
|
||||
|
|
|
@ -15,11 +15,14 @@ let
|
|||
value)))
|
||||
|
||||
(require :asdf)
|
||||
(asdf:load-system :cl-gemini)
|
||||
(let ((slynk-port (uiop:getenv "GEMINI_SLYNK_PORT")))
|
||||
(when slynk-port
|
||||
(asdf:load-system :slynk)
|
||||
(asdf:load-system :cl-gemini)
|
||||
(let ((slynk-port (uiop:getenvp "GEMINI_SLYNK_PORT")))
|
||||
(when slynk-port
|
||||
(slynk:create-server :port (parse-integer slynk-port) :dont-close t)))
|
||||
(let ((feed-file (uiop:getenvp "GEMINI_FEEDS")))
|
||||
(when feed-file
|
||||
(load feed-file)))
|
||||
(cl-gemini:start-gemini-server
|
||||
(getenv-or-fail "GEMINI_LISTEN_IP")
|
||||
(getenv-or-fail "GEMINI_PRIVATE_KEY")
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, localLispPackages, ... }:
|
||||
|
||||
pkgs.lispPackages.buildLispPackage {
|
||||
baseName = "agnostic-lizard";
|
||||
packageName = "agnostic-lizard";
|
||||
description = "Agnostic Lizard is a portable implementation of a code walker and in particular of the macroexpand-all function (and macro) that makes a best effort to be correct while not expecting much beyond what the Common Lisp standard requires.";
|
||||
|
||||
buildSystems = [ "agnostic-lizard" ];
|
||||
|
||||
deps = with localLispPackages; [];
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://gitlab.common-lisp.net/mraskin/agnostic-lizard.git";
|
||||
rev = "fe3a73719f05901c8819f8995a3ebae738257952";
|
||||
sha256 = "0ax78y8w4zlp5dcwyhz2nq7j3shi49qn31dkfg8lv2jlg7mkwh2d";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
asdFilesToKeep = [ "agnostic-lizard.asd" ];
|
||||
}
|
|
@ -33,6 +33,10 @@ in pkgs.lispPackages.buildLispPackage {
|
|||
osicat
|
||||
quicklisp
|
||||
quri
|
||||
slynk
|
||||
# slynk-asdf
|
||||
slynk-macrostep
|
||||
slynk-stepper
|
||||
uiop
|
||||
usocket-server
|
||||
xml-emitter
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, localLispPackages, ... }:
|
||||
|
||||
rec {
|
||||
agnostic-lizard = import ./agnostic-lizard.nix { inherit pkgs localLispPackages; };
|
||||
arrows = import ./arrows.nix { inherit pkgs localLispPackages; };
|
||||
cl-gemini = import ./cl-gemini.nix { inherit pkgs localLispPackages; };
|
||||
cl-sasl = import ./cl-sasl.nix { inherit pkgs localLispPackages; };
|
||||
|
@ -12,6 +13,10 @@ rec {
|
|||
inferior-shell = import ./inferior-shell.nix { inherit pkgs localLispPackages; };
|
||||
ip-utils = import ./ip-utils.nix { inherit pkgs localLispPackages; };
|
||||
osicat = import ./osicat.nix { inherit pkgs localLispPackages; };
|
||||
slynk = import ./slynk.nix { inherit pkgs localLispPackages; };
|
||||
slynk-asdf = import ./slynk-asdf.nix { inherit pkgs localLispPackages; };
|
||||
slynk-macrostep = import ./slynk-macrostep.nix { inherit pkgs localLispPackages; };
|
||||
slynk-stepper = import ./slynk-stepper.nix { inherit pkgs localLispPackages; };
|
||||
usocket-server = import ./usocket-server.nix { inherit pkgs localLispPackages; };
|
||||
xml-emitter = import ./xml-emitter.nix { inherit pkgs localLispPackages; };
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, localLispPackages, ... }:
|
||||
|
||||
pkgs.lispPackages.buildLispPackage {
|
||||
baseName = "slynk-asdf";
|
||||
packageName = "slynk-asdf";
|
||||
description = "SLY-ASDF is a contrib for SLY that adds support for editing ASDF systems, exposing several utilities for working with and loading systems.";
|
||||
|
||||
buildSystems = [ "slynk-asdf" ];
|
||||
|
||||
deps = with localLispPackages; [
|
||||
slynk
|
||||
];
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/mmgeorge/sly-asdf.git";
|
||||
rev = "95ca71ddeb6132c413e1e4352b136f41ed9254f1";
|
||||
sha256 = "1dvjwdan3qd3x716zgziy5vbq2972rz8pdqi7b40haqg01f33qf4";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
asdFilesToKeep = [ "slynk-asdf.asd" ];
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, localLispPackages, ... }:
|
||||
|
||||
pkgs.lispPackages.buildLispPackage {
|
||||
baseName = "slynk-macrostep";
|
||||
packageName = "slynk-macrostep";
|
||||
description = "sly-macrostep is a SLY contrib for expanding CL macros right inside the source file.";
|
||||
|
||||
buildSystems = [ "slynk-macrostep" ];
|
||||
|
||||
deps = with localLispPackages; [
|
||||
slynk
|
||||
];
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/joaotavora/sly-macrostep.git";
|
||||
rev = "5113e4e926cd752b1d0bcc1508b3ebad5def5fad";
|
||||
sha256 = "1nxf28gn4f3n0wnv7nb5sgl36fz175y470zs9hig4kq8cp0yal0r";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
asdFilesToKeep = [ "slynk-macrostep.asd" ];
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, localLispPackages, ... }:
|
||||
|
||||
pkgs.lispPackages.buildLispPackage {
|
||||
baseName = "slynk-stepper";
|
||||
packageName = "slynk-stepper";
|
||||
description = "A portable Common Lisp stepper interface.";
|
||||
|
||||
buildSystems = [ "slynk-stepper" ];
|
||||
|
||||
deps = with localLispPackages; [
|
||||
agnostic-lizard
|
||||
slynk
|
||||
];
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/joaotavora/sly-stepper.git";
|
||||
rev = "ec3c0a7f3c8b82926882e5fcfdacf67b86d989f8";
|
||||
sha256 = "1hxniaxifdw3m4y4yssgy22xcmmf558wx7rpz66wy5hwybjslf7b";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
asdFilesToKeep = [ "slynk-stepper.asd" ];
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, localLispPackages, ... }:
|
||||
|
||||
pkgs.lispPackages.buildLispPackage {
|
||||
baseName = "slynk";
|
||||
packageName = "slynk";
|
||||
description = "SLY is Sylvester the Cat's Common Lisp IDE for Emacs.";
|
||||
|
||||
buildSystems = [
|
||||
"slynk"
|
||||
"slynk/arglists"
|
||||
"slynk/fancy-inspector"
|
||||
"slynk/package-fu"
|
||||
"slynk/mrepl"
|
||||
"slynk/trace-dialog"
|
||||
"slynk/profiler"
|
||||
"slynk/stickers"
|
||||
"slynk/stickers"
|
||||
"slynk/indentation"
|
||||
"slynk/retro"
|
||||
];
|
||||
|
||||
deps = with localLispPackages; [];
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/joaotavora/sly.git";
|
||||
rev = "1.0.43";
|
||||
sha256 = "11yclc8i6gpy26m1yj6bid6da22639zpil1qzj87m5gfvxiv4zg6";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
asdFilesToKeep = [ "slynk/slynk.asd" ];
|
||||
}
|
Loading…
Reference in New Issue