1{ stdenv
2, buildPythonPackage
3, pkgs
4, python
5, pygobject3
6}:
7
8buildPythonPackage rec {
9 pname = "gtimelog";
10 version = "0.9.1";
11
12 src = pkgs.fetchurl {
13 url = "https://github.com/gtimelog/gtimelog/archive/${version}.tar.gz";
14 sha256 = "0qk8fv8cszzqpdi3wl9vvkym1jil502ycn6sic4jrxckw5s9jsfj";
15 };
16
17 buildInputs = [ pkgs.glibcLocales ];
18
19 LC_ALL="en_US.UTF-8";
20
21 # TODO: AppIndicator
22 propagatedBuildInputs = [ pkgs.gobject-introspection pygobject3 pkgs.makeWrapper pkgs.gtk3 ];
23
24 checkPhase = ''
25 substituteInPlace runtests --replace "/usr/bin/env python" "${python}/bin/${python.executable}"
26 ./runtests
27 '';
28
29 preFixup = ''
30 wrapProgram $out/bin/gtimelog \
31 --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
32 --prefix LD_LIBRARY_PATH ":" "${pkgs.gtk3.out}/lib" \
33 '';
34
35 meta = with stdenv.lib; {
36 description = "A small GTK app for keeping track of your time. It's main goal is to be as unintrusive as possible";
37 homepage = https://mg.pov.lt/gtimelog/;
38 license = licenses.gpl2Plus;
39 maintainers = with maintainers; [ ocharles ];
40 platforms = platforms.unix;
41 };
42
43}