diff --git a/pkgs/development/interpreters/wasmtime/default.nix b/pkgs/by-name/wa/wasmtime/package.nix similarity index 89% rename from pkgs/development/interpreters/wasmtime/default.nix rename to pkgs/by-name/wa/wasmtime/package.nix index a8d438430d62..d8a2e04ab4a1 100644 --- a/pkgs/development/interpreters/wasmtime/default.nix +++ b/pkgs/by-name/wa/wasmtime/package.nix @@ -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/"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 20b63e41d2b4..645685eb5e15 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {