Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.0 kB · 94 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495{ lib, stdenv, cmake, python3, fetchFromGitHub, emscripten, gtest, lit, nodejs, filecheck,}:let testsuite = fetchFromGitHub { owner = "WebAssembly"; repo = "testsuite"; rev = "e05365077e13a1d86ffe77acfb1a835b7aa78422"; hash = "sha256-yvZ5AZTPUA6nsD3xpFC0VLthiu2CxVto66RTXBXXeJM="; };instdenv.mkDerivation rec { pname = "binaryen"; version = "123";
src = fetchFromGitHub { owner = "WebAssembly"; repo = "binaryen"; rev = "version_${version}"; hash = "sha256-SFruWOJVxO3Ll1HwjK3DYSPY2IprnDly7QjxrECTrzE="; };
nativeBuildInputs = [ cmake python3 ];
strictDeps = true;
preConfigure = '' if [ $doCheck -eq 1 ]; then sed -i '/gtest/d' third_party/CMakeLists.txt rmdir test/spec/testsuite ln -s ${testsuite} test/spec/testsuite else cmakeFlagsArray=($cmakeFlagsArray -DBUILD_TESTS=0) fi '';
nativeCheckInputs = [ lit nodejs filecheck ]; checkInputs = [ gtest ]; checkPhase = '' LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib python3 ../check.py $tests '';
tests = [ "version" "wasm-opt" "wasm-dis" "crash" "dylink" "ctor-eval" "wasm-metadce" "wasm-reduce" "spec" "lld" "wasm2js" # "unit" # fails on test.unit.test_cluster_fuzz.ClusterFuzz # "binaryenjs" "binaryenjs_wasm" # not building this # "lit" # fails on d8/fuzz_shell* "gtest" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "example" "validator" ];
doCheck = (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin);
meta = with lib; { 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; };}