Created
April 18, 2019 01:14
-
-
Save fstamour/36ed6d8f5198ae0e9429044d5fd1d94e to your computer and use it in GitHub Desktop.
hacky way to work with libraries in lisp with nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl-ppcre) | |
(defpackage :cffi) | |
(defparameter cffi::*foreign-library-directories* | |
`(,(merge-pathnames ".nix-profile/lib/" | |
(user-homedir-pathname)) | |
,@(loop for path in (cl-ppcre:all-matches-as-strings | |
"-L[-\\w/.]+" | |
(uiop:getenv "NIX_LDFLAGS")) | |
append (directory (subseq path 2))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment