Skip to content

Commit df41b48

Browse files
committed
wasmer: 5.0.4 → 6.0.0
Resolves #403981 . . .
1 parent 6a0960a commit df41b48

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

pkgs/development/interpreters/wasmer/default.nix

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,32 @@
55
llvmPackages,
66
libffi,
77
libxml2,
8+
makeWrapper,
9+
bash,
10+
make,
811
withLLVM ? true,
912
withSinglepass ? true,
1013
}:
1114

1215
rustPlatform.buildRustPackage rec {
1316
pname = "wasmer";
14-
version = "5.0.4";
17+
version = "6.0.0";
1518

1619
src = fetchFromGitHub {
1720
owner = "wasmerio";
1821
repo = pname;
1922
tag = "v${version}";
20-
hash = "sha256-rP0qvSb9PxsTMAq0hpB+zdSTHvridyCVdukLUYxdao8=";
23+
hash = "sha256-Qx5bHCzdh3RqB5r93sa01mPyxN2EQWPWcIXJs1MrUHs=";
2124
};
2225

2326
useFetchCargoVendor = true;
24-
cargoHash = "sha256-Fympp2A04viibo4U79FiBSJIeGDUWS34OOwebCks6S0=";
27+
cargoHash = "sha256-/Kcd9vZu5QstIEjDYaJ/ddXUIXL1F8Omi+Bm4jtOKcg=";
2528

2629
nativeBuildInputs = [
2730
rustPlatform.bindgenHook
31+
makeWrapper
32+
bash
33+
make
2834
];
2935

3036
buildInputs = lib.optionals withLLVM [
@@ -57,6 +63,22 @@ rustPlatform.buildRustPackage rec {
5763
# Tests are failing due to `Cannot allocate memory` and other reasons
5864
doCheck = false;
5965

66+
postBuild = ''
67+
# Prepare and build the Wasmer C-API
68+
sed -i 's|SHELL=/usr/bin/env bash|SHELL=${bash}/bin/bash|' Makefile
69+
make build-capi
70+
make package-capi
71+
'';
72+
73+
postInstall = ''
74+
# Install the C-API headers, libs, etc.
75+
cp -r package/* $out/
76+
77+
# Ensure the CLI can locate its assets
78+
makeWrapper "$out/bin/wasmer" \
79+
--set WASMER_DIR "$out"
80+
'';
81+
6082
meta = {
6183
description = "Universal WebAssembly Runtime";
6284
mainProgram = "wasmer";

pkgs/top-level/all-packages.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16751,6 +16751,7 @@ with pkgs;
1675116751

1675216752
wasmer = callPackage ../development/interpreters/wasmer {
1675316753
llvmPackages = llvmPackages_18;
16754+
make = pkgs.make;
1675416755
};
1675516756

1675616757
wavm = callPackage ../development/interpreters/wavm {

0 commit comments

Comments
 (0)