last bits to making compilation work
This commit is contained in:
parent
207f1d0234
commit
4af927f7e9
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
all: build-server
|
all: build-server
|
||||||
|
|
||||||
build-server:
|
build-server:
|
||||||
sbcl --eval '(asdf:load-asd "/home/chris/dev/tfcconnection/tfcserver.asd")' --eval '(ql:quickload :tfcserver)' --eval '(push :deploy-console *features*)' --eval "(asdf:make :tfcserver)" --eval '(quit)'
|
sbcl --load build.lisp
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
hugo server --noHTTPCache
|
hugo server --noHTTPCache
|
||||||
|
|
30
README.org
30
README.org
|
@ -5,3 +5,33 @@ In an attempt at building a better/faster website than is possible with the curr
|
||||||
|
|
||||||
To edit the campmap use this link
|
To edit the campmap use this link
|
||||||
http://umap.openstreetmap.fr/en/map/anonymous-edit/888075:134YBQNTmQ2pkJ76ur0PJ8KPuAc
|
http://umap.openstreetmap.fr/en/map/anonymous-edit/888075:134YBQNTmQ2pkJ76ur0PJ8KPuAc
|
||||||
|
|
||||||
|
* Website
|
||||||
|
The website is built with Hugo. This gives us the ability of creating a very fast site with a lot of flexibility if you know what you're doing.
|
||||||
|
|
||||||
|
* Server
|
||||||
|
The website has a few parts that need processing like forms, these are plugged into a server component that has a RESTFUL API like system and helps us to process info on the site much faster.
|
||||||
|
|
||||||
|
The server is written in lisp.
|
||||||
|
|
||||||
|
** Build
|
||||||
|
To build the server run make
|
||||||
|
|
||||||
|
#+begin_src shell :results silent
|
||||||
|
make
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
This drops the server binary in the =bin= folder with the libraries bundled next to it.
|
||||||
|
|
||||||
|
** Nix
|
||||||
|
Because we use NixOS for our servers, we also have everything setup using Nix Flakes. To enter a development shell
|
||||||
|
|
||||||
|
#+begin_src nix :results silent
|
||||||
|
nix develop
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
To build it.
|
||||||
|
|
||||||
|
#+begin_src nix :results silent
|
||||||
|
nix build
|
||||||
|
#+end_src
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
(when (find-package :ql) (funcall (read-from-string "ql:quickload") :deploy))
|
||||||
(load (sb-ext:posix-getenv "ASDF"))
|
(load (sb-ext:posix-getenv "ASDF"))
|
||||||
(asdf:load-asd (pathname (truename "tfcserver.asd")))
|
(asdf:load-asd (pathname (truename "tfcserver.asd")))
|
||||||
;; (ql:quickload :tfcserver)
|
(asdf:load-system "tfcserver")
|
||||||
|
(when (find-package :ql) (funcall (read-from-string "ql:quickload") :tfcserver))
|
||||||
|
;; (push :deploy-console *features*)
|
||||||
(asdf:make :tfcserver)
|
(asdf:make :tfcserver)
|
||||||
|
(quit)
|
||||||
|
|
|
@ -17,6 +17,7 @@ let
|
||||||
clack
|
clack
|
||||||
jzon
|
jzon
|
||||||
serapeum
|
serapeum
|
||||||
|
deploy
|
||||||
openssl
|
openssl
|
||||||
openssl.out
|
openssl.out
|
||||||
openssl.dev
|
openssl.dev
|
||||||
|
@ -45,13 +46,16 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp tfcapi $out/bin
|
||||||
|
# wrapProgram $out/bin/tfcapi \
|
||||||
|
# --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
name = "tfcconnection";
|
name = "tfcconnection";
|
||||||
description = "TFC Connection Website";
|
description = "TFC Connection Website";
|
||||||
homepage = "";
|
homepage = "https://tfcconnection.org";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = [ "chriscochrun" ];
|
maintainers = [ "chriscochrun" ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
;; (ql:quickload '(hunchentoot clack dexador com.inuoe.jzon serapeum bordeaux-threads))
|
;; (ql:quickload '(hunchentoot clack dexador com.inuoe.jzon serapeum bordeaux-threads))
|
||||||
(asdf:load-systems '(hunchentoot clack dexador com.inuoe.jzon serapeum bordeaux-threads))
|
;; (asdf:load-systems '(hunchentoot clack dexador com.inuoe.jzon serapeum bordeaux-threads))
|
||||||
;; (require '(hunchentoot clack dexador com.inuoe.jzon serapeum bordeaux-threads))
|
(require "hunchentoot")
|
||||||
|
(require "clack")
|
||||||
|
(require "dexador")
|
||||||
|
(require "com.inuoe.jzon")
|
||||||
|
(require "serapeum")
|
||||||
|
(require "bordeaux-threads")
|
||||||
|
|
||||||
(defpackage tfc-server
|
(defpackage tfc-server
|
||||||
(:use :cl :uiop :com.inuoe.jzon :clack))
|
(:use :cl :uiop :com.inuoe.jzon :clack))
|
||||||
|
@ -116,7 +121,7 @@
|
||||||
(if (listp content)
|
(if (listp content)
|
||||||
(setq content (serapeum:mapconcat
|
(setq content (serapeum:mapconcat
|
||||||
(lambda (x) (if (string= x "")
|
(lambda (x) (if (string= x "")
|
||||||
(coerce #\linefeed 'string)
|
(coerce #\Newline 'string)
|
||||||
x))
|
x))
|
||||||
content ""))))
|
content ""))))
|
||||||
(if name (if (string/= name "image") (progn
|
(if name (if (string/= name "image") (progn
|
||||||
|
|
Loading…
Reference in a new issue