diff --git a/pkgs/by-name/gq/gqlgen/package.nix b/pkgs/by-name/gq/gqlgen/package.nix new file mode 100644 index 00000000000000..a3def1f2d38b4d --- /dev/null +++ b/pkgs/by-name/gq/gqlgen/package.nix @@ -0,0 +1,45 @@ +{ + lib, + fetchFromGitHub, + buildGoModule, +}: + +let + version = "0.17.63"; +in +buildGoModule { + pname = "gqlgen"; + inherit version; + + src = fetchFromGitHub { + owner = "99designs"; + repo = "gqlgen"; + tag = "v${version}"; + hash = "sha256-J9+pleHdbQMHP/Aq9Pl6ise6PDvRqxQ72Iq7SNxgMws="; + }; + + vendorHash = "sha256-hPUWYOfCx+kW2dJsjkCE/7bwofnGdQbDTvfZ877/pCk="; + + subPackages = [ "." ]; + + env.CGO_ENABLED = 0; + + checkFlags = + let + # Skip tests that want to run "go mod tidy" + skippedTests = [ + "TestGenerate" + ]; + in + [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; + + meta = { + homepage = "https://github.com/99designs/gqlgen"; + changelog = "https://github.com/99designs/gqlgen/releases/tag/v${version}"; + description = "go generate based graphql server library"; + license = lib.licenses.mit; + mainProgram = "gqlgen"; + maintainers = with lib.maintainers; [ skowalak ]; + }; + +}