Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
77 lines
1.7 KiB
Nix
77 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
llvmPackages_18,
|
|
libffi,
|
|
libxml2,
|
|
withLLVM ? true,
|
|
withSinglepass ? true,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "wasmer";
|
|
version = "5.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wasmerio";
|
|
repo = "wasmer";
|
|
tag = "v${version}";
|
|
hash = "sha256-rP0qvSb9PxsTMAq0hpB+zdSTHvridyCVdukLUYxdao8=";
|
|
};
|
|
|
|
cargoHash = "sha256-Fympp2A04viibo4U79FiBSJIeGDUWS34OOwebCks6S0=";
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = lib.optionals withLLVM [
|
|
llvmPackages_18.llvm
|
|
libffi
|
|
libxml2
|
|
];
|
|
|
|
# check references to `compiler_features` in Makefile on update
|
|
buildFeatures = [
|
|
"cranelift"
|
|
"wasmer-artifact-create"
|
|
"static-artifact-create"
|
|
"wasmer-artifact-load"
|
|
"static-artifact-load"
|
|
]
|
|
++ lib.optional withLLVM "llvm"
|
|
++ lib.optional withSinglepass "singlepass";
|
|
|
|
cargoBuildFlags = [
|
|
"--manifest-path"
|
|
"lib/cli/Cargo.toml"
|
|
"--bin"
|
|
"wasmer"
|
|
];
|
|
|
|
env.LLVM_SYS_180_PREFIX = lib.optionalString withLLVM llvmPackages_18.llvm.dev;
|
|
|
|
# Tests are failing due to `Cannot allocate memory` and other reasons
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "Universal WebAssembly Runtime";
|
|
mainProgram = "wasmer";
|
|
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 = lib.licenses.mit;
|
|
platforms = with lib.platforms; linux ++ darwin;
|
|
maintainers = with lib.maintainers; [
|
|
Br1ght0ne
|
|
shamilton
|
|
nickcao
|
|
];
|
|
};
|
|
}
|