at 24.11-pre 2.0 kB view raw
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 # `pic2plot/gram.cc` uses the register storage class specifier, which is not supported in C++17. 21 # This prevents clang 16 from building plotutils because it defaults to C++17. 22 ++ [ ./c++17-register-usage-fix.patch ]; 23 24 preBuild = '' 25 # Fix parallel building. 26 make -C libplot xmi.h 27 ''; 28 29 configureFlags = [ "--enable-libplotter" ]; # required for pstoedit 30 31 hardeningDisable = [ "format" ]; 32 33 doCheck = true; 34 35 enableParallelBuilding = true; 36 37 meta = { 38 description = "Powerful C/C++ library for exporting 2D vector graphics"; 39 40 longDescription = 41 '' The GNU plotutils package contains software for both programmers and 42 technical users. Its centerpiece is libplot, a powerful C/C++ 43 function library for exporting 2-D vector graphics in many file 44 formats, both vector and raster. It can also do vector graphics 45 animations. 46 47 libplot is device-independent in the sense that its API (application 48 programming interface) does not depend on the type of graphics file 49 to be exported. 50 51 Besides libplot, the package contains command-line programs for 52 plotting scientific data. Many of them use libplot to export 53 graphics. 54 ''; 55 56 homepage = "https://www.gnu.org/software/plotutils/"; 57 58 license = lib.licenses.gpl2Plus; 59 maintainers = [ lib.maintainers.marcweber ]; 60 platforms = lib.platforms.unix; 61 }; 62}