2019-10-18 09:58:25 +02:00
|
|
|
{ rustPlatform, fetchFromGitHub, lib, python, cmake, llvmPackages, clang, stdenv, darwin }:
|
2019-04-15 22:22:16 -04:00
|
|
|
|
2020-01-07 17:36:29 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-06-09 11:48:14 +02:00
|
|
|
pname = "wasmtime";
|
2020-04-20 09:32:39 +02:00
|
|
|
version = "0.15.0";
|
2019-04-15 22:22:16 -04:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-11-25 12:04:40 +01:00
|
|
|
owner = "bytecodealliance";
|
2020-01-07 17:36:29 +01:00
|
|
|
repo = "${pname}";
|
2020-04-14 19:49:12 +02:00
|
|
|
rev = "v${version}";
|
2020-04-20 09:32:39 +02:00
|
|
|
sha256 = "1df99iak0psydlg9m8f8qq4zyh4wbi5l4qgsdjr2lm74ci3483xy";
|
2019-04-15 22:22:16 -04:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2020-04-20 09:32:39 +02:00
|
|
|
cargoSha256 = "170bz48jrc1k2ylfmd3bcry0xpcxx8p3rzzv9mprlfmrfpb0b28r";
|
2019-04-15 22:22:16 -04:00
|
|
|
|
|
|
|
nativeBuildInputs = [ python cmake clang ];
|
2019-10-18 09:58:25 +02:00
|
|
|
buildInputs = [ llvmPackages.libclang ] ++
|
|
|
|
lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
2019-04-15 22:22:16 -04:00
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
|
2020-05-04 10:19:23 +02:00
|
|
|
# no test on darwin due to
|
|
|
|
# https://github.com/bytecodealliance/wasmtime/issues/1556
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2020-02-29 12:58:22 +01:00
|
|
|
|
2019-04-15 22:22:16 -04:00
|
|
|
meta = with lib; {
|
2020-01-07 17:36:29 +01:00
|
|
|
description = "Standalone JIT-style runtime for WebAssembly, using Cranelift";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/CraneStation/wasmtime";
|
2019-04-15 22:22:16 -04:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.matthewbauer ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|