e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
51 lines
1 KiB
Nix
51 lines
1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, wazero
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "wazero";
|
|
version = "1.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tetratelabs";
|
|
repo = "wazero";
|
|
rev = "v${version}";
|
|
hash = "sha256-s01NoliiS8SqoHUjEUUsFcK82nt3xQgmAQZdrEtrOS0=";
|
|
};
|
|
|
|
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 ];
|
|
mainProgram = "wazero";
|
|
};
|
|
}
|