stuff
This commit is contained in:
parent
3fecf46f63
commit
9ed3fa6690
2 changed files with 46 additions and 8 deletions
|
@ -1,9 +1,31 @@
|
|||
|
||||
;;; The following lines added by ql:add-to-init-file:
|
||||
;; The following lines added by ql:add-to-init-file:
|
||||
#-quicklisp
|
||||
(let ((quicklisp-init (merge-pathnames "~/.quicklisp/setup.lisp"
|
||||
#+asdf (require :asdf)
|
||||
|
||||
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
|
||||
(user-homedir-pathname))))
|
||||
(when (probe-file quicklisp-init)
|
||||
(load quicklisp-init)))
|
||||
|
||||
(push (pathname "~/source/_cl/") ql:*local-project-directories*)
|
||||
|
||||
(ql:quickload :cffi :silent t)
|
||||
(pushnew (merge-pathnames ".nix-profile/lib/" (user-homedir-pathname))
|
||||
cffi:*foreign-library-directories*)
|
||||
(pushnew (merge-pathnames ".nix-profile/lib64/" (user-homedir-pathname))
|
||||
cffi:*foreign-library-directories*)
|
||||
|
||||
|
||||
(defun pkg-config-add-lib (libname)
|
||||
(let ((process (sb-ext:run-program "/usr/bin/env"
|
||||
(list "pkg-config" 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))))
|
||||
;; load specific libs
|
||||
(pkg-config-add-lib "libffi")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue