2023-07-02 20:41:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, wazero
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "wazero";
|
2023-08-24 13:24:05 +00:00
|
|
|
version = "1.5.0";
|
2023-07-02 20:41:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tetratelabs";
|
|
|
|
repo = "wazero";
|
|
|
|
rev = "v${version}";
|
2023-08-24 13:24:05 +00:00
|
|
|
hash = "sha256-iUPAVOmZNX4qs7bHu9dXtQP/G8FwyblJvZ3pauA9ev0=";
|
2023-07-02 20:41:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = null;
|
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/wazero"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/tetratelabs/wazero/internal/version.version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# fails when version is specified
|
|
|
|
"-skip=TestCompile|TestRun"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = wazero;
|
|
|
|
command = "wazero version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A zero dependency WebAssembly runtime for Go developers";
|
|
|
|
homepage = "https://github.com/tetratelabs/wazero";
|
|
|
|
changelog = "https://github.com/tetratelabs/wazero/releases/tag/${src.rev}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2023-08-24 18:08:33 +00:00
|
|
|
mainProgram = "wazero";
|
2023-07-02 20:41:55 +00:00
|
|
|
};
|
|
|
|
}
|