diff options
Diffstat (limited to 'pkgs/development/interpreters/wasmtime/default.nix')
-rw-r--r-- | pkgs/development/interpreters/wasmtime/default.nix | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/pkgs/development/interpreters/wasmtime/default.nix b/pkgs/development/interpreters/wasmtime/default.nix index 545c176ab4722..f880cf81a7210 100644 --- a/pkgs/development/interpreters/wasmtime/default.nix +++ b/pkgs/development/interpreters/wasmtime/default.nix @@ -1,31 +1,40 @@ -{ rustPlatform, fetchFromGitHub, Security, lib, stdenv }: +{ rustPlatform, rustfmt, fetchFromGitHub, Security, lib, stdenv }: rustPlatform.buildRustPackage rec { pname = "wasmtime"; - version = "20.0.0"; + version = "21.0.0"; src = fetchFromGitHub { owner = "bytecodealliance"; repo = pname; rev = "v${version}"; - hash = "sha256-Q2CsIwYQsLnAlGyMRxNTxjZsezxhjSptBF540NtgkCc="; + hash = "sha256-2iCtAgOhO7ydmaSKFFdiMMImrJHv53EtVeJ6tn3F7/Y="; fetchSubmodules = true; }; # Disable cargo-auditable until https://github.com/rust-secure-code/cargo-auditable/issues/124 is solved. auditable = false; - cargoHash = "sha256-d956DuVtLbZ/u3sAA4cQlw55CuYC7XyzeQarwyQ/hpY="; + cargoHash = "sha256-vYOSX01jYJ4x6QaGazYXA1QJiR501zlaV3QZfeDDUdw="; cargoBuildFlags = [ "--package" "wasmtime-cli" "--package" "wasmtime-c-api" ]; outputs = [ "out" "dev" ]; buildInputs = lib.optional stdenv.isDarwin Security; - # SIMD tests are only executed on platforms that support all - # required processor features (e.g. SSE3, SSSE3 and SSE4.1 on x86_64): - # https://github.com/bytecodealliance/wasmtime/blob/v9.0.0/cranelift/codegen/src/isa/x64/mod.rs#L220 - doCheck = with stdenv.buildPlatform; (isx86_64 -> sse3Support && ssse3Support && sse4_1Support); - cargoTestFlags = ["--package" "wasmtime-runtime"]; + # rustfmt is brought into scope to fix the following + # warning: cranelift-codegen@0.108.0: + # Failed to run `rustfmt` on ISLE-generated code: Os + # { code: 2, kind: NotFound, message: "No such file or directory" } + nativeBuildInputs = [ rustfmt ]; + + doCheck = with stdenv.buildPlatform; + # SIMD tests are only executed on platforms that support all + # required processor features (e.g. SSE3, SSSE3 and SSE4.1 on x86_64): + # https://github.com/bytecodealliance/wasmtime/blob/v9.0.0/cranelift/codegen/src/isa/x64/mod.rs#L220 + (isx86_64 -> sse3Support && ssse3Support && sse4_1Support) && + # The dependency `wasi-preview1-component-adapter` fails to build because of: + # error: linker `rust-lld` not found + !isAarch64; postInstall = '' # move libs from out to dev |