1 { lib, stdenv, cmake, python3, fetchFromGitHub, emscripten,
2 gtest, lit, nodejs, filecheck
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
10 owner = "WebAssembly";
12 rev = "version_${version}";
13 hash = "sha256-gMwbWiP+YDCVafQMBWhTuJGWmkYtnhEdn/oofKaUT08=";
16 nativeBuildInputs = [ cmake python3 ];
19 if [ $doCheck -eq 1 ]; then
20 sed -i '/googletest/d' third_party/CMakeLists.txt
22 cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0)
26 nativeCheckInputs = [ gtest lit nodejs filecheck ];
28 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests
32 "version" "wasm-opt" "wasm-dis"
33 "crash" "dylink" "ctor-eval"
34 "wasm-metadce" "wasm-reduce" "spec"
35 "lld" "wasm2js" "validator"
37 # "binaryenjs" "binaryenjs_wasm" # not building this
40 doCheck = stdenv.isLinux;
43 homepage = "https://github.com/WebAssembly/binaryen";
44 description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
45 platforms = platforms.all;
46 maintainers = with maintainers; [ asppsa ];
47 license = licenses.asl20;