nixpkgs/pkgs/development/python-modules/wasmer/default.nix
Sirio Balmelli 119b2d63f1
python3Packages.wasmer: build on Darwin
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
2021-04-01 10:55:55 +02:00

43 lines
974 B
Nix

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