@@ -51,7 +51,8 @@ import System.Directory
5151import System.Environment (lookupEnv)
5252import System.Exit (ExitCode(..))
5353import System.FilePath
54−import System.FSNotify (defaultConfig, eventPath)
54+import System.FSNotify (defaultConfig, eventPath, WatchConfig(..))
55+import qualified System.Info as SysInfo
5556import System.IO.Temp
5657import System.IO.Unsafe (unsafePerformIO)
5758import System.PosixCompat.Files
@@ -405,7 +406,8 @@ watchStaticFilesDerivation root = do
405406 liftIO $ runHeadlessApp $ do
406407 pb <- getPostBuild
407408 checkForChanges <- batchOccurrences 0.25 =<< watchDirectoryTree
408− defaultConfig
409+ -- On macOS, use the polling backend due to https://github.com/luite/hfsevents/issues/13
410+ (defaultConfig { confUsePolling = SysInfo.os == "darwin", confPollInterval = 250000 })
409411 (root <$ pb)
410412 ((/="static.out") . takeFileName . eventPath)
411413 drv <- performEvent $ ffor checkForChanges $ \_ ->