memstream: cross-compilation fixes (#346934)

This commit is contained in:
Dmitry Kalinkin
2024-10-07 14:53:44 -04:00
committed by GitHub
@@ -9,13 +9,18 @@ stdenv.mkDerivation rec {
sha256 = "0kvdb897g7nyviaz72arbqijk2g2wa61cmi3l5yh48rzr49r3a3a";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'cc' '$(CC)'
'';
dontConfigure = true;
postBuild = ''
$AR rcs libmemstream.a memstream.o
'';
doCheck = true;
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
checkPhase = ''
runHook preCheck