1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-26 21:09:44 +01:00

Support Cabal 3.

hsSourceDirs is now a list of SymbolicPath instead of FilePath.
This commit is contained in:
Mike Sperber 2023-02-16 13:38:54 +01:00 committed by fkm3
parent dad19fde31
commit 555d90c432

View file

@ -28,6 +28,9 @@ import Distribution.Simple
, simpleUserHooks , simpleUserHooks
, UserHooks(..) , UserHooks(..)
) )
#if MIN_VERSION_Cabal(3,1,0)
import Distribution.Utils.Path (unsafeMakeSymbolicPath)
#endif
import Data.List (intercalate) import Data.List (intercalate)
import Data.ProtoLens (decodeMessage) import Data.ProtoLens (decodeMessage)
import System.Directory (createDirectoryIfMissing) import System.Directory (createDirectoryIfMissing)
@ -81,7 +84,11 @@ fudgePackageDesc lbi p = p
} }
where where
fudgeBuildInfo bi = fudgeBuildInfo bi =
#if MIN_VERSION_Cabal(3,1,0)
bi { hsSourceDirs = unsafeMakeSymbolicPath (autogenModulesDir lbi) : hsSourceDirs bi }
#else
bi { hsSourceDirs = autogenModulesDir lbi : hsSourceDirs bi } bi { hsSourceDirs = autogenModulesDir lbi : hsSourceDirs bi }
#endif
blackList = blackList =
[ -- Requires the "func" type: [ -- Requires the "func" type: