diff options
-rw-r--r-- | pkgs/development/interpreters/wazero/default.nix | 50 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/wazero/default.nix b/pkgs/development/interpreters/wazero/default.nix new file mode 100644 index 000000000000..ab43d96db745 --- /dev/null +++ b/pkgs/development/interpreters/wazero/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, wazero +}: + +buildGoModule rec { + pname = "wazero"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "tetratelabs"; + repo = "wazero"; + rev = "v${version}"; + hash = "sha256-u9VsSV+pdyBnAmT910SOL1I8tpDCYAWFTfWkWTNWQVs="; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1e5ba389773..67a4cbed80eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17050,6 +17050,8 @@ with pkgs; vyper = with python3Packages; toPythonApplication vyper; + wazero = callPackage ../development/interpreters/wazero { }; + wcc = callPackage ../development/compilers/wcc { }; wla-dx = callPackage ../development/compilers/wla-dx { }; |