emscripten: node_modules fix, cache location fix
This commit is contained in:
parent
262313d520
commit
c2618fc5e3
@ -114,15 +114,22 @@ stdenv.mkDerivation rec {
|
||||
cp -r . $appdir
|
||||
chmod -R +w $appdir
|
||||
|
||||
mkdir -p $appdir/node_modules
|
||||
mkdir -p $appdir/node_modules/.bin
|
||||
cp -r ${nodeModules}/* $appdir/node_modules
|
||||
cp -r ${nodeModules}/* $appdir/node_modules/.bin
|
||||
|
||||
cp ${./locate_cache.sh} $appdir/locate_cache.sh
|
||||
chmod +x $appdir/locate_cache.sh
|
||||
|
||||
export EM_CACHE=$out/share/emscripten/cache
|
||||
|
||||
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} \
|
||||
--set EM_EXCLUSIVE_CACHE_ACCESS 1 \
|
||||
--set PYTHON ${python3}/bin/python
|
||||
--set PYTHON ${python3}/bin/python \
|
||||
--run "source $appdir/locate_cache.sh"
|
||||
done
|
||||
|
||||
# precompile libc (etc.) in all variants:
|
||||
|
||||
1
pkgs/development/compilers/emscripten/locate_cache.sh
Normal file
1
pkgs/development/compilers/emscripten/locate_cache.sh
Normal file
@ -0,0 +1 @@
|
||||
export EM_CACHE=${EM_CACHE:-"/tmp/$(basename $(realpath $(dirname $(which emcc))/..))_cache"}
|
||||
Loading…
x
Reference in New Issue
Block a user