From 1119b007101afa65b2e7a6f3eae28d357388e830 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 27 Feb 2023 17:46:34 +0100 Subject: [PATCH] python310Packages.wasmer*: Fix build with maturin 0.14 With maturin 0.14.0 certain metadata fields cannot live in Cargo.toml anymore. Instead of warning about it we're seeing a hard fail, so we just go about and patch the names away, so it doesn't see them any longer. > The following metadata fields in `package.metadata.maturin` section > of Cargo.toml are removed since maturin 0.14.0: classifier, > project-url, please set them in pyproject.toml as PEP 621 specifies. --- pkgs/development/python-modules/wasmer/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/wasmer/default.nix b/pkgs/development/python-modules/wasmer/default.nix index 3444f541282e..0fbd9d2f8d7d 100644 --- a/pkgs/development/python-modules/wasmer/default.nix +++ b/pkgs/development/python-modules/wasmer/default.nix @@ -41,6 +41,12 @@ let nativeBuildInputs = (with rustPlatform; [ cargoSetupHook maturinBuildHook ]) ++ extraNativeBuildInputs; + postPatch = '' + # Workaround for metadata, that maturin 0.14 does not accept in Cargo.toml anymore + substituteInPlace ${buildAndTestSubdir}/Cargo.toml \ + --replace "package.metadata.maturin" "broken" + ''; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ] ++ extraBuildInputs;