@@ -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
@@ -409,7 +410,8 @@ watchStaticFilesDerivation root = do
409410 liftIO $ runHeadlessApp $ do
410411 pb <- getPostBuild
411412 checkForChanges <- batchOccurrences 0.25 =<< watchDirectoryTree
412− defaultConfig
413+ -- On macOS, use the polling backend due to https://github.com/luite/hfsevents/issues/13
414+ (defaultConfig { confUsePolling = SysInfo.os == "darwin", confPollInterval = 250000 })
413415 (root <$ pb)
414416 ((/="static.out") . takeFileName . eventPath)
415417 drv <- performEvent $ ffor checkForChanges $ \_ ->