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