nixpkgs/pkgs/development/interpreters/wasmtime/default.nix
Pavol Rusnak 2c931312ce treewide: simplify rev/repo arguments in src
+ use fetchFromGithub where possible
2020-11-01 23:02:24 -08:00

32 lines
971 B
Nix

{ rustPlatform, fetchFromGitHub, lib, python, cmake, llvmPackages, clang, stdenv, darwin }:
rustPlatform.buildRustPackage rec {
pname = "wasmtime";
version = "0.20.0";
src = fetchFromGitHub {
owner = "bytecodealliance";
repo = pname;
rev = "v${version}";
sha256 = "01k1fpk2qp4kv0xr4f0xmrjkr98j5ws48r1aks8l80mffs4ynqfr";
fetchSubmodules = true;
};
cargoSha256 = "0vghcs1nbxlkmw9wfikzb1ndscx7fkmgv5q8dnfcisl05zpkj7si";
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/bytecodealliance/wasmtime";
license = licenses.asl20;
maintainers = [ maintainers.matthewbauer ];
platforms = platforms.unix;
};
}