From 3620ead09bc687f3d79035955e8b2966c8c81965 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 13 Jun 2023 14:07:39 -0500 Subject: [PATCH] updates to build system --- Makefile | 2 +- build.lisp | 5 +++-- default.nix | 4 +++- src/main.lisp | 6 ++++-- tfcserver.asd | 8 ++++---- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 942a5e6..bf99f72 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: build-server build-server: - sbcl --eval '(ql:quickload "deploy")' --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 --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)' serve: hugo server --noHTTPCache diff --git a/build.lisp b/build.lisp index f4c7119..fa98957 100644 --- a/build.lisp +++ b/build.lisp @@ -1,3 +1,4 @@ -(asdf:load-asd "/home/chris/dev/tfcconnection/tfcserver.asd") -(ql:quickload :tfcserver) +(load (sb-ext:posix-getenv "ASDF")) +(asdf:load-asd (pathname (truename "tfcserver.asd"))) +;; (ql:quickload :tfcserver) (asdf:make :tfcserver) diff --git a/default.nix b/default.nix index 2f7a2f0..bed777c 100644 --- a/default.nix +++ b/default.nix @@ -11,6 +11,7 @@ let sbcl' = sbcl.withPackages (ps: with ps; [ + deploy hunchentoot dexador clack @@ -39,7 +40,8 @@ stdenv.mkDerivation rec { ]; buildPhase = '' - make + export HOME=$(pwd) + ${sbcl'}/bin/sbcl --load build.lisp ''; installPhase = '' diff --git a/src/main.lisp b/src/main.lisp index 2c1d000..50e5606 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -1,4 +1,6 @@ -(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)) +;; (require '(hunchentoot clack dexador com.inuoe.jzon serapeum bordeaux-threads)) (defpackage tfc-server (:use :cl :uiop :com.inuoe.jzon :clack)) @@ -114,7 +116,7 @@ (if (listp content) (setq content (serapeum:mapconcat (lambda (x) (if (string= x "") - (coerce #\Newline 'string) + (coerce #\linefeed 'string) x)) content "")))) (if name (if (string/= name "image") (progn diff --git a/tfcserver.asd b/tfcserver.asd index 0e57792..b4d1a21 100644 --- a/tfcserver.asd +++ b/tfcserver.asd @@ -1,4 +1,5 @@ #-asdf3.1 (error "requires asdf 3.1") +;; #+linux (deploy:define-library deploy::compression-lib :dont-deploy T) (defsystem "tfcserver" :version "0.1.0" @@ -11,8 +12,7 @@ :description "Restful server to handle website pieces" :long-description "Restful server to handle website pieces" ;; :in-order-to ((test-op (test-op "tfcserver-test"))) - :defsystem-depends-on (:deploy) ;; (ql:quickload "deploy") before - :build-operation "deploy-op" ;; leave as is + ;; :defsystem-depends-on (:deploy) ;; (ql:quickload "deploy") before + :build-operation "program-op" ;; leave as is :build-pathname "tfcapi" - :entry-point "tfc-server::main" - ) + :entry-point "tfc-server::main")