2019-10-18 09:58:25 +02:00
|
|
|
{ rustPlatform, fetchFromGitHub, lib, python, cmake, llvmPackages, clang, stdenv, darwin }:
|
2019-04-16 04:22:16 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
rustPlatform.buildRustPackage {
|
2019-06-09 11:48:14 +02:00
|
|
|
pname = "wasmtime";
|
2019-11-25 10:53:56 +01:00
|
|
|
version = "20191111";
|
2019-04-16 04:22:16 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CraneStation";
|
|
|
|
repo = "wasmtime";
|
2019-11-25 10:53:56 +01:00
|
|
|
rev = "0006a2af954eba74c79885cb1fe8cdeb68f531c1";
|
|
|
|
sha256 = "0lf3pdkjxcrjmjic7xxyjl5dka3arxi809sp9hm4hih5p2fhf2gw";
|
2019-04-16 04:22:16 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2019-11-25 10:53:56 +01:00
|
|
|
cargoSha256 = "0mnwaipa2az3vpgbz4m9siz6bfyhmzwz174k678cv158m7mxx12f";
|
2019-04-16 04:22:16 +02:00
|
|
|
|
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
|
|
|
|
|
|
|
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-16 04:22:16 +02:00
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Standalone JIT-style runtime for WebAsssembly, using Cranelift";
|
|
|
|
homepage = https://github.com/CraneStation/wasmtime;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.matthewbauer ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|