sbcl: create version file if none exists

Fallback for when there is no such file (e.g. building from git)

The blanket recreation of this file was removed by me in
d09db9c096 but I hadn’t considered this edge case.
This commit is contained in:
Hraban Luyat 2024-03-21 11:08:30 -04:00
parent 7872526e9c
commit a91049c31a

View file

@ -146,6 +146,12 @@ stdenv.mkDerivation (self: rec {
--replace-quiet /bin/uname "${coreutils}/bin/uname" \
--replace-quiet /bin/sh "${stdenv.shell}"
)
# Official source release tarballs will have a version.lispexpr, but if you
# want to override { src = ... } it might not exist. Its required for
# building, so create a mock version as a backup.
if [[ ! -a version.lisp-expr ]]; then
echo '"${version}.nixos"' > version.lisp-expr
fi
'';
preBuild = ''