1 { lib, stdenv, fetchFromGitHub, perl, xterm, coreutils }:
5 version = "2018-09-02";
7 src = fetchFromGitHub {
10 rev = "59343e2cbe451eb16109e782c194ccbd0ee4196d";
11 sha256 = "1xpmra3f9618b0gajfxqh061r4phkiklvcgpglsyx82bhmgf9n1f";
21 mkdir -p $out/{libexec,bin}
23 # We don’t support a config file for now,
24 # since it’s not entirely clear how to split nix-set paths
25 # from the actual config options.
27 substituteInPlace "$pl" \
28 --replace 'require "$ENV{HOME}/.tagtimerc";' \
29 'require "${placeholder "out"}/libexec/settings.pl";'
32 install tagtimed.pl $out/bin/tagtimed
34 substituteInPlace util.pl \
35 --replace '/usr/bin/touch' \
36 '${coreutils}/bin/touch' \
37 --replace '/bin/rm -f $lockf' \
38 '${coreutils}/bin/rm -f $lockf' \
39 --replace '$lockf = "''${path}tagtime.lock";' \
40 'mkdir "$ENV{HOME}/.cache/tagtime";
41 $lockf = "$ENV{HOME}/.cache/tagtime/tagtime.lock";'
44 mv template.tsk $out/libexec/
47 # set the default template arguments to sane defaults.
48 substitute settings.pl.template $out/libexec/settings.pl \
49 --replace '"__USER__"' \
51 --replace '"__PATH__"' \
52 '"${placeholder "out"}/libexec/"' \
53 --replace '$logf = "$path$usr.log";' \
54 'mkdir "$ENV{HOME}/.local/share/tagtime";
55 $logf = "$ENV{HOME}/.local/share/tagtime/pings.log";' \
56 --replace '"__ED__ +"' \
58 --replace '"__XT__"' \
59 '"${xterm}/bin/xterm"'
65 description = "Stochastic Time Tracking for Space Cadets";
67 To determine how you spend your time, TagTime literally randomly samples
68 you. At random times it pops up and asks what you're doing right at that
69 moment. You answer with tags.
71 See https://messymatters.com/tagtime for the whole story.
73 [maintainer’s note]: This is the original perl script implementation.
75 homepage = "http://messymatters.com/tagtime/";
76 license = lib.licenses.bsd3;
77 maintainers = [ lib.maintainers.Profpatsch ];
78 mainProgram = "tagtimed";