regal: set pname, use finalAttrs (#486081)
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
name = "regal";
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "regal";
|
||||
version = "0.38.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "open-policy-agent";
|
||||
repo = "regal";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-/WGZCwT9VJ5zjEmL4PZqPymaUJFaWzjbgq2KMBfl6uQ=";
|
||||
};
|
||||
|
||||
@@ -23,16 +23,16 @@ buildGoModule rec {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/open-policy-agent/regal/pkg/version.Version=${version}"
|
||||
"-X github.com/open-policy-agent/regal/pkg/version.Commit=${version}"
|
||||
"-X github.com/open-policy-agent/regal/pkg/version.Version=${finalAttrs.version}"
|
||||
"-X github.com/open-policy-agent/regal/pkg/version.Commit=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Linter and language server for Rego";
|
||||
mainProgram = "regal";
|
||||
homepage = "https://github.com/open-policy-agent/regal";
|
||||
changelog = "https://github.com/open-policy-agent/regal/releases/tag/${src.rev}";
|
||||
changelog = "https://github.com/open-policy-agent/regal/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ rinx ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user