about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-11-06 14:26:52 +0100
committerGitHub <noreply@github.com>2023-11-06 14:26:52 +0100
commit250c07f960eaefd781df539ee0d877b13da17b97 (patch)
treea168dcdb4c81fdbcd800e9a9ca93f61bc21ca4d4 /pkgs
parent8ab2f09522d5aefabf1100b3f59a3bde628cb2b4 (diff)
parentc5b219ec902db9fd069f7f0d6ac7dd864d5d9c47 (diff)
Merge pull request #245431 from leiserfg/staging
inkscape: 1.2.2 -> 1.3, lib2geom: 1.2.2 -> 1.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix20
-rw-r--r--pkgs/development/libraries/lib2geom/default.nix31
-rw-r--r--pkgs/development/python-modules/inkex/default.nix33
3 files changed, 54 insertions, 30 deletions
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 575f93efcb270..85b067d9fb292 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -40,6 +40,7 @@
 , python3
 , substituteAll
 , wrapGAppsHook
+, libepoxy
 , zlib
 }:
 let
@@ -48,12 +49,17 @@ let
       appdirs
       beautifulsoup4
       cachecontrol
-      filelock
+    ]
+    # CacheControl requires extra runtime dependencies for FileCache
+    # https://gitlab.com/inkscape/extras/extension-manager/-/commit/9a4acde6c1c028725187ff5972e29e0dbfa99b06
+    ++ cachecontrol.optional-dependencies.filecache
+    ++ [
       numpy
       lxml
       packaging
       pillow
       scour
+      pyparsing
       pyserial
       requests
       pygobject3
@@ -61,11 +67,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "inkscape";
-  version = "1.2.2";
+  version = "1.3";
 
   src = fetchurl {
-    url = "https://media.inkscape.org/dl/resources/file/inkscape-${version}.tar.xz";
-    sha256 = "oMf9DQPAohU15kjvMB3PgN18/B81ReUQZfvxuj7opcQ=";
+    url = "https://inkscape.org/release/inkscape-${version}/source/archive/xz/dl/inkscape-${version}.tar.xz";
+    sha256 = "sha256-v08oawJeAWm4lIzBTVGZqbTCBNdhyJTEtISWVx7HYwc=";
   };
 
   # Inkscape hits the ARGMAX when linking on macOS. It appears to be
@@ -143,6 +149,7 @@ stdenv.mkDerivation rec {
     potrace
     python3Env
     zlib
+    libepoxy
   ] ++ lib.optionals (!stdenv.isDarwin) [
     gspell
   ] ++ lib.optionals stdenv.isDarwin [
@@ -152,8 +159,9 @@ stdenv.mkDerivation rec {
 
   # Make sure PyXML modules can be found at run-time.
   postInstall = lib.optionalString stdenv.isDarwin ''
-    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
+    for f in $out/lib/inkscape/*.dylib; do
+      ln -s $f $out/lib/$(basename $f)
+    done
   '';
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/lib2geom/default.nix b/pkgs/development/libraries/lib2geom/default.nix
index 2b99c7bdaf12e..0c97f116a0bf4 100644
--- a/pkgs/development/libraries/lib2geom/default.nix
+++ b/pkgs/development/libraries/lib2geom/default.nix
@@ -15,7 +15,7 @@
 
 stdenv.mkDerivation rec {
   pname = "lib2geom";
-  version = "1.2.2";
+  version = "1.3";
 
   outputs = [ "out" "dev" ];
 
@@ -23,16 +23,19 @@ stdenv.mkDerivation rec {
     owner = "inkscape";
     repo = "lib2geom";
     rev = "refs/tags/${version}";
-    sha256 = "sha256-xkUxcAk8KJkL482R7pvgmCT+5I8aUMm/q25pvK3ZPuY=";
+    hash = "sha256-llUpW8VRBD8RKaGfyedzsMbLRb8DIo0ePt6m2T2w7Po=";
   };
 
   patches = [
-    # Fixed upstream, remove when the new version releases:
-    # https://gitlab.com/inkscape/lib2geom/-/issues/49
+    # Fix compilation with Clang.
+    # https://gitlab.com/inkscape/lib2geom/-/merge_requests/102
     (fetchpatch {
-      name = "expect-double-eq-in-choose-test.patch";
-      url = "https://gitlab.com/inkscape/lib2geom/-/commit/5b7c75dd3841cb415f163f0a81f556c57d3e0a83.patch";
-      sha256 = "RMgwJkylrGFTTrqBzqs5j2LMSLsHhcE/UT1pKBZnU50=";
+      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=";
     })
   ];
 
@@ -60,6 +63,20 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
+  # TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829
+  checkPhase = let
+    disabledTests =
+      lib.optionals stdenv.isAarch64 [
+        # Broken on all platforms, test just accidentally passes on some.
+        # https://gitlab.com/inkscape/lib2geom/-/issues/63
+        "elliptical-arc-test"
+      ];
+  in ''
+    runHook preCheck
+    ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
+    runHook postCheck
+  '';
+
   meta = with lib; {
     description = "Easy to use 2D geometry library in C++";
     homepage = "https://gitlab.com/inkscape/lib2geom";
diff --git a/pkgs/development/python-modules/inkex/default.nix b/pkgs/development/python-modules/inkex/default.nix
index 4cc96646bc0bf..4d04618ec3e6b 100644
--- a/pkgs/development/python-modules/inkex/default.nix
+++ b/pkgs/development/python-modules/inkex/default.nix
@@ -1,5 +1,6 @@
 { lib
 , buildPythonPackage
+, inkscape
 , fetchFromGitLab
 , poetry-core
 , cssselect
@@ -8,6 +9,7 @@
 , packaging
 , pillow
 , pygobject3
+, pyparsing
 , pyserial
 , scour
 , gobject-introspection
@@ -15,24 +17,13 @@
 , gtk3
 }:
 
-buildPythonPackage rec {
+buildPythonPackage {
   pname = "inkex";
-  version = "1.2.2";
+  inherit (inkscape) version;
 
   format = "pyproject";
 
-  src = fetchFromGitLab {
-    owner = "inkscape";
-    repo = "extensions";
-    rev = "EXTENSIONS_AT_INKSCAPE_${version}";
-    hash = "sha256-jw7daZQTBxLHWOpjZkMYtP1vIQvd/eLgiktWqVSjEgU=";
-  };
-
-  postPatch = ''
-    substituteInPlace pyproject.toml \
-      --replace '"1.2.0"' '"${version}"' \
-      --replace 'scour = "^0.37"' 'scour = ">=0.37"'
-  '';
+  inherit (inkscape) src;
 
   nativeBuildInputs = [
     poetry-core
@@ -42,11 +33,8 @@ buildPythonPackage rec {
     cssselect
     lxml
     numpy
-    packaging
-    pillow
     pygobject3
     pyserial
-    scour
   ];
 
   pythonImportsCheck = [ "inkex" ];
@@ -58,6 +46,10 @@ buildPythonPackage rec {
 
   checkInputs = [
     gtk3
+    packaging
+    pillow
+    pyparsing
+    scour
   ];
 
   disabledTests = [
@@ -74,6 +66,13 @@ buildPythonPackage rec {
     "tests/test_inkex_gui_pixmaps.py"
   ];
 
+  postPatch = ''
+    cd share/extensions
+
+    substituteInPlace pyproject.toml \
+      --replace 'scour = "^0.37"' 'scour = ">=0.37"'
+  '';
+
   meta = {
     description = "Library for manipulating SVG documents which is the basis for Inkscape extensions";
     homepage = "https://gitlab.com/inkscape/extensions";