2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, llvmPackages
|
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, gtest
|
|
|
|
, spdlog
|
2023-02-09 11:40:11 +00:00
|
|
|
, libxml2
|
|
|
|
, libffi
|
|
|
|
, Foundation
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
let
|
|
|
|
stdenv = llvmPackages.stdenv;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "wasmedge";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "0.11.2";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WasmEdge";
|
|
|
|
repo = "WasmEdge";
|
|
|
|
rev = version;
|
2022-11-04 12:27:35 +00:00
|
|
|
sha256 = "sha256-P2Y2WK6G8aEK1Q4hjrS9X+2WbOfy4brclB/+SWP5LTM=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
llvmPackages.lld
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
spdlog
|
|
|
|
llvmPackages.llvm
|
2023-02-09 11:40:11 +00:00
|
|
|
libxml2
|
|
|
|
libffi
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Foundation
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DWASMEDGE_BUILD_TESTS=OFF" # Tests are downloaded using git
|
2023-02-09 11:40:11 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"-DWASMEDGE_FORCE_DISABLE_LTO=ON"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://wasmedge.org/";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
description = "A lightweight, high-performance, and extensible WebAssembly runtime for cloud native, edge, and decentralized applications";
|
|
|
|
maintainers = with maintainers; [ dit7ya ];
|
2023-02-09 11:40:11 +00:00
|
|
|
# error: no member named 'utimensat' in the global namespace
|
|
|
|
broken = stdenv.isDarwin && stdenv.isx86_64;
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
}
|