1{ stdenv, fetchFromGitHub, python }:
2
3let
4 rev = "1.36.4";
5in
6
7stdenv.mkDerivation rec {
8 name = "emscripten-fastcomp-${rev}";
9
10 srcFC = fetchFromGitHub {
11 owner = "kripken";
12 repo = "emscripten-fastcomp";
13 sha256 = "0838rl0n9hyq5dd0gmj5rvigbmk5mhrhzyjk0zd8mjs2mk8z510l";
14 inherit rev;
15 };
16
17 srcFL = fetchFromGitHub {
18 owner = "kripken";
19 repo = "emscripten-fastcomp-clang";
20 sha256 = "169hfabamv3jmf88flhl4scwaxdh24196gwpz3sdb26lzcns519q";
21 inherit rev;
22 };
23
24 buildInputs = [ python ];
25 buildCommand = ''
26 cp -as ${srcFC} $TMPDIR/src
27 chmod +w $TMPDIR/src/tools
28 cp -as ${srcFL} $TMPDIR/src/tools/clang
29
30 chmod +w $TMPDIR/src
31 mkdir $TMPDIR/src/build
32 cd $TMPDIR/src/build
33
34 ../configure --enable-optimized --disable-assertions --enable-targets=host,js
35 make
36 cp -a Release/bin $out
37 '';
38
39 meta = with stdenv.lib; {
40 homepage = https://github.com/kripken/emscripten-fastcomp;
41 description = "Emscripten llvm";
42 platforms = platforms.all;
43 maintainers = with maintainers; [ qknight matthewbauer ];
44 license = stdenv.lib.licenses.ncsa;
45 };
46}