2323 gnutar ,
2424 gnugrep ,
2525 envoy ,
26+ git ,
2627
2728 # v8 (upstream default), wavm, wamr, wasmtime, disabled
28- wasmRuntime ? "wamr" ,
29+ wasmRuntime ? "wasmtime" ,
30+
31+ # Allows overriding the deps hash used for building - you will likely need to
32+ # set this if you have changed the 'wasmRuntime' setting.
33+ depsHash ? null ,
2934} :
3035
3136let
4045 } ;
4146
4247 # these need to be updated for any changes to fetchAttrs
43- depsHash =
44- {
45- x86_64-linux = "sha256-E6yUSd00ngmjaMds+9UVZLtcYhzeS8F9eSIkC1mZSps=" ;
46- aarch64-linux = "sha256-ivboOrV/uORKVHRL3685aopcElGvzsxgVcUmYsBwzXY=" ;
47- }
48- . ${ stdenv . system } or ( throw "unsupported system ${ stdenv . system } " ) ;
48+ depsHash' =
49+ if depsHash != null then
50+ depsHash
51+ else
52+ {
53+ x86_64-linux = "sha256-t4Xv4UGYW5YU0kmv+1rdf2JvM1BYQyNWdtpz6Cdmxm4=" ;
54+ aarch64-linux = "sha256-aIBnNGzc0hTdlTgRyJ7eLnWvHqZ5ywhqOM+mHfH3/18=" ;
55+ }
56+ . ${ stdenv . system } or ( throw "unsupported system ${ stdenv . system } " ) ;
4957
5058 python3 = python312 ;
5159
@@ -94,7 +102,7 @@ buildBazelPackage rec {
94102 ln -sf "${ cargo } /bin/cargo" bazel/nix/cargo
95103 ln -sf "${ rustc } /bin/rustc" bazel/nix/rustc
96104 ln -sf "${ rustc } /bin/rustdoc" bazel/nix/rustdoc
97- ln -sf "${ rustPlatform . rustLibSrc } " bazel/nix/ruststd
105+ ln -sf "${ rustc . unwrapped } " bazel/nix/rustcroot
98106 substituteInPlace bazel/dependency_imports.bzl \
99107 --replace-fail 'crate_universe_dependencies()' 'crate_universe_dependencies(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc")' \
100108 --replace-fail 'crates_repository(' 'crates_repository(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc",'
@@ -120,12 +128,13 @@ buildBazelPackage rec {
120128 ninja
121129 patchelf
122130 cacert
131+ git
123132 ] ;
124133
125134 buildInputs = [ linuxHeaders ] ;
126135
127136 fetchAttrs = {
128- sha256 = depsHash ;
137+ sha256 = depsHash' ;
129138 env . CARGO_BAZEL_REPIN = true ;
130139 dontUseCmakeConfigure = true ;
131140 dontUseGnConfigure = true ;
@@ -239,6 +248,7 @@ buildBazelPackage rec {
239248 "--linkopt=-Wl,-z,noexecstack"
240249 "--config=gcc"
241250 "--verbose_failures"
251+ "--incompatible_enable_cc_toolchain_resolution=true"
242252
243253 # Force use of system Java.
244254 "--extra_toolchains=@local_jdk//:all"
0 commit comments