2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, makeWrapper
|
2019-08-08 15:41:05 +01:00
|
|
|
, glibcLocales, gobject-introspection, gtk3, libsoup, libsecret
|
|
|
|
, buildPythonPackage, python
|
|
|
|
, pygobject3, freezegun, mock
|
2018-10-16 04:38:46 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gtimelog";
|
2019-08-08 15:41:05 +01:00
|
|
|
version = "unstable-2020-05-16";
|
2018-10-16 04:38:46 +01:00
|
|
|
|
2019-08-08 15:41:05 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "80682ddbf9e0d68b8c67257289784f3b49b543d8";
|
|
|
|
sha256 = "0qv2kv7vc3qqlzxsisgg31cmrkkqgnmxspbj10c5fhdmwzzwi0i9";
|
2018-10-16 04:38:46 +01:00
|
|
|
};
|
|
|
|
|
2019-08-08 15:41:05 +01:00
|
|
|
buildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
glibcLocales gobject-introspection gtk3 libsoup libsecret
|
|
|
|
];
|
2018-10-16 04:38:46 +01:00
|
|
|
|
2019-08-08 15:41:05 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pygobject3 freezegun mock
|
|
|
|
];
|
2018-10-16 04:38:46 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-08-08 15:41:05 +01:00
|
|
|
substituteInPlace runtests --replace "/usr/bin/env python3" "${python.interpreter}"
|
2018-10-16 04:38:46 +01:00
|
|
|
./runtests
|
|
|
|
'';
|
|
|
|
|
2019-08-08 15:41:05 +01:00
|
|
|
pythonImportsCheck = [ "gtimelog" ];
|
|
|
|
|
2018-10-16 04:38:46 +01:00
|
|
|
preFixup = ''
|
2019-08-08 15:41:05 +01:00
|
|
|
wrapProgram $out/bin/gtimelog \
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "${gtk3.out}/lib" \
|
2018-10-16 04:38:46 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-08-08 15:41:05 +01:00
|
|
|
description = "A time tracking app";
|
|
|
|
longDescription = ''
|
|
|
|
GTimeLog is a small time tracking application for GNOME.
|
|
|
|
It's main goal is to be as unintrusive as possible.
|
|
|
|
|
|
|
|
To run gtimelog successfully on a system that does not have full GNOME 3
|
|
|
|
installed, the following NixOS options should be set:
|
|
|
|
- programs.dconf.enable = true;
|
2021-05-07 22:18:14 +01:00
|
|
|
- services.gnome.gnome-keyring.enable = true;
|
2019-08-08 15:41:05 +01:00
|
|
|
|
|
|
|
In addition, the following packages should be added to the environment:
|
2021-05-07 22:18:14 +01:00
|
|
|
- gnome.adwaita-icon-theme
|
|
|
|
- gnome.dconf
|
2019-08-08 15:41:05 +01:00
|
|
|
'';
|
|
|
|
homepage = "https://gtimelog.org/";
|
2018-10-16 04:38:46 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-12-07 14:26:45 +00:00
|
|
|
maintainers = with maintainers; [ oxzi ];
|
2018-10-16 04:38:46 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|