2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2023-02-28 18:18:51 +00:00
|
|
|
, python310
|
2021-03-24 14:26:45 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gdk-pixbuf
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2021-03-24 14:26:45 +00:00
|
|
|
, gpsbabel
|
2018-12-31 14:28:20 +00:00
|
|
|
, glib-networking
|
|
|
|
, glibcLocales
|
2021-03-24 14:26:45 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, perl
|
|
|
|
, sqlite
|
2018-12-31 14:28:20 +00:00
|
|
|
, tzdata
|
2021-03-24 14:26:45 +00:00
|
|
|
, webkitgtk
|
|
|
|
, wrapGAppsHook
|
2021-05-08 13:45:03 +00:00
|
|
|
, xvfb-run
|
2018-12-31 14:28:20 +00:00
|
|
|
}:
|
2014-12-21 10:23:53 +00:00
|
|
|
|
|
|
|
let
|
2023-02-28 18:18:51 +00:00
|
|
|
python = python310.override {
|
2021-03-24 14:26:45 +00:00
|
|
|
packageOverrides = (self: super: {
|
|
|
|
matplotlib = super.matplotlib.override {
|
|
|
|
enableGtk3 = true;
|
|
|
|
};
|
2023-02-28 18:18:51 +00:00
|
|
|
sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec {
|
|
|
|
version = "1.4.46";
|
|
|
|
src = self.fetchPypi {
|
|
|
|
pname = "SQLAlchemy";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
|
|
|
|
};
|
|
|
|
});
|
2021-03-24 14:26:45 +00:00
|
|
|
});
|
2014-12-21 10:23:53 +00:00
|
|
|
};
|
2021-03-24 14:26:45 +00:00
|
|
|
in python.pkgs.buildPythonApplication rec {
|
2018-12-31 14:28:20 +00:00
|
|
|
pname = "pytrainer";
|
2022-04-05 04:27:29 +00:00
|
|
|
version = "2.1.0";
|
2014-12-21 10:23:53 +00:00
|
|
|
|
2017-09-30 17:03:07 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytrainer";
|
|
|
|
repo = "pytrainer";
|
|
|
|
rev = "v${version}";
|
2022-04-05 04:27:29 +00:00
|
|
|
sha256 = "sha256-U2SVQKkr5HF7LB0WuCZ1xc7TljISjCNO26QUDGR+W/4=";
|
2014-12-21 10:23:53 +00:00
|
|
|
};
|
|
|
|
|
2021-03-24 14:26:45 +00:00
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
2021-10-28 08:59:03 +00:00
|
|
|
sqlalchemy-migrate
|
2021-03-24 14:26:45 +00:00
|
|
|
python-dateutil
|
|
|
|
matplotlib
|
|
|
|
lxml
|
2020-03-09 21:30:46 +00:00
|
|
|
setuptools
|
2021-03-24 14:26:45 +00:00
|
|
|
requests
|
|
|
|
gdal
|
2018-12-31 14:28:20 +00:00
|
|
|
];
|
2017-09-30 17:03:07 +00:00
|
|
|
|
2018-12-31 14:28:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
2014-12-21 10:23:53 +00:00
|
|
|
|
2018-12-31 14:28:20 +00:00
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
gtk3
|
|
|
|
webkitgtk
|
|
|
|
glib-networking
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome.adwaita-icon-theme
|
2021-03-24 14:26:45 +00:00
|
|
|
gdk-pixbuf
|
|
|
|
];
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ perl gpsbabel ])
|
2018-12-31 14:28:20 +00:00
|
|
|
];
|
2014-12-21 10:23:53 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-24 14:26:45 +00:00
|
|
|
glibcLocales
|
|
|
|
perl
|
2021-05-08 13:45:03 +00:00
|
|
|
xvfb-run
|
2021-03-24 14:26:45 +00:00
|
|
|
] ++ (with python.pkgs; [
|
|
|
|
mysqlclient
|
|
|
|
psycopg2
|
|
|
|
]);
|
|
|
|
|
2018-02-21 23:12:44 +00:00
|
|
|
checkPhase = ''
|
2018-12-31 14:28:20 +00:00
|
|
|
env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \
|
|
|
|
TZ=Europe/Kaliningrad \
|
|
|
|
LC_ALL=en_US.UTF-8 \
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' \
|
2023-02-28 18:18:51 +00:00
|
|
|
${python.interpreter} setup.py test
|
2018-02-21 23:12:44 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-03-24 14:26:45 +00:00
|
|
|
homepage = "https://github.com/pytrainer/pytrainer";
|
2014-12-21 10:23:53 +00:00
|
|
|
description = "Application for logging and graphing sporting excursions";
|
2021-03-24 14:26:45 +00:00
|
|
|
maintainers = with maintainers; [ rycee dotlambda ];
|
2014-12-21 10:23:53 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|