1{ lib
2, rustPlatform
3, fetchFromGitHub
4, buildPythonPackage
5}:
6let
7 pname = "wasmer";
8 version = "1.0.0";
9in buildPythonPackage rec {
10 inherit pname version;
11
12 src = fetchFromGitHub {
13 owner = "wasmerio";
14 repo = "wasmer-python";
15 rev = version;
16 hash = "sha256-I1GfjLaPYMIHKh2m/5IQepUsJNiVUEJg49wyuuzUYtY=";
17 };
18
19 cargoDeps = rustPlatform.fetchCargoTarball {
20 inherit src;
21 name = "${pname}-${version}";
22 hash = "sha256-txOOia1C4W+nsXuXp4EytEn82CFfSmiOYwRLC4WPImc=";
23 };
24
25 format = "pyproject";
26
27 nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
28
29 buildAndTestSubdir = "packages/api";
30
31 doCheck = false;
32
33 pythonImportsCheck = [ "wasmer" ];
34
35 meta = with lib; {
36 description = "Python extension to run WebAssembly binaries";
37 homepage = "https://github.com/wasmerio/wasmer-python";
38 license = licenses.mit;
39 platforms = platforms.unix;
40 maintainers = with maintainers; [ SuperSandro2000 ];
41 };
42}