Merge pull request #117500 from dotlambda/pytrainer-2.0.2

pytrainer: 2.0.1 -> 2.0.2

authored by

Sandro and committed by
GitHub
ec2157bc 0c1d21df

+41 -56
+41 -45
pkgs/applications/misc/pytrainer/default.nix
··· 1 1 { lib 2 - , fetchFromGitHub 3 - , perl 4 2 , python3 5 - , sqlite 6 - , gpsbabel 3 + , fetchFromGitHub 4 + , gdk-pixbuf 7 5 , gnome3 8 - , gobject-introspection 9 - , wrapGAppsHook 10 - , gtk3 11 - , xvfb_run 12 - , webkitgtk 6 + , gpsbabel 13 7 , glib-networking 14 8 , glibcLocales 9 + , gobject-introspection 10 + , gtk3 11 + , perl 12 + , sqlite 15 13 , tzdata 16 - , substituteAll 14 + , webkitgtk 15 + , wrapGAppsHook 16 + , xvfb_run 17 17 }: 18 18 19 19 let 20 - # Pytrainer needs a matplotlib with GTK backend. 21 - matplotlibGtk = python3.pkgs.matplotlib.override { 22 - enableGtk3 = true; 20 + python = python3.override { 21 + packageOverrides = (self: super: { 22 + matplotlib = super.matplotlib.override { 23 + enableGtk3 = true; 24 + }; 25 + }); 23 26 }; 24 - 25 - in 26 - 27 - python3.pkgs.buildPythonApplication rec { 27 + in python.pkgs.buildPythonApplication rec { 28 28 pname = "pytrainer"; 29 - version = "2.0.1"; 29 + version = "2.0.2"; 30 30 31 31 src = fetchFromGitHub { 32 32 owner = "pytrainer"; 33 33 repo = "pytrainer"; 34 34 rev = "v${version}"; 35 - sha256 = "0m2sy3f5pyc4wv1ns31r7vlafqkzp0a2jasaskwrkl6273agbbk9"; 35 + sha256 = "sha256-i3QC6ct7tS8B0QQjtVqPcd03LLIxo6djQe4YX35syzk="; 36 36 }; 37 37 38 - patches = [ 39 - (substituteAll { 40 - src = ./fix-paths.patch; 41 - perl = "${perl}/bin/perl"; 42 - }) 43 - ]; 44 - 45 - postPatch = '' 46 - substituteInPlace ./setup.py \ 47 - --replace "'mysqlclient'," "" 48 - ''; 49 - 50 - propagatedBuildInputs = with python3.pkgs; [ 51 - dateutil 52 - lxml 53 - matplotlibGtk 54 - pygobject3 55 - sqlalchemy 38 + propagatedBuildInputs = with python.pkgs; [ 56 39 sqlalchemy_migrate 57 - psycopg2 40 + python-dateutil 41 + matplotlib 42 + lxml 43 + setuptools 58 44 requests 59 - certifi 60 - setuptools 45 + gdal 61 46 ]; 62 47 63 48 nativeBuildInputs = [ 64 49 gobject-introspection 65 50 wrapGAppsHook 66 - xvfb_run 67 51 ]; 68 52 69 53 buildInputs = [ 70 - gpsbabel 71 54 sqlite 72 55 gtk3 73 56 webkitgtk 74 57 glib-networking 75 - glibcLocales 76 58 gnome3.adwaita-icon-theme 59 + gdk-pixbuf 77 60 ]; 78 61 62 + makeWrapperArgs = [ 63 + "--prefix" "PATH" ":" (lib.makeBinPath [ perl gpsbabel ]) 64 + ]; 65 + 66 + checkInputs = [ 67 + glibcLocales 68 + perl 69 + xvfb_run 70 + ] ++ (with python.pkgs; [ 71 + mysqlclient 72 + psycopg2 73 + ]); 74 + 79 75 checkPhase = '' 80 76 env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \ 81 77 TZ=Europe/Kaliningrad \ ··· 85 81 ''; 86 82 87 83 meta = with lib; { 88 - homepage = "https://github.com/pytrainer/pytrainer/wiki"; 84 + homepage = "https://github.com/pytrainer/pytrainer"; 89 85 description = "Application for logging and graphing sporting excursions"; 90 - maintainers = [ maintainers.rycee ]; 86 + maintainers = with maintainers; [ rycee dotlambda ]; 91 87 license = licenses.gpl2Plus; 92 88 platforms = platforms.linux; 93 89 };
-11
pkgs/applications/misc/pytrainer/fix-paths.patch
··· 1 - --- a/imports/file_garminfit.py 2 - +++ b/imports/file_garminfit.py 3 - @@ -81,7 +81,7 @@ 4 - logging.debug(">>") 5 - result = False 6 - try: 7 - - result = subprocess.check_output(["perl", 8 - + result = subprocess.check_output(["@perl@", 9 - self.main_data_path+"plugins/garmin-fit/bin/fit2tcx", 10 - filename]) 11 - except subprocess.CalledProcessError: