pytrainer: 1.10.0 -> 1.11.0

Also explicitly use python2 and default to running without webkit.
This commit is contained in:
Robert Helgesson 2017-09-30 19:03:07 +02:00
parent 3763b48cb5
commit 181c6216d4
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86

View File

@ -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;