Merge pull request #245431 from leiserfg/staging

inkscape: 1.2.2 -> 1.3, lib2geom: 1.2.2 -> 1.3
This commit is contained in:
Weijia Wang
2023-11-06 14:26:52 +01:00
committed by GitHub
3 changed files with 54 additions and 30 deletions
@@ -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; {
@@ -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";
@@ -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";