nixpkgs/pkgs/applications/graphics/xfig/default.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

2021-02-03 04:05:49 +00:00
{ lib
, stdenv
, fetchurl
, xlibsWrapper
, makeWrapper
, libXpm
, libXmu
, libXi
, libXp
, Xaw3d
, libXaw
, fig2dev
}:
2021-01-20 21:29:43 +00:00
stdenv.mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "xfig";
version = "3.2.8b";
src = fetchurl {
url = "mirror://sourceforge/mcj/xfig-${version}.tar.xz";
sha256 = "0fndgbm1mkqb1sn2v2kj3nx9mxj70jbp31y2bjvzcmmkry0q3k5j";
};
2021-02-03 04:05:49 +00:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
xlibsWrapper
libXpm
libXmu
libXi
libXp
Xaw3d
libXaw
];
postPatch = ''
sed -i 's:"fig2dev":"${fig2dev}/bin/fig2dev":' src/main.c
'';
postInstall = ''
mkdir -p $out/share/X11/app-defaults
cp app-defaults/* $out/share/X11/app-defaults
wrapProgram $out/bin/xfig \
--set XAPPLRESDIR $out/share/X11/app-defaults
'';
enableParallelBuilding = true;
2016-02-20 22:00:56 +00:00
meta = with lib; {
description = "An interactive drawing tool for X11";
longDescription = ''
Note that you need to have the <literal>netpbm</literal> tools
in your path to export bitmaps.
'';
2021-01-20 21:29:43 +00:00
inherit (fig2dev.meta) license homepage platforms maintainers;
};
}