diff options
author | Robert Helgesson <robert@rycee.net> | 2014-12-21 11:23:53 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-01-18 13:34:02 +0100 |
commit | b2be4092c632effc22b0484c839649454b07f0fa (patch) | |
tree | 0e96d090e28beb159986a47abceebe3ae03518a5 /pkgs/applications/misc/pytrainer/default.nix | |
parent | 35e5f59aeebb6636fdfa4f2d5e881d53d015360b (diff) | |
download | nixlib-b2be4092c632effc22b0484c839649454b07f0fa.tar nixlib-b2be4092c632effc22b0484c839649454b07f0fa.tar.gz nixlib-b2be4092c632effc22b0484c839649454b07f0fa.tar.bz2 nixlib-b2be4092c632effc22b0484c839649454b07f0fa.tar.lz nixlib-b2be4092c632effc22b0484c839649454b07f0fa.tar.xz nixlib-b2be4092c632effc22b0484c839649454b07f0fa.tar.zst nixlib-b2be4092c632effc22b0484c839649454b07f0fa.zip |
Add package 'pytrainer'.
Diffstat (limited to 'pkgs/applications/misc/pytrainer/default.nix')
-rw-r--r-- | pkgs/applications/misc/pytrainer/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/misc/pytrainer/default.nix b/pkgs/applications/misc/pytrainer/default.nix new file mode 100644 index 000000000000..843d0ab93d88 --- /dev/null +++ b/pkgs/applications/misc/pytrainer/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, pythonPackages, sqlite, gpsbabel }: + +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 { + enableGtk2 = true; + pygtk = pythonPackages.pyGtkGlade; + }; + +in + +pythonPackages.buildPythonPackage rec { + name = "pytrainer-${version}"; + version = "1.10.0"; + + src = fetchurl { + url = "https://github.com/pytrainer/pytrainer/archive/v${version}.tar.gz"; + sha256 = "0l42p630qhymgrcvxgry8chrpzcp6nr3d1vd7vhifh2npfq9l09y"; + }; + + 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 ]; + + pythonPath = with pythonPackages; [ + dateutil lxml matplotlibGtk pyGtkGlade pywebkitgtk + sqlalchemy sqlalchemy_migrate + ]; + + buildInputs = [gpsbabel sqlite] ++ pythonPath; + + # This package contains no binaries to patch or strip. + dontPatchELF = true; + dontStrip = true; + + meta = with stdenv.lib; { + homepage = https://github.com/pytrainer/pytrainer/wiki; + description = "Application for logging and graphing sporting excursions"; + maintainers = [ maintainers.rycee ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} |