Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / interpreters / wazero / default.nix
blob18fa05ccc238514bd101b61efca001d10a549db1
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , testers
5 , wazero
6 }:
8 buildGoModule rec {
9   pname = "wazero";
10   version = "1.5.0";
12   src = fetchFromGitHub {
13     owner = "tetratelabs";
14     repo = "wazero";
15     rev = "v${version}";
16     hash = "sha256-iUPAVOmZNX4qs7bHu9dXtQP/G8FwyblJvZ3pauA9ev0=";
17   };
19   vendorHash = null;
21   subPackages = [
22     "cmd/wazero"
23   ];
25   ldflags = [
26     "-s"
27     "-w"
28     "-X=github.com/tetratelabs/wazero/internal/version.version=${version}"
29   ];
31   checkFlags = [
32     # fails when version is specified
33     "-skip=TestCompile|TestRun"
34   ];
36   passthru.tests = {
37     version = testers.testVersion {
38       package = wazero;
39       command = "wazero version";
40     };
41   };
43   meta = with lib; {
44     description = "A zero dependency WebAssembly runtime for Go developers";
45     homepage = "https://github.com/tetratelabs/wazero";
46     changelog = "https://github.com/tetratelabs/wazero/releases/tag/${src.rev}";
47     license = licenses.asl20;
48     maintainers = with maintainers; [ figsoda ];
49     mainProgram = "wazero";
50   };