nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, buildGoModule, fetchFromGitHub }:
2
3buildGoModule rec {
4 pname = "go-camo";
5 version = "2.4.3";
6
7 src = fetchFromGitHub {
8 owner = "cactus";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-GRctsE+uAvyA0pcz+ym4sz3K80pUHoDipVsjFcdrT2A=";
12 };
13
14 vendorHash = "sha256-C66QxlMBupbHYktyzHapUrl0yk+pvWZN0BLhpjIGVzI=";
15
16 ldflags = [ "-s" "-w" "-X=main.ServerVersion=${version}" ];
17
18 preCheck = ''
19 # requires network access
20 rm pkg/camo/proxy_{,filter_}test.go
21 '';
22
23 meta = with lib; {
24 description = "A camo server is a special type of image proxy that proxies non-secure images over SSL/TLS";
25 homepage = "https://github.com/cactus/go-camo";
26 changelog = "https://github.com/cactus/go-camo/releases/tag/v${version}";
27 license = licenses.mit;
28 maintainers = with maintainers; [ viraptor ];
29 };
30}