blob: 34a60c320bcb40733d14b49bf36d09de4359b466 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wamr";
version = "1.3.2";
src = fetchFromGitHub {
owner = "bytecodealliance";
repo = "wasm-micro-runtime";
rev = "WAMR-${finalAttrs.version}";
hash = "sha256-4iH1PC0fEPehlez8YWgqPBxWnePFcMBzbGfd2CQjvd4=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optionals stdenv.isDarwin [
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinSdkVersion}"
];
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}";
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;
};
})
|