git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #117500 from dotlambda/pytrainer-2.0.2

pytrainer: 2.0.1 -> 2.0.2

commitec2157bc327f1b8843f4020cafa8cefc8b99cf1f authorSandro <sandro.jaeckel@gmail.com> dateMon 12 Apr 2021, 16:52 (6 years ago) parent0c1d21de4e5669
2 files changed+41−56
pkgs/applications/misc/pytrainer/default.nix+41−45 pkgs/applications/misc/pytrainer/fix-paths.patch−11
pkgs/applications/misc/pytrainer/default.nix+41−45
@@ -1,81 +1,77 @@
11{ lib
2−, fetchFromGitHub
3−, perl
42, python3
5−, sqlite
6−, gpsbabel
3+, fetchFromGitHub
4+, gdk-pixbuf
75, gnome3
8−, gobject-introspection
9−, wrapGAppsHook
10−, gtk3
11−, xvfb_run
12−, webkitgtk
6+, gpsbabel
137, glib-networking
148, glibcLocales
9+, gobject-introspection
10+, gtk3
11+, perl
12+, sqlite
1513, tzdata
16−, substituteAll
14+, webkitgtk
15+, wrapGAppsHook
16+, xvfb_run
1717}:
1818
1919let
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+ });
2326 };
24−
25−in
26−
27−python3.pkgs.buildPythonApplication rec {
27+in python.pkgs.buildPythonApplication rec {
2828 pname = "pytrainer";
29− version = "2.0.1";
29+ version = "2.0.2";
3030
3131 src = fetchFromGitHub {
3232 owner = "pytrainer";
3333 repo = "pytrainer";
3434 rev = "v${version}";
35− sha256 = "0m2sy3f5pyc4wv1ns31r7vlafqkzp0a2jasaskwrkl6273agbbk9";
35+ sha256 = "sha256-i3QC6ct7tS8B0QQjtVqPcd03LLIxo6djQe4YX35syzk=";
3636 };
3737
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; [
5639 sqlalchemy_migrate
57− psycopg2
58− requests
59− certifi
40+ python-dateutil
41+ matplotlib
42+ lxml
6043 setuptools
44+ requests
45+ gdal
6146 ];
6247
6348 nativeBuildInputs = [
6449 gobject-introspection
6550 wrapGAppsHook
66− xvfb_run
6751 ];
6852
6953 buildInputs = [
70− gpsbabel
7154 sqlite
7255 gtk3
7356 webkitgtk
7457 glib-networking
75− glibcLocales
7658 gnome3.adwaita-icon-theme
59+ gdk-pixbuf
60+ ];
61+
62+ makeWrapperArgs = [
63+ "--prefix" "PATH" ":" (lib.makeBinPath [ perl gpsbabel ])
7764 ];
7865
66+ checkInputs = [
67+ glibcLocales
68+ perl
69+ xvfb_run
70+ ] ++ (with python.pkgs; [
71+ mysqlclient
72+ psycopg2
73+ ]);
74+
7975 checkPhase = ''
8076 env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \
8177 TZ=Europe/Kaliningrad \
@@ -85,9 +81,9 @@ python3.pkgs.buildPythonApplication rec {
8581 '';
8682
8783 meta = with lib; {
88− homepage = "https://github.com/pytrainer/pytrainer/wiki";
84+ homepage = "https://github.com/pytrainer/pytrainer";
8985 description = "Application for logging and graphing sporting excursions";
90− maintainers = [ maintainers.rycee ];
86+ maintainers = with maintainers; [ rycee dotlambda ];
9187 license = licenses.gpl2Plus;
9288 platforms = platforms.linux;
9389 };
pkgs/applications/misc/pytrainer/fix-paths.patchdeleted−11
@@ -1,11 +0,0 @@
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: