From 4c06ae274bfdb9844d71b51d8a71d8d7f0cf667e Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 17 Feb 2024 14:15:01 +0100 Subject: Find the package category automatically --- lib/SlackBuilder/Package.hs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/SlackBuilder/Package.hs') diff --git a/lib/SlackBuilder/Package.hs b/lib/SlackBuilder/Package.hs index 7d73976..1fdb29e 100644 --- a/lib/SlackBuilder/Package.hs +++ b/lib/SlackBuilder/Package.hs @@ -6,7 +6,8 @@ module SlackBuilder.Package ( DownloadPlaceholder(..) , Download(..) , DownloadTemplate(..) - , Package(..) + , PackageDescription(..) + , PackageUpdateData(..) , Maintainer(..) , Updater(..) , renderDownloadWithVersion @@ -23,13 +24,18 @@ import Control.Monad.Catch (MonadThrow) import Data.Map (Map) -- | Contains information how a package can be updated. -data Package = Package +data PackageDescription = PackageDescription { latest :: Updater , downloaders :: Map Text Updater - , category :: Text , name :: Text } +data PackageUpdateData = PackageUpdateData + { description :: PackageDescription + , category :: Text + , version :: Text + } + -- | Download URI with the MD5 checksum of the target. data Download = Download { download :: URI -- cgit v1.2.3