wasmer: use buildFeatures and checkFeatures

This commit is contained in:
figsoda 2021-11-15 19:36:07 -05:00
parent 44c0a3a626
commit 43333d3c6e

View File

@ -22,20 +22,18 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ cmake pkg-config ];
# cranelift+jit works everywhere, see:
# https://github.com/wasmerio/wasmer/blob/master/Makefile#L22
buildFeatures = [ "cranelift" "jit" ];
cargoBuildFlags = [
# cranelift+jit works everywhere, see:
# https://github.com/wasmerio/wasmer/blob/master/Makefile#L22
"--features" "cranelift,jit"
# must target manifest and desired output bin, otherwise output is empty
"--manifest-path" "lib/cli/Cargo.toml"
"--bin" "wasmer"
];
cargoTestFlags = [
"--features" "test-cranelift"
# Can't use test-jit :
# error: Package `wasmer-workspace v2.0.0 (/build/source)` does not have the feature `test-jit`
];
# Can't use test-jit:
# error: Package `wasmer-workspace v2.0.0 (/build/source)` does not have the feature `test-jit`
checkFeatures = [ "test-cranelift" ];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";