From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH 0/12]: Add asdf-build-system. Date: Fri, 30 Sep 2016 19:45:18 +0800 Message-ID: <871t01ligh.fsf@member.fsf.org> References: <20160927041532.27097-1-ajpatter@uwaterloo.ca> <20160928223005.3efee184@uwaterloo.ca> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpwFw-0006fG-9I for guix-devel@gnu.org; Fri, 30 Sep 2016 07:45:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpwFq-000887-Cc for guix-devel@gnu.org; Fri, 30 Sep 2016 07:45:31 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:54381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpwFq-00087k-6W for guix-devel@gnu.org; Fri, 30 Sep 2016 07:45:26 -0400 In-Reply-To: <20160928223005.3efee184@uwaterloo.ca> (Andy Patterson's message of "Wed, 28 Sep 2016 22:30:05 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andy Patterson Cc: guix-devel@gnu.org Andy Patterson writes: > On Tue, 27 Sep 2016 00:15:20 -0400 > Andy Patterson wrote: > >> Getting things to work "out of the box": I'd like to set up an >> environment variable to allow implementations to find installed >> libraries, but it's a bit tricky: > > After having thought about it some more, and having tried some things, I > came up with another solution which is able to integrate with guix's > existing environment variable handling. I've attached it as patches, > which would probably best be applied right after the first patch in > the main series, but could really go anywhere. > > With these changes, the system is functionally complete, so I'm just > waiting for comments. Any suggestions are welcome. Amazing works, thanks! I'd like to suggest 2 changes: - Name generic (source) packages with 'cl-...', and specified (compiled) packages with 'sbcl-...', 'ecl-...', etc. Same with our python and perl packages, etc. - Put the source-registry customization 'GUIX_SBCL_SOURCE_REGISTRY' below the 'asdf/source-registry:default-user-source-registry' in 'asdf/source-registry:*default-source-registries*'. IIUC, otherwise CL systems installed from Guix will be prefered over user managed systems by quicklisp or under ~/common-lisp, etc. Also, I find that ASDF already knowing the source systems well without any additional evironment variable. Due to XDG_DATA_DIRS is honored by 'asdf/source-registry:default-system-source-registry' So, I think we can change this: --8<---------------cut here---------------start------------->8--- (defun default-system-source-registry () `(:source-registry ,@(loop :for dir :in (xdg-data-dirs "common-lisp/") :collect `(:directory (,dir "systems/")) :collect `(:tree (,dir "source/"))) :inherit-configuration)) --8<---------------cut here---------------end--------------->8--- To: --8<---------------cut here---------------start------------->8--- (defun default-system-source-registry () `(:source-registry ,@(loop :for dir :in (xdg-data-dirs "common-lisp/") :collect `(:directory (,dir "@LISP@-bundle-systems/"))) ,@(loop :for dir :in (xdg-data-dirs "common-lisp/") :collect `(:directory (,dir "systems/")) :collect `(:tree (,dir "source/"))) :inherit-configuration)) --8<---------------cut here---------------end--------------->8--- For the same effects. Last, I guess the use of 'CL_SOURCE_REGISTRY' in asdf-build-system can be removed safely (for either way, with GUIX_SBCL_SOURCE_REGISTRY or XDG_DATA_DIRS). Those environment variables should work in both the builder (concatenated from directories from inputs) and profile. What do you think?