ghcup-hs/lib/GHCup/Data/ToolRequirements.hs

148 lines
3.9 KiB
Haskell
Raw Normal View History

2020-04-10 15:36:27 +00:00
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
2020-04-22 17:32:48 +00:00
module GHCup.Data.ToolRequirements where
2020-04-10 15:36:27 +00:00
import GHCup.Types
import GHCup.Utils.String.QQ
2020-04-27 19:52:44 +00:00
import GHCup.Utils.Version.QQ
2020-04-10 15:36:27 +00:00
import qualified Data.Map as M
-- | Currently 'GHC' is used for both GHC and cabal to simplify
-- this, until we need actual separation.
toolRequirements :: ToolRequirements
toolRequirements = M.fromList
[ ( GHC
, M.fromList
[ ( Nothing
, M.fromList
[ ( Linux UnknownLinux
, M.fromList
[ ( Nothing
, Requirements
[]
[s|You need the following packages: curl g++ gcc gmp make ncurses realpath xz-utils. Consult your distro documentation on the exact names of those packages.|]
)
]
)
, ( Linux Alpine
, M.fromList
[ ( Nothing
, Requirements
[ "curl"
, "gcc"
, "g++"
, "gmp-dev"
, "ncurses-dev"
, "libffi-dev"
, "make"
, "xz"
, "tar"
, "perl"
]
""
)
]
)
, ( Linux Ubuntu
, M.fromList
[ ( Nothing
, Requirements
[ "build-essential"
, "curl"
, "libffi-dev"
, "libffi6"
2020-04-10 15:36:27 +00:00
, "libgmp-dev"
, "libgmp10"
, "libncurses-dev"
, "libncurses5"
, "libtinfo5"
]
""
)
]
)
, ( Linux Debian
, M.fromList
[ ( Nothing
, Requirements
[ "build-essential"
, "curl"
2020-04-10 15:36:27 +00:00
, "libffi-dev"
, "libffi6"
, "libgmp-dev"
, "libgmp10"
2020-04-10 15:36:27 +00:00
, "libncurses-dev"
, "libncurses5"
2020-04-10 15:36:27 +00:00
, "libtinfo5"
]
""
)
]
)
2020-04-27 19:52:44 +00:00
, ( Linux CentOS
, M.fromList
[ ( Nothing
, Requirements
[ "gcc"
, "gcc-c++"
, "gmp"
2020-04-30 18:14:04 +00:00
, "gmp-devel"
2020-04-27 19:52:44 +00:00
, "make"
, "ncurses"
, "ncurses-compat-libs"
, "xz"
, "perl"
]
""
),
( Just [vers|7|]
, Requirements
[ "gcc"
, "gcc-c++"
, "gmp"
2020-04-30 18:14:04 +00:00
, "gmp-devel"
2020-04-27 19:52:44 +00:00
, "make"
, "ncurses"
, "xz"
, "perl"
]
""
)
]
)
2020-04-10 15:36:27 +00:00
, ( Darwin
, M.fromList
[ ( Nothing
, Requirements
[]
"On OS X, in the course of running ghcup you will be given a dialog box to install the command line tools. Accept and the requirements will be installed for you. You will then need to run the command again."
)
]
)
, ( FreeBSD
, M.fromList
[ ( Nothing
, Requirements
[ "curl"
, "gcc"
, "gmp"
, "gmake"
, "ncurses"
, "perl5"
, "libffi"
, "libiconv"
]
""
)
]
)
]
)
]
)
]