depot/third_party/nixpkgs/pkgs/by-name/re/regal/package.nix

30 lines
823 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
name = "regal";
version = "0.29.2";
src = fetchFromGitHub {
owner = "StyraInc";
repo = "regal";
rev = "v${version}";
hash = "sha256-VB4x2zGyK/lohJPlekJjmu4tL8dHW6zXihEJvfmO0uI=";
};
vendorHash = "sha256-BvGzoATrMmtquO7fipNQkaQv8HpZs0sNK0EF/RzFTPU=";
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 ];
};
}