diff options
author | Rafael Fernández López <ereslibre@ereslibre.es> | 2022-03-31 19:42:34 +0300 |
---|---|---|
committer | Yt <raphael@megzari.com> | 2022-04-03 08:11:58 -0400 |
commit | d233c169c72cd0dbbf11aed6a96685870b19dfde (patch) | |
tree | eb5f8328eb20a341fdd45cb4b75fd40fe156d7f3 /pkgs/development/interpreters/wasmtime | |
parent | a4b3bd08d9b92ada4b3f1ac0d6a19f829b913f6e (diff) |
Fix wasmtime build
Provide a specific path for the v8 project, so `wasmtime` dependency `rusty_v8` can find it and does not need to download the static library, what would break build hermetism.
Diffstat (limited to 'pkgs/development/interpreters/wasmtime')
-rw-r--r-- | pkgs/development/interpreters/wasmtime/default.nix | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/pkgs/development/interpreters/wasmtime/default.nix b/pkgs/development/interpreters/wasmtime/default.nix index b3938240e3914..33f40eda2ea73 100644 --- a/pkgs/development/interpreters/wasmtime/default.nix +++ b/pkgs/development/interpreters/wasmtime/default.nix @@ -14,16 +14,22 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-IqFOw9bGdM3IEoMeqDlxKfLnZvR80PSnwP9kr1tI/h0="; - nativeBuildInputs = [ python3 cmake clang ]; - buildInputs = [ llvmPackages.libclang ] ++ - lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; - - configurePhase = '' - export HOME=$TMP; - ''; + # This environment variable is required so that when wasmtime tries + # to run tests by using the rusty_v8 crate, it does not try to + # download a static v8 build from the Internet, what would break + # build hermetism. + RUSTY_V8_ARCHIVE = "${v8}/lib/libv8.a"; doCheck = true; + checkFlags = [ + "--skip=cli_tests::run_cwasm" + "--skip=commands::compile::test::test_successful_compile" + "--skip=commands::compile::test::test_aarch64_flags_compile" + "--skip=commands::compile::test::test_unsupported_flags_compile" + "--skip=commands::compile::test::test_x64_flags_compile" + "--skip=commands::compile::test::test_x64_presets_compile" + "--skip=traps::parse_dwarf_info" + ]; meta = with lib; { description = "Standalone JIT-style runtime for WebAssembly, using Cranelift"; |