Commit 1119b007 authored by Martin Weinelt's avatar Martin Weinelt
Browse files

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.
parent 751efb43
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;