Use cabal flag to avoid spurious system-filepath dependency.

This commit is contained in:
Christopher Reichert 2015-07-29 01:41:29 -05:00
parent cf4dd85eba
commit 5d1b9824ef
2 changed files with 14 additions and 5 deletions

View File

@ -50,7 +50,7 @@ import qualified System.FSNotify as FSN
import System.Posix.User (getUserEntryForID,
getUserEntryForName, userGroupID,
userID, userName)
#if !MIN_VERSION_fsnotify(0,2,0)
#ifdef SYSTEM_FILEPATH
import qualified Filesystem.Path as FP (FilePath)
import Filesystem.Path.CurrentOS (encodeString)
#endif

View File

@ -15,6 +15,10 @@ extra-source-files: ChangeLog.md
--Data-Files: incoming/foo/bundle.sh, incoming/foo/config/keter.yaml
flag system-filepath
description: Use system-filepath
default: False
Library
Build-depends: base >= 4 && < 5
, directory
@ -57,11 +61,16 @@ Library
, stm >= 2.4
, async
, lifted-base
, fsnotify >= 0.0.11
, system-filepath
if impl(ghc < 7.6)
build-depends:
ghc-prim
build-depends: ghc-prim
if flag(system-filepath)
build-depends: fsnotify >= 0.1 && < 0.2
, system-filepath
cpp-options: -DSYSTEM_FILEPATH
else
build-depends: fsnotify >= 0.2.0.2
Exposed-Modules: Keter.Plugin.Postgres
Keter.Types
Keter.Types.V04