trying to build the lisp server in nix
This commit is contained in:
parent
c204bd8d96
commit
54dab680d6
5 changed files with 38 additions and 8 deletions
19
build.lisp
19
build.lisp
|
@ -1,7 +1,24 @@
|
|||
(when (find-package :ql) (funcall (read-from-string "ql:quickload") :deploy))
|
||||
(load (sb-ext:posix-getenv "ASDF"))
|
||||
(asdf:load-asd (pathname (truename "tfcserver.asd")))
|
||||
(asdf:load-system "tfcserver")
|
||||
(require "cffi")
|
||||
(when (find-package :ql) (funcall (read-from-string "ql:quickload") :cffi))
|
||||
(when (find-package :ql) (funcall (read-from-string "ql:quickload") :deploy))
|
||||
|
||||
(defun pkg-config-add-lib (libname)
|
||||
(let ((process (sb-ext:run-program "pkg-config"
|
||||
(list libname "--libs-only-L")
|
||||
:input t :output :stream :wait t)))
|
||||
(let ((stream (sb-ext:process-output process)))
|
||||
(loop for line = (read-line stream nil nil)
|
||||
while line do
|
||||
;; Drop "-L" part, and add '/' to the end. '/' IS necessary!
|
||||
(pushnew (pathname (concatenate 'string (subseq line 2) "/"))
|
||||
cffi:*foreign-library-directories*))
|
||||
(sb-ext:process-close process))))
|
||||
;; Get libssl
|
||||
(pkg-config-add-lib "libssl")
|
||||
|
||||
(when (find-package :ql) (funcall (read-from-string "ql:quickload") :tfcserver))
|
||||
(push :deploy-console *features*)
|
||||
(asdf:make :tfcserver)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue