summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2013-10-28 18:32:23 +0100
committerJaka Hudoklin <jakahudoklin@gmail.com>2013-10-30 11:30:49 +0100
commit24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7 (patch)
tree1f1d2f531badfe0fc496efe3b9fe5aa8868b4c68 /pkgs/tools
parent04fc38d23391aa92d92a7a5fe0682511c392d4ff (diff)
downloadnixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.tar
nixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.tar.gz
nixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.tar.bz2
nixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.tar.lz
nixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.tar.xz
nixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.tar.zst
nixpkgs-24f0eccaa8848c4bbd3db3be6d8af0f3669f46f7.zip
Add pngquant, it converts 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved.
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/graphics/pngquant/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/pngquant/default.nix b/pkgs/tools/graphics/pngquant/default.nix
new file mode 100644
index 00000000000..560352c481e
--- /dev/null
+++ b/pkgs/tools/graphics/pngquant/default.nix
@@ -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
+  };
+}