diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/development/python-modules/wasmer | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/wasmer')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/wasmer/default.nix | 65 |
1 files changed, 18 insertions, 47 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/wasmer/default.nix b/nixpkgs/pkgs/development/python-modules/wasmer/default.nix index 62c8a2a06b71..373e7a0a2203 100644 --- a/nixpkgs/pkgs/development/python-modules/wasmer/default.nix +++ b/nixpkgs/pkgs/development/python-modules/wasmer/default.nix @@ -1,63 +1,34 @@ { lib , rustPlatform , fetchFromGitHub -, maturin , buildPythonPackage -, isPy38 -, python }: let pname = "wasmer"; version = "1.0.0"; +in buildPythonPackage rec { + inherit pname version; - wheel = rustPlatform.buildRustPackage rec { - inherit pname version; - - src = fetchFromGitHub { - owner = "wasmerio"; - repo = "wasmer-python"; - rev = version; - hash = "sha256-I1GfjLaPYMIHKh2m/5IQepUsJNiVUEJg49wyuuzUYtY="; - }; - - cargoHash = "sha256-txOOia1C4W+nsXuXp4EytEn82CFfSmiOYwRLC4WPImc="; - - nativeBuildInputs = [ maturin python ]; - - preBuild = '' - cd packages/api - ''; - - buildPhase = '' - runHook preBuild - maturin build --release --manylinux off --strip - runHook postBuild - ''; - - postBuild = '' - cd ../.. - ''; - - doCheck = false; + src = fetchFromGitHub { + owner = "wasmerio"; + repo = "wasmer-python"; + rev = version; + hash = "sha256-I1GfjLaPYMIHKh2m/5IQepUsJNiVUEJg49wyuuzUYtY="; + }; - installPhase = '' - runHook preInstall - install -Dm644 -t $out target/wheels/*.whl - runHook postInstall - ''; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-txOOia1C4W+nsXuXp4EytEn82CFfSmiOYwRLC4WPImc="; }; -in -buildPythonPackage rec { - inherit pname version; + format = "pyproject"; + + nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; - format = "wheel"; - src = wheel; + buildAndTestSubdir = "packages/api"; - unpackPhase = '' - mkdir -p dist - cp $src/*.whl dist - ''; + doCheck = false; pythonImportsCheck = [ "wasmer" ]; @@ -65,7 +36,7 @@ buildPythonPackage rec { description = "Python extension to run WebAssembly binaries"; homepage = "https://github.com/wasmerio/wasmer-python"; license = licenses.mit; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ SuperSandro2000 ]; }; } |