@@ -196,8 +196,14 @@ def setup_wasi_sdk():
196196 run_curl (jq_autogen ('binaryen' ), 'binaryen' , pipe_to = 'tar xz -C %s --no-same-owner --strip-components=1' )
197197 run_cmd (['cp' , 'binaryen/bin/wasm-opt' , f'{ WASI_SDK_ROOT } /bin' ])
198198
199+ print ('--- Setting up nodejs ---' )
200+ if path_is_fresh ('nodejs' ):
201+ run_cmd (['mkdir' , '-p' , 'nodejs' ])
202+ run_curl (jq_autogen ('nodejs' ), 'nodejs' , pipe_to = 'tar xJ -C %s --no-same-owner --strip-components=1' )
203+ run_cmd (['cp' , '-r' , 'nodejs' , PREFIX ])
204+
199205# utilities are NOT included, please install them by yourself:
200- # nodejs, playwright, wabt, wasmtime
206+ # playwright, wabt, wasmtime
201207
202208def setup_wasm_run ():
203209 pass
@@ -275,6 +281,7 @@ def write_env_files(envs):
275281 envfile .write (f'prepend_path "{ cabal_prefix } "\n ' )
276282 envfile .write (f'prepend_path "{ WASI_SDK_ROOT } /bin"\n ' )
277283 envfile .write (f'prepend_path "{ wasm_ghc_prefix } /bin"\n ' )
284+ envfile .write (f'prepend_path "{ PREFIX } /nodejs/bin"\n ' )
278285
279286 for env , value in envs .items ():
280287 envfile .write (f'export { env } ={ value } \n ' )
0 commit comments