This commit is contained in:
2020-03-03 23:34:25 +01:00
parent 62b249db2d
commit 63f9bc6b0a
9 changed files with 292 additions and 141 deletions

View File

@@ -13,6 +13,86 @@ import URI.ByteString.QQ
import qualified Data.Map as M
-----------------
--[ GHC 8.4.4 ]--
-----------------
ghc_844_64_fedora :: DownloadInfo
ghc_844_64_fedora = DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-fedora27-linux.tar.xz|]
(Just ([rel|ghc-8.4.4|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
ghc_844_64_debian9 :: DownloadInfo
ghc_844_64_debian9 = DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-deb9-linux.tar.xz|]
(Just ([rel|ghc-8.4.4|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
ghc_844_64_debian8 :: DownloadInfo
ghc_844_64_debian8 = DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-deb8-linux.tar.xz|]
(Just ([rel|ghc-8.4.4|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
-----------------
--[ GHC 8.6.5 ]--
-----------------
ghc_865_64_fedora :: DownloadInfo
ghc_865_64_fedora = DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-fedora27-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
ghc_865_64_debian9 :: DownloadInfo
ghc_865_64_debian9 = DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb9-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|8de779b73c1b2f1b7ab49030015fce3d|]
ghc_865_64_debian8 :: DownloadInfo
ghc_865_64_debian8 = DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb8-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
---------------------
--[ Cabal-3.0.0.0 ]--
---------------------
cabal_3000_64_linux :: DownloadInfo
cabal_3000_64_linux = DownloadInfo
[uri|https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-x86_64-unknown-linux.tar.xz|]
Nothing
[s|32352d2259909970e6ff04faf61bbfac|]
-------------
--[ GHCup ]--
-------------
ghcup_010_64_linux :: DownloadInfo
ghcup_010_64_linux = DownloadInfo [uri|file:///home/ospa_ju/tmp/ghcup-exe|]
Nothing
[s|d8da9e09ca71648f4c1bc6a0a46efc82|]
-----------------------
--[ Tarball mapping ]--
-----------------------
binaryDownloads :: BinaryDownloads
binaryDownloads = M.fromList
[ ( GHC
@@ -21,84 +101,28 @@ binaryDownloads = M.fromList
, VersionInfo [Latest] $ M.fromList
[ ( A_64
, M.fromList
[ ( Linux UnknownLinux
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-fedora27-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
)
]
)
, ( Linux Ubuntu
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-fedora27-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
)
]
)
[ (Linux UnknownLinux, M.fromList [(Nothing, ghc_865_64_fedora)])
, (Linux Ubuntu , M.fromList [(Nothing, ghc_865_64_debian9)])
, ( Linux Debian
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-debian9-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
)
, ( Just $ [vers|8|]
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-debian9-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|5f871a3eaf808acb2420fdeef9318698|]
)
[ (Nothing , ghc_865_64_debian9)
, (Just $ [vers|8|], ghc_865_64_debian8)
]
)
]
)
]
),
( [vver|8.4.4|]
)
, ( [vver|8.4.4|]
, VersionInfo [] $ M.fromList
[ ( A_64
, M.fromList
[ ( Linux UnknownLinux
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-fedora27-linux.tar.xz|]
(Just ([rel|ghc-8.4.4|] :: Path Rel))
[s|86785f41d228168461859e40956973fb|]
)
]
)
, ( Linux Ubuntu
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-fedora27-linux.tar.xz|]
(Just ([rel|ghc-8.4.4|] :: Path Rel))
[s|f943a245c54c2f2dcb354dceeff886e1|]
)
]
)
[ (Linux UnknownLinux, M.fromList [(Nothing, ghc_844_64_fedora)])
, (Linux Ubuntu , M.fromList [(Nothing, ghc_844_64_fedora)])
, ( Linux Debian
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-debian9-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|f943a245c54c2f2dcb354dceeff886e1|]
)
, ( Just $ [vers|8|]
, DownloadInfo
[uri|https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-debian8-linux.tar.xz|]
(Just ([rel|ghc-8.6.5|] :: Path Rel))
[s|f943a245c54c2f2dcb354dceeff886e1|]
)
[ (Nothing , ghc_844_64_debian9)
, (Just $ [vers|8|], ghc_844_64_debian8)
]
)
]
@@ -114,14 +138,7 @@ binaryDownloads = M.fromList
[ ( A_64
, M.fromList
[ ( Linux UnknownLinux
, M.fromList
[ ( Nothing
, DownloadInfo
[uri|https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-x86_64-unknown-linux.tar.xz|]
Nothing
[s|32352d2259909970e6ff04faf61bbfac|]
)
]
, M.fromList [(Nothing, cabal_3000_64_linux)]
)
]
)
@@ -129,4 +146,16 @@ binaryDownloads = M.fromList
)
]
)
, ( GHCup
, M.fromList
[ ( [vver|0.1.0|]
, VersionInfo [Latest] $ M.fromList
[ ( A_64
, M.fromList
[(Linux UnknownLinux, M.fromList [(Nothing, ghcup_010_64_linux)])]
)
]
)
]
)
]

View File

@@ -33,6 +33,7 @@ instance Exception ValidationError
-- TODO: test that GHC is in semver
-- TODO: check there's LATEST tag for every tool
validate :: (Monad m, MonadLogger m, MonadThrow m, MonadIO m)
=> GHCupDownloads
-> m ExitCode