39 lines
810 B
Nix
39 lines
810 B
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "expr";
|
|
version = "1.16.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "expr-lang";
|
|
repo = "expr";
|
|
rev = "v${version}";
|
|
hash = "sha256-AyFL+XHxitueAadx1M/xWqeittDCQ/hzsE/fUzt75yI=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/repl";
|
|
|
|
vendorHash = "sha256-FiXxplt4w7M0cZz46kdjYuKHailW2cnLOj0jkA9w1RM=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/{repl,expr}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Expression language and expression evaluation for Go";
|
|
homepage = "https://github.com/expr-lang/expr";
|
|
changelog = "https://github.com/expr-lang/expr/releases/tag/${src.rev}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "expr";
|
|
};
|
|
}
|