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