2021-02-03 05:06:32 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, ghostscript
|
|
|
|
, libpng
|
|
|
|
, makeWrapper
|
|
|
|
, coreutils
|
|
|
|
, bc
|
|
|
|
, gnugrep
|
|
|
|
, gawk
|
|
|
|
, gnused
|
|
|
|
}:
|
2018-08-19 00:00:04 +02:00
|
|
|
|
2021-01-19 22:37:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "fig2dev";
|
2021-09-01 12:11:44 +02:00
|
|
|
version = "3.2.8b";
|
2018-08-19 00:00:04 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/mcj/fig2dev-${version}.tar.xz";
|
2021-09-01 12:11:44 +02:00
|
|
|
sha256 = "1jv8rg71dsy00lpg434r5zqs5qrg8mxqvv2gpcjjvmzsm551d2j1";
|
2018-08-19 00:00:04 +02:00
|
|
|
};
|
|
|
|
|
2021-01-19 22:37:41 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2018-08-19 00:00:04 +02:00
|
|
|
buildInputs = [ libpng ];
|
|
|
|
|
|
|
|
GSEXE="${ghostscript}/bin/gs";
|
|
|
|
|
2022-01-24 03:21:09 +01:00
|
|
|
configureFlags = [ "--enable-transfig" ];
|
|
|
|
|
2021-01-19 22:37:41 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/fig2ps2tex \
|
|
|
|
--set PATH ${lib.makeBinPath [ coreutils bc gnugrep gawk ]}
|
|
|
|
wrapProgram $out/bin/pic2tpic \
|
|
|
|
--set PATH ${lib.makeBinPath [ gnused ]}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-08-19 00:00:04 +02:00
|
|
|
description = "Tool to convert Xfig files to other formats";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://mcj.sourceforge.net/";
|
2018-08-19 00:00:04 +02:00
|
|
|
license = licenses.xfig;
|
2022-01-24 03:03:45 +01:00
|
|
|
platforms = platforms.unix;
|
2021-01-19 22:37:41 +01:00
|
|
|
maintainers = with maintainers; [ lesuisse ];
|
2018-08-19 00:00:04 +02:00
|
|
|
};
|
|
|
|
}
|