1{ lib, fetchFromGitHub, makeWrapper 2, glibcLocales, gobject-introspection, gtk3, libsoup, libsecret 3, buildPythonPackage, python 4, pygobject3, freezegun, mock 5}: 6 7buildPythonPackage rec { 8 pname = "gtimelog"; 9 version = "unstable-2020-05-16"; 10 11 src = fetchFromGitHub { 12 owner = pname; 13 repo = pname; 14 rev = "80682ddbf9e0d68b8c67257289784f3b49b543d8"; 15 sha256 = "0qv2kv7vc3qqlzxsisgg31cmrkkqgnmxspbj10c5fhdmwzzwi0i9"; 16 }; 17 18 buildInputs = [ 19 makeWrapper 20 glibcLocales gobject-introspection gtk3 libsoup libsecret 21 ]; 22 23 propagatedBuildInputs = [ 24 pygobject3 freezegun mock 25 ]; 26 27 checkPhase = '' 28 substituteInPlace runtests --replace "/usr/bin/env python3" "${python.interpreter}" 29 ./runtests 30 ''; 31 32 pythonImportsCheck = [ "gtimelog" ]; 33 34 preFixup = '' 35 wrapProgram $out/bin/gtimelog \ 36 --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ 37 --prefix LD_LIBRARY_PATH ":" "${gtk3.out}/lib" \ 38 ''; 39 40 meta = with lib; { 41 description = "A time tracking app"; 42 longDescription = '' 43 GTimeLog is a small time tracking application for GNOME. 44 It's main goal is to be as unintrusive as possible. 45 46 To run gtimelog successfully on a system that does not have full GNOME 3 47 installed, the following NixOS options should be set: 48 - programs.dconf.enable = true; 49 - services.gnome.gnome-keyring.enable = true; 50 51 In addition, the following packages should be added to the environment: 52 - gnome.adwaita-icon-theme 53 - gnome.dconf 54 ''; 55 homepage = "https://gtimelog.org/"; 56 license = licenses.gpl2Plus; 57 maintainers = with maintainers; [ oxzi ]; 58 platforms = platforms.unix; 59 }; 60}