2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, ghostscript
|
|
|
|
, libpng
|
|
|
|
, makeWrapper
|
|
|
|
, coreutils
|
|
|
|
, bc
|
|
|
|
, gnugrep
|
|
|
|
, gawk
|
|
|
|
, gnused
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "fig2dev";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "3.2.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/mcj/fig2dev-${version}.tar.xz";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "0zg29yqknfafyzmmln4k7kydfb2dapk3r8ffvlqhj3cm8fp5h4lk";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libpng ];
|
|
|
|
|
|
|
|
GSEXE="${ghostscript}/bin/gs";
|
|
|
|
|
2021-02-05 17:12:51 +00: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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tool to convert Xfig files to other formats";
|
|
|
|
homepage = "http://mcj.sourceforge.net/";
|
|
|
|
license = licenses.xfig;
|
|
|
|
platforms = platforms.linux;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ lesuisse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|