wasmtime: include `conf.h` in `include/wasmtime` (#394859)

authored by Weijia Wang and committed by GitHub a5748d3a 9a62eb09

+21 -22
+21 -22
pkgs/development/interpreters/wasmtime/default.nix
··· 2 lib, 3 rustPlatform, 4 cmake, 5 - rustfmt, 6 fetchFromGitHub, 7 Security, 8 stdenv, 9 }: 10 - 11 - rustPlatform.buildRustPackage rec { 12 pname = "wasmtime"; 13 version = "31.0.0"; 14 15 src = fetchFromGitHub { 16 owner = "bytecodealliance"; 17 - repo = pname; 18 - rev = "v${version}"; 19 hash = "sha256-IQeYmqCXhzWsuufrLKeBI2sw86dXbn7c5DbmcoJTWvo="; 20 fetchSubmodules = true; 21 }; ··· 37 ]; 38 39 buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; 40 - 41 - # rustfmt is brought into scope to fix the following 42 - # warning: cranelift-codegen@0.108.0: 43 - # Failed to run `rustfmt` on ISLE-generated code: Os 44 - # { code: 2, kind: NotFound, message: "No such file or directory" } 45 - nativeBuildInputs = [ 46 - cmake 47 - rustfmt 48 - ]; 49 50 doCheck = 51 with stdenv.buildPlatform; ··· 65 install -m 0644 ''${!outputLib}/lib/* $dev/lib 66 rm -r ''${!outputLib}/lib 67 68 install -d -m0755 $dev/include/wasmtime 69 - install -m0644 $src/crates/c-api/include/*.h $dev/include 70 - install -m0644 $src/crates/c-api/include/wasmtime/*.h $dev/include/wasmtime 71 '' 72 + lib.optionalString stdenv.hostPlatform.isDarwin '' 73 install_name_tool -id \ ··· 75 $dev/lib/libwasmtime.dylib 76 ''; 77 78 - meta = with lib; { 79 description = "Standalone JIT-style runtime for WebAssembly, using Cranelift"; 80 homepage = "https://wasmtime.dev/"; 81 - license = licenses.asl20; 82 mainProgram = "wasmtime"; 83 - maintainers = with maintainers; [ 84 ereslibre 85 matthewbauer 86 ]; 87 - platforms = platforms.unix; 88 - changelog = "https://github.com/bytecodealliance/wasmtime/blob/v${version}/RELEASES.md"; 89 }; 90 - }
··· 2 lib, 3 rustPlatform, 4 cmake, 5 fetchFromGitHub, 6 Security, 7 stdenv, 8 }: 9 + let 10 + inherit (stdenv.targetPlatform.rust) cargoShortTarget; 11 + in 12 + rustPlatform.buildRustPackage (finalAttrs: { 13 pname = "wasmtime"; 14 version = "31.0.0"; 15 16 src = fetchFromGitHub { 17 owner = "bytecodealliance"; 18 + repo = "wasmtime"; 19 + tag = "v${finalAttrs.version}"; 20 hash = "sha256-IQeYmqCXhzWsuufrLKeBI2sw86dXbn7c5DbmcoJTWvo="; 21 fetchSubmodules = true; 22 }; ··· 38 ]; 39 40 buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; 41 + nativeBuildInputs = [ cmake ]; 42 43 doCheck = 44 with stdenv.buildPlatform; ··· 58 install -m 0644 ''${!outputLib}/lib/* $dev/lib 59 rm -r ''${!outputLib}/lib 60 61 + # copy the build.rs generated c-api headers 62 install -d -m0755 $dev/include/wasmtime 63 + # https://github.com/rust-lang/cargo/issues/9661 64 + install -m0644 \ 65 + target/${cargoShortTarget}/release/build/wasmtime-c-api-impl-*/out/include/*.h \ 66 + $dev/include 67 + install -m0644 \ 68 + target/${cargoShortTarget}/release/build/wasmtime-c-api-impl-*/out/include/wasmtime/*.h \ 69 + $dev/include/wasmtime 70 '' 71 + lib.optionalString stdenv.hostPlatform.isDarwin '' 72 install_name_tool -id \ ··· 74 $dev/lib/libwasmtime.dylib 75 ''; 76 77 + meta = { 78 description = "Standalone JIT-style runtime for WebAssembly, using Cranelift"; 79 homepage = "https://wasmtime.dev/"; 80 + license = lib.licenses.asl20; 81 mainProgram = "wasmtime"; 82 + maintainers = with lib.maintainers; [ 83 ereslibre 84 matthewbauer 85 ]; 86 + platforms = lib.platforms.unix; 87 + changelog = "https://github.com/bytecodealliance/wasmtime/blob/v${finalAttrs.version}/RELEASES.md"; 88 }; 89 + })