From 5709115ac9231cab456a11d13a70f0e768c640e2 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 22 Sep 2024 22:52:46 -0400 Subject: [PATCH] memstream: cross-compilation fixes - Use `$(CC)` to pick up the prefixed compiler automatically; and - Only run check phase when the builder can execute host binaries. --- pkgs/development/libraries/memstream/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/memstream/default.nix b/pkgs/development/libraries/memstream/default.nix index 90505a56a931..7877718e6d35 100644 --- a/pkgs/development/libraries/memstream/default.nix +++ b/pkgs/development/libraries/memstream/default.nix @@ -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