diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-21 23:31:06 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-23 03:07:00 +0000 |
commit | bad631ba0f47f822243accf9cf8e602adef00243 (patch) | |
tree | 82faea2b0b6ea85b491c19f8ebc928aae7bc9fd4 /pkgs/applications | |
parent | 68e9e3bcc526497daa625b853eeff515e893343d (diff) |
tomato-c: init at unstable-2023-08-21
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/tomato-c/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/applications/misc/tomato-c/default.nix b/pkgs/applications/misc/tomato-c/default.nix new file mode 100644 index 0000000000000..9f87712399f2b --- /dev/null +++ b/pkgs/applications/misc/tomato-c/default.nix @@ -0,0 +1,67 @@ +{ lib +, stdenv +, fetchFromGitHub +, libnotify +, makeWrapper +, mpv +, ncurses +, pkg-config +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "tomato-c"; + version = "unstable-2023-08-21"; + + src = fetchFromGitHub { + owner = "gabrielzschmitz"; + repo = "Tomato.C"; + rev = "6e43e85aa15f3d96811311a3950eba8ce9715634"; + hash = "sha256-RpKkQ7xhM2XqfZdXra0ju0cTBL3Al9NMVQ/oleFydDs="; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace "sudo " "" + substituteInPlace notify.c \ + --replace "/usr/local" "${placeholder "out"}" + substituteInPlace util.c \ + --replace "/usr/local" "${placeholder "out"}" + substituteInPlace tomato.desktop \ + --replace "/usr/local" "${placeholder "out"}" + ''; + + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; + + buildInputs = [ + libnotify + mpv + ncurses + ]; + + installFlags = [ + "PREFIX=${placeholder "out"}" + "CPPFLAGS=$NIX_CFLAGS_COMPILE" + "LDFLAGS=$NIX_LDFLAGS" + ]; + + postFixup = '' + for file in $out/bin/*; do + wrapProgram $file \ + --prefix PATH : ${lib.makeBinPath [ libnotify mpv ]} + done + ''; + + strictDeps = true; + + meta = { + homepage = "https://github.com/gabrielzschmitz/Tomato.C"; + description = " A pomodoro timer written in pure C"; + license = with lib.licenses; [ gpl3Plus ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + mainProgram = "tomato"; + platforms = lib.platforms.unix; + }; +}) |