2021-04-11 09:06:26 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libpng, zlib, nasm }:
|
2016-01-07 21:05:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-08-15 11:53:11 +00:00
|
|
|
version = "4.1.1";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mozjpeg";
|
2016-01-07 21:05:13 +00:00
|
|
|
|
2018-06-18 08:07:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozilla";
|
|
|
|
repo = "mozjpeg";
|
|
|
|
rev = "v${version}";
|
2022-08-15 11:53:11 +00:00
|
|
|
sha256 = "sha256-tHiuQeBWjyXxy5F8jadYz5qfF2S3snagnlCPjI1Cj18=";
|
2016-01-07 21:05:13 +00:00
|
|
|
};
|
|
|
|
|
2021-04-11 09:06:26 +00:00
|
|
|
cmakeFlags = [ "-DENABLE_STATIC=NO" "-DPNG_SUPPORTED=TRUE" ]; # See https://github.com/mozilla/mozjpeg/issues/351
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ libpng zlib nasm ];
|
2016-01-07 21:05:13 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Mozilla JPEG Encoder Project";
|
|
|
|
longDescription = ''
|
|
|
|
This project's goal is to reduce the size of JPEG files without reducing quality or compatibility with the
|
|
|
|
vast majority of the world's deployed decoders.
|
|
|
|
|
|
|
|
The idea is to reduce transfer times for JPEGs on the Web, thus reducing page load times.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/mozilla/mozjpeg";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = [ lib.maintainers.aristid ];
|
|
|
|
platforms = lib.platforms.all;
|
2016-01-07 21:05:13 +00:00
|
|
|
};
|
|
|
|
}
|