Add pngquant, it converts 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved.
This commit is contained in:
parent
04fc38d233
commit
24f0eccaa8
26
pkgs/tools/graphics/pngquant/default.nix
Normal file
26
pkgs/tools/graphics/pngquant/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ stdenv, fetchgit, libpng }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "pngquant-${version}";
|
||||||
|
version = "2.0.1";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = https://github.com/pornel/pngquant.git;
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
sha256 = "00mrv9wgxbwy517l8i4n7n3jpzirjdgi0zass3wj29i7xyipwlhf";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ libpng ];
|
||||||
|
|
||||||
|
preInstall = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
export PREFIX=$out
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/pornel/pngquant;
|
||||||
|
description = "pngquant converts 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved";
|
||||||
|
platforms = platforms.all;
|
||||||
|
license = licenses.bsd2; # Not exactly bsd2, but alike
|
||||||
|
};
|
||||||
|
}
|
@ -1596,6 +1596,8 @@ let
|
|||||||
libpng = libpng12;
|
libpng = libpng12;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pngquant = callPackage ../tools/graphics/pngquant { };
|
||||||
|
|
||||||
podiff = callPackage ../tools/text/podiff { };
|
podiff = callPackage ../tools/text/podiff { };
|
||||||
|
|
||||||
poedit = callPackage ../tools/text/poedit { };
|
poedit = callPackage ../tools/text/poedit { };
|
||||||
|
Loading…
Reference in New Issue
Block a user