nixpkgs/pkgs/applications/misc/pytrainer/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

91 lines
1.7 KiB
Nix

{ lib
, python3
, fetchFromGitHub
, gdk-pixbuf
, gnome
, gpsbabel
, glib-networking
, glibcLocales
, gobject-introspection
, gtk3
, perl
, sqlite
, tzdata
, webkitgtk
, wrapGAppsHook
, xvfb-run
}:
let
python = python3.override {
packageOverrides = (self: super: {
matplotlib = super.matplotlib.override {
enableGtk3 = true;
};
});
};
in python.pkgs.buildPythonApplication rec {
pname = "pytrainer";
version = "2.1.0";
src = fetchFromGitHub {
owner = "pytrainer";
repo = "pytrainer";
rev = "v${version}";
sha256 = "sha256-U2SVQKkr5HF7LB0WuCZ1xc7TljISjCNO26QUDGR+W/4=";
};
propagatedBuildInputs = with python.pkgs; [
sqlalchemy-migrate
python-dateutil
matplotlib
lxml
setuptools
requests
gdal
];
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook
];
buildInputs = [
sqlite
gtk3
webkitgtk
glib-networking
gnome.adwaita-icon-theme
gdk-pixbuf
];
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ perl gpsbabel ])
];
nativeCheckInputs = [
glibcLocales
perl
xvfb-run
] ++ (with python.pkgs; [
mysqlclient
psycopg2
]);
checkPhase = ''
env HOME=$TEMPDIR TZDIR=${tzdata}/share/zoneinfo \
TZ=Europe/Kaliningrad \
LC_ALL=en_US.UTF-8 \
xvfb-run -s '-screen 0 800x600x24' \
${python3.interpreter} setup.py test
'';
meta = with lib; {
homepage = "https://github.com/pytrainer/pytrainer";
description = "Application for logging and graphing sporting excursions";
maintainers = with maintainers; [ rycee dotlambda ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}