depot/third_party/nixpkgs/pkgs/servers/http/go-camo/default.nix
Default email d2947cfef0 Project import generated by Copybara.
GitOrigin-RevId: 598f83ebeb2235435189cf84d844b8b73e858e0f
2022-10-06 20:32:54 +02:00

30 lines
847 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "go-camo";
version = "2.4.1";
src = fetchFromGitHub {
owner = "cactus";
repo = pname;
rev = "v${version}";
sha256 = "sha256-3gjn8UAfj7jT/gncgXShrfI75DPwiNU4hHMVJlYDIPA=";
};
vendorSha256 = "sha256-31B6LXCutIdPwxqMFTMUfxAaCuYW14py8Vu1EycBydE=";
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;
maintainers = with maintainers; [ viraptor ];
};
}