2021-01-15 22:18:51 +00:00
|
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, boehmgc
|
|
|
|
|
, boost
|
|
|
|
|
, cairo
|
|
|
|
|
, cmake
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, double-conversion
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, fetchurl
|
|
|
|
|
, gettext
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, gdl
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, glib
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, glib-networking
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, glibmm
|
|
|
|
|
, gsl
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, gtk-mac-integration
|
|
|
|
|
, gtkmm3
|
|
|
|
|
, gtkspell3
|
|
|
|
|
, gdk-pixbuf
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, imagemagick
|
|
|
|
|
, lcms
|
|
|
|
|
, libcdr
|
|
|
|
|
, libexif
|
|
|
|
|
, libpng
|
|
|
|
|
, librevenge
|
|
|
|
|
, librsvg
|
|
|
|
|
, libsigcxx
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, libsoup
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, libvisio
|
|
|
|
|
, libwpg
|
|
|
|
|
, libXft
|
|
|
|
|
, libxml2
|
|
|
|
|
, libxslt
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, perlPackages
|
|
|
|
|
, pkg-config
|
|
|
|
|
, poppler
|
|
|
|
|
, popt
|
|
|
|
|
, potrace
|
|
|
|
|
, python3
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, wrapGAppsHook
|
|
|
|
|
, zlib
|
|
|
|
|
}:
|
|
|
|
|
let
|
|
|
|
|
python3Env = python3.withPackages
|
|
|
|
|
(ps: with ps; [
|
|
|
|
|
numpy
|
|
|
|
|
lxml
|
|
|
|
|
scour
|
|
|
|
|
]);
|
|
|
|
|
in
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "inkscape";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
version = "1.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-08-20 17:08:02 +00:00
|
|
|
|
url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.xz";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
sha256 = "sha256-2j4jBRGgjL8h6GcQ0WFFhZT+qHhn6RV7Z+0BoE6ieYo=";
|
2020-04-24 23:36:52 +00: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-08-20 17:08:02 +00: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";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
patchShebangs share/extensions
|
2020-08-20 17:08:02 +00:00
|
|
|
|
patchShebangs share/templates
|
|
|
|
|
patchShebangs man/fix-roff-punct
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pkg-config
|
|
|
|
|
cmake
|
2020-08-20 17:08:02 +00:00
|
|
|
|
ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
|
python3Env
|
2020-08-20 17:08:02 +00:00
|
|
|
|
glib # for setup hook
|
|
|
|
|
gdk-pixbuf # for setup hook
|
2020-04-24 23:36:52 +00:00
|
|
|
|
wrapGAppsHook
|
|
|
|
|
] ++ (with perlPackages; [
|
|
|
|
|
perl
|
|
|
|
|
XMLParser
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
boehmgc
|
|
|
|
|
boost
|
2020-08-20 17:08:02 +00:00
|
|
|
|
double-conversion
|
|
|
|
|
gdl
|
2020-04-24 23:36:52 +00:00
|
|
|
|
gettext
|
|
|
|
|
glib
|
2020-08-20 17:08:02 +00:00
|
|
|
|
glib-networking
|
2020-04-24 23:36:52 +00:00
|
|
|
|
glibmm
|
|
|
|
|
gsl
|
2020-08-20 17:08:02 +00:00
|
|
|
|
gtkmm3
|
2020-04-24 23:36:52 +00:00
|
|
|
|
imagemagick
|
|
|
|
|
lcms
|
|
|
|
|
libcdr
|
|
|
|
|
libexif
|
|
|
|
|
libpng
|
|
|
|
|
librevenge
|
|
|
|
|
librsvg # for loading icons
|
|
|
|
|
libsigcxx
|
2020-08-20 17:08:02 +00:00
|
|
|
|
libsoup
|
2020-04-24 23:36:52 +00:00
|
|
|
|
libvisio
|
|
|
|
|
libwpg
|
|
|
|
|
libXft
|
|
|
|
|
libxml2
|
|
|
|
|
libxslt
|
|
|
|
|
perlPackages.perl
|
|
|
|
|
poppler
|
|
|
|
|
popt
|
|
|
|
|
potrace
|
|
|
|
|
python3Env
|
|
|
|
|
zlib
|
2021-01-17 00:15:33 +00:00
|
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
2020-08-20 17:08:02 +00:00
|
|
|
|
gtkspell3
|
2021-01-17 00:15:33 +00:00
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
|
cairo
|
2020-08-20 17:08:02 +00:00
|
|
|
|
gtk-mac-integration
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Make sure PyXML modules can be found at run-time.
|
2021-01-17 00:15:33 +00:00
|
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00: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
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "Vector graphics editor";
|
|
|
|
|
homepage = "https://www.inkscape.org";
|
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
|
maintainers = [ maintainers.jtojnar ];
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Inkscape is a feature-rich vector graphics editor that edits
|
|
|
|
|
files in the W3C SVG (Scalable Vector Graphics) file format.
|
|
|
|
|
|
|
|
|
|
If you want to import .eps files install ps2edit.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
}
|