wasmtime: add pinned 36.x variant
Expose wasmtime_36 for packages that need the 36.x C API while keeping the default wasmtime on the current major.
This commit is contained in:
@@ -10,23 +10,40 @@
|
||||
nix-update-script,
|
||||
enableShared ? !stdenv.hostPlatform.isStatic,
|
||||
enableStatic ? stdenv.hostPlatform.isStatic,
|
||||
majorVersion ? "45",
|
||||
}:
|
||||
let
|
||||
sources = {
|
||||
"36" = {
|
||||
version = "36.0.11";
|
||||
hash = "sha256-rrSI2dSOA8/1CL7JhW0eQ7LaeS5EqTVnyn2HTI+/x20=";
|
||||
cargoHash = "sha256-S67/fv7179uDy4PpwycyXSWAknIC/7ZzvzWPOd6MD+8=";
|
||||
};
|
||||
"45" = {
|
||||
|
||||
version = "45.0.2";
|
||||
hash = "sha256-LEQitwz+UDSX4mrjEecmoO/ZPgRnYTZ3DsD1pu8Jybs=";
|
||||
cargoHash = "sha256-uTgEW2w0RSMetd2W1ucGiVMEEvz2A7CQ79SEsE8/+BM=";
|
||||
};
|
||||
};
|
||||
source = sources.${majorVersion};
|
||||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "wasmtime";
|
||||
version = "45.0.2";
|
||||
version = source.version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bytecodealliance";
|
||||
repo = "wasmtime";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-LEQitwz+UDSX4mrjEecmoO/ZPgRnYTZ3DsD1pu8Jybs=";
|
||||
hash = source.hash;
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# Disable cargo-auditable until https://github.com/rust-secure-code/cargo-auditable/issues/124 is solved.
|
||||
auditable = false;
|
||||
|
||||
cargoHash = "sha256-uTgEW2w0RSMetd2W1ucGiVMEEvz2A7CQ79SEsE8/+BM=";
|
||||
cargoHash = source.cargoHash;
|
||||
cargoBuildFlags = [
|
||||
"--package"
|
||||
"wasmtime-cli"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
nix-update-script,
|
||||
wasmtime,
|
||||
}:
|
||||
|
||||
# NOTE: LTS Version EOL August 20 2027
|
||||
(wasmtime.override { majorVersion = "36"; }).overrideAttrs (old: {
|
||||
__structuredAttrs = true;
|
||||
|
||||
passthru = old.passthru // {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^v(36\\.\\d+\\.\\d+)$"
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user