From f41e5ca56e8a864687780e038c51d762b6ed6ebe Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Thu, 30 Jul 2026 10:06:46 -0400 Subject: [PATCH 1/2] binaryen: make doCheck test more correct Assisted-by: Claude:opus-5 --- pkgs/development/compilers/binaryen/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix index 8bc21cff7a10..22ce5575fcfd 100644 --- a/pkgs/development/compilers/binaryen/default.nix +++ b/pkgs/development/compilers/binaryen/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { strictDeps = true; preConfigure = '' - if [ $doCheck -eq 1 ]; then + if [ -n "$doCheck" ]; then sed -i '/gtest/d' third_party/CMakeLists.txt rmdir test/spec/testsuite ln -s ${testsuite} test/spec/testsuite From 2acf70a4e29bf7327a7a0e1630cc562d8d3e6086 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Wed, 29 Jul 2026 20:32:36 +0000 Subject: [PATCH 2/2] binaryen: omit binaryen-unittests in non-cross too Assisted-by: Claude:opus-5 --- pkgs/development/compilers/binaryen/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix index 22ce5575fcfd..8868590af83f 100644 --- a/pkgs/development/compilers/binaryen/default.nix +++ b/pkgs/development/compilers/binaryen/default.nix @@ -62,6 +62,14 @@ stdenv.mkDerivation rec { LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests ''; + # bin/binaryen-unittests is absent on cross builds which don't have doCheck, + # so delete it on non-cross builds too (thus removing gtest from the closure). + postInstall = '' + if [ -n "$doCheck" ]; then + rm "$out/bin/binaryen-unittests" + fi + ''; + tests = [ "version" "wasm-opt"