nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 pkg-config,
6 vips,
7 gobject-introspection,
8 stdenv,
9 libunwind,
10}:
11
12buildGoModule rec {
13 pname = "imgproxy";
14 version = "3.30.1";
15
16 src = fetchFromGitHub {
17 owner = "imgproxy";
18 repo = "imgproxy";
19 hash = "sha256-UaJ02TQ8jbebRDF5K3zFy+4ho+dt1o/o3cEDzUQY3iU=";
20 rev = "v${version}";
21 };
22
23 vendorHash = "sha256-0NIsaSMOBenDCGvnGdLB60sp08EaC/CezWogxTrcDdY=";
24
25 __darwinAllowLocalNetworking = true;
26
27 nativeBuildInputs = [
28 pkg-config
29 gobject-introspection
30 ];
31
32 buildInputs = [ vips ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libunwind ];
33
34 preBuild = ''
35 export CGO_LDFLAGS_ALLOW='-(s|w)'
36 '';
37
38 meta = {
39 description = "Fast and secure on-the-fly image processing server written in Go";
40 mainProgram = "imgproxy";
41 homepage = "https://imgproxy.net";
42 changelog = "https://github.com/imgproxy/imgproxy/blob/${src.rev}/CHANGELOG.md";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ paluh ];
45 };
46}