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
|
|
|
|
2020-01-07 17:36:29 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-06-09 11:48:14 +02:00
|
|
|
pname = "wasmtime";
|
2020-01-07 17:36:29 +01:00
|
|
|
version = "v0.8.0";
|
2019-04-16 04:22:16 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-11-25 12:04:40 +01:00
|
|
|
owner = "bytecodealliance";
|
2020-01-07 17:36:29 +01:00
|
|
|
repo = "${pname}";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "0az893srw49szvs5461bd165ffla4cc98gh42p3dwskwfkhpqjm4";
|
2019-04-16 04:22:16 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2020-01-07 17:36:29 +01:00
|
|
|
cargoSha256 = "08b3rbnl7qwyfbwaqcb7z84sh0h94v18v6557hrf0dlil414v54i";
|
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; {
|
2020-01-07 17:36:29 +01:00
|
|
|
description = "Standalone JIT-style runtime for WebAssembly, using Cranelift";
|
2019-04-16 04:22:16 +02:00
|
|
|
homepage = https://github.com/CraneStation/wasmtime;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.matthewbauer ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|