Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "wamr";
|
|
version = "2.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bytecodealliance";
|
|
repo = "wasm-micro-runtime";
|
|
rev = "WAMR-${finalAttrs.version}";
|
|
hash = "sha256-Rhn26TRyjkR30+zyosfooOGjhvG+ztYtJVQlRfzWEFo=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinSdkVersion}"
|
|
];
|
|
|
|
sourceRoot = let
|
|
platform = if stdenv.hostPlatform.isLinux then
|
|
"linux"
|
|
else if stdenv.hostPlatform.isDarwin then
|
|
"darwin"
|
|
else throw "unsupported platform";
|
|
in "${finalAttrs.src.name}/product-mini/platforms/${platform}";
|
|
|
|
meta = with lib; {
|
|
description = "WebAssembly Micro Runtime";
|
|
homepage = "https://github.com/bytecodealliance/wasm-micro-runtime";
|
|
license = licenses.asl20;
|
|
mainProgram = "iwasm";
|
|
maintainers = with maintainers; [ ereslibre ];
|
|
platforms = platforms.unix;
|
|
};
|
|
})
|