diff options
Diffstat (limited to 'pkgs/applications/misc/pytrainer/default.nix')
-rw-r--r-- | pkgs/applications/misc/pytrainer/default.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/applications/misc/pytrainer/default.nix b/pkgs/applications/misc/pytrainer/default.nix index ecc4c341a6867..8605801dea166 100644 --- a/pkgs/applications/misc/pytrainer/default.nix +++ b/pkgs/applications/misc/pytrainer/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchFromGitHub, perl, python2Packages, sqlite, gpsbabel +{ stdenv, fetchFromGitHub, perl, python, sqlite, gpsbabel , withWebKit ? false }: let # Pytrainer needs a matplotlib with GTK backend. Also ensure we are # using the pygtk with glade support as needed by pytrainer. - matplotlibGtk = python2Packages.matplotlib.override { + matplotlibGtk = python.pkgs.matplotlib.override { enableGtk2 = true; - pygtk = python2Packages.pyGtkGlade; + pygtk = python.pkgs.pyGtkGlade; }; in -python2Packages.buildPythonApplication rec { - name = "pytrainer-${version}"; +python.pkgs.buildPythonApplication rec { + pname = "pytrainer"; version = "1.11.0"; src = fetchFromGitHub { @@ -35,7 +35,7 @@ python2Packages.buildPythonApplication rec { ./pytrainer-webkit.patch ]; - propagatedBuildInputs = with python2Packages; [ + propagatedBuildInputs = with python.pkgs; [ dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate ] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ]; @@ -45,6 +45,10 @@ python2Packages.buildPythonApplication rec { dontPatchELF = true; dontStrip = true; + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + meta = with stdenv.lib; { homepage = https://github.com/pytrainer/pytrainer/wiki; description = "Application for logging and graphing sporting excursions"; |