imaginary: add -return-size flag
Apply https://github.com/h2non/imaginary/pull/382 as patch. The -return-size flag is recommended by Nextcloud: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#previews
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub, pkg-config, vips }:
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pkg-config
|
||||
, vips
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "imaginary";
|
||||
@@ -11,6 +17,16 @@ buildGoModule rec {
|
||||
hash = "sha256-oEkFoZMaNNJPMisqpIneeLK/sA23gaTWJ4nqtDHkrwA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# add -return-size flag recommend by Nextcloud
|
||||
# https://github.com/h2non/imaginary/pull/382
|
||||
(fetchpatch {
|
||||
name = "return-width-and-height-of-generated-images.patch";
|
||||
url = "https://github.com/h2non/imaginary/commit/cfbf8d724cd326e835dfcb01e7224397c46037d3.patch";
|
||||
hash = "sha256-TwZ5WU5g9LXrenpfY52jYsc6KsEt2fjDq7cPz6ILlhA=";
|
||||
})
|
||||
];
|
||||
|
||||
vendorHash = "sha256-BluY6Fz4yAKJ/A9aFuPPsgQN9N/5yd8g8rDfIZeYz5U=";
|
||||
|
||||
buildInputs = [ vips ];
|
||||
@@ -28,6 +44,6 @@ buildGoModule rec {
|
||||
changelog = "https://github.com/h2non/${pname}/releases/tag/v${version}";
|
||||
description = "Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ urandom ];
|
||||
maintainers = with maintainers; [ dotlambda urandom ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user