3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/interpreters/wasmer/default.nix

55 lines
1.5 KiB
Nix
Raw Normal View History

2020-01-09 10:59:51 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, cmake
, llvmPackages
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "wasmer";
2021-06-21 13:07:53 +01:00
version = "2.0.0";
2020-01-09 10:59:51 +00:00
src = fetchFromGitHub {
owner = "wasmerio";
repo = pname;
rev = version;
2021-06-21 13:07:53 +01:00
sha256 = "191f60db2y1f3xw1x81mw88vclf1c4kgvnfv74g5vb3vn7n57c5j";
2020-01-09 10:59:51 +00:00
fetchSubmodules = true;
};
2021-06-21 13:07:53 +01:00
cargoSha256 = "0hhwixqhrl79hpzmvq7ga3kp2cfrwr4i8364cwnr7195xwnfxb0k";
2020-01-09 10:59:51 +00:00
nativeBuildInputs = [ cmake pkg-config ];
cargoBuildFlags = [
# cranelift+jit works everywhere, see:
# https://github.com/wasmerio/wasmer/blob/master/Makefile#L22
"--features" "cranelift,jit"
# must target manifest and desired output bin, otherwise output is empty
"--manifest-path" "lib/cli/Cargo.toml"
"--bin" "wasmer"
];
cargoTestFlags = [
2021-06-21 13:07:53 +01:00
"--features" "test-cranelift"
# Can't use test-jit :
# error: Package `wasmer-workspace v2.0.0 (/build/source)` does not have the feature `test-jit`
];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
2020-01-09 10:59:51 +00:00
meta = with lib; {
description = "The Universal WebAssembly Runtime";
longDescription = ''
Wasmer is a standalone WebAssembly runtime for running WebAssembly outside
of the browser, supporting WASI and Emscripten. Wasmer can be used
standalone (via the CLI) and embedded in different languages, running in
x86 and ARM devices.
'';
homepage = "https://wasmer.io/";
license = licenses.mit;
2021-06-21 13:07:53 +01:00
maintainers = with maintainers; [ Br1ght0ne shamilton ];
2020-01-09 10:59:51 +00:00
};
}