about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2024-06-22 23:28:21 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2024-06-23 01:36:45 +0200
commit4f991469fba89c1703f5ff5338fb923c44f09351 (patch)
treeddfdb81a0ec7338182038b235c201aaecb070b6d /pkgs/tools
parent438fbfa8b99dee65864fedaaae5190e160304837 (diff)
remind: fix darwin build
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/remind/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/tools/misc/remind/default.nix b/pkgs/tools/misc/remind/default.nix
index a1f63cc08ddf9..51448931dcfb3 100644
--- a/pkgs/tools/misc/remind/default.nix
+++ b/pkgs/tools/misc/remind/default.nix
@@ -1,4 +1,5 @@
 { lib
+, stdenv
 , fetchurl
 , tk
 , tcllib
@@ -28,6 +29,15 @@ tcl.mkTclDerivation rec {
       --replace-fail 'set Rem2PDF "rem2pdf"' "set Rem2PDF \"$out/bin/rem2pdf\""
   '';
 
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [
+    # Disable clang link time optimization until the following issue is resolved:
+    # https://github.com/NixOS/nixpkgs/issues/19098
+    "-fno-lto"
+    # On Darwin setenv and unsetenv are defined in stdlib.h from libSystem
+    "-DHAVE_SETENV"
+    "-DHAVE_UNSETENV"
+  ]);
+
   meta = with lib; {
     homepage = "https://dianne.skoll.ca/projects/remind/";
     description = "Sophisticated calendar and alarm program for the console";