diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/tools/protolint | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/protolint')
-rw-r--r-- | nixpkgs/pkgs/development/tools/protolint/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/protolint/default.nix b/nixpkgs/pkgs/development/tools/protolint/default.nix new file mode 100644 index 000000000000..dee2f9c28f5c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/protolint/default.nix @@ -0,0 +1,39 @@ +{ lib, buildGoModule, fetchFromGitHub }: +buildGoModule rec { + pname = "protolint"; + version = "0.37.1"; + + src = fetchFromGitHub { + owner = "yoheimuta"; + repo = pname; + rev = "6aa30515838cc0adf7c76a9461f52bdc713f2e9f"; + sha256 = "sha256-oKGA5FZpT3E5G7oREGAojdu4Xn8JPd7IYwfueK9QA34="; + }; + + vendorSha256 = "sha256-iLQwx3B5n21ZXefWiGBBL9roa9LIFByzB8KXLywhvKs="; + + # Something about the way we run tests causes issues. It doesn't happen + # when using "go test" directly: + # === RUN TestEnumFieldNamesPrefixRule_Apply_fix/no_fix_for_a_correct_proto + # util_test.go:35: open : no such file or directory + # === RUN TestEnumFieldNamesPrefixRule_Apply_fix/fix_for_an_incorrect_proto + # util_test.go:35: open : no such file or directory + excludedPackages = [ "internal" ]; + + ldflags = let + rev = builtins.substring 0 7 src.rev; + in [ + "-X github.com/yoheimuta/protolint/internal/cmd.version=${version}" + "-X github.com/yoheimuta/protolint/internal/cmd.revision=${rev}" + "-X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.version=${version}" + "-X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.revision=${rev}" + ]; + + meta = with lib; { + description = "A pluggable linter and fixer to enforce Protocol Buffer style and conventions"; + homepage = "https://github.com/yoheimuta/protolint"; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.zane ]; + }; +} |