This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/lib/crushpng.nix

19 lines
293 B
Nix
Raw Normal View History

2022-11-08 20:11:11 +00:00
{
stdenvNoCC,
oxipng,
pngquant,
}: {
name,
src,
maxsize,
} @ args:
stdenvNoCC.mkDerivation {
dontUnpack = true;
inherit (args) name src maxsize;
nativeBuildInputs = [oxipng pngquant];
buildPhase = ''
${./crushpng.sh} $src $out $maxsize
'';
installPhase = "true";
}