2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "cel-go";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.20.1";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cel-go";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-RN3Eqdf1Zon0gSsP3jGxydVEa0NL5filAei4+xPFNv8=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
modRoot = "repl";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-jNlzsx1QII9UBHQDU7nSzkNLtfbuce4O1AcPaFqtj9c=";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"main"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/{main,cel-go}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast, portable, non-Turing complete expression evaluation with gradual typing";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cel-go";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/google/cel-go";
|
|
|
|
changelog = "https://github.com/google/cel-go/releases/tag/${src.rev}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|