7 , desktopToDarwinBundle
14 , gobject-introspection
48 python3Env = python3.withPackages
54 # CacheControl requires extra runtime dependencies for FileCache
55 # https://gitlab.com/inkscape/extras/extension-manager/-/commit/9a4acde6c1c028725187ff5972e29e0dbfa99b06
56 ++ cachecontrol.optional-dependencies.filecache
67 ] ++ inkex.propagatedBuildInputs);
69 stdenv.mkDerivation rec {
74 url = "https://inkscape.org/release/inkscape-${version}/source/archive/xz/dl/inkscape-${version}.tar.xz";
75 sha256 = "sha256-29GETcRD/l4Q0+mohxROX7ciOFL/8ZHPte963qsOCGs=";
78 # Inkscape hits the ARGMAX when linking on macOS. It appears to be
79 # CMake’s ARGMAX check doesn’t offer enough padding for NIX_LDFLAGS.
80 # Setting strictDeps it avoids duplicating some dependencies so it
81 # will leave us under ARGMAX.
86 src = ./fix-python-paths.patch;
87 # Python is used at run-time to execute scripts,
88 # e.g., those from the "Effects" menu.
89 python3 = "${python3Env}/bin/python";
92 # Fix path to ps2pdf binary
93 src = ./fix-ps2pdf-path.patch;
97 # Fix build with libxml2 2.12
98 # https://gitlab.com/inkscape/inkscape/-/merge_requests/6089
100 url = "https://gitlab.com/inkscape/inkscape/-/commit/694d8ae43d06efff21adebf377ce614d660b24cd.patch";
101 hash = "sha256-9IXJzpZbNU5fnt7XKgqCzUDrwr08qxGwo8TqnL+xc6E=";
106 patchShebangs share/extensions
107 patchShebangs share/templates
108 patchShebangs man/fix-roff-punct
110 # double-conversion is a dependency of 2geom
111 substituteInPlace CMakeScripts/DefineDependsandFlags.cmake \
112 --replace 'find_package(DoubleConversion REQUIRED)' ""
115 nativeBuildInputs = [
120 glib # for setup hook
121 gdk-pixbuf # for setup hook
123 gobject-introspection
124 ] ++ (with perlPackages; [
127 ]) ++ lib.optionals stdenv.isDarwin [
128 desktopToDarwinBundle
146 librsvg # for loading icons
161 ] ++ lib.optionals (!stdenv.isDarwin) [
163 ] ++ lib.optionals stdenv.isDarwin [
168 # Make sure PyXML modules can be found at run-time.
169 postInstall = lib.optionalString stdenv.isDarwin ''
170 for f in $out/lib/inkscape/*.dylib; do
171 ln -s $f $out/lib/$(basename $f)
176 description = "Vector graphics editor";
177 homepage = "https://www.inkscape.org";
178 license = licenses.gpl3Plus;
179 maintainers = [ maintainers.jtojnar ];
180 platforms = platforms.all;
181 mainProgram = "inkscape";
183 Inkscape is a feature-rich vector graphics editor that edits
184 files in the W3C SVG (Scalable Vector Graphics) file format.
186 If you want to import .eps files install ps2edit.