2014-08-14 15:59:22 +02:00
|
|
|
{stdenv, fetchurl}:
|
|
|
|
|
|
|
|
let
|
2018-08-20 21:11:29 +02:00
|
|
|
folder = if stdenv.hostPlatform.system == "i686-linux" then "i686"
|
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
|
|
|
|
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
2014-08-14 15:59:22 +02:00
|
|
|
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
|
|
|
|
|
2018-08-20 21:11:29 +02:00
|
|
|
${if stdenv.hostPlatform.system == "i686-linux" then ''
|
2015-04-26 19:54:51 +02:00
|
|
|
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout
|
2018-08-20 21:11:29 +02:00
|
|
|
'' else if stdenv.hostPlatform.system == "x86_64-linux" then ''
|
2015-04-26 19:54:51 +02:00
|
|
|
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout
|
2014-08-14 15:59:22 +02:00
|
|
|
'' else ""}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2014-12-30 03:31:03 +01:00
|
|
|
description = "A tool that aggressively optimizes the sizes of PNG images";
|
2014-08-14 15:59:22 +02:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
|
|
|
homepage = http://advsys.net/ken/utils.htm;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
|
|
};
|
|
|
|
}
|