wasmer: 2.3.0 -> 3.0.1
This commit is contained in:
parent
d08a22c7ce
commit
b79697e89b
2 changed files with 41 additions and 21 deletions
|
@ -2,44 +2,61 @@
|
|||
, lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, llvmPackages
|
||||
, pkg-config
|
||||
, libffi
|
||||
, libxml2
|
||||
, CoreFoundation
|
||||
, SystemConfiguration
|
||||
, Security
|
||||
, withLLVM ? !stdenv.isDarwin
|
||||
, withSinglepass ? !(stdenv.isDarwin && stdenv.isx86_64)
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wasmer";
|
||||
version = "2.3.0";
|
||||
version = "3.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wasmerio";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-25wWgMNybbsEf/1xmm+8BPcjx8CSW9ZBzxGKT/DbBXw=";
|
||||
fetchSubmodules = true;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-os1TvqDTn+WJjX0fREFlNsd8bASdnOOvnCyAkplTVrA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-tswsbijNN5UcSZovVmy66yehcEOpQDGMdRgR/1mkuE8=";
|
||||
cargoSha256 = "sha256-zfGtRoCpTKomsq3xjfMC1VWUGbpb/qjdWNZ8pgwZfMQ=";
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
nativeBuildInputs = [ rustPlatform.bindgenHook ];
|
||||
|
||||
# cranelift+jit works everywhere, see:
|
||||
# https://github.com/wasmerio/wasmer/blob/master/Makefile#L22
|
||||
buildFeatures = [ "cranelift" "jit" ];
|
||||
cargoBuildFlags = [
|
||||
# must target manifest and desired output bin, otherwise output is empty
|
||||
"--manifest-path" "lib/cli/Cargo.toml"
|
||||
"--bin" "wasmer"
|
||||
buildInputs = lib.optionals withLLVM [
|
||||
llvmPackages.llvm
|
||||
libffi
|
||||
libxml2
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
CoreFoundation
|
||||
SystemConfiguration
|
||||
Security
|
||||
];
|
||||
|
||||
# Can't use test-jit:
|
||||
# error: Package `wasmer-workspace v2.3.0 (/build/source)` does not have the feature `test-jit`
|
||||
checkFeatures = [ "test-cranelift" ];
|
||||
LLVM_SYS_120_PREFIX = lib.optionalString withLLVM llvmPackages.llvm.dev;
|
||||
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
# check references to `compiler_features` in Makefile on update
|
||||
buildFeatures = checkFeatures ++ [
|
||||
"webc_runner"
|
||||
];
|
||||
|
||||
checkFeatures = [
|
||||
"cranelift"
|
||||
"wasmer-artifact-create"
|
||||
"static-artifact-create"
|
||||
"wasmer-artifact-load"
|
||||
"static-artifact-load"
|
||||
]
|
||||
++ lib.optional withLLVM "llvm"
|
||||
++ lib.optional withSinglepass "singlepass";
|
||||
|
||||
cargoBuildFlags = [ "--manifest-path" "lib/cli/Cargo.toml" "--bin" "wasmer" ];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "The Universal WebAssembly Runtime";
|
||||
longDescription = ''
|
||||
Wasmer is a standalone WebAssembly runtime for running WebAssembly outside
|
||||
|
|
|
@ -37506,7 +37506,10 @@ with pkgs;
|
|||
|
||||
wacomtablet = libsForQt5.callPackage ../tools/misc/wacomtablet { };
|
||||
|
||||
wasmer = callPackage ../development/interpreters/wasmer { };
|
||||
wasmer = callPackage ../development/interpreters/wasmer {
|
||||
llvmPackages = llvmPackages_12;
|
||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation SystemConfiguration Security;
|
||||
};
|
||||
|
||||
yabasic = callPackage ../development/interpreters/yabasic { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue