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

34 lines
1 KiB
Nix
Raw Normal View History

{ rustPlatform, fetchFromGitHub, lib, python, cmake, llvmPackages, clang, stdenv, darwin }:
2020-01-07 17:36:29 +01:00
rustPlatform.buildRustPackage rec {
2019-06-09 11:48:14 +02:00
pname = "wasmtime";
2020-05-16 04:34:01 +02:00
version = "0.16.0";
src = fetchFromGitHub {
2019-11-25 12:04:40 +01:00
owner = "bytecodealliance";
2020-01-07 17:36:29 +01:00
repo = "${pname}";
rev = "v${version}";
2020-05-16 04:34:01 +02:00
sha256 = "1zlljqkkcw8h94ff1w47sqn9pn0zal06s06i8nciv5i2d1xaqg5n";
fetchSubmodules = true;
};
2020-05-16 04:34:01 +02:00
cargoSha256 = "1hb7l7a76lgbji0qm9qd80m35cp346hyi4rphfk6p80v142cw8hh";
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 17:36:29 +01: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;
};
}