Skip to content

Commit

Permalink
tomato-c: 2023-8-21 → 2024-4-19 (#347360)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbsds authored Oct 13, 2024
2 parents 1be07e5 + 304eea6 commit d4f247e
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 deletions pkgs/by-name/to/tomato-c/package.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, libnotify
, makeWrapper
, mpv
, ncurses
, pkg-config
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
libnotify,
makeWrapper,
mpv,
ncurses,
pkg-config,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "tomato-c";
version = "unstable-2023-08-21";
version = "0-unstable-2024-04-19";

src = fetchFromGitHub {
owner = "gabrielzschmitz";
repo = "Tomato.C";
rev = "6e43e85aa15f3d96811311a3950eba8ce9715634";
hash = "sha256-RpKkQ7xhM2XqfZdXra0ju0cTBL3Al9NMVQ/oleFydDs=";
rev = "b3b85764362a7c120f3312f5b618102a4eac9f01";
hash = "sha256-7i+vn1dAK+bAGpBlKTnSBUpyJyRiPc7AiUF/tz+RyTI=";
};

patches = [
# Adds missing function declarations required by newer versions of clang.
(fetchpatch {
url = "https://github.com/gabrielzschmitz/Tomato.C/commit/ad6d4c385ae39d655a716850653cd92431c1f31e.patch";
hash = "sha256-3ormv59Ce4rOmeyL30QET3CCUIOrRYMquub+eIQsMW8=";
})
];

postPatch = ''
substituteInPlace Makefile \
--replace-fail "sudo " ""
# Need to define _ISOC99_SOURCE to use `snprintf` on Darwin
substituteInPlace config.mk \
--replace-fail -D_POSIX_C_SOURCE -D_ISOC99_SOURCE
substituteInPlace notify.c \
--replace-fail "/usr/local" "${placeholder "out"}"
substituteInPlace util.c \
Expand Down Expand Up @@ -65,7 +55,12 @@ stdenv.mkDerivation (finalAttrs: {
postFixup = ''
for file in $out/bin/*; do
wrapProgram $file \
--prefix PATH : ${lib.makeBinPath [ libnotify mpv ]}
--prefix PATH : ${
lib.makeBinPath [
libnotify
mpv
]
}
done
'';

Expand Down

0 comments on commit d4f247e

Please sign in to comment.