@@ -410,6 +410,8 @@ watchStaticFilesDerivation root = do
410 ob <- getObelisk
410 ob <- getObelisk
411 liftIO $ runHeadlessApp $ do
411 liftIO $ runHeadlessApp $ do
412 pb <- getPostBuild
412 pb <- getPostBuild
413+ -- TODO: Instead of filtering like this, we should figure out what the derivation
414+ -- actually relies on, or at least use the gitignore
413 let filterEvents x =
415 let filterEvents x =
414 let fn = takeFileName x
416 let fn = takeFileName x
415 dirs = Set.fromList $ splitDirectories x
417 dirs = Set.fromList $ splitDirectories x
@@ -430,6 +432,7 @@ watchStaticFilesDerivation root = do
431 , "dist-newstyle"
433 , "dist-newstyle"
432 , "profile"
434 , "profile"
434 ignoredExtensions = Set.fromList
437 ignoredExtensions = Set.fromList
@@ -443,7 +446,6 @@ watchStaticFilesDerivation root = do
443 fn `Set.member` ignoredFilenames ||
446 fn `Set.member` ignoredFilenames ||
444 takeExtension fn `Set.member` ignoredExtensions ||
447 takeExtension fn `Set.member` ignoredExtensions ||
445 not (Set.null $ Set.intersection ignoredDirectories dirs)
448 not (Set.null $ Set.intersection ignoredDirectories dirs)
447 checkForChanges <- batchOccurrences 0.25 =<< watchDirectoryTree
449 checkForChanges <- batchOccurrences 0.25 =<< watchDirectoryTree
448 -- On macOS, use the polling backend due to https://github.com/luite/hfsevents/issues/13
450 -- On macOS, use the polling backend due to https://github.com/luite/hfsevents/issues/13
449 (defaultConfig { confUsePolling = SysInfo.os == "darwin", confPollInterval = 250000 })
451 (defaultConfig { confUsePolling = SysInfo.os == "darwin", confPollInterval = 250000 })