Merge pull request #26390 from asppsa/emscripten-binaryen

emscripten: add binaryen support
This commit is contained in:
Gabriel Ebner 2017-06-05 09:30:51 +02:00 committed by GitHub
commit c1dd378b58
3 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,24 @@
{ stdenv, cmake, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "32";
rev = "version_${version}";
name = "binaryen-${version}";
src = fetchFromGitHub {
owner = "WebAssembly";
repo = "binaryen";
sha256 = "0zclw6pa2pkzrnp8ib9qwbjvq38r2h5ynfg8fjl99b5lcyz5m590";
inherit rev;
};
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
homepage = https://github.com/WebAssembly/binaryen;
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
platforms = platforms.all;
maintainers = with maintainers; [ asppsa ];
license = licenses.asl20;
};
}

View File

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler, jre }:
{ stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler
, jre, binaryen, enableWasm ? true
}:
let
rev = "1.37.10";
@ -36,6 +38,9 @@ stdenv.mkDerivation {
echo "COMPILER_ENGINE = NODE_JS" >> $out/${appdir}/config
echo "CLOSURE_COMPILER = '${closurecompiler}/share/java/closure-compiler-v${closurecompiler.version}.jar'" >> $out/${appdir}/config
echo "JAVA = '${jre}/bin/java'" >> $out/${appdir}/config
''
+ stdenv.lib.optionalString enableWasm ''
echo "BINARYEN_ROOT = '${binaryen}'" >> $out/share/emscripten/config
'';
meta = with stdenv.lib; {

View File

@ -5014,6 +5014,8 @@ with pkgs;
stdenv = overrideCC stdenv gcc49;
};
binaryen = callPackage ../development/compilers/binaryen { };
boo = callPackage ../development/compilers/boo {
inherit (gnome2) gtksourceview;
};