summary refs log tree commit diff
path: root/pkgs/tools/graphics/plotutils/default.nix
blob: 61e21b1a33da59081d3d136dbeb78ec9f829bfbf (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ fetchurl, stdenv, libpng, autoreconfHook }:

# debian splits this package into plotutils and libplot2c2

# gentoo passes X, this package contains fonts
# I'm only interested in making pstoedit convert to svg

stdenv.mkDerivation rec {
  name = "plotutils-2.6";

  src = fetchurl {
    url = "mirror://gnu/plotutils/${name}.tar.gz";
    sha256 = "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg";
  };

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [ libpng ];
  patches = map fetchurl (import ./debian-patches.nix);

  preBuild = ''
    # Fix parallel building.
    make -C libplot xmi.h
  '';

  configureFlags = [ "--enable-libplotter" ]; # required for pstoedit

  hardeningDisable = [ "format" ];

  doCheck = true;

  enableParallelBuilding = true;

  meta = {
    description = "Powerful C/C++ library for exporting 2D vector graphics";

    longDescription =
      '' The GNU plotutils package contains software for both programmers and
         technical users.  Its centerpiece is libplot, a powerful C/C++
         function library for exporting 2-D vector graphics in many file
         formats, both vector and raster.  It can also do vector graphics
         animations.

         libplot is device-independent in the sense that its API (application
         programming interface) does not depend on the type of graphics file
         to be exported.

         Besides libplot, the package contains command-line programs for
         plotting scientific data.  Many of them use libplot to export
         graphics.
      '';

    homepage = https://www.gnu.org/software/plotutils/;

    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = [ stdenv.lib.maintainers.marcweber ];
    platforms = stdenv.lib.platforms.unix;
  };
}