wasmtime: move to by-name, cleanup (#399424)

This commit is contained in:
Gaétan Lepage 2025-04-17 11:41:04 +02:00 committed by GitHub
commit 20d252b74f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 12 deletions

View file

@ -1,14 +1,12 @@
{
lib,
rustPlatform,
cmake,
fetchFromGitHub,
Security,
stdenv,
rustPlatform,
fetchFromGitHub,
cmake,
versionCheckHook,
nix-update-script,
}:
let
inherit (stdenv.targetPlatform.rust) cargoShortTarget;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "wasmtime";
version = "31.0.0";
@ -37,7 +35,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
"dev"
];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
nativeBuildInputs = [ cmake ];
doCheck =
@ -52,6 +49,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
!isAarch64;
postInstall =
let
inherit (stdenv.targetPlatform.rust) cargoShortTarget;
in
''
# move libs from out to dev
install -d -m 0755 $dev/lib
@ -74,6 +74,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
$dev/lib/libwasmtime.dylib
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Standalone JIT-style runtime for WebAssembly, using Cranelift";
homepage = "https://wasmtime.dev/";

View file

@ -19450,10 +19450,6 @@ with pkgs;
nanoizeNewlib = true;
};
wasmtime = callPackage ../development/interpreters/wasmtime {
inherit (darwin.apple_sdk.frameworks) Security;
};
wfuzz = with python3Packages; toPythonApplication wfuzz;
kodelife = callPackage ../applications/graphics/kodelife {