From 34d8190e3067a4413d0b71fd401404955b0934bb Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 14 Aug 2014 15:59:22 +0200 Subject: pngout: Create new package --- pkgs/tools/graphics/pngout/default.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkgs/tools/graphics/pngout/default.nix (limited to 'pkgs/tools/graphics') diff --git a/pkgs/tools/graphics/pngout/default.nix b/pkgs/tools/graphics/pngout/default.nix new file mode 100644 index 000000000000..ff2a18c9fedc --- /dev/null +++ b/pkgs/tools/graphics/pngout/default.nix @@ -0,0 +1,33 @@ +{stdenv, fetchurl}: + +let + folder = if stdenv.system == "i686-linux" then "i686" + else if stdenv.system == "x86_64-linux" then "x86_64" + else throw "Unsupported system: ${stdenv.system}"; +in +stdenv.mkDerivation { + name = "pngout-20130221"; + + src = fetchurl { + url = http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz; + sha256 = "1qdzmgx7si9zr7wjdj8fgf5dqmmqw4zg19ypg0pdz7521ns5xbvi"; + }; + + installPhase = '' + mkdir -p $out/bin + cp ${folder}/pngout $out/bin + + ${if stdenv.system == "i686-linux" then '' + patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/bin/pngout + '' else if stdenv.system == "x86_64-linux" then '' + patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/bin/pngout + '' else ""} + ''; + + meta = { + description = "A tool that agressively optimizes the sizes of PNG images"; + license = stdenv.lib.licenses.unfree; + homepage = http://advsys.net/ken/utils.htm; + maintainers = [ stdenv.lib.maintainers.sander ]; + }; +} -- cgit 1.4.1