1 { lib, bundlerApp, bundlerUpdateScript, makeWrapper,
2 withPngcrush ? true, pngcrush,
3 withPngout ? true, pngout,
4 withAdvpng ? true, advancecomp,
5 withOptipng ? true, optipng,
6 withPngquant ? true, pngquant,
7 withJhead ? true, jhead,
8 withJpegoptim ? true, jpegoptim,
9 withJpegrecompress ? true, jpeg-archive,
10 withJpegtran ? true, libjpeg,
11 withGifsicle ? true, gifsicle,
19 ++ optional withPngcrush pngcrush
20 ++ optional withPngout pngout
21 ++ optional withAdvpng advancecomp
22 ++ optional withOptipng optipng
23 ++ optional withPngquant pngquant
24 ++ optional withJhead jhead
25 ++ optional withJpegoptim jpegoptim
26 ++ optional withJpegrecompress jpeg-archive
27 ++ optional withJpegtran libjpeg
28 ++ optional withGifsicle gifsicle
29 ++ optional withSvgo svgo;
33 pname = "image_optim";
36 exes = [ "image_optim" ];
38 nativeBuildInputs = [ makeWrapper ];
41 wrapProgram $out/bin/image_optim \
42 --prefix PATH : ${lib.escapeShellArg (makeBinPath optionalDepsPath)}
45 passthru.updateScript = bundlerUpdateScript "image_optim";
48 description = "Command line tool and ruby interface to optimize (lossless compress, optionally lossy) jpeg, png, gif and svg images using external utilities (advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegrescan, jpegtran, optipng, pngcrush, pngout, pngquant, svgo)";
49 homepage = "https://github.com/toy/image_optim";
50 license = licenses.mit;
51 maintainers = with maintainers; [ srghma nicknovitski ];
52 platforms = platforms.all;