Merge pull request #117500 from dotlambda/pytrainer-2.0.2
pytrainer: 2.0.1 -> 2.0.2
This commit is contained in:
commit
ec2157bc32
|
@ -1,81 +1,77 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
|
||||||
, perl
|
|
||||||
, python3
|
, python3
|
||||||
, sqlite
|
, fetchFromGitHub
|
||||||
, gpsbabel
|
, gdk-pixbuf
|
||||||
, gnome3
|
, gnome3
|
||||||
, gobject-introspection
|
, gpsbabel
|
||||||
, wrapGAppsHook
|
|
||||||
, gtk3
|
|
||||||
, xvfb_run
|
|
||||||
, webkitgtk
|
|
||||||
, glib-networking
|
, glib-networking
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
|
, gobject-introspection
|
||||||
|
, gtk3
|
||||||
|
, perl
|
||||||
|
, sqlite
|
||||||
, tzdata
|
, tzdata
|
||||||
, substituteAll
|
, webkitgtk
|
||||||
|
, wrapGAppsHook
|
||||||
|
, xvfb_run
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Pytrainer needs a matplotlib with GTK backend.
|
python = python3.override {
|
||||||
matplotlibGtk = python3.pkgs.matplotlib.override {
|
packageOverrides = (self: super: {
|
||||||
enableGtk3 = true;
|
matplotlib = super.matplotlib.override {
|
||||||
|
enableGtk3 = true;
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
in python.pkgs.buildPythonApplication rec {
|
||||||
in
|
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
|
||||||
pname = "pytrainer";
|
pname = "pytrainer";
|
||||||
version = "2.0.1";
|
version = "2.0.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pytrainer";
|
owner = "pytrainer";
|
||||||
repo = "pytrainer";
|
repo = "pytrainer";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0m2sy3f5pyc4wv1ns31r7vlafqkzp0a2jasaskwrkl6273agbbk9";
|
sha256 = "sha256-i3QC6ct7tS8B0QQjtVqPcd03LLIxo6djQe4YX35syzk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
propagatedBuildInputs = with python.pkgs; [
|
||||||
(substituteAll {
|
|
||||||
src = ./fix-paths.patch;
|
|
||||||
perl = "${perl}/bin/perl";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace ./setup.py \
|
|
||||||
--replace "'mysqlclient'," ""
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
|
||||||
dateutil
|
|
||||||
lxml
|
|
||||||
matplotlibGtk
|
|
||||||
pygobject3
|
|
||||||
sqlalchemy
|
|
||||||
sqlalchemy_migrate
|
sqlalchemy_migrate
|
||||||
psycopg2
|
python-dateutil
|
||||||
requests
|
matplotlib
|
||||||
certifi
|
lxml
|
||||||
setuptools
|
setuptools
|
||||||
|
requests
|
||||||
|
gdal
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
xvfb_run
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gpsbabel
|
|
||||||
sqlite
|
sqlite
|
||||||
gtk3
|
gtk3
|
||||||
webkitgtk
|
webkitgtk
|
||||||
glib-networking
|
glib-networking
|
||||||
glibcLocales
|
|
||||||
gnome3.adwaita-icon-theme
|
gnome3.adwaita-icon-theme
|
||||||
|
gdk-pixbuf
|
||||||
];
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"--prefix" "PATH" ":" (lib.makeBinPath [ perl gpsbabel ])
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
glibcLocales
|
||||||
|
perl
|
||||||
|
xvfb_run
|
||||||
|
] ++ (with python.pkgs; [
|
||||||
|
mysqlclient
|
||||||
|
psycopg2
|
||||||
|
]);
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \
|
env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \
|
||||||
TZ=Europe/Kaliningrad \
|
TZ=Europe/Kaliningrad \
|
||||||
|
@ -85,9 +81,9 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/pytrainer/pytrainer/wiki";
|
homepage = "https://github.com/pytrainer/pytrainer";
|
||||||
description = "Application for logging and graphing sporting excursions";
|
description = "Application for logging and graphing sporting excursions";
|
||||||
maintainers = [ maintainers.rycee ];
|
maintainers = with maintainers; [ rycee dotlambda ];
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/imports/file_garminfit.py
|
|
||||||
+++ b/imports/file_garminfit.py
|
|
||||||
@@ -81,7 +81,7 @@
|
|
||||||
logging.debug(">>")
|
|
||||||
result = False
|
|
||||||
try:
|
|
||||||
- result = subprocess.check_output(["perl",
|
|
||||||
+ result = subprocess.check_output(["@perl@",
|
|
||||||
self.main_data_path+"plugins/garmin-fit/bin/fit2tcx",
|
|
||||||
filename])
|
|
||||||
except subprocess.CalledProcessError:
|
|
Loading…
Reference in New Issue