2023-03-24 00:07:29 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, libjpeg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "1.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jpegoptim";
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tjko";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-PROQvOqsis8we58OOZ/kuY+L/CoV7XfnY9wvrpsTJu8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2023-27781.patch";
|
|
|
|
url = "https://github.com/tjko/jpegoptim/commit/29a073ad297a0954f5e865264e24755d0ffe53ed.patch";
|
|
|
|
hash = "sha256-YUjVg0cvElhzMG3b4t5bqcqnHAuzDoNvSqe0yvlgX4E=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# There are no checks, it seems.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
buildInputs = [ libjpeg ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Optimize JPEG files";
|
|
|
|
homepage = "https://www.kokkonen.net/tjko/projects.html";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.aristid ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|