diff --git a/pkgs/by-name/fs/fsg/package.nix b/pkgs/by-name/fs/fsg/package.nix index 5f7340f9f039..0a8048d5e6f8 100644 --- a/pkgs/by-name/fs/fsg/package.nix +++ b/pkgs/by-name/fs/fsg/package.nix @@ -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