nixos-config/packages/lib/crushpng.nix

18 lines
276 B
Nix
Raw Normal View History

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