lol
1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "cel-go";
8 version = "0.18.2";
9
10 src = fetchFromGitHub {
11 owner = "google";
12 repo = "cel-go";
13 rev = "v${version}";
14 hash = "sha256-c4MVOHkDaUGlRVYb9YS9BH4ld2zS3SR5efP6amLhTig=";
15 };
16
17 modRoot = "repl";
18
19 vendorHash = "sha256-Oj/XUUmuj5scD5WT6zBxnU1hSapDyRBBz75rbIdY4Ho=";
20
21 subPackages = [
22 "main"
23 ];
24
25 ldflags = [ "-s" "-w" ];
26
27 postInstall = ''
28 mv $out/bin/{main,cel-go}
29 '';
30
31 meta = with lib; {
32 description = "Fast, portable, non-Turing complete expression evaluation with gradual typing";
33 homepage = "https://github.com/google/cel-go";
34 changelog = "https://github.com/google/cel-go/releases/tag/${src.rev}";
35 license = licenses.asl20;
36 maintainers = with maintainers; [ figsoda ];
37 };
38}