2020-08-29 10:27:35 +01:00
|
|
|
{ stdenv, cmake, python3, fetchFromGitHub, fetchpatch, emscripten }:
|
2017-06-04 04:49:46 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "binaryen";
|
2020-08-29 10:27:35 +01:00
|
|
|
version = "96";
|
2017-06-04 04:49:46 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WebAssembly";
|
|
|
|
repo = "binaryen";
|
2020-08-28 19:46:26 +01:00
|
|
|
rev = "version_${version}";
|
2020-08-29 10:27:35 +01:00
|
|
|
sha256 = "1mqpb6yy87aifpbcy0lczi3bp6kddrwi6d0g6lrhjrdxx2kvbdag";
|
2017-06-04 04:49:46 +01:00
|
|
|
};
|
|
|
|
|
2020-08-29 10:27:35 +01:00
|
|
|
patches = [
|
|
|
|
# Adds --minimize-wasm-changes option required by emscripten 2.0.1
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/WebAssembly/binaryen/pull/3044.patch";
|
|
|
|
sha256 = "1hdbc9h9zhh2d3bl4sqv6v9psfmny715612bwpjdln0ibdvc129s";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-03-14 01:00:27 +00:00
|
|
|
nativeBuildInputs = [ cmake python3 ];
|
2017-06-04 04:49:46 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/WebAssembly/binaryen";
|
2017-06-04 04:49:46 +01:00
|
|
|
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ asppsa ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
2020-08-29 10:27:35 +01:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
inherit emscripten;
|
|
|
|
};
|
2017-06-04 04:49:46 +01:00
|
|
|
}
|