From f3c7172a2d13df3d33bfec4d005a32f1114fb04a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 4 Feb 2023 06:02:07 +0100 Subject: [PATCH] wasmedge: reformat --- pkgs/development/tools/wasmedge/default.nix | 23 ++++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/wasmedge/default.nix b/pkgs/development/tools/wasmedge/default.nix index edcdf0d8c1e1..077042b1c0ac 100644 --- a/pkgs/development/tools/wasmedge/default.nix +++ b/pkgs/development/tools/wasmedge/default.nix @@ -5,12 +5,15 @@ , cmake , gtest , spdlog -, Foundation , libxml2 , libffi +, Foundation }: -llvmPackages.stdenv.mkDerivation rec { +let + stdenv = llvmPackages.stdenv; +in +stdenv.mkDerivation rec { pname = "wasmedge"; version = "0.11.2"; @@ -24,27 +27,31 @@ llvmPackages.stdenv.mkDerivation rec { nativeBuildInputs = [ cmake llvmPackages.lld - ] ++ lib.optionals llvmPackages.stdenv.isDarwin [ Foundation ]; + ]; 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.optional llvmPackages.stdenv.isDarwin "-DWASMEDGE_FORCE_DISABLE_LTO=ON"; + ] ++ lib.optionals stdenv.isDarwin [ + "-DWASMEDGE_FORCE_DISABLE_LTO=ON" + ]; 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 ]; + # error: no member named 'utimensat' in the global namespace + broken = stdenv.isDarwin && stdenv.isx86_64; }; }