2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "wasmer";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "1.0.0";
|
2021-03-09 03:18:52 +00:00
|
|
|
in buildPythonPackage rec {
|
|
|
|
inherit pname version;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wasmerio";
|
|
|
|
repo = "wasmer-python";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-I1GfjLaPYMIHKh2m/5IQepUsJNiVUEJg49wyuuzUYtY=";
|
|
|
|
};
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
hash = "sha256-txOOia1C4W+nsXuXp4EytEn82CFfSmiOYwRLC4WPImc=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildAndTestSubdir = "packages/api";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
doCheck = false;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "wasmer" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python extension to run WebAssembly binaries";
|
|
|
|
homepage = "https://github.com/wasmerio/wasmer-python";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|