2020-04-13 22:05:03 +02:00
|
|
|
|
{ stdenv
|
|
|
|
|
, boehmgc
|
|
|
|
|
, boost
|
|
|
|
|
, cairo
|
|
|
|
|
, cmake
|
|
|
|
|
, fetchpatch
|
|
|
|
|
, fetchurl
|
|
|
|
|
, gettext
|
|
|
|
|
, glib
|
|
|
|
|
, glibmm
|
|
|
|
|
, gsl
|
|
|
|
|
, gtkmm2
|
|
|
|
|
, gtkspell2
|
|
|
|
|
, imagemagick
|
|
|
|
|
, lcms
|
|
|
|
|
, libcdr
|
|
|
|
|
, libexif
|
|
|
|
|
, libpng
|
|
|
|
|
, librevenge
|
|
|
|
|
, librsvg
|
|
|
|
|
, libsigcxx
|
|
|
|
|
, libvisio
|
|
|
|
|
, libwpg
|
|
|
|
|
, libXft
|
|
|
|
|
, libxml2
|
|
|
|
|
, libxslt
|
|
|
|
|
, makeWrapper
|
|
|
|
|
, perlPackages
|
|
|
|
|
, pkg-config
|
|
|
|
|
, poppler
|
|
|
|
|
, popt
|
|
|
|
|
, potrace
|
2020-04-14 01:03:59 +02:00
|
|
|
|
, python3
|
2020-04-13 22:05:03 +02:00
|
|
|
|
, wrapGAppsHook
|
|
|
|
|
, zlib
|
2015-02-22 08:14:53 +01:00
|
|
|
|
}:
|
2017-03-09 01:26:26 +01:00
|
|
|
|
let
|
2020-04-14 01:03:59 +02:00
|
|
|
|
python3Env = python3.withPackages
|
2020-04-13 22:05:03 +02:00
|
|
|
|
(ps: with ps; [
|
|
|
|
|
numpy
|
|
|
|
|
lxml
|
|
|
|
|
scour
|
|
|
|
|
]);
|
2015-05-21 15:43:02 +02:00
|
|
|
|
in
|
2008-02-03 14:17:59 +01:00
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-13 22:05:03 +02:00
|
|
|
|
pname = "inkscape";
|
2020-04-14 01:03:59 +02:00
|
|
|
|
version = "0.92.5";
|
2005-09-07 16:57:30 +02:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-13 22:05:03 +02:00
|
|
|
|
url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.bz2";
|
2020-04-14 01:03:59 +02:00
|
|
|
|
sha256 = "ge5/aeK9ZKlzQ9g5Wkp6eQWyG4YVZu1eXZF5F41Rmgs=";
|
2005-09-07 16:57:30 +02:00
|
|
|
|
};
|
|
|
|
|
|
2018-06-19 00:41:17 +02: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;
|
|
|
|
|
|
2015-02-22 08:14:53 +01:00
|
|
|
|
postPatch = ''
|
|
|
|
|
patchShebangs share/extensions
|
2017-01-09 10:02:10 +01:00
|
|
|
|
patchShebangs fix-roff-punct
|
2014-07-18 11:54:10 +02:00
|
|
|
|
|
2017-06-01 06:55:38 +02:00
|
|
|
|
# Python is used at run-time to execute scripts, e.g., those from
|
|
|
|
|
# the "Effects" menu.
|
|
|
|
|
substituteInPlace src/extension/implementation/script.cpp \
|
2020-04-14 01:03:59 +02:00
|
|
|
|
--replace '"python-interpreter", "python"' '"python-interpreter", "${python3Env}/bin/python"'
|
2017-06-01 06:55:38 +02:00
|
|
|
|
'';
|
2008-02-22 17:24:58 +01:00
|
|
|
|
|
2020-04-13 22:05:03 +02:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pkg-config
|
|
|
|
|
cmake
|
|
|
|
|
makeWrapper
|
2020-04-14 01:03:59 +02:00
|
|
|
|
python3Env
|
2020-04-13 22:05:03 +02:00
|
|
|
|
wrapGAppsHook
|
|
|
|
|
] ++ (with perlPackages; [
|
|
|
|
|
perl
|
|
|
|
|
XMLParser
|
|
|
|
|
]);
|
2018-11-18 20:31:03 +01:00
|
|
|
|
|
2020-04-13 22:05:03 +02:00
|
|
|
|
buildInputs = [
|
|
|
|
|
boehmgc
|
|
|
|
|
boost
|
|
|
|
|
gettext
|
|
|
|
|
glib
|
|
|
|
|
glibmm
|
|
|
|
|
gsl
|
|
|
|
|
gtkmm2
|
|
|
|
|
imagemagick
|
|
|
|
|
lcms
|
|
|
|
|
libcdr
|
|
|
|
|
libexif
|
|
|
|
|
libpng
|
|
|
|
|
librevenge
|
2019-09-07 23:42:35 +02:00
|
|
|
|
librsvg # for loading icons
|
2020-04-13 22:05:03 +02:00
|
|
|
|
libsigcxx
|
|
|
|
|
libvisio
|
|
|
|
|
libwpg
|
|
|
|
|
libXft
|
|
|
|
|
libxml2
|
|
|
|
|
libxslt
|
|
|
|
|
perlPackages.perl
|
|
|
|
|
poppler
|
|
|
|
|
popt
|
|
|
|
|
potrace
|
2020-04-14 01:03:59 +02:00
|
|
|
|
python3Env
|
2020-04-13 22:05:03 +02:00
|
|
|
|
zlib
|
|
|
|
|
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
|
|
|
|
|
gtkspell2
|
|
|
|
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
|
cairo
|
|
|
|
|
];
|
2008-01-31 11:41:45 +01:00
|
|
|
|
|
2018-07-21 23:20:01 +02:00
|
|
|
|
# Make sure PyXML modules can be found at run-time.
|
|
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
2018-05-28 21:10:27 +02: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 17:24:58 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2018-05-28 21:10:27 +02:00
|
|
|
|
meta = with stdenv.lib; {
|
2014-07-18 11:54:10 +02:00
|
|
|
|
description = "Vector graphics editor";
|
2020-04-14 01:11:51 +02:00
|
|
|
|
homepage = "https://www.inkscape.org";
|
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
|
maintainers = [ maintainers.jtojnar ];
|
2014-07-18 11:54:10 +02:00
|
|
|
|
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
|
|
|
|
}
|