2018-10-12 23:56:15 +01:00
|
|
|
|
{ stdenv, fetchurl, pkgconfig, perlPackages, libXft
|
2016-09-11 22:24:51 +01:00
|
|
|
|
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
|
2017-08-12 18:33:22 +01:00
|
|
|
|
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper
|
2019-11-04 14:59:33 +00:00
|
|
|
|
, gsl, gtkspell2, cairo, python2, poppler, imagemagick, libwpg, librevenge
|
2019-09-12 15:25:05 +01:00
|
|
|
|
, libvisio, libcdr, libexif, potrace, cmake
|
2019-09-07 22:42:35 +01:00
|
|
|
|
, librsvg, wrapGAppsHook
|
2015-02-22 07:14:53 +00:00
|
|
|
|
}:
|
2005-09-07 15:57:30 +01:00
|
|
|
|
|
2017-03-09 00:26:26 +00:00
|
|
|
|
let
|
2018-11-12 19:24:32 +00:00
|
|
|
|
python2Env = python2.withPackages(ps: with ps;
|
|
|
|
|
[ numpy lxml scour ]);
|
2015-05-21 14:43:02 +01:00
|
|
|
|
in
|
|
|
|
|
|
2008-02-03 13:17:59 +00:00
|
|
|
|
stdenv.mkDerivation rec {
|
2019-02-01 00:11:05 +00:00
|
|
|
|
name = "inkscape-0.92.4";
|
2005-09-07 15:57:30 +01:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-08-25 14:59:15 +01:00
|
|
|
|
url = "https://media.inkscape.org/dl/resources/file/${name}.tar.bz2";
|
2019-02-01 00:11:05 +00:00
|
|
|
|
sha256 = "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p";
|
2005-09-07 15:57:30 +01:00
|
|
|
|
};
|
|
|
|
|
|
2018-06-18 23:41:17 +01:00
|
|
|
|
# Inkscape hits the ARGMAX when linking on macOS. It appears to be
|
|
|
|
|
# CMake’s ARGMAX check doesn’t offer enough padding for NIX_LDFLAGS.
|
|
|
|
|
# Setting strictDeps it avoids duplicating some dependencies so it
|
|
|
|
|
# will leave us under ARGMAX.
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
2018-05-28 20:10:27 +01:00
|
|
|
|
unpackPhase = ''
|
|
|
|
|
cp $src ${name}.tar.bz2
|
|
|
|
|
tar xvjf ${name}.tar.bz2 > /dev/null
|
|
|
|
|
cd ${name}
|
|
|
|
|
'';
|
|
|
|
|
|
2015-02-22 07:14:53 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
patchShebangs share/extensions
|
2017-01-09 09:02:10 +00:00
|
|
|
|
patchShebangs fix-roff-punct
|
2014-07-18 10:54:10 +01:00
|
|
|
|
|
2017-06-01 05:55:38 +01:00
|
|
|
|
# Python is used at run-time to execute scripts, e.g., those from
|
|
|
|
|
# the "Effects" menu.
|
|
|
|
|
substituteInPlace src/extension/implementation/script.cpp \
|
|
|
|
|
--replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"'
|
|
|
|
|
'';
|
2008-02-22 16:24:58 +00:00
|
|
|
|
|
2019-09-07 22:42:35 +01:00
|
|
|
|
nativeBuildInputs = [ pkgconfig cmake makeWrapper python2Env wrapGAppsHook ]
|
2018-10-12 23:56:15 +01:00
|
|
|
|
++ (with perlPackages; [ perl XMLParser ]);
|
2005-09-07 15:57:30 +01:00
|
|
|
|
buildInputs = [
|
2018-06-19 20:43:36 +01:00
|
|
|
|
libXft libpng zlib popt boehmgc
|
2016-09-11 22:24:51 +01:00
|
|
|
|
libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
|
2018-06-18 23:41:17 +01:00
|
|
|
|
gsl poppler imagemagick libwpg librevenge
|
2019-09-12 15:25:05 +01:00
|
|
|
|
libvisio libcdr libexif potrace
|
2018-11-18 19:31:03 +00:00
|
|
|
|
|
2019-09-07 22:42:35 +01:00
|
|
|
|
librsvg # for loading icons
|
|
|
|
|
|
2018-11-18 19:31:03 +00:00
|
|
|
|
python2Env perlPackages.perl
|
2019-11-04 14:59:33 +00:00
|
|
|
|
] ++ stdenv.lib.optional (!stdenv.isDarwin) gtkspell2
|
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin cairo;
|
2008-01-31 10:41:45 +00:00
|
|
|
|
|
2018-05-28 20:10:08 +01:00
|
|
|
|
enableParallelBuilding = true;
|
2014-07-18 10:54:10 +01:00
|
|
|
|
|
2018-07-21 22:20:01 +01:00
|
|
|
|
# Make sure PyXML modules can be found at run-time.
|
|
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
2018-05-28 20:10:27 +01:00
|
|
|
|
install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkscape
|
|
|
|
|
install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkview
|
2008-02-22 16:24:58 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2018-05-28 20:10:27 +01:00
|
|
|
|
meta = with stdenv.lib; {
|
2008-02-22 16:24:58 +00:00
|
|
|
|
license = "GPL";
|
2017-08-25 14:59:15 +01:00
|
|
|
|
homepage = https://www.inkscape.org;
|
2014-07-18 10:54:10 +01:00
|
|
|
|
description = "Vector graphics editor";
|
|
|
|
|
platforms = platforms.all;
|
2009-03-03 13:27:40 +00: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 05:43:53 +01:00
|
|
|
|
|
2009-11-26 12:39:22 +00:00
|
|
|
|
If you want to import .eps files install ps2edit.
|
2009-03-03 13:27:40 +00:00
|
|
|
|
'';
|
2008-01-31 10:41:45 +00:00
|
|
|
|
};
|
2005-09-07 15:57:30 +01:00
|
|
|
|
}
|