fsg: fix cross build

This commit is contained in:
FliegendeWurst
2025-01-02 17:46:00 +01:00
parent f28864e00d
commit 7b55ce8367
+10
View File
@@ -25,6 +25,12 @@ stdenv.mkDerivation rec {
patches = [ ./wxgtk-3.2.patch ];
# use correct wx-config for cross-compiling
postPatch = ''
substituteInPlace makefile \
--replace-fail 'wx-config' "${lib.getExe' wxGTK32 "wx-config"}"
'';
hardeningDisable = [ "format" ];
nativeBuildInputs = [ pkg-config ];
@@ -45,6 +51,10 @@ stdenv.mkDerivation rec {
sed -re '/ctrans_prob/s/energy\[center][+]energy\[other]/(int)(fmin(energy[center]+energy[other],99))/g' -i Canvas.cpp
'';
makeFlags = [
"CPP=${stdenv.cc.targetPrefix}c++"
];
installPhase = ''
mkdir -p $out/bin $out/libexec
cp sand $out/libexec