fix(gemma): Fix build process in Nix
This commit is contained in:
parent
b43e5529f7
commit
4411eea11f
2 changed files with 28 additions and 51 deletions
|
|
@ -1,31 +1,5 @@
|
|||
;; Build script for use within Nix.
|
||||
|
||||
(require :asdf)
|
||||
(require :sb-posix)
|
||||
(require :cffi)
|
||||
|
||||
(push (format nil "~A/" (sb-posix:getcwd)) asdf:*central-registry*)
|
||||
|
||||
;; Quicklisp is configured in the Nix build script
|
||||
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
|
||||
(user-homedir-pathname))))
|
||||
(when (probe-file quicklisp-init)
|
||||
(load quicklisp-init)))
|
||||
|
||||
;; OpenSSL linking requires pkg_config on NixOS.
|
||||
(ql:quickload "inferior-shell")
|
||||
|
||||
(defun pkg-config-lib-path (lib)
|
||||
"Look up the location of a library using pkg-config."
|
||||
(let ((flag (inferior-shell:run `("pkg-config" "--libs-only-L" ,lib)
|
||||
:output '(:string :stripped t))))
|
||||
(concatenate 'string (subseq flag 2) "/")))
|
||||
|
||||
(pushnew (pathname (pkg-config-lib-path "openssl"))
|
||||
cffi:*foreign-library-directories*
|
||||
:test #'equal)
|
||||
|
||||
;; cl-prevalence is not in the current Quicklisp -> Nix snapshot
|
||||
(ql:quickload "cl-prevalence")
|
||||
|
||||
(asdf:operate 'asdf:program-op :gemma)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue