1{ fetchurl, lib, stdenv, libpng, autoreconfHook }:
2
3# debian splits this package into plotutils and libplot2c2
4
5# gentoo passes X, this package contains fonts
6# I'm only interested in making pstoedit convert to svg
7
8stdenv.mkDerivation rec {
9 pname = "plotutils";
10 version = "2.6";
11
12 src = fetchurl {
13 url = "mirror://gnu/plotutils/plotutils-${version}.tar.gz";
14 sha256 = "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg";
15 };
16
17 nativeBuildInputs = [ autoreconfHook ];
18 buildInputs = [ libpng ];
19 patches = map fetchurl (import ./debian-patches.nix);
20
21 preBuild = ''
22 # Fix parallel building.
23 make -C libplot xmi.h
24 '';
25
26 configureFlags = [ "--enable-libplotter" ]; # required for pstoedit
27
28 hardeningDisable = [ "format" ];
29
30 doCheck = true;
31
32 enableParallelBuilding = true;
33
34 meta = {
35 description = "Powerful C/C++ library for exporting 2D vector graphics";
36
37 longDescription =
38 '' The GNU plotutils package contains software for both programmers and
39 technical users. Its centerpiece is libplot, a powerful C/C++
40 function library for exporting 2-D vector graphics in many file
41 formats, both vector and raster. It can also do vector graphics
42 animations.
43
44 libplot is device-independent in the sense that its API (application
45 programming interface) does not depend on the type of graphics file
46 to be exported.
47
48 Besides libplot, the package contains command-line programs for
49 plotting scientific data. Many of them use libplot to export
50 graphics.
51 '';
52
53 homepage = "https://www.gnu.org/software/plotutils/";
54
55 license = lib.licenses.gpl2Plus;
56 maintainers = [ lib.maintainers.marcweber ];
57 platforms = lib.platforms.unix;
58 };
59}