From 78e434a4ac1554f1d14c7df03145303f5b5debef Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 13 Aug 2024 22:02:52 +0200 Subject: [PATCH] image_optim: remove 'with lib;' --- .../graphics/image_optim/default.nix | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/pkgs/applications/graphics/image_optim/default.nix b/pkgs/applications/graphics/image_optim/default.nix index 1d9048cafaa6..feceb00c31e8 100644 --- a/pkgs/applications/graphics/image_optim/default.nix +++ b/pkgs/applications/graphics/image_optim/default.nix @@ -13,34 +13,32 @@ withSvgo ? true, svgo }: -with lib; - let - optionalDepsPath = optional withPngcrush pngcrush - ++ optional withPngout pngout - ++ optional withAdvpng advancecomp - ++ optional withOptipng optipng - ++ optional withPngquant pngquant - ++ optional withOxipng oxipng - ++ optional withJhead jhead - ++ optional withJpegoptim jpegoptim - ++ optional withJpegrecompress jpeg-archive - ++ optional withJpegtran libjpeg - ++ optional withGifsicle gifsicle - ++ optional withSvgo svgo; + optionalDepsPath = lib.optional withPngcrush pngcrush + ++ lib.optional withPngout pngout + ++ lib.optional withAdvpng advancecomp + ++ lib.optional withOptipng optipng + ++ lib.optional withPngquant pngquant + ++ lib.optional withOxipng oxipng + ++ lib.optional withJhead jhead + ++ lib.optional withJpegoptim jpegoptim + ++ lib.optional withJpegrecompress jpeg-archive + ++ lib.optional withJpegtran libjpeg + ++ lib.optional withGifsicle gifsicle + ++ lib.optional withSvgo svgo; - disabledWorkersFlags = optional (!withPngcrush) "--no-pngcrush" - ++ optional (!withPngout) "--no-pngout" - ++ optional (!withAdvpng) "--no-advpng" - ++ optional (!withOptipng) "--no-optipng" - ++ optional (!withPngquant) "--no-pngquant" - ++ optional (!withOxipng) "--no-oxipng" - ++ optional (!withJhead) "--no-jhead" - ++ optional (!withJpegoptim) "--no-jpegoptim" - ++ optional (!withJpegrecompress) "--no-jpegrecompress" - ++ optional (!withJpegtran) "--no-jpegtran" - ++ optional (!withGifsicle) "--no-gifsicle" - ++ optional (!withSvgo) "--no-svgo"; + disabledWorkersFlags = lib.optional (!withPngcrush) "--no-pngcrush" + ++ lib.optional (!withPngout) "--no-pngout" + ++ lib.optional (!withAdvpng) "--no-advpng" + ++ lib.optional (!withOptipng) "--no-optipng" + ++ lib.optional (!withPngquant) "--no-pngquant" + ++ lib.optional (!withOxipng) "--no-oxipng" + ++ lib.optional (!withJhead) "--no-jhead" + ++ lib.optional (!withJpegoptim) "--no-jpegoptim" + ++ lib.optional (!withJpegrecompress) "--no-jpegrecompress" + ++ lib.optional (!withJpegtran) "--no-jpegtran" + ++ lib.optional (!withGifsicle) "--no-gifsicle" + ++ lib.optional (!withSvgo) "--no-svgo"; in bundlerApp { @@ -53,7 +51,7 @@ bundlerApp { postBuild = '' wrapProgram $out/bin/image_optim \ - --prefix PATH : ${lib.escapeShellArg (makeBinPath optionalDepsPath)} \ + --prefix PATH : ${lib.escapeShellArg (lib.makeBinPath optionalDepsPath)} \ --add-flags "${lib.concatStringsSep " " disabledWorkersFlags}" '';