From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#32770: Packaging SLIME/SWANK as Common Lisp library Date: Thu, 04 Oct 2018 20:08:30 +0200 Message-ID: <87zhvtshy9.fsf@elephly.net> References: <87museeyy5.fsf@ambrevar.xyz> <20180929151630.00cf6396@mailservices.uwaterloo.ca> <87lg7iwu9i.fsf@ambrevar.xyz> <87k1n2wten.fsf@ambrevar.xyz> <20181002045531.78223c72@mailservices.uwaterloo.ca> <878t3gwsrm.fsf@ambrevar.xyz> <20181003012224.5baff3ac@mailservices.uwaterloo.ca> <8736tmj2vj.fsf@ambrevar.xyz> <20181004010308.7825505f@mailservices.uwaterloo.ca> <87k1mym7kb.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8QaN-0005Cz-Sb for bug-guix@gnu.org; Fri, 05 Oct 2018 09:56:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8QaI-0000I7-PG for bug-guix@gnu.org; Fri, 05 Oct 2018 09:56:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33726) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8QaI-0000Hu-Ko for bug-guix@gnu.org; Fri, 05 Oct 2018 09:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8QaI-0007Fg-H8 for bug-guix@gnu.org; Fri, 05 Oct 2018 09:56:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87k1mym7kb.fsf@ambrevar.xyz> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 32770@debbugs.gnu.org Hi, >> Adding to *foreign-library-directories* at compile time may allow a >> package to compile, but I get the feeling that it may not have the >> desired effect when you try to load the package later on. > > Why? In my experience it works for a compiled Next executable. > >> I guess another approach we could take if replacement is undesirable >> would be to modify the cffi package to honour some environment variable >> for its default, and then add that variable to the search path for >> cffi. > > The cffi:*foreign-library-directories* approach got recommended to me on > the CFFI mailing list. I find it similar to what you want, a sort of > environment variable (a search-path global variable). I haven't looked > into Nix. > >> I personally tend to favour replacement, but others could chime in here >> as well since this problem isn't specific to lisp packaging. We usually replace plain references to libraries with exact store paths. > Could this be automated? What I like with cffi:*foreign-library-directories* is > that we could automatically push > > (string-append (assoc-ref inputs "foo") "/lib) > > to it so that packages only have to write something like > > #:cffi-packages (list ,cl-sqlite ,cl-foo...) This sounds useful, but to me it feels like wrapping executables in LD_LIBRARY_PATH, which we try hard to avoid. When using cffi:*foreign-library-directories* how would we deal with cases where we have more than one package specifying cffi-packages? Would this option need to be considered for every package in the package closure? Would it need to be handled by a profile hook in case these packages are installed? -- Ricardo