Skip to content

Commit

Permalink
pytrainer: 1.10.0 -> 1.11.0
Browse files Browse the repository at this point in the history
Also explicitly use python2 and default to running without webkit.
  • Loading branch information
rycee committed Sep 30, 2017
1 parent 3763b48 commit 181c621
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions pkgs/applications/misc/pytrainer/default.nix
@@ -1,38 +1,45 @@
{ stdenv, fetchurl, pythonPackages, sqlite, gpsbabel }:
{ stdenv, fetchFromGitHub, perl, python2Packages, 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 = pythonPackages.matplotlib.override {
matplotlibGtk = python2Packages.matplotlib.override {
enableGtk2 = true;
pygtk = pythonPackages.pyGtkGlade;
pygtk = python2Packages.pyGtkGlade;
};

in

pythonPackages.buildPythonApplication rec {
python2Packages.buildPythonApplication rec {
name = "pytrainer-${version}";
version = "1.10.0";
version = "1.11.0";

src = fetchurl {
url = "https://github.com/pytrainer/pytrainer/archive/v${version}.tar.gz";
sha256 = "0l42p630qhymgrcvxgry8chrpzcp6nr3d1vd7vhifh2npfq9l09y";
src = fetchFromGitHub {
owner = "pytrainer";
repo = "pytrainer";
rev = "v${version}";
sha256 = "1x4f1ydjql0aisvxs5kyi9lx35b4q3768dx42fyzq1nxdwzaqyvy";
};

namePrefix = "";

# The existing use of pywebkitgtk shows raw HTML text instead of
# map. This patch solves the problems by showing the file from a
# string, which allows setting an explicit MIME type.
patches = [ ./pytrainer-webkit.patch ];
patches = [
# The test fails in the UTC timezone and C locale.
./fix-test-tz.patch

propagatedBuildInputs = with pythonPackages; [
dateutil lxml matplotlibGtk pyGtkGlade pywebkitgtk
sqlalchemy_migrate
# The existing use of pywebkitgtk shows raw HTML text instead of
# map. This patch solves the problems by showing the file from a
# string, which allows setting an explicit MIME type.
./pytrainer-webkit.patch
];

buildInputs = [ gpsbabel sqlite ];
propagatedBuildInputs = with python2Packages; [
dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate
] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ];

buildInputs = [ perl gpsbabel sqlite ];

# This package contains no binaries to patch or strip.
dontPatchELF = true;
Expand Down

0 comments on commit 181c621

Please sign in to comment.