clisp: fix broken symlinks (#425299)

This commit is contained in:
7c6f434c 2025-07-15 09:16:04 +00:00 committed by GitHub
commit 9b2b281ea8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,10 +130,16 @@ stdenv.mkDerivation {
doCheck = true; doCheck = true;
postInstall = lib.optionalString (withModules != [ ]) ( postInstall = lib.optionalString (withModules != [ ]) ''
''bash ./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' bash ./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full \
+ lib.concatMapStrings (x: " " + x) withModules ${lib.concatMapStrings (x: " " + x) withModules}
);
find "$out"/lib/clisp*/full -type l -name "*.o" | while read -r symlink; do
if [[ "$(readlink "$symlink")" =~ (.*\/builddir\/)(.*) ]]; then
ln -sf "../''${BASH_REMATCH[2]}" "$symlink"
fi
done
'';
env.NIX_CFLAGS_COMPILE = "-O0 -falign-functions=${ env.NIX_CFLAGS_COMPILE = "-O0 -falign-functions=${
if stdenv.hostPlatform.is64bit then "8" else "4" if stdenv.hostPlatform.is64bit then "8" else "4"