depot/third_party/nixpkgs/pkgs/development/interpreters/wamr/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

36 lines
879 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wamr";
version = "1.3.0";
src = fetchFromGitHub {
owner = "bytecodealliance";
repo = "wasm-micro-runtime";
rev = "WAMR-${finalAttrs.version}";
hash = "sha256-h+IwCdufimmkVk2XUAFtDcV+5dJWohRc1kmh3zgDKIg=";
};
nativeBuildInputs = [ cmake ];
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;
};
})