2023-08-16 13:37:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "expr";
|
2023-09-20 14:15:43 +00:00
|
|
|
version = "1.15.3";
|
2023-08-16 13:37:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "antonmedv";
|
|
|
|
repo = "expr";
|
|
|
|
rev = "v${version}";
|
2023-09-20 14:15:43 +00:00
|
|
|
hash = "sha256-r+XlcDvCQarzh8wO3NL87PJThnioeVC73OZdJ8kW4RM=";
|
2023-08-16 13:37:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "${src.name}/repl";
|
|
|
|
|
2023-09-20 14:15:43 +00:00
|
|
|
vendorHash = "sha256-WxYqP8L64U5MAYG7XTpKrRW1aaqGB4hJr+e/RKdb1lU=";
|
2023-08-16 13:37:51 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2023-08-20 20:40:36 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/{repl,expr}
|
|
|
|
'';
|
|
|
|
|
2023-08-16 13:37:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Expression language and expression evaluation for Go";
|
|
|
|
homepage = "https://github.com/antonmedv/expr";
|
|
|
|
changelog = "https://github.com/antonmedv/expr/releases/tag/${src.rev}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
mainProgram = "expr";
|
|
|
|
};
|
|
|
|
}
|