2010-07-28 17:35:01 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, perl, perlXMLParser, gtk, libXft
|
|
|
|
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm
|
|
|
|
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper, intltool
|
2016-01-28 19:57:39 +01:00
|
|
|
, gsl, python, numpy, pyxml, lxml, poppler, imagemagick, libwpg, librevenge
|
2015-05-21 15:43:02 +02:00
|
|
|
, libvisio, libcdr, libexif, unzip
|
|
|
|
, boxMakerPlugin ? false # boxmaker plugin
|
2015-02-22 08:14:53 +01:00
|
|
|
}:
|
2005-09-07 16:57:30 +02:00
|
|
|
|
2015-05-21 15:43:02 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
boxmaker = fetchurl {
|
|
|
|
# http://www.inkscapeforum.com/viewtopic.php?f=11&t=10403
|
|
|
|
url = "http://www.keppel.demon.co.uk/111000/files/BoxMaker0.91.zip";
|
|
|
|
sha256 = "5c5697f43dc3a95468f61f479cb50b7e2b93379a1729abf19e4040ac9f43a1a8";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2008-02-03 14:17:59 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-22 08:14:53 +01:00
|
|
|
name = "inkscape-0.91";
|
2005-09-07 16:57:30 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-22 08:14:53 +01:00
|
|
|
url = "https://inkscape.global.ssl.fastly.net/media/resources/file/"
|
|
|
|
+ "${name}.tar.bz2";
|
|
|
|
sha256 = "06ql3x732x2rlnanv0a8aharsnj91j5kplksg574090rks51z42d";
|
2005-09-07 16:57:30 +02:00
|
|
|
};
|
|
|
|
|
2015-02-22 08:14:53 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs share/extensions
|
2015-04-08 07:02:59 +02:00
|
|
|
''
|
|
|
|
# Clang gets misdetected, so hardcode the right answer
|
2015-05-11 23:37:53 +02:00
|
|
|
+ stdenv.lib.optionalString stdenv.cc.isClang ''
|
2015-04-08 07:02:59 +02:00
|
|
|
substituteInPlace src/ui/tool/node.h \
|
|
|
|
--replace "#if __cplusplus >= 201103L" "#if true"
|
2015-02-22 08:14:53 +01:00
|
|
|
'';
|
2014-07-18 11:54:10 +02:00
|
|
|
|
2008-02-22 17:24:58 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# Python is used at run-time to execute scripts, e.g., those from
|
|
|
|
# the "Effects" menu.
|
2016-01-28 19:57:39 +01:00
|
|
|
python pyxml numpy lxml
|
2008-02-22 17:24:58 +01:00
|
|
|
];
|
|
|
|
|
2005-09-07 16:57:30 +02:00
|
|
|
buildInputs = [
|
2009-11-26 13:39:22 +01:00
|
|
|
pkgconfig perl perlXMLParser gtk libXft libpng zlib popt boehmgc
|
2008-02-03 14:17:59 +01:00
|
|
|
libxml2 libxslt glib gtkmm glibmm libsigcxx lcms boost gettext
|
2015-02-22 08:14:53 +01:00
|
|
|
makeWrapper intltool gsl poppler imagemagick libwpg librevenge
|
|
|
|
libvisio libcdr libexif
|
2015-05-21 15:43:02 +02:00
|
|
|
] ++ stdenv.lib.optional boxMakerPlugin unzip;
|
2008-01-31 11:41:45 +01:00
|
|
|
|
2014-07-18 11:54:10 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = true;
|
|
|
|
|
2008-02-22 17:24:58 +01:00
|
|
|
postInstall = ''
|
2015-05-21 15:43:02 +02:00
|
|
|
${if boxMakerPlugin then "
|
|
|
|
mkdir -p $out/share/inkscape/extensions/
|
|
|
|
# boxmaker packaged version 0.91 in a directory called 0.85 ?!??
|
|
|
|
unzip ${boxmaker};
|
|
|
|
cp boxmake-upd-0.85/* $out/share/inkscape/extensions/
|
|
|
|
rm -Rf boxmake-upd-0.85
|
|
|
|
"
|
|
|
|
else
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
2008-02-22 17:24:58 +01:00
|
|
|
# Make sure PyXML modules can be found at run-time.
|
|
|
|
for i in "$out/bin/"*
|
|
|
|
do
|
|
|
|
wrapProgram "$i" --prefix PYTHONPATH : \
|
2016-01-28 19:57:39 +01:00
|
|
|
"$(toPythonPath ${pyxml}):$(toPythonPath ${lxml}):$(toPythonPath ${numpy})" \
|
2014-08-09 17:02:36 +02:00
|
|
|
--prefix PATH : ${python}/bin || \
|
2008-02-22 17:24:58 +01:00
|
|
|
exit 2
|
|
|
|
done
|
2015-02-22 08:14:53 +01:00
|
|
|
rm "$out/share/icons/hicolor/icon-theme.cache"
|
2008-02-22 17:24:58 +01:00
|
|
|
'';
|
|
|
|
|
2014-07-18 11:54:10 +02:00
|
|
|
meta = with stdenv.lib; {
|
2008-02-22 17:24:58 +01:00
|
|
|
license = "GPL";
|
2008-01-31 11:41:45 +01:00
|
|
|
homepage = http://www.inkscape.org;
|
2014-07-18 11:54:10 +02:00
|
|
|
description = "Vector graphics editor";
|
|
|
|
platforms = platforms.all;
|
2009-03-03 14:27:40 +01:00
|
|
|
longDescription = ''
|
|
|
|
Inkscape is a feature-rich vector graphics editor that edits
|
|
|
|
files in the W3C SVG (Scalable Vector Graphics) file format.
|
2009-10-18 06:43:53 +02:00
|
|
|
|
2009-11-26 13:39:22 +01:00
|
|
|
If you want to import .eps files install ps2edit.
|
2009-03-03 14:27:40 +01:00
|
|
|
'';
|
2008-01-31 11:41:45 +01:00
|
|
|
};
|
2005-09-07 16:57:30 +02:00
|
|
|
}
|