Andy Patterson <ajpat...@uwaterloo.ca> writes: > On Tue, 27 Sep 2016 00:15:20 -0400 > Andy Patterson <ajpat...@uwaterloo.ca> 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?