mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
365e8a7b6a
lispPackages: reduce environment-bombing
34 lines
1 KiB
Plaintext
34 lines
1 KiB
Plaintext
args @ { fetchurl, ... }:
|
|
rec {
|
|
baseName = ''<% @var filename %>'';
|
|
version = ''<% @var version %>'';<% @if testname %>
|
|
|
|
testSystems = ["<% @var testname %>"];<% @endif %>
|
|
|
|
description = ''<% @var description %>'';
|
|
|
|
deps = [ <% @loop deps %>args."<% @var name %>" <% @endloop %>];
|
|
|
|
src = fetchurl {
|
|
url = ''<% @var url %>'';
|
|
sha256 = ''<% @var sha256 %>'';
|
|
};
|
|
|
|
overrides = x: {
|
|
postInstall = ''
|
|
find "$out/lib/common-lisp/" -name '*.asd' | grep -iv '/<% @var name %>[.]asd${"$"}' |
|
|
while read f; do
|
|
env -i \
|
|
NIX_LISP="$NIX_LISP" \
|
|
NIX_LISP_PRELAUNCH_HOOK="nix_lisp_run_single_form '(progn
|
|
(asdf:load-system :$(basename "$f" .asd))
|
|
(asdf:perform (quote asdf:compile-bundle-op) :$(basename "$f" .asd))
|
|
(ignore-errors (asdf:perform (quote asdf:deliver-asd-op) :$(basename "$f" .asd)))
|
|
)'" \
|
|
"$out"/bin/*-lisp-launcher.sh ||
|
|
mv "$f"{,.sibling}; done || true
|
|
'';
|
|
};
|
|
}
|
|
/* <%= cl-emb-intern::topenv %> */
|