Installed sbcl with home.packages = [ pkgs.sbcl ];
that works well with sly repl for finishing the textbook.
Next I want to learn to load different packages, quicklisp seems to be the way to go about loading things into repl, and possibly projects.
In the NixOS search found only package for quicklisp, not options, and also there are no options in home-manager.
adding home.packages = [ pkgs.lispPackages.quicklisp ];
makes binary available on “~/.nix-profile/bin/quicklisp”
and library available on “.nix-profile/lib/common-lisp/quicklisp/setup.lisp”
Article on installing quicklisp Quicklisp beta ( Loading After Installation )
seems to say that I need to evaluate (load "~/.nix-profile/lib/common-lisp/quicklisp/setup.lisp")
to make quicklisp available to current session
But that results in an error
“Can’t create directory /nix/store/fglfv7x2zbvg3crn6ss28w9yzl9n7ysd-lisp-quicklisp-2021-02-13/lib/common-lisp/quicklisp/dists”
It seems that maybe I need to add quicklisp to startup config for sbcl, that’s installed into nix store?
I’m unsure how to proceed, and whether it’s possible to use quicklisp from nix for “non-purely” loading packages from web.
Maybe this binary is only meant for use with quicklisp packages which are wrapped into nix, and are installed from pkgs.quicklispPackagesClisp?
I tried to look for wiki page, or manual page, and in README in nixpkgs module
For now only way I see is installing quicklisp outside of nix, through downloadable installer
For the projects, use nix-shell
with lisp compiler (sbcl or another) and any non-lisp dependencies specified in nix
Lisp compiler would not automatically see dependencies from nix-shell builtinputs,
so in shell definition setting explicitly LD_LIBRARY_PATH and sometimes CPATH for headers would be required
How to get external libraries, on example of loading CLOG
(ql:quickload :clog)
failed with error
0: (CFFI::FL-ERROR “Unable to load any of the alternatives:~% ~S” (“libcrypto.so.1.1” “libcrypto.so.1.0.0” “libcrypto.so.3” “libcrypto.so”))
1: (CFFI::TRY-FOREIGN-LIBRARY-ALTERNATIVES CL+SSL/CONFIG::LIBCRYPTO (“libcrypto.so.1.1” “libcrypto.so.1.0.0” “libcrypto.so.3” “libcrypto.so”) NIL)