about summary refs log tree commit diff
path: root/pkgs/development/interpreters/wasmtime
diff options
context:
space:
mode:
authorRafael Fernández López <ereslibre@ereslibre.es>2023-05-09 13:29:59 +0200
committerAlyssa Ross <hi@alyssa.is>2023-05-19 13:53:42 +0000
commit76836deefd06ee4e9427617fa7a1de0ad895aa87 (patch)
treee3fd3c9f4fd9cc6a142c8605a00f09da54da6ca6 /pkgs/development/interpreters/wasmtime
parent8a4c408a8e28570f6abc628c771f100ec1ff1567 (diff)
downloadnixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.tar
nixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.tar.gz
nixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.tar.bz2
nixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.tar.lz
nixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.tar.xz
nixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.tar.zst
nixlib-76836deefd06ee4e9427617fa7a1de0ad895aa87.zip
wasmtime: run tests depending on the platform features
Run tests depending on the platform features reported by stdenv.
Diffstat (limited to 'pkgs/development/interpreters/wasmtime')
-rw-r--r--pkgs/development/interpreters/wasmtime/default.nix23
1 files changed, 8 insertions, 15 deletions
diff --git a/pkgs/development/interpreters/wasmtime/default.nix b/pkgs/development/interpreters/wasmtime/default.nix
index 4103741dacef..16abba6087d0 100644
--- a/pkgs/development/interpreters/wasmtime/default.nix
+++ b/pkgs/development/interpreters/wasmtime/default.nix
@@ -14,23 +14,15 @@ rustPlatform.buildRustPackage rec {
 
   cargoHash = "sha256-A2JhjRFKPltHubiJYHBXj2H4cdU43Y2x6UjEpRGPX7U=";
 
-  cargoBuildFlags = [
-    "--package wasmtime-cli"
-    "--package wasmtime-c-api"
-  ];
+  cargoBuildFlags = [ "--package" "wasmtime-cli" "--package" "wasmtime-c-api" ];
 
   outputs = [ "out" "dev" ];
 
-  # We disable tests on x86_64-darwin because Hydra runners do not
-  # support SSE3, SSSE3, SSE4.1 and SSE4.2 at this time. This is
-  # required by wasmtime. Given this is very specific to Hydra
-  # runners, just disable tests on this platform, so we don't get
-  # false positives of this package being broken due to failed runs on
-  # Hydra (e.g. https://hydra.nixos.org/build/187667794/)
-  doCheck = (stdenv.system != "x86_64-darwin");
-  cargoTestFlags = [
-    "--package wasmtime-runtime"
-  ];
+  # SIMD tests are only executed on platforms that support all
+  # required processor features (e.g. SSE3, SSSE3, SSE4.1 and SSE4.2 on x86_64):
+  # https://github.com/bytecodealliance/wasmtime/blob/207cd1ce15ecc504dafaec490c5eae801cac4691/cranelift/codegen/src/isa/x64/mod.rs#L228
+  doCheck = with stdenv.buildPlatform; (isx86_64 -> sse3Support && ssse3Support && sse4_1Support && sse4_2Support);
+  cargoTestFlags = ["--package" "wasmtime-runtime"];
 
   postInstall = ''
     # move libs from out to dev
@@ -45,7 +37,8 @@ rustPlatform.buildRustPackage rec {
   '';
 
   meta = with lib; {
-    description = "Standalone JIT-style runtime for WebAssembly, using Cranelift";
+    description =
+      "Standalone JIT-style runtime for WebAssembly, using Cranelift";
     homepage = "https://github.com/bytecodealliance/wasmtime";
     license = licenses.asl20;
     maintainers = with maintainers; [ ereslibre matthewbauer ];