A MIN_VERSION for Cabal

This commit is contained in:
Michael Snoyman 2014-10-31 11:15:41 +02:00
parent 4068fc53e4
commit 101e5758cf

View File

@ -214,7 +214,12 @@ getMetadata name version hash' gpd = do
env <- ask
return $ liftIO $ runNoLoggingT $ flip runReaderT env $ do
(mreadme, mchangelog, mlicenseContent) <-
grabExtraFiles name version $ PD.licenseFiles pd
grabExtraFiles name version
#if MIN_VERSION_Cabal(1, 20, 0)
$ PD.licenseFiles pd
#else
[PD.licenseFile pd]
#endif
return Metadata
{ metadataName = name
, metadataVersion = version