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