mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
Output core packages list to "core" file #68
This commit is contained in:
parent
defcef772c
commit
1d6907089c
@ -12,6 +12,7 @@ module Stackage.ServerBundle
|
||||
import qualified Codec.Archive.Tar as Tar
|
||||
import qualified Codec.Archive.Tar.Entry as Tar
|
||||
import qualified Codec.Compression.GZip as GZip
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Yaml as Y
|
||||
import Filesystem (isFile)
|
||||
import Foreign.C.Types (CTime (CTime))
|
||||
@ -43,6 +44,7 @@ serverBundle time title slug bp@BuildPlan {..} = GZip.compress $ Tar.write
|
||||
, fe "hackage" hackage
|
||||
, fe "slug" (fromStrict $ encodeUtf8 slug)
|
||||
, fe "desc" (fromStrict $ encodeUtf8 title)
|
||||
, fe "core" corePackagesList
|
||||
]
|
||||
where
|
||||
fe name contents =
|
||||
@ -66,6 +68,13 @@ serverBundle time title slug bp@BuildPlan {..} = GZip.compress $ Tar.write
|
||||
toBuilder (display version) ++
|
||||
toBuilder (asText "\n")
|
||||
|
||||
corePackagesList =
|
||||
builderToLazy $ toBuilder $
|
||||
intercalate
|
||||
"\n"
|
||||
(map (\(PackageName name) -> name)
|
||||
(M.keys $ siCorePackages bpSystemInfo))
|
||||
|
||||
docsListing :: BuildPlan
|
||||
-> FilePath -- ^ docs directory
|
||||
-> IO ByteString
|
||||
|
||||
Loading…
Reference in New Issue
Block a user