From 20ea3d87e4605cb9ecffa947cc2fd5b683ab9cfd Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 12 Aug 2023 10:02:59 +0200 Subject: [PATCH] pytrainer: 2.1.0 -> 2.2.1 The new version supports SQLAlchemy version >2 allowing us to remove the custom version. --- pkgs/applications/misc/pytrainer/default.nix | 29 ++++++++------------ 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pkgs/applications/misc/pytrainer/default.nix b/pkgs/applications/misc/pytrainer/default.nix index 28969a777e94..22ee11082f15 100644 --- a/pkgs/applications/misc/pytrainer/default.nix +++ b/pkgs/applications/misc/pytrainer/default.nix @@ -23,33 +23,21 @@ let matplotlib = super.matplotlib.override { enableGtk3 = true; }; - sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec { - version = "1.4.46"; - src = fetchPypi { - pname = "SQLAlchemy"; - inherit version; - hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA="; - }; - disabledTestPaths = [ - "test/aaa_profiling" - "test/ext/mypy" - ]; - }); }); }; in python.pkgs.buildPythonApplication rec { pname = "pytrainer"; - version = "2.1.0"; + version = "2.2.1"; src = fetchFromGitHub { owner = "pytrainer"; repo = "pytrainer"; rev = "v${version}"; - sha256 = "sha256-U2SVQKkr5HF7LB0WuCZ1xc7TljISjCNO26QUDGR+W/4="; + hash = "sha256-t61vHVTKN5KsjrgbhzljB7UZdRask7qfYISd+++QbV0="; }; propagatedBuildInputs = with python.pkgs; [ - sqlalchemy-migrate + sqlalchemy python-dateutil matplotlib lxml @@ -85,10 +73,17 @@ in python.pkgs.buildPythonApplication rec { psycopg2 ]); + postPatch = '' + substituteInPlace pytrainer/platform.py \ + --replace 'sys.prefix' "\"$out\"" + ''; + checkPhase = '' - env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \ + env \ + HOME=$TEMPDIR \ + TZDIR=${tzdata}/share/zoneinfo \ TZ=Europe/Kaliningrad \ - LC_ALL=en_US.UTF-8 \ + LC_TIME=C \ xvfb-run -s '-screen 0 800x600x24' \ ${python.interpreter} setup.py test '';