1{ lib, buildGoModule, fetchFromGitHub, pkg-config, vips, gobject-introspection
2, stdenv, libunwind }:
3
4buildGoModule rec {
5 pname = "imgproxy";
6 version = "3.19.0";
7
8 src = fetchFromGitHub {
9 owner = pname;
10 repo = pname;
11 hash = "sha256-EGnamJBotPDatsWG+XLI/QhF2464aphkB9oS631oj+c=";
12 rev = "v${version}";
13 };
14
15 vendorHash = "sha256-gjRUt8/LECFSU2DG4ALi7a3DxKAGFoW98eBgeE5i2+s=";
16
17 nativeBuildInputs = [ pkg-config gobject-introspection ];
18
19 buildInputs = [ vips ]
20 ++ lib.optionals stdenv.isDarwin [ libunwind ];
21
22 preBuild = ''
23 export CGO_LDFLAGS_ALLOW='-(s|w)'
24 '';
25
26 meta = with lib; {
27 description = "Fast and secure on-the-fly image processing server written in Go";
28 homepage = "https://imgproxy.net";
29 changelog = "https://github.com/imgproxy/imgproxy/blob/${src.rev}/CHANGELOG.md";
30 license = licenses.mit;
31 maintainers = with maintainers; [ paluh ];
32 };
33}