depot/third_party/nixpkgs/pkgs/development/interpreters/expr/default.nix

36 lines
795 B
Nix
Raw Normal View History

{ 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";
};
}