summary refs log tree commit diff
path: root/pkgs/tools/graphics/pgf/default.nix
blob: 14cd83c3fcfe2241c5b5ea55839160473fb0245a (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
{ lib, stdenv, fetchurl, autoconf, automake, libtool, dos2unix, libpgf, freeimage, doxygen }:

with lib;

let
  version = "6.14.12";
in
stdenv.mkDerivation {
  pname = "pgf";
  inherit version;

  src = fetchurl {
    url = "mirror://sourceforge/libpgf/pgf-console-src-${version}.tar.gz";
    sha256 = "1vfm12cfq3an3xg0679bcwdmjq2x1bbij1iwsmm60hwmrm3zvab0";
  };

  buildInputs = [ autoconf automake libtool dos2unix libpgf freeimage doxygen ];

  patchPhase = ''
      sed 1i'#include <inttypes.h>' -i src/PGF.cpp
      sed s/__int64/int64_t/g -i src/PGF.cpp
      rm include/FreeImage.h include/FreeImagePlus.h
  '';

  preConfigure = "dos2unix configure.ac; sh autogen.sh";

# configureFlags = optional static "--enable-static --disable-shared";

  meta = {
    homepage = "https://www.libpgf.org/";
    description = "Progressive Graphics Format command line program";
    license = lib.licenses.lgpl21Plus;
    platforms = lib.platforms.linux;
  };
}