depot/third_party/nixpkgs/pkgs/development/interpreters/expr/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

35 lines
795 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "expr";
version = "1.15.3";
src = fetchFromGitHub {
owner = "antonmedv";
repo = "expr";
rev = "v${version}";
hash = "sha256-r+XlcDvCQarzh8wO3NL87PJThnioeVC73OZdJ8kW4RM=";
};
sourceRoot = "${src.name}/repl";
vendorHash = "sha256-WxYqP8L64U5MAYG7XTpKrRW1aaqGB4hJr+e/RKdb1lU=";
ldflags = [ "-s" "-w" ];
postInstall = ''
mv $out/bin/{repl,expr}
'';
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";
};
}