2024-07-31 10:19:44 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
tk,
|
2024-10-29 11:11:06 +00:00
|
|
|
tclPackages,
|
2024-07-31 10:19:44 +00:00
|
|
|
tcl,
|
|
|
|
tkremind ? null,
|
|
|
|
withGui ?
|
|
|
|
if tkremind != null then
|
|
|
|
lib.warn "tkremind is deprecated and should be removed; use withGui instead." tkremind
|
|
|
|
else
|
|
|
|
true,
|
2021-04-13 19:44:15 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
tcl.mkTclDerivation rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "remind";
|
2024-10-23 06:41:50 +00:00
|
|
|
version = "05.00.07";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2020-08-20 17:08:02 +00:00
|
|
|
url = "https://dianne.skoll.ca/projects/remind/download/remind-${version}.tar.gz";
|
2024-10-23 06:41:50 +00:00
|
|
|
hash = "sha256-id3yVyKHRSJWhm8r4Zmc/k61AZUt1wa3lArQktDbt9w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
propagatedBuildInputs = lib.optionals withGui [
|
2024-10-29 11:11:06 +00:00
|
|
|
tclPackages.tcllib
|
2024-07-31 10:19:44 +00:00
|
|
|
tk
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
postPatch = lib.optionalString withGui ''
|
2024-06-24 18:47:55 +00:00
|
|
|
# NOTA BENE: The path to rem2pdf is replaced in tkremind for future use
|
|
|
|
# as rem2pdf is currently not build since it requires the JSON::MaybeXS,
|
|
|
|
# Pango and Cairo Perl modules.
|
2024-10-23 06:41:50 +00:00
|
|
|
substituteInPlace scripts/tkremind.in \
|
2024-07-31 10:19:44 +00:00
|
|
|
--replace-fail "exec wish" "exec ${lib.getExe' tk "wish"}" \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail 'set Remind "remind"' "set Remind \"$out/bin/remind\"" \
|
|
|
|
--replace-fail 'set Rem2PS "rem2ps"' "set Rem2PS \"$out/bin/rem2ps\"" \
|
|
|
|
--replace-fail 'set Rem2PDF "rem2pdf"' "set Rem2PDF \"$out/bin/rem2pdf\""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
|
2024-06-24 18:47:55 +00:00
|
|
|
# On Darwin setenv and unsetenv are defined in stdlib.h from libSystem
|
|
|
|
"-DHAVE_SETENV"
|
|
|
|
"-DHAVE_UNSETENV"
|
|
|
|
]);
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://dianne.skoll.ca/projects/remind/";
|
|
|
|
description = "Sophisticated calendar and alarm program for the console";
|
2021-04-13 19:44:15 +00:00
|
|
|
license = licenses.gpl2Only;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
raskin
|
|
|
|
kovirobi
|
|
|
|
];
|
2024-06-24 18:47:55 +00:00
|
|
|
mainProgram = "remind";
|
2021-04-13 19:44:15 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|