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

32 lines
972 B
Nix

{ rustPlatform, fetchFromGitHub, lib, python, cmake, llvmPackages, clang, stdenv, darwin }:
rustPlatform.buildRustPackage rec {
pname = "wasmtime";
version = "0.17.0";
src = fetchFromGitHub {
owner = "bytecodealliance";
repo = "${pname}";
rev = "v${version}";
sha256 = "18kmxc53jz1rlbmgdvffpvvsr8m399lgv62kwhciv5pif857qbb4";
fetchSubmodules = true;
};
cargoSha256 = "149nav392wf4sr50dpdlnvfq3vfrrl9lqgr98g5dyzfjrf5jbzm3";
nativeBuildInputs = [ python cmake clang ];
buildInputs = [ llvmPackages.libclang ] ++
lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
doCheck = true;
meta = with lib; {
description = "Standalone JIT-style runtime for WebAssembly, using Cranelift";
homepage = "https://github.com/CraneStation/wasmtime";
license = licenses.asl20;
maintainers = [ maintainers.matthewbauer ];
platforms = platforms.unix;
};
}