2021-01-11 07:54:33 +00:00
|
|
|
|
{ lib, stdenv
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, boehmgc
|
|
|
|
|
, boost
|
|
|
|
|
, cairo
|
|
|
|
|
, cmake
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, double-conversion
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, fetchurl
|
|
|
|
|
, gettext
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, gdl
|
2021-02-17 20:12:27 +00:00
|
|
|
|
, ghostscript
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, glib
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, glib-networking
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, glibmm
|
|
|
|
|
, gsl
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, gtk-mac-integration
|
|
|
|
|
, gtkmm3
|
|
|
|
|
, gtkspell3
|
|
|
|
|
, gdk-pixbuf
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, imagemagick
|
|
|
|
|
, lcms
|
|
|
|
|
, libcdr
|
|
|
|
|
, libexif
|
|
|
|
|
, libpng
|
|
|
|
|
, librevenge
|
|
|
|
|
, librsvg
|
|
|
|
|
, libsigcxx
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, libsoup
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, libvisio
|
|
|
|
|
, libwpg
|
|
|
|
|
, libXft
|
|
|
|
|
, libxml2
|
|
|
|
|
, libxslt
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, ninja
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, perlPackages
|
|
|
|
|
, pkg-config
|
|
|
|
|
, poppler
|
|
|
|
|
, popt
|
|
|
|
|
, potrace
|
2020-04-14 00:03:59 +01:00
|
|
|
|
, python3
|
2020-04-14 09:55:08 +01:00
|
|
|
|
, substituteAll
|
2020-04-13 21:05:03 +01:00
|
|
|
|
, wrapGAppsHook
|
|
|
|
|
, zlib
|
2015-02-22 07:14:53 +00:00
|
|
|
|
}:
|
2017-03-09 00:26:26 +00:00
|
|
|
|
let
|
2020-04-14 00:03:59 +01:00
|
|
|
|
python3Env = python3.withPackages
|
2020-04-13 21:05:03 +01:00
|
|
|
|
(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 {
|
2020-04-13 21:05:03 +01:00
|
|
|
|
pname = "inkscape";
|
2021-01-19 15:35:29 +00:00
|
|
|
|
version = "1.0.2";
|
2005-09-07 15:57:30 +01:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-14 09:55:08 +01:00
|
|
|
|
url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.xz";
|
2021-01-19 15:35:29 +00:00
|
|
|
|
sha256 = "sha256-2j4jBRGgjL8h6GcQ0WFFhZT+qHhn6RV7Z+0BoE6ieYo=";
|
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;
|
|
|
|
|
|
2020-04-14 09:55:08 +01:00
|
|
|
|
patches = [
|
|
|
|
|
(substituteAll {
|
|
|
|
|
src = ./fix-python-paths.patch;
|
|
|
|
|
# Python is used at run-time to execute scripts,
|
|
|
|
|
# e.g., those from the "Effects" menu.
|
|
|
|
|
python3 = "${python3Env}/bin/python";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2015-02-22 07:14:53 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
patchShebangs share/extensions
|
2021-02-17 20:12:27 +00:00
|
|
|
|
substituteInPlace share/extensions/eps_input.inx \
|
|
|
|
|
--replace "location=\"path\">ps2pdf" "location=\"absolute\">${ghostscript}/bin/ps2pdf"
|
|
|
|
|
substituteInPlace share/extensions/ps_input.inx \
|
|
|
|
|
--replace "location=\"path\">ps2pdf" "location=\"absolute\">${ghostscript}/bin/ps2pdf"
|
|
|
|
|
substituteInPlace share/extensions/ps_input.py \
|
|
|
|
|
--replace "call('ps2pdf'" "call('${ghostscript}/bin/ps2pdf'"
|
2020-04-14 09:55:08 +01:00
|
|
|
|
patchShebangs share/templates
|
|
|
|
|
patchShebangs man/fix-roff-punct
|
2017-06-01 05:55:38 +01:00
|
|
|
|
'';
|
2008-02-22 16:24:58 +00:00
|
|
|
|
|
2020-04-13 21:05:03 +01:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pkg-config
|
|
|
|
|
cmake
|
2020-04-14 09:55:08 +01:00
|
|
|
|
ninja
|
2020-04-14 00:03:59 +01:00
|
|
|
|
python3Env
|
2020-04-14 09:55:08 +01:00
|
|
|
|
glib # for setup hook
|
|
|
|
|
gdk-pixbuf # for setup hook
|
2020-04-13 21:05:03 +01:00
|
|
|
|
wrapGAppsHook
|
|
|
|
|
] ++ (with perlPackages; [
|
|
|
|
|
perl
|
|
|
|
|
XMLParser
|
|
|
|
|
]);
|
2018-11-18 19:31:03 +00:00
|
|
|
|
|
2020-04-13 21:05:03 +01:00
|
|
|
|
buildInputs = [
|
|
|
|
|
boehmgc
|
|
|
|
|
boost
|
2020-04-14 09:55:08 +01:00
|
|
|
|
double-conversion
|
|
|
|
|
gdl
|
2020-04-13 21:05:03 +01:00
|
|
|
|
gettext
|
|
|
|
|
glib
|
2020-04-14 09:55:08 +01:00
|
|
|
|
glib-networking
|
2020-04-13 21:05:03 +01:00
|
|
|
|
glibmm
|
|
|
|
|
gsl
|
2020-04-14 09:55:08 +01:00
|
|
|
|
gtkmm3
|
2020-04-13 21:05:03 +01:00
|
|
|
|
imagemagick
|
|
|
|
|
lcms
|
|
|
|
|
libcdr
|
|
|
|
|
libexif
|
|
|
|
|
libpng
|
|
|
|
|
librevenge
|
2019-09-07 22:42:35 +01:00
|
|
|
|
librsvg # for loading icons
|
2020-04-13 21:05:03 +01:00
|
|
|
|
libsigcxx
|
2020-04-14 09:55:08 +01:00
|
|
|
|
libsoup
|
2020-04-13 21:05:03 +01:00
|
|
|
|
libvisio
|
|
|
|
|
libwpg
|
|
|
|
|
libXft
|
|
|
|
|
libxml2
|
|
|
|
|
libxslt
|
|
|
|
|
perlPackages.perl
|
|
|
|
|
poppler
|
|
|
|
|
popt
|
|
|
|
|
potrace
|
2020-04-14 00:03:59 +01:00
|
|
|
|
python3Env
|
2020-04-13 21:05:03 +01:00
|
|
|
|
zlib
|
2021-01-15 13:21:58 +00:00
|
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
2020-04-14 09:55:08 +01:00
|
|
|
|
gtkspell3
|
2021-01-15 13:21:58 +00:00
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-04-13 21:05:03 +01:00
|
|
|
|
cairo
|
2020-04-14 09:55:08 +01:00
|
|
|
|
gtk-mac-integration
|
2020-04-13 21:05:03 +01:00
|
|
|
|
];
|
2008-01-31 10:41:45 +00:00
|
|
|
|
|
2018-07-21 22:20:01 +01:00
|
|
|
|
# Make sure PyXML modules can be found at run-time.
|
2021-01-15 13:21:58 +00:00
|
|
|
|
postInstall = 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
|
|
|
|
'';
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2014-07-18 10:54:10 +01:00
|
|
|
|
description = "Vector graphics editor";
|
2020-04-14 00:11:51 +01:00
|
|
|
|
homepage = "https://www.inkscape.org";
|
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
|
maintainers = [ maintainers.jtojnar ];
|
2014-07-18 10:54:10 +01:00
|
|
|
|
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
|
|
|
|
}
|