Unverified Commit 3f405f03 authored by dish's avatar dish Committed by GitHub
Browse files

wasmtime: don't propagate binaries for C API & library (#438391)

parents 4a9c6a98 6c867d22
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -48,15 +48,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
      # error: linker `rust-lld` not found
      !isAarch64;

  # prevent $out from being propagated to $dev:
  # the library and header files are not dependent on the binaries
  propagatedBuildOutputs = [ ];

  postInstall =
    let
      inherit (stdenv.targetPlatform.rust) cargoShortTarget;
    in
    ''
      # move libs from out to dev
      install -d -m 0755 $dev/lib
      install -m 0644 ''${!outputLib}/lib/* $dev/lib
      rm -r ''${!outputLib}/lib
      moveToOutput lib $dev

      # copy the build.rs generated c-api headers
      # https://github.com/rust-lang/cargo/issues/9661
@@ -89,6 +90,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
    maintainers = with lib.maintainers; [
      ereslibre
      matthewbauer
      nekowinston
    ];
    platforms = lib.platforms.unix;
    changelog = "https://github.com/bytecodealliance/wasmtime/blob/v${finalAttrs.version}/RELEASES.md";