nixpkgs/pkgs/by-name/re/regal/package.nix
2025-05-30 19:05:39 +00:00

35 lines
834 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
name = "regal";
version = "0.34.0";
src = fetchFromGitHub {
owner = "StyraInc";
repo = "regal";
rev = "v${version}";
hash = "sha256-o/vJh7ZZBNjoOmqlj6VhksJKc5EyK3kRtsmkApmE6zo=";
};
vendorHash = "sha256-TeGrqwLgxr4w9Ig/5mekyff6T5xlvKUHQoxqwferWew=";
ldflags = [
"-s"
"-w"
"-X github.com/styrainc/regal/pkg/version.Version=${version}"
"-X github.com/styrainc/regal/pkg/version.Commit=${version}"
];
meta = with lib; {
description = "Linter and language server for Rego";
mainProgram = "regal";
homepage = "https://github.com/StyraInc/regal";
changelog = "https://github.com/StyraInc/regal/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ rinx ];
};
}