wasmtime: fix lib on darwin

Before:

```
otool -D result-dev/lib/libwasmtime.dylib
result-dev/lib/libwasmtime.dylib:
/private/tmp/nix-build-wasmtime-9.0.2.drv-0/source/target/aarch64-apple-darwin/release/deps/libwasmtime.dylib
```

After:

```
otool -D result-dev/lib/libwasmtime.dylib
result-dev/lib/libwasmtime.dylib:
/nix/store/bz6l7dr60izrq6vga83df9y2p1mgh5hw-wasmtime-9.0.2-dev/lib/libwasmtime.dylib
```
This commit is contained in:
Bas van Dijk 2023-05-29 22:30:29 +02:00
parent aab9ccad3e
commit ad3402c664

View File

@ -36,6 +36,10 @@ rustPlatform.buildRustPackage rec {
install -m0644 $src/crates/c-api/include/*.h $dev/include
install -m0644 $src/crates/c-api/include/wasmtime/*.h $dev/include/wasmtime
install -m0644 $src/crates/c-api/wasm-c-api/include/* $dev/include
'' + lib.optionalString stdenv.isDarwin ''
install_name_tool -id \
$dev/lib/libwasmtime.dylib \
$dev/lib/libwasmtime.dylib
'';
meta = with lib; {