diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index d80b7e8202619..566b92eda2d04 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -7,7 +7,7 @@ , cmake , desktopToDarwinBundle , fetchurl -, fetchpatch +, fd , gettext , ghostscript , glib @@ -27,7 +27,6 @@ , librevenge , librsvg , libsigcxx -, libsoup_2_4 , libvisio , libwpg , libXft @@ -40,40 +39,43 @@ , popt , potrace , python3 +, runCommand , substituteAll , wrapGAppsHook3 , libepoxy , zlib +, yq }: let python3Env = python3.withPackages (ps: with ps; [ + # List taken almost verbatim from the output of nix-build -A inkscape.passthru.pythonDependencies appdirs beautifulsoup4 cachecontrol - ] - # CacheControl requires extra runtime dependencies for FileCache - # https://gitlab.com/inkscape/extras/extension-manager/-/commit/9a4acde6c1c028725187ff5972e29e0dbfa99b06 - ++ cachecontrol.optional-dependencies.filecache - ++ [ - numpy + cssselect + filelock + inkex lxml + numpy packaging pillow - scour + pygobject3 pyparsing pyserial requests - pygobject3 - ] ++ inkex.propagatedBuildInputs); + scour + tinycss2 + zstandard + ]); in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "inkscape"; - version = "1.3.2"; + version = "1.4"; src = fetchurl { - url = "https://inkscape.org/release/inkscape-${version}/source/archive/xz/dl/inkscape-${version}.tar.xz"; - sha256 = "sha256-29GETcRD/l4Q0+mohxROX7ciOFL/8ZHPte963qsOCGs="; + url = "https://inkscape.org/release/inkscape-${finalAttrs.version}/source/archive/xz/dl/inkscape-${finalAttrs.version}.tar.xz"; + sha256 = "sha256-xZqFRTtpmt3rzVHB3AdoTdlqEMiuxxaxlVHbUFYuE/U="; }; # Inkscape hits the ARGMAX when linking on macOS. It appears to be @@ -87,29 +89,13 @@ stdenv.mkDerivation rec { 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"; + python3 = lib.getExe python3Env; }) (substituteAll { # Fix path to ps2pdf binary src = ./fix-ps2pdf-path.patch; inherit ghostscript; }) - - # Fix build with libxml2 2.12 - # https://gitlab.com/inkscape/inkscape/-/merge_requests/6089 - (fetchpatch { - url = "https://gitlab.com/inkscape/inkscape/-/commit/694d8ae43d06efff21adebf377ce614d660b24cd.patch"; - hash = "sha256-9IXJzpZbNU5fnt7XKgqCzUDrwr08qxGwo8TqnL+xc6E="; - }) - - # Improve distribute along path precision - # https://gitlab.com/inkscape/extensions/-/issues/580 - (fetchpatch { - url = "https://gitlab.com/inkscape/extensions/-/commit/c576043c195cd044bdfc975e6367afb9b655eb14.patch"; - extraPrefix = "share/extensions/"; - stripLen = 1; - hash = "sha256-D9HxBx8RNkD7hHuExJqdu3oqlrXX6IOUw9m9Gx6+Dr8="; - }) ]; postPatch = '' @@ -119,7 +105,7 @@ stdenv.mkDerivation rec { # double-conversion is a dependency of 2geom substituteInPlace CMakeScripts/DefineDependsandFlags.cmake \ - --replace 'find_package(DoubleConversion REQUIRED)' "" + --replace-fail 'find_package(DoubleConversion REQUIRED)' "" ''; nativeBuildInputs = [ @@ -155,7 +141,6 @@ stdenv.mkDerivation rec { librevenge librsvg # for loading icons libsigcxx - libsoup_2_4 libvisio libwpg libXft @@ -182,14 +167,34 @@ stdenv.mkDerivation rec { done ''; - passthru.tests.ps2pdf-plugin = callPackage ./test-ps2pdf-plugin.nix { }; + passthru = { + tests = { + ps2pdf-plugin = callPackage ./test-ps2pdf-plugin.nix { }; + inherit (python3.pkgs) inkex; + }; + + pythonDependencies = runCommand "python-dependency-list" { + nativeBuildInputs = [ + fd + yq + ]; + inherit (finalAttrs) src; + } '' + unpackPhase + tomlq --slurp 'map(.tool.poetry.dependencies | to_entries | map(.key)) | flatten | map(ascii_downcase) | unique' $(fd pyproject.toml) > "$out" + ''; + }; - meta = with lib; { + meta = { description = "Vector graphics editor"; homepage = "https://www.inkscape.org"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.jtojnar ]; - platforms = platforms.all; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ + jtojnar + x123 + Luflosi + ]; + platforms = lib.platforms.all; mainProgram = "inkscape"; longDescription = '' Inkscape is a feature-rich vector graphics editor that edits @@ -198,4 +203,4 @@ stdenv.mkDerivation rec { If you want to import .eps files install ps2edit. ''; }; -} +}) diff --git a/pkgs/development/libraries/lib2geom/default.nix b/pkgs/by-name/li/lib2geom/package.nix similarity index 58% rename from pkgs/development/libraries/lib2geom/default.nix rename to pkgs/by-name/li/lib2geom/package.nix index 9548ee49408a5..13e9219537fab 100644 --- a/pkgs/development/libraries/lib2geom/default.nix +++ b/pkgs/by-name/li/lib2geom/package.nix @@ -1,6 +1,5 @@ { stdenv, - fetchpatch, fetchFromGitLab, cmake, ninja, @@ -16,7 +15,7 @@ stdenv.mkDerivation rec { pname = "lib2geom"; - version = "1.3"; + version = "1.4"; outputs = [ "out" @@ -27,33 +26,9 @@ stdenv.mkDerivation rec { owner = "inkscape"; repo = "lib2geom"; rev = "refs/tags/${version}"; - hash = "sha256-llUpW8VRBD8RKaGfyedzsMbLRb8DIo0ePt6m2T2w7Po="; + hash = "sha256-kbcnefzNhUj/ZKZaB9r19bpI68vxUKOLVAwUXSr/zz0="; }; - patches = [ - # Fix compilation with Clang. - # https://gitlab.com/inkscape/lib2geom/-/merge_requests/102 - (fetchpatch { - url = "https://gitlab.com/inkscape/lib2geom/-/commit/a5b5ac7d992023f8a80535ede60421e73ecd8e20.patch"; - hash = "sha256-WJYkk3WRYVyPSvyTbKDUrYvUwFgKA9mmTiEWtYQqM4Q="; - }) - (fetchpatch { - url = "https://gitlab.com/inkscape/lib2geom/-/commit/23d9393af4bee17aeb66a3c13bdad5dbed982d08.patch"; - hash = "sha256-LAaGMIXpDI/Wzv5E2LasW1Y2/G4ukhuEzDmFu3AzZOA="; - }) - - # Fix ellipses rendering near page corners. - # https://gitlab.com/inkscape/lib2geom/-/issues/66 - (fetchpatch { - url = "https://gitlab.com/inkscape/lib2geom/-/commit/039ce8d4af23a0a2a9d48eb970b321d9795dcc08.patch"; - hash = "sha256-JfgGrqBcYSYKcdl4Bt7vGZ4aTBPSHM6JjZ95IlzxPwI="; - }) - (fetchpatch { - url = "https://gitlab.com/inkscape/lib2geom/-/commit/cf523857e48c87f9f6a09217bdf935fff457823d.patch"; - hash = "sha256-BRg8ANHMSgoi6vt9PNbhwG1fRkzEPXb4gPTPO3sY0XE="; - }) - ]; - nativeBuildInputs = [ cmake ninja @@ -91,6 +66,17 @@ stdenv.mkDerivation rec { # Fails due to rounding differences # https://gitlab.com/inkscape/lib2geom/-/issues/70 "circle-test" + ] + ++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [ + # https://gitlab.com/inkscape/lib2geom/-/issues/69 + "polynomial-test" + + # https://gitlab.com/inkscape/lib2geom/-/issues/75 + "line-test" + + # Failure observed on aarch64-darwin + "bezier-test" + "ellipse-test" ]; in '' diff --git a/pkgs/development/python-modules/inkex/default.nix b/pkgs/development/python-modules/inkex/default.nix index 2435c7e467868..c3c65ae3184fa 100644 --- a/pkgs/development/python-modules/inkex/default.nix +++ b/pkgs/development/python-modules/inkex/default.nix @@ -3,7 +3,6 @@ stdenv, buildPythonPackage, inkscape, - fetchpatch, poetry-core, cssselect, lxml, @@ -14,6 +13,7 @@ pyparsing, pyserial, scour, + tinycss2, gobject-introspection, pytestCheckHook, gtk3, @@ -27,17 +27,6 @@ buildPythonPackage { inherit (inkscape) src; - patches = [ - # Fix “distribute along path” test with Python 3.12. - # https://gitlab.com/inkscape/extensions/-/issues/580 - (fetchpatch { - url = "https://gitlab.com/inkscape/extensions/-/commit/c576043c195cd044bdfc975e6367afb9b655eb14.patch"; - extraPrefix = "share/extensions/"; - stripLen = 1; - hash = "sha256-D9HxBx8RNkD7hHuExJqdu3oqlrXX6IOUw9m9Gx6+Dr8="; - }) - ]; - nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ @@ -46,6 +35,7 @@ buildPythonPackage { numpy pygobject3 pyserial + tinycss2 ]; pythonImportsCheck = [ "inkex" ]; @@ -87,8 +77,7 @@ buildPythonPackage { cd share/extensions substituteInPlace pyproject.toml \ - --replace-fail 'scour = "^0.37"' 'scour = ">=0.37"' \ - --replace-fail 'lxml = "^4.5.0"' 'lxml = "^4.5.0 || ^5.0.0"' + --replace-fail 'scour = "^0.37"' 'scour = ">=0.37"' ''; meta = { diff --git a/pkgs/development/python-modules/svg2tikz/default.nix b/pkgs/development/python-modules/svg2tikz/default.nix index d079222d53ad4..5ef700eadc174 100644 --- a/pkgs/development/python-modules/svg2tikz/default.nix +++ b/pkgs/development/python-modules/svg2tikz/default.nix @@ -50,5 +50,6 @@ buildPythonPackage rec { dotlambda gal_bolle ]; + broken = true; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd4aedf998d0b..b7ac997840089 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9628,10 +9628,6 @@ with pkgs; lcms = lcms2; - lib2geom = callPackage ../development/libraries/lib2geom { - stdenv = if stdenv.cc.isClang then llvmPackages_13.stdenv else stdenv; - }; - libacr38u = callPackage ../tools/security/libacr38u { inherit (darwin.apple_sdk.frameworks) IOKit; };