python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / protolint / default.nix
blobdee2f9c28f5cd205f09eb52864a686498a1dbeee
1 { lib, buildGoModule, fetchFromGitHub }:
2 buildGoModule rec {
3   pname = "protolint";
4   version = "0.37.1";
6   src = fetchFromGitHub {
7     owner = "yoheimuta";
8     repo = pname;
9     rev = "6aa30515838cc0adf7c76a9461f52bdc713f2e9f";
10     sha256 = "sha256-oKGA5FZpT3E5G7oREGAojdu4Xn8JPd7IYwfueK9QA34=";
11   };
13   vendorSha256 = "sha256-iLQwx3B5n21ZXefWiGBBL9roa9LIFByzB8KXLywhvKs=";
15   # Something about the way we run tests causes issues. It doesn't happen
16   # when using "go test" directly:
17   # === RUN   TestEnumFieldNamesPrefixRule_Apply_fix/no_fix_for_a_correct_proto
18   #    util_test.go:35: open : no such file or directory
19   # === RUN   TestEnumFieldNamesPrefixRule_Apply_fix/fix_for_an_incorrect_proto
20   #    util_test.go:35: open : no such file or directory
21   excludedPackages = [ "internal" ];
23   ldflags = let
24     rev = builtins.substring 0 7 src.rev;
25   in [
26     "-X github.com/yoheimuta/protolint/internal/cmd.version=${version}"
27     "-X github.com/yoheimuta/protolint/internal/cmd.revision=${rev}"
28     "-X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.version=${version}"
29     "-X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.revision=${rev}"
30   ];
32   meta = with lib; {
33     description = "A pluggable linter and fixer to enforce Protocol Buffer style and conventions";
34     homepage = "https://github.com/yoheimuta/protolint";
35     license = licenses.mit;
36     platforms = platforms.all;
37     maintainers = [ maintainers.zane ];
38   };