depot/third_party/nixpkgs/pkgs/by-name/go/go-camo/package.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

31 lines
874 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "go-camo";
version = "2.4.8";
src = fetchFromGitHub {
owner = "cactus";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Y2Zhr8MhIN13AYMq0t9QASfd2Mgp4tiFmrpc6VTIUq0=";
};
vendorHash = "sha256-O3JatOmQrNZRxKa9dTYQpVoPUIuFIbnEXpak3PXJquA=";
ldflags = [ "-s" "-w" "-X=main.ServerVersion=${version}" ];
preCheck = ''
# requires network access
rm pkg/camo/proxy_{,filter_}test.go
'';
meta = with lib; {
description = "A camo server is a special type of image proxy that proxies non-secure images over SSL/TLS";
homepage = "https://github.com/cactus/go-camo";
changelog = "https://github.com/cactus/go-camo/releases/tag/v${version}";
license = licenses.mit;
mainProgram = "go-camo";
maintainers = with maintainers; [ viraptor ];
};
}