Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
lispPackages.clwrapper
is a useful package for creating nix derivations that support a variety of lisp compilers. Instead of running the compiler directly (and thus depending on a specific one), you use thecommon-lisp.sh
script to actually invoke the compiler. Neat! Unfortunately, not all functionality is exposed conveniently. For example, if you want to get your compiler to load a file, you need to jump through some hoops. Right now, the easiest way to do that is to sourcecl-wrapper.sh
and use the variables it sets.Over in https://github.com/bradleyjensen/ql2nix, I to source
cl-wrapper.sh
during abuildPhase
. Unfortunately,cl-wrapper.sh
always returns a non-zero exit code whenNIX_LISP_SKIP_CODE
is the empty string. So, I had to hack around it by tossing a|| true
into mybuildPhase
. This PR corrects that.This PR also makes clwrapper work with CCL. The
common-lisp.sh
script passes in the path to theccl
symlink rather than the path to the actual executable binary. That causescl-wrapper.sh
to fail to recognize the implementation.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)