mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
3b9ef2c71b
Done mostly without any verification. I didn't bother with libc}/include, as the path is still correct.
34 lines
1.0 KiB
Nix
34 lines
1.0 KiB
Nix
{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.out}/lib/ld-linux.so.2 $out/bin/pngout
|
|
'' else if stdenv.system == "x86_64-linux" then ''
|
|
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout
|
|
'' else ""}
|
|
'';
|
|
|
|
meta = {
|
|
description = "A tool that aggressively optimizes the sizes of PNG images";
|
|
license = stdenv.lib.licenses.unfree;
|
|
homepage = http://advsys.net/ken/utils.htm;
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
};
|
|
}
|