Merge pull request #210397 from willcohen/bump-emscripten-rebased

emscripten: 3.1.17 -> 3.1.24
This commit is contained in:
Ryan Lahfa 2023-01-15 17:40:41 +01:00 committed by GitHub
commit 65e07f20cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 3459 deletions

View file

@ -2,32 +2,37 @@
, jre, binaryen
, llvmPackages
, symlinkJoin, makeWrapper, substituteAll
, mkYarnModules
, buildNpmPackage
, emscripten
}:
stdenv.mkDerivation rec {
pname = "emscripten";
version = "3.1.17";
version = "3.1.24";
llvmEnv = symlinkJoin {
name = "emscripten-llvm-${version}";
paths = with llvmPackages; [ clang-unwrapped clang-unwrapped.lib lld llvm ];
};
nodeModules = mkYarnModules {
nodeModules = buildNpmPackage {
name = "emscripten-node-modules-${version}";
inherit pname version;
# it is vitally important the the package.json has name and version fields
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
inherit pname version src;
npmDepsHash = "sha256-ejuHR2BpAUStWjuvQuGE6ko4byF4GBl6FJBshxlknQk=";
dontBuild = true;
# Copy node_modules directly.
installPhase = ''
cp -r node_modules $out/
'';
};
src = fetchFromGitHub {
owner = "emscripten-core";
repo = "emscripten";
sha256 = "sha256-xOt9Znn5kCcieRHnXk794rMpgTzoR8pIKBXv/GeKcuw=";
sha256 = "sha256-1jW6ThxK6dThOO90l4Mc5yehVF3tI4HWipBWZAOztrk=";
rev = version;
};
@ -54,7 +59,7 @@ stdenv.mkDerivation rec {
sed -i "/^def check_sanity/a\\ return" tools/shared.py
# required for wasm2c
ln -s ${nodeModules}/node_modules .
ln -s ${nodeModules} node_modules
echo "EMSCRIPTEN_ROOT = '$out/share/emscripten'" > .emscripten
echo "LLVM_ROOT = '${llvmEnv}/bin'" >> .emscripten
@ -86,7 +91,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
for b in em++ em-config emar embuilder.py emcc emcmake emconfigure emmake emranlib emrun emscons emsize; do
makeWrapper $appdir/$b $out/bin/$b \
--set NODE_PATH ${nodeModules}/node_modules \
--set NODE_PATH ${nodeModules} \
--set EM_EXCLUSIVE_CACHE_ACCESS 1 \
--set PYTHON ${python3}/bin/python
done
@ -109,9 +114,9 @@ stdenv.mkDerivation rec {
popd
export PYTHON=${python3}/bin/python
export NODE_PATH=${nodeModules}/node_modules
export NODE_PATH=${nodeModules}
pushd $appdir
python tests/runner.py test_hello_world
python test/runner.py test_hello_world
popd
runHook postInstall
@ -128,7 +133,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/emscripten-core/emscripten";
description = "An LLVM-to-JavaScript Compiler";
platforms = platforms.all;
maintainers = with maintainers; [ qknight matthewbauer ];
maintainers = with maintainers; [ qknight matthewbauer raitobezarius ];
license = licenses.ncsa;
};
}

View file

@ -1,21 +0,0 @@
{
"name": "emscripten",
"version": "3.1.17",
"private": true,
"devDependencies": {
"es-check": "^6.2.1",
"eslint": "^8.16.0",
"eslint-config-google": "^0.14.0",
"source-map": "0.7.3",
"ws": "^8.6.0"
},
"dependencies": {
"acorn": "^8.7.1",
"google-closure-compiler": "20220502.0.0",
"html-minifier-terser": "6.1.0",
"wasm2c": "1.0.0"
},
"scripts": {
"lint": "eslint ."
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff