2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
}:
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-05-24 13:37:59 +00:00
|
|
|
pname = "wamr";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.3.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bytecodealliance";
|
|
|
|
repo = "wasm-micro-runtime";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "WAMR-${finalAttrs.version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-h+IwCdufimmkVk2XUAFtDcV+5dJWohRc1kmh3zgDKIg=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
sourceRoot = let
|
|
|
|
platform = if stdenv.isLinux then
|
|
|
|
"linux"
|
|
|
|
else if stdenv.isDarwin then
|
|
|
|
"darwin"
|
|
|
|
else throw "unsupported platform";
|
|
|
|
in "${finalAttrs.src.name}/product-mini/platforms/${platform}";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "WebAssembly Micro Runtime";
|
|
|
|
homepage = "https://github.com/bytecodealliance/wasm-micro-runtime";
|
|
|
|
license = licenses.asl20;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "iwasm";
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ ereslibre ];
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.unix;
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
})
|