File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 61
61
ln -s "$lib" "priv/native/$(basename "$lib")"
62
62
done
63
63
'' ;
64
+
65
+ buildPhase = ''
66
+ suggestion() {
67
+ echo "***********************************************"
68
+ echo " deps_nix "
69
+ echo
70
+ echo " Rust dependency build failed. "
71
+ echo
72
+ echo " If you saw network errors, you might need "
73
+ echo " to disable compilation on the appropriate "
74
+ echo " RustlerPrecompiled module in your "
75
+ echo " application config. "
76
+ echo
77
+ echo " We think you need this: "
78
+ echo
79
+ echo -n " "
80
+ grep -Rl 'use RustlerPrecompiled' lib \
81
+ | xargs grep 'defmodule' \
82
+ | sed 's/defmodule \(.*\) do/config :${ old . packageName } , \1, skip_compilation?: true/'
83
+ echo "***********************************************"
84
+ exit 1
85
+ }
86
+ trap suggestion ERR
87
+ ${ old . buildPhase }
88
+ '' ;
64
89
} ;
65
90
} ;
66
91
Original file line number Diff line number Diff line change @@ -246,6 +246,31 @@ defmodule DepsNix do
246
246
ln -s "$lib" "priv/native/$(basename "$lib")"
247
247
done
248
248
'';
249
+
250
+ buildPhase = ''
251
+ suggestion() {
252
+ echo "***********************************************"
253
+ echo " deps_nix "
254
+ echo
255
+ echo " Rust dependency build failed. "
256
+ echo
257
+ echo " If you saw network errors, you might need "
258
+ echo " to disable compilation on the appropriate "
259
+ echo " RustlerPrecompiled module in your "
260
+ echo " application config. "
261
+ echo
262
+ echo " We think you need this: "
263
+ echo
264
+ echo -n " "
265
+ grep -Rl 'use RustlerPrecompiled' lib \\
266
+ | xargs grep 'defmodule' \\
267
+ | sed 's/defmodule \\ (.*\\ ) do/config :${old.packageName}, \\ 1, skip_compilation?: true/'
268
+ echo "***********************************************"
269
+ exit 1
270
+ }
271
+ trap suggestion ERR
272
+ ${old.buildPhase}
273
+ '';
249
274
};
250
275
};
251
276
You can’t perform that action at this time.
0 commit comments