image_optim: refactor
This commit is contained in:
parent
57aa87131f
commit
83d7cb0bbc
@ -27,8 +27,7 @@ assert withSvgo -> svgo != null;
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
optionalDepsPath = makeBinPath (
|
optionalDepsPath = []
|
||||||
[]
|
|
||||||
++ optional withPngcrush pngcrush
|
++ optional withPngcrush pngcrush
|
||||||
++ optional withPngout pngout
|
++ optional withPngout pngout
|
||||||
++ optional withAdvpng advancecomp
|
++ optional withAdvpng advancecomp
|
||||||
@ -39,8 +38,7 @@ let
|
|||||||
++ optional withJpegrecompress jpeg-archive
|
++ optional withJpegrecompress jpeg-archive
|
||||||
++ optional withJpegtran libjpeg
|
++ optional withJpegtran libjpeg
|
||||||
++ optional withGifsicle gifsicle
|
++ optional withGifsicle gifsicle
|
||||||
++ optional withSvgo svgo
|
++ optional withSvgo svgo;
|
||||||
);
|
|
||||||
in
|
in
|
||||||
|
|
||||||
bundlerApp {
|
bundlerApp {
|
||||||
@ -55,7 +53,7 @@ bundlerApp {
|
|||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/image_optim \
|
wrapProgram $out/bin/image_optim \
|
||||||
--prefix PATH : ${optionalDepsPath}
|
--prefix PATH : ${makeBinPath optionalDepsPath}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user