Skip to content

Commit 455e852

Browse files
committed
Reenable GitRev
1 parent adf068e commit 455e852

File tree

2 files changed

+12
-36
lines changed

2 files changed

+12
-36
lines changed

agda-wasm.patch

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -161,34 +161,3 @@ index a66359e3e3..22434c211f 100644
161161

162162
instance B.Binary Node where
163163

164-
diff --git a/src/full/Agda/VersionCommit.hs b/src/full/Agda/VersionCommit.hs
165-
index ce53083a99..40b0e704f6 100644
166-
--- a/src/full/Agda/VersionCommit.hs
167-
+++ b/src/full/Agda/VersionCommit.hs
168-
@@ -9,7 +9,9 @@
169-
170-
module Agda.VersionCommit where
171-
172-
+#if !defined(wasm32_HOST_ARCH)
173-
import Development.GitRev
174-
+#endif
175-
176-
import Agda.Version
177-
178-
@@ -22,11 +24,16 @@ commitInfo
179-
| hash == "UNKNOWN" = Nothing
180-
| otherwise = Just $ abbrev hash ++ dirty
181-
where
182-
+#if defined(wasm32_HOST_ARCH)
183-
+ hash = "UNKNOWN"
184-
+ dirty = ""
185-
+#else
186-
hash = $(gitHash)
187-
188-
-- Check if any tracked files have uncommitted changes
189-
dirty | $(gitDirtyTracked) = "-dirty"
190-
| otherwise = ""
191-
+#endif
192-
193-
-- Abbreviate a commit hash while keeping it unambiguous
194-
abbrev = take 7

setup-ghc-wasm.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def host_specific():
9292
'x86_64-linux',
9393
'wasi-sdk',
9494
'x86_64-linux',
95-
'dist/wasi-sdk-26.0-x86_64-linux.tar.gz',
95+
'dist/wasi-sdk-27.0-x86_64-linux.tar.gz',
9696
'wasmtime',
9797
'nodejs',
9898
'cabal',
@@ -108,7 +108,7 @@ def host_specific():
108108
'aarch64-linux',
109109
'wasi-sdk-aarch64-linux',
110110
'aarch64-linux',
111-
'dist/wasi-sdk-26.0-aarch64-linux.tar.gz',
111+
'dist/wasi-sdk-27.0-aarch64-linux.tar.gz',
112112
'wasmtime_aarch64_linux',
113113
'nodejs_aarch64_linux',
114114
'cabal_aarch64_linux',
@@ -124,7 +124,7 @@ def host_specific():
124124
'aarch64-apple-darwin',
125125
'wasi-sdk-aarch64-darwin',
126126
'aarch64-darwin',
127-
'dist/wasi-sdk-26.0-arm64-macos.tar.gz',
127+
'dist/wasi-sdk-27.0-arm64-macos.tar.gz',
128128
'wasmtime_aarch64_darwin',
129129
'nodejs_aarch64_darwin',
130130
'cabal_aarch64_darwin',
@@ -139,7 +139,7 @@ def host_specific():
139139
'x86_64-apple-darwin',
140140
'wasi-sdk-x86_64-darwin',
141141
'x86_64-darwin',
142-
'dist/wasi-sdk-26.0-arm64-macos.tar.gz',
142+
'dist/wasi-sdk-27.0-arm64-macos.tar.gz',
143143
'wasmtime_x86_64_darwin',
144144
'nodejs_x86_64_darwin',
145145
'cabal_x86_64_darwin',
@@ -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

202208
def 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

Comments
 (0)