depot/third_party/nixpkgs/pkgs/development/interpreters/wazero/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

51 lines
1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, wazero
}:
buildGoModule rec {
pname = "wazero";
version = "1.5.0";
src = fetchFromGitHub {
owner = "tetratelabs";
repo = "wazero";
rev = "v${version}";
hash = "sha256-iUPAVOmZNX4qs7bHu9dXtQP/G8FwyblJvZ3pauA9ev0=";
};
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";
};
}