binaryen: 118 -> 119

This commit is contained in:
Will Cohen 2024-11-23 14:27:48 -05:00
parent 77e646f171
commit 6a49785456

View File

@ -1,53 +1,61 @@
{ lib, stdenv, cmake, python3, fetchFromGitHub, emscripten, { lib, stdenv, cmake, python3, fetchFromGitHub, emscripten,
gtest, lit, nodejs, filecheck gtest, lit, nodejs, filecheck
}: }:
let
stdenv.mkDerivation rec { testsuite = fetchFromGitHub {
pname = "binaryen";
version = "118";
src = fetchFromGitHub {
owner = "WebAssembly"; owner = "WebAssembly";
repo = "binaryen"; repo = "testsuite";
rev = "version_${version}"; rev = "e05365077e13a1d86ffe77acfb1a835b7aa78422";
hash = "sha256-akMW3S2/qUyLK8F77EtnaXPDXvIMpkGfNB2jOD6hQho="; hash = "sha256-yvZ5AZTPUA6nsD3xpFC0VLthiu2CxVto66RTXBXXeJM=";
}; };
in
stdenv.mkDerivation rec {
pname = "binaryen";
version = "119";
nativeBuildInputs = [ cmake python3 ]; src = fetchFromGitHub {
owner = "WebAssembly";
repo = "binaryen";
rev = "version_${version}";
hash = "sha256-JYXtN3CW4qm/nnjGRvv3GxQ0x9O9wHtNYQLqHIYTTOA=";
};
preConfigure = '' nativeBuildInputs = [ cmake python3 ];
if [ $doCheck -eq 1 ]; then
sed -i '/googletest/d' third_party/CMakeLists.txt
else
cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
fi
'';
nativeCheckInputs = [ gtest lit nodejs filecheck ]; preConfigure = ''
checkPhase = '' if [ $doCheck -eq 1 ]; then
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests sed -i '/googletest/d' third_party/CMakeLists.txt
''; rmdir test/spec/testsuite
ln -s ${testsuite} test/spec/testsuite
else
cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
fi
'';
tests = [ nativeCheckInputs = [ gtest lit nodejs filecheck ];
"version" "wasm-opt" "wasm-dis" checkPhase = ''
"crash" "dylink" "ctor-eval" LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
"wasm-metadce" "wasm-reduce" "spec" '';
"lld" "wasm2js" "validator"
"example" "unit"
# "binaryenjs" "binaryenjs_wasm" # not building this
"lit" "gtest"
];
doCheck = stdenv.hostPlatform.isLinux;
meta = with lib; { tests = [
homepage = "https://github.com/WebAssembly/binaryen"; "version" "wasm-opt" "wasm-dis"
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++"; "crash" "dylink" "ctor-eval"
platforms = platforms.all; "wasm-metadce" "wasm-reduce" "spec"
maintainers = with maintainers; [ asppsa willcohen ]; "lld" "wasm2js" "validator"
license = licenses.asl20; "example" "unit"
}; # "binaryenjs" "binaryenjs_wasm" # not building this
"lit" "gtest"
];
doCheck = stdenv.isLinux;
passthru.tests = { meta = with lib; {
inherit emscripten; homepage = "https://github.com/WebAssembly/binaryen";
}; description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
} platforms = platforms.all;
maintainers = with maintainers; [ asppsa willcohen ];
license = licenses.asl20;
};
passthru.tests = {
inherit emscripten;
};
}