Skip to content

Commit c56e135

Browse files
committed
build: create node_modules symlink for NODE_PATH
1 parent 084ca27 commit c56e135

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

nix/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ let
136136
];
137137
shellHook = ''
138138
export NODE_PATH="${nodeModules}/lib/node_modules"
139+
ln -sfn $NODE_PATH node_modules
139140
export PATH="${nodeModules}/bin:$PATH"
140141
${pkgs.lib.optionalString packageLockOnly "export NPM_CONFIG_PACKAGE_LOCK_ONLY=true"}
141142
''
@@ -177,6 +178,7 @@ let
177178
unpackPhase = ''
178179
export HOME="$TMP"
179180
export NODE_PATH="${nodeModules}/lib/node_modules"
181+
ln -sfn $NODE_PATH node_modules
180182
export PATH="${nodeModules}/bin:$PATH"
181183
cp -r $src .
182184
install-spago-style
@@ -227,6 +229,7 @@ let
227229
# sandbox, so we can just use node instead
228230
# (idea taken from `plutus-playground-client`)
229231
''
232+
ln -sfn $NODE_PATH node_modules
230233
cd ${project}
231234
${nodejs}/bin/node --enable-source-maps -e 'import("./output/${testMain}/index.js").then(m => m.main())'
232235
touch $out
@@ -400,6 +403,7 @@ let
400403
''
401404
export HOME="$TMP"
402405
export NODE_PATH="${nodeModules}/lib/node_modules"
406+
ln -sfn $NODE_PATH node_modules
403407
export PATH="${nodeModules}/bin:$PATH"
404408
${pkgs.lib.optionalString browserRuntime "export BROWSER_RUNTIME=1"}
405409
cp -r ${project}/* .
@@ -489,6 +493,7 @@ let
489493
}
490494
''
491495
export NODE_PATH="${pursDocsSearchNpm.nodeDependencies}/lib/node_modules"
496+
ln -sfn $NODE_PATH node_modules
492497
export PATH="${pursDocsSearchNpm.nodeDependencies}/bin:$PATH"
493498
cp -r ${buildPursDocs { }}/{generated-docs,output,src} .
494499
install-spago-style

test/Wallet/Cip30/SignData.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
88
lib = await import("@emurgo/cardano-message-signing-nodejs");
99
csl = await import("@emurgo/cardano-serialization-lib-nodejs");
1010
}
11-
import gcWrapper from "@mlabs-haskell/csl-gc-wrapper";
12-
lib = gcWrapper(lib);
13-
csl = gcWrapper(csl);
11+
// import gcWrapper from "@mlabs-haskell/csl-gc-wrapper";
12+
// lib = gcWrapper(lib);
13+
// csl = gcWrapper(csl);
1414

1515
function opt_chain(maybe, obj) {
1616
const isNothing = x => x === null || x === undefined;

0 commit comments

Comments
 (0)