nixpkgs/pkgs/development/interpreters/wasmtime/default.nix

34 lines
1.0 KiB
Nix
Raw Normal View History

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