memstream: cross-compilation fixes (#346934)

This commit is contained in:
Dmitry Kalinkin 2024-10-07 14:53:44 -04:00 committed by GitHub
commit bdff2c4c87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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