2018-08-19 00:00:04 +02:00
|
|
|
{ stdenv, fetchurl, xlibsWrapper, makeWrapper, libXpm
|
|
|
|
, libXmu, libXi, libXp, Xaw3d, fig2dev
|
|
|
|
}:
|
2006-12-08 02:17:21 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
let
|
|
|
|
version = "3.2.7a";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2012-01-02 16:29:14 +01:00
|
|
|
name = "xfig-${version}";
|
2006-12-08 02:17:21 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-19 00:00:04 +02:00
|
|
|
url = "mirror://sourceforge/mcj/xfig-${version}.tar.xz";
|
|
|
|
sha256 = "096zgp0bqnxhgxbrv2jjylrjz3pr4da0xxznlk2z7ffxr5pri2fa";
|
2006-12-08 02:17:21 +01:00
|
|
|
};
|
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's:"fig2dev":"${fig2dev}/bin/fig2dev":' src/main.c
|
|
|
|
'';
|
2006-12-08 02:17:21 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/X11/app-defaults
|
|
|
|
cp app-defaults/* $out/share/X11/app-defaults
|
2012-01-02 16:29:14 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
wrapProgram $out/bin/xfig \
|
|
|
|
--set XAPPLRESDIR $out/share/X11/app-defaults
|
|
|
|
'';
|
2006-12-08 02:17:21 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
enableParallelBuilding = true;
|
2016-02-20 23:00:56 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2006-12-08 02:17:21 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
buildInputs = [ xlibsWrapper libXpm libXmu libXi libXp Xaw3d ];
|
2012-01-02 16:29:14 +01:00
|
|
|
|
2018-08-19 00:00:04 +02:00
|
|
|
meta = with stdenv.lib; {
|
2006-12-08 02:17:21 +01:00
|
|
|
description = "An interactive drawing tool for X11";
|
2018-08-19 00:00:04 +02:00
|
|
|
longDescription = ''
|
|
|
|
Note that you need to have the <literal>netpbm</literal> tools
|
|
|
|
in your path to export bitmaps.
|
|
|
|
'';
|
|
|
|
inherit (fig2dev.meta) license homepage platforms;
|
2006-12-08 02:17:21 +01:00
|
|
|
};
|
|
|
|
}
|