pytrainer: unbreak (#454710)

This commit is contained in:
Jan Tojnar
2025-10-25 13:03:22 +00:00
committed by GitHub
+15 -6
View File
@@ -2,6 +2,7 @@
lib,
python3,
fetchFromGitHub,
fetchpatch,
gdk-pixbuf,
adwaita-icon-theme,
gpsbabel,
@@ -41,6 +42,20 @@ python.pkgs.buildPythonApplication rec {
hash = "sha256-t61vHVTKN5KsjrgbhzljB7UZdRask7qfYISd+++QbV0=";
};
patches = [
# Fix startup crash with SQLAlchemy 2.0
(fetchpatch {
url = "https://github.com/pytrainer/pytrainer/commit/9847c76e61945466775bde038057bf5fd31ae089.patch";
hash = "sha256-cGNu4lK0eQWzcSFTKc8g/qHSSHfy0ow4T3eT+zl5lPM=";
})
# Port to webkigtk 4.1
(fetchpatch {
url = "https://github.com/pytrainer/pytrainer/commit/eda968a8b48074f03efbdfbd692b46edef3658cd.patch";
hash = "sha256-MdxsKO6DgncHhGlJWcEeyYiPKf3qdhMqXrYYC+jqros=";
})
];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python.pkgs; [
@@ -89,10 +104,6 @@ python.pkgs.buildPythonApplication rec {
postPatch = ''
substituteInPlace pytrainer/platform.py \
--replace-fail 'sys.prefix' "\"$out\""
# https://github.com/pytrainer/pytrainer/pull/281
substituteInPlace pytrainer/extensions/mapviewer.py \
--replace-fail "gi.require_version('WebKit2', '4.0')" "gi.require_version('WebKit2', '4.1')"
'';
checkPhase = ''
@@ -106,8 +117,6 @@ python.pkgs.buildPythonApplication rec {
'';
meta = with lib; {
# https://github.com/pytrainer/pytrainer/issues/280
broken = true;
homepage = "https://github.com/pytrainer/pytrainer";
description = "Application for logging and graphing sporting excursions";
mainProgram = "pytrainer";