Lisp: If on Guix, load CFFI and add ~/.guix-profile/lib to CFFI's load path

master
Pierre Neidhardt 2018-11-22 14:55:59 +01:00
parent ed8cf91c88
commit d68a039426
1 changed files with 10 additions and 0 deletions

10
.sbclrc
View File

@ -8,3 +8,13 @@
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
;; Some OSes package Lisp compilers in a way that ASDF is not automatically loaded.
(require "asdf")
(let ((guix-profile (format nil "~a/.guix-profile/lib/" (uiop:getenv "HOME"))))
(when (and (probe-file guix-profile)
(ignore-errors (asdf:load-system "cffi")))
(push guix-profile
(symbol-value (find-symbol (string '*foreign-library-directories*)
(find-package 'cffi))))))