I noticed one incompatibility while setting it up: I can't load cl-interpol because it tries to generate code into the nix store directory. I'm not sure what the best solution is or whether it is really a ql2nix issue at all but anywhere here's a backtrace when I try to REQUIRE it:
;;; Parsing Unicode file UnicodeData.txt
;;; Parsing Unicode file Scripts.txt
;;; Parsing Unicode file Blocks.txt
;;; Parsing Unicode file WordBreakProperty.txt
;;; Parsing Unicode file PropList.txt
;;; Parsing Unicode file DerivedAge.txt
;;; Parsing Unicode file BidiMirroring.txt
;;; Parsing Unicode file Jamo.txt
;;; Parsing Unicode file PropertyAliases.txt
;;; Building hash tables
;;; Writing source file methods.lispASDF could not load cl-interpol because
Error opening #P"/nix/store/5b5xmmnil50353lalzi33xpgig26jcc6-nixlisp-bundle-1.0.0/lib/common-lisp/bundle/software/cl-unicode-20190521-git/build/../methods.lisp":
Permission denied.
While evaluating the form starting at line 1, column 0
of #P"/nix/store/91a2v6lc6radpjw9kf50q14fy7k6yfcx-builder.lisp":
debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {10005285B3}>:
Error opening #P"/nix/store/5b5xmmnil50353lalzi33xpgig26jcc6-nixlisp-bundle-1.0.0/lib/common-lisp/bundle/software/cl-unicode-20190521-git/build/../methods.lisp":
Permission denied
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] Retry opening.
1: [USE-VALUE ] Try opening a different file.
2: [RETRY ] Retry
completing load for #<SYSTEM "cl-unicode/build">.
3: [ACCEPT ] Continue, treating
completing load for #<SYSTEM "cl-unicode/build">
as having been successful.
4: Retry ASDF operation.
5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
6: [RETRY ] Retry EVAL of current toplevel form.
7: Ignore error and continue loading file "/nix/store/91a2v6lc6radpjw9kf50q14fy7k6yfcx-builder.lisp".
8: [ABORT ] Abort loading file "/nix/store/91a2v6lc6radpjw9kf50q14fy7k6yfcx-builder.lisp".
9: Ignore runtime option --load "/nix/store/91a2v6lc6radpjw9kf50q14fy7k6yfcx-builder.lisp".
10: Skip rest of --eval and --load options.
11: Skip to toplevel READ/EVAL/PRINT loop.
12: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
((FLET SB-IMPL::VANILLA-OPEN-ERROR :IN OPEN) SB-INT:SIMPLE-FILE-ERROR)
0]
;
; compilation unit aborted
; caught 2 fatal ERROR conditions
; printed 1201 notes
* cp: cannot stat 'my.image': No such file or directory
builder for '/nix/store/vk7xm72qang178qb5aqjm0w0zgs6px7z-lisp.drv' failed with exit code 1
error: build of '/nix/store/vk7xm72qang178qb5aqjm0w0zgs6px7z-lisp.drv' failed
loading this derivation
{ pkgs ? import <nixpkgs> {} }:
with pkgs; with stdenv;
let
# Until Nixpkgs adopts mkNixlispBundle, you'll have to embed it in
# your project. Details are below.
mkNixlispBundle = import /home/luke/git/ql2nix/mkNixlispBundle.nix pkgs;
nixlispBundle = mkNixlispBundle (import ./qlDist.nix);
script = writeText "builder.lisp" ''
(let ((packages '(cl-ppcre esrap bordeaux-threads alexandria cffi cl-interpol cl-quickcheck read-csv uffi)))
(mapc #'require packages)
(save-lisp-and-die "my.image"))
'';
in
runCommand "lisp" { buildInputs = [ sbcl lispPackages.clwrapper nixlispBundle ]; } ''
cl-wrapper.sh sbcl --load ${script}
mkdir $out
cp my.image $out/
''
Hey ql2nix is awesome!!
I noticed one incompatibility while setting it up: I can't load
cl-interpol
because it tries to generate code into the nix store directory. I'm not sure what the best solution is or whether it is really a ql2nix issue at all but anywhere here's a backtrace when I try toREQUIRE
it:loading this derivation