Merge pull request #214448 from wegank/wasmedge-darwin
wasmedge: add darwin support
This commit is contained in:
@@ -5,9 +5,15 @@
|
||||
, cmake
|
||||
, gtest
|
||||
, spdlog
|
||||
, libxml2
|
||||
, libffi
|
||||
, Foundation
|
||||
}:
|
||||
|
||||
llvmPackages.stdenv.mkDerivation rec {
|
||||
let
|
||||
stdenv = llvmPackages.stdenv;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wasmedge";
|
||||
version = "0.11.2";
|
||||
|
||||
@@ -18,19 +24,26 @@ llvmPackages.stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-P2Y2WK6G8aEK1Q4hjrS9X+2WbOfy4brclB/+SWP5LTM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
llvmPackages.lld
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
spdlog
|
||||
llvmPackages.llvm
|
||||
libxml2
|
||||
libffi
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Foundation
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake llvmPackages.lld ];
|
||||
|
||||
nativeCheckInputs = [ gtest ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DWASMEDGE_BUILD_TESTS=OFF" # Tests are downloaded using git
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"-DWASMEDGE_FORCE_DISABLE_LTO=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
@@ -38,5 +51,7 @@ llvmPackages.stdenv.mkDerivation rec {
|
||||
license = with licenses; [ asl20 ];
|
||||
description = "A lightweight, high-performance, and extensible WebAssembly runtime for cloud native, edge, and decentralized applications";
|
||||
maintainers = with maintainers; [ dit7ya ];
|
||||
# error: no member named 'utimensat' in the global namespace
|
||||
broken = stdenv.isDarwin && stdenv.isx86_64;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13073,6 +13073,7 @@ with pkgs;
|
||||
|
||||
wasmedge = callPackage ../development/tools/wasmedge {
|
||||
llvmPackages = llvmPackages_12;
|
||||
inherit (darwin.apple_sdk.frameworks) Foundation;
|
||||
};
|
||||
|
||||
welkin = callPackage ../tools/graphics/welkin {};
|
||||
|
||||
Reference in New Issue
Block a user