summary refs log tree commit diff
path: root/pkgs/servers/imgproxy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/imgproxy/default.nix')
-rw-r--r--pkgs/servers/imgproxy/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/servers/imgproxy/default.nix b/pkgs/servers/imgproxy/default.nix
new file mode 100644
index 00000000000..c7d0d910ac1
--- /dev/null
+++ b/pkgs/servers/imgproxy/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, buildGoModule, fetchFromGitHub, pkg-config, vips, gobject-introspection, Security }:
+
+buildGoModule rec {
+  pname = "imgproxy";
+  version = "2.8.1";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    sha256 = "00hhgh6nrzg2blc6yl8rph5h5w7swlkbh0zgsj7xr0lkm10879pc";
+    rev = "v${version}";
+  };
+
+  modSha256 = "0kgd8lwcdns3skvd4bj4z85mq6hkk79mb0zzwky0wqxni8f73s6w";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ gobject-introspection vips ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
+
+  preBuild = ''
+    export CGO_LDFLAGS_ALLOW='-(s|w)'
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Fast and secure on-the-fly image processing server written in Go";
+    homepage = "https://imgproxy.net";
+    license = licenses.mit;
+    maintainers = with maintainers; [ paluh ];
+  };
+}