From d68a039426a6822d07ae6f3004e9c79a697903b7 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 22 Nov 2018 14:55:59 +0100 Subject: [PATCH] Lisp: If on Guix, load CFFI and add ~/.guix-profile/lib to CFFI's load path --- .sbclrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.sbclrc b/.sbclrc index c9c07953..078f4250 100644 --- a/.sbclrc +++ b/.sbclrc @@ -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))))))