polyml: Fix polyc linking script

polyc linking script hardcodes the linker to be the value of `$CXX` at
compile time. This is bad for environments without `g++` in path. Fix
this by patching the correct path into the script.

Co-Authored-By: Ricardo Correia <someplaceguy@wizy.org>
Co-Authored-By: Ivan Trubach <mr.trubach@icloud.com>
This commit is contained in:
sempiternal-aurora
2026-06-01 20:54:28 +10:00
co-authored by Ricardo Correia Ivan Trubach
parent d9bf2ea7ea
commit 3a717e7522
+7
View File
@@ -1,6 +1,7 @@
{
lib,
stdenv,
pkgsHostTarget,
fetchFromGitHub,
autoreconfHook,
gmp,
@@ -35,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
libffi
gmp
pkgsHostTarget.stdenv.cc
];
nativeBuildInputs = [ autoreconfHook ];
@@ -45,6 +47,11 @@ stdenv.mkDerivation (finalAttrs: {
"--with-gmp"
];
preInstall = ''
substituteInPlace polyc \
--replace-fail "LINK=\"$CXX\"" "LINK=\"${lib.getExe' pkgsHostTarget.stdenv.cc "c++"}\""
'';
doCheck = true;
meta = {