12 stdenv.mkDerivation (finalAttrs: {
14 version = "unstable-2023-08-21";
16 src = fetchFromGitHub {
17 owner = "gabrielzschmitz";
19 rev = "6e43e85aa15f3d96811311a3950eba8ce9715634";
20 hash = "sha256-RpKkQ7xhM2XqfZdXra0ju0cTBL3Al9NMVQ/oleFydDs=";
24 # Adds missing function declarations required by newer versions of clang.
26 url = "https://github.com/gabrielzschmitz/Tomato.C/commit/ad6d4c385ae39d655a716850653cd92431c1f31e.patch";
27 hash = "sha256-3ormv59Ce4rOmeyL30QET3CCUIOrRYMquub+eIQsMW8=";
32 substituteInPlace Makefile \
33 --replace-fail "sudo " ""
34 # Need to define _ISOC99_SOURCE to use `snprintf` on Darwin
35 substituteInPlace config.mk \
36 --replace-fail -D_POSIX_C_SOURCE -D_ISOC99_SOURCE
37 substituteInPlace notify.c \
38 --replace-fail "/usr/local" "${placeholder "out"}"
39 substituteInPlace util.c \
40 --replace-fail "/usr/local" "${placeholder "out"}"
41 substituteInPlace tomato.desktop \
42 --replace-fail "/usr/local" "${placeholder "out"}"
57 "PREFIX=${placeholder "out"}"
61 "CPPFLAGS=$NIX_CFLAGS_COMPILE"
62 "LDFLAGS=$NIX_LDFLAGS"
66 for file in $out/bin/*; do
68 --prefix PATH : ${lib.makeBinPath [ libnotify mpv ]}
75 homepage = "https://github.com/gabrielzschmitz/Tomato.C";
76 description = " A pomodoro timer written in pure C";
77 license = with lib.licenses; [ gpl3Plus ];
78 maintainers = with lib.maintainers; [ AndersonTorres ];
79 mainProgram = "tomato";
80 platforms = lib.platforms.unix;