shell.nix and default.nix work right now
This commit is contained in:
parent
54dab680d6
commit
aee6d10404
5 changed files with 32 additions and 80 deletions
32
build.lisp
32
build.lisp
|
@ -1,25 +1,11 @@
|
|||
(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)
|
||||
(quit)
|
||||
(asdf:load-system 'tfcserver)
|
||||
;; (asdf:make :tfcserver)
|
||||
;; (asdf:operate :program-op :tfcserver)
|
||||
(asdf:disable-output-translations)
|
||||
(sb-ext:save-lisp-and-die
|
||||
#p"tfcserver"
|
||||
:compression t
|
||||
:toplevel #'tfcserver::main
|
||||
:executable t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue