about summary refs log tree commit diff
path: root/pkgs/applications/graphics/apngasm/2.nix
blob: f581f9dd12456a6e2b82557c2a3a4146092addea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenv, fetchzip, libpng, zlib, zopfli }:

stdenv.mkDerivation rec {
  pname = "apngasm";
  version = "2.91";

  src = fetchzip {
    url = "mirror://sourceforge/${pname}/${pname}-${version}-src.zip";
    stripRoot = false;
    sha256 = "0qhljqql159xkn1l83vz0q8wvzr7rjz4jnhiy0zn36pgvacg0zn1";
  };

  buildInputs = [ libpng zlib zopfli ];

  postPatch = ''
    rm -rf libpng zlib zopfli
  '';

  NIX_CFLAGS_LINK = "-lzopfli";

  installPhase = ''
    install -Dt $out/bin apngasm
  '';

  enableParallelBuilding = true;

  meta = with lib; {
    description = "Create highly optimized Animated PNG files from PNG/TGA images";
    mainProgram = "apngasm";
    homepage = "https://apngasm.sourceforge.net/";
    license = licenses.zlib;
    maintainers = with maintainers; [ orivej ];
    platforms = platforms.linux;
  };

}