Compare commits
8 Commits
drop-freeb
...
v0.1.8
| Author | SHA1 | Date | |
|---|---|---|---|
| b5440fc7d2 | |||
| 4b21adadf1 | |||
| 78ae77780b | |||
| ccb95bcbee | |||
| 21ac670bbe | |||
| 8b54dee66c | |||
| dad926f3ba | |||
| a298d949b5 |
@@ -37,6 +37,12 @@ variables:
|
||||
variables:
|
||||
OS: "DARWIN"
|
||||
|
||||
.freebsd:
|
||||
tags:
|
||||
- x86_64-freebsd
|
||||
variables:
|
||||
OS: "FREEBSD"
|
||||
|
||||
.root_cleanup:
|
||||
after_script:
|
||||
- BUILD_DIR=$CI_PROJECT_DIR
|
||||
@@ -68,6 +74,14 @@ variables:
|
||||
before_script:
|
||||
- ./.gitlab/before_script/darwin/install_deps.sh
|
||||
|
||||
.test_ghcup_version:freebsd:
|
||||
extends:
|
||||
- .test_ghcup_version
|
||||
- .freebsd
|
||||
- .root_cleanup
|
||||
before_script:
|
||||
- ./.gitlab/before_script/freebsd/install_deps.sh
|
||||
|
||||
.release_ghcup:
|
||||
script:
|
||||
- ./.gitlab/script/ghcup_release.sh
|
||||
@@ -110,6 +124,22 @@ test:mac:latest:
|
||||
allow_failure: true
|
||||
|
||||
|
||||
######## freebsd test ########
|
||||
|
||||
test:freebsd:recommended:
|
||||
extends: .test_ghcup_version:freebsd
|
||||
variables:
|
||||
GHC_VERSION: "8.8.4"
|
||||
CABAL_VERSION: "3.2.0.0"
|
||||
|
||||
test:freebsd:latest:
|
||||
extends: .test_ghcup_version:freebsd
|
||||
variables:
|
||||
GHC_VERSION: "8.10.1"
|
||||
CABAL_VERSION: "3.2.0.0"
|
||||
allow_failure: true
|
||||
|
||||
|
||||
######## linux release ########
|
||||
|
||||
release:linux:64bit:
|
||||
@@ -151,3 +181,18 @@ release:darwin:
|
||||
CABAL_VERSION: "3.2.0.0"
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.7"
|
||||
|
||||
|
||||
######## freebsd release ########
|
||||
|
||||
release:freebsd:
|
||||
extends:
|
||||
- .freebsd
|
||||
- .release_ghcup
|
||||
- .root_cleanup
|
||||
before_script:
|
||||
- ./.gitlab/before_script/freebsd/install_deps.sh
|
||||
variables:
|
||||
ARTIFACT: "x86_64-portbld-freebsd-ghcup"
|
||||
GHC_VERSION: "8.8.3"
|
||||
CABAL_VERSION: "3.2.0.0"
|
||||
|
||||
|
||||
18
.gitlab/before_script/freebsd/install_deps.sh
Executable file
18
.gitlab/before_script/freebsd/install_deps.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
# pkg install --force --yes --no-repo-update curl gcc gmp gmake ncurses perl5 libffi libiconv
|
||||
|
||||
. "$( cd "$(dirname "$0")" ; pwd -P )/../../ghcup_env"
|
||||
|
||||
mkdir -p "${TMPDIR}"
|
||||
|
||||
curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-portbld-freebsd-ghcup > ./ghcup-bin
|
||||
chmod +x ghcup-bin
|
||||
|
||||
./ghcup-bin install ${GHC_VERSION}
|
||||
./ghcup-bin install-cabal ${CABAL_VERSION}
|
||||
./ghcup-bin set ${GHC_VERSION}
|
||||
|
||||
exit 0
|
||||
@@ -21,6 +21,8 @@ if [ "${OS}" = "LINUX" ] ; then
|
||||
else
|
||||
ecabal build -w ghc-${GHC_VERSION} --ghc-options='-split-sections -optl-static' -ftui
|
||||
fi
|
||||
elif [ "${OS}" = "FREEBSD" ] ; then
|
||||
ecabal build -w ghc-${GHC_VERSION} --ghc-options='-split-sections' --constraint="zlib static" -ftui
|
||||
else
|
||||
ecabal build -w ghc-${GHC_VERSION} --constraint="zlib static" --constraint="lzma static" -ftui
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Revision history for ghcup
|
||||
|
||||
## 0.1.8 -- 2020-07-21
|
||||
|
||||
* Fix bug in logging thread dying on newlines
|
||||
* Allow to install from arbitrary bindists: `ghcup -n install ghc -u '{"dlHash": "", "dlSubdir": "ghc-8.10.1", "dlUri": "https://github.com/commercialhaskell/ghc/releases/download/ghc-8.10.1-release/ghc-8.10.1-x86_64-deb9-linux.tar.xz"}' 8.10.1`
|
||||
|
||||
## 0.1.7 -- 2020-07-20
|
||||
|
||||
* Fix a bug in libarchive not unpacking some uncleanly packed bindists
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
`ghcup` makes it easy to install specific versions of `ghc` on GNU/Linux and
|
||||
macOS (aka Darwin) and can also bootstrap a fresh Haskell developer environment from scratch.
|
||||
`ghcup` makes it easy to install specific versions of `ghc` on GNU/Linux,
|
||||
macOS (aka Darwin) and FreeBSD and can also bootstrap a fresh Haskell developer environment from scratch.
|
||||
It follows the unix UNIX philosophy of [do one thing and do it well](https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_and_Do_It_Well).
|
||||
|
||||
Similar in scope to [rustup](https://github.com/rust-lang-nursery/rustup.rs), [pyenv](https://github.com/pyenv/pyenv) and [jenv](http://www.jenv.be).
|
||||
|
||||
@@ -85,6 +85,8 @@ validate dls = do
|
||||
when ((not $ any (== Darwin) pspecs) && arch == A_64) $ do
|
||||
lift $ $(logError) [i|Darwin missing for #{t} #{v'} #{arch}|]
|
||||
addError
|
||||
when ((not $ any (== FreeBSD) pspecs) && arch == A_64) $ lift $ $(logWarn)
|
||||
[i|FreeBSD missing for #{t} #{v'} #{arch}|]
|
||||
|
||||
checkUniqueTags tool = do
|
||||
let allTags = join $ M.elems $ availableToolVersions dls tool
|
||||
|
||||
@@ -283,6 +283,7 @@ changelog' AppState {..} (_, ListResult {..}) = do
|
||||
let cmd = case _rPlatform pfreq of
|
||||
Darwin -> "open"
|
||||
Linux _ -> "xdg-open"
|
||||
FreeBSD -> "xdg-open"
|
||||
exec cmd True [serializeURIRef' uri] Nothing Nothing >>= \case
|
||||
Right _ -> pure $ Right ()
|
||||
Left e -> pure $ Left [i|#{e}|]
|
||||
|
||||
@@ -38,6 +38,7 @@ import Control.Monad.Fail ( MonadFail )
|
||||
import Control.Monad.Logger
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad.Trans.Resource
|
||||
import Data.Aeson ( eitherDecode )
|
||||
import Data.Bifunctor
|
||||
import Data.Char
|
||||
import Data.Either
|
||||
@@ -68,6 +69,7 @@ import URI.ByteString
|
||||
|
||||
import qualified Data.ByteString as B
|
||||
import qualified Data.ByteString.UTF8 as UTF8
|
||||
import qualified Data.ByteString.Lazy.UTF8 as BLU
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.IO as T
|
||||
import qualified Data.Text.Encoding as E
|
||||
@@ -119,6 +121,7 @@ data InstallCommand = InstallGHC InstallOptions
|
||||
data InstallOptions = InstallOptions
|
||||
{ instVer :: Maybe ToolVersion
|
||||
, instPlatform :: Maybe PlatformRequest
|
||||
, instBindist :: Maybe DownloadInfo
|
||||
}
|
||||
|
||||
data SetCommand = SetGHC SetOptions
|
||||
@@ -405,7 +408,7 @@ installParser =
|
||||
|
||||
installOpts :: Parser InstallOptions
|
||||
installOpts =
|
||||
(flip InstallOptions)
|
||||
(\p u v -> InstallOptions v p u)
|
||||
<$> (optional
|
||||
(option
|
||||
(eitherReader platformParser)
|
||||
@@ -417,6 +420,17 @@ installOpts =
|
||||
)
|
||||
)
|
||||
)
|
||||
<*> (optional
|
||||
(option
|
||||
(eitherReader bindistParser)
|
||||
( short 'u'
|
||||
<> long "url"
|
||||
<> metavar "BINDIST_URL"
|
||||
<> help
|
||||
"Provide DownloadInfo as json string, e.g.: '{ \"dlHash\": \"<sha256 hash>\", \"dlSubdir\": \"ghc-<ver>\", \"dlUri\": \"<uri>\" }'"
|
||||
)
|
||||
)
|
||||
)
|
||||
<*> optional toolVersionArgument
|
||||
|
||||
|
||||
@@ -749,7 +763,15 @@ platformParser s' = case MP.parse (platformP <* MP.eof) "" (T.pack s') of
|
||||
archP = (MP.try (MP.chunk "x86_64" $> A_64)) <|> (MP.chunk "i386" $> A_32)
|
||||
platformP :: MP.Parsec Void Text PlatformRequest
|
||||
platformP = choice'
|
||||
[ (\a mv -> PlatformRequest a Darwin mv)
|
||||
[ (\a mv -> PlatformRequest a FreeBSD mv)
|
||||
<$> (archP <* MP.chunk "-")
|
||||
<*> ( MP.chunk "portbld"
|
||||
*> ( MP.try (Just <$> verP (MP.chunk "-freebsd" <* MP.eof))
|
||||
<|> pure Nothing
|
||||
)
|
||||
<* MP.chunk "-freebsd"
|
||||
)
|
||||
, (\a mv -> PlatformRequest a Darwin mv)
|
||||
<$> (archP <* MP.chunk "-")
|
||||
<*> ( MP.chunk "apple"
|
||||
*> ( MP.try (Just <$> verP (MP.chunk "-darwin" <* MP.eof))
|
||||
@@ -792,6 +814,8 @@ platformParser s' = case MP.parse (platformP <* MP.eof) "" (T.pack s') of
|
||||
pure v
|
||||
|
||||
|
||||
bindistParser :: String -> Either String DownloadInfo
|
||||
bindistParser = eitherDecode . BLU.fromString
|
||||
|
||||
|
||||
toSettings :: Options -> Settings
|
||||
@@ -1039,7 +1063,9 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
|
||||
let installGHC InstallOptions{..} =
|
||||
(runInstTool $ do
|
||||
v <- liftE $ fromVersion dls instVer GHC
|
||||
liftE $ installGHCBin dls (_tvVersion v) (fromMaybe pfreq instPlatform) -- FIXME: ugly sharing of tool version
|
||||
case instBindist of
|
||||
Nothing -> liftE $ installGHCBin dls (_tvVersion v) (fromMaybe pfreq instPlatform)
|
||||
Just uri -> liftE $ installGHCBindist uri (_tvVersion v) (fromMaybe pfreq instPlatform)
|
||||
)
|
||||
>>= \case
|
||||
VRight _ -> do
|
||||
@@ -1073,7 +1099,9 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
|
||||
let installCabal InstallOptions{..} =
|
||||
(runInstTool $ do
|
||||
v <- liftE $ fromVersion dls instVer Cabal
|
||||
liftE $ installCabalBin dls (_tvVersion v) (fromMaybe pfreq instPlatform) -- FIXME: ugly sharing of tool version
|
||||
case instBindist of
|
||||
Nothing -> liftE $ installCabalBin dls (_tvVersion v) (fromMaybe pfreq instPlatform)
|
||||
Just uri -> liftE $ installCabalBindist uri (_tvVersion v) (fromMaybe pfreq instPlatform)
|
||||
)
|
||||
>>= \case
|
||||
VRight _ -> do
|
||||
@@ -1306,6 +1334,7 @@ Make sure to clean up #{tmpdir} afterwards.|])
|
||||
cmd = case _rPlatform pfreq of
|
||||
Darwin -> "open"
|
||||
Linux _ -> "xdg-open"
|
||||
FreeBSD -> "xdg-open"
|
||||
|
||||
if clOpen
|
||||
then
|
||||
|
||||
@@ -52,6 +52,18 @@ download_ghcup() {
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"FreeBSD"|"freebsd")
|
||||
case "${_arch}" in
|
||||
x86_64|amd64)
|
||||
;;
|
||||
i*86)
|
||||
die "i386 currently not supported!"
|
||||
;;
|
||||
*) die "Unknown architecture: ${_arch}"
|
||||
;;
|
||||
esac
|
||||
_url=${_base_url}/${_ghver}/x86_64-portbld-freebsd-ghcup-${_ghver}
|
||||
;;
|
||||
"Darwin"|"darwin")
|
||||
case "${_arch}" in
|
||||
x86_64|amd64)
|
||||
|
||||
144
ghcup-0.0.2.json
144
ghcup-0.0.2.json
@@ -19,6 +19,21 @@
|
||||
"notes": ""
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"distroPKGs": [
|
||||
"curl",
|
||||
"gcc",
|
||||
"gmp",
|
||||
"gmake",
|
||||
"ncurses",
|
||||
"perl5",
|
||||
"libffi",
|
||||
"libiconv"
|
||||
],
|
||||
"notes": ""
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"distroPKGs": [
|
||||
@@ -204,6 +219,13 @@
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.0.2-x86_64-alpine-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "b36a20e5cae24d70bbb6116ae486f21811e9384f15d3892d260f02fba3e3bb8c",
|
||||
"dlSubdir": "ghc-8.0.2",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"7": {
|
||||
"dlHash": "b2f5c304b57ac5840a0d2ef763a3c6fa858c70840f749cfad12ed227da973c0a",
|
||||
@@ -389,6 +411,13 @@
|
||||
"8.4.1": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "e748daec098445c6190090fe32bb2817a1140553be5acd2188e1af05ad24e5aa",
|
||||
"dlSubdir": "ghc-8.4.1",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.4.1/ghc-8.4.1-x86_64-portbld11-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "427c77a934b30c3f1de992c38c072afb4323fe6fb30dbac919ca8cb6ae98fbd9",
|
||||
@@ -476,6 +505,13 @@
|
||||
"8.6.3": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "bc2419fa180f8a7808c49775987866435995df9bdd9ce08bcd38352d63ba6031",
|
||||
"dlSubdir": "ghc-8.6.3",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.6.3/ghc-8.6.3-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "e7954c8ed9b422a09c6ab737e4a0865a2725d034ba0e272bd5c70db910797f99",
|
||||
@@ -606,6 +642,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-alpine3.10-linux-integer-simple.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "52d27dbf9de82005dde9bfc521bff612e381b5228af194259c2306d2b75825c2",
|
||||
"dlSubdir": "ghc-8.10.1",
|
||||
"dlUri": "https://downloads.haskell.org/ghc/8.10.1/ghc-8.10.1-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "d1cf7886f27af070f3b7dbe1975a78b43ef2d32b86362cbe953e79464fe70761",
|
||||
@@ -764,6 +807,13 @@
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.6.5-x86_64-alpine-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "83a3059a630d40a98e26cb5b520354e12094a96e36ba2f5ab002dad94cf2fb37",
|
||||
"dlSubdir": "ghc-8.6.5",
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.6.5-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "bc75f5601a9f41d58b2ba161b9e28fad52143a7229060f1e084168d9b2e914df",
|
||||
@@ -894,6 +944,13 @@
|
||||
"8.4.2": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "e9ed417fdf94c2ff2c6e344ed16f332bf6b591511f6442c0d9ea94854882b66c",
|
||||
"dlSubdir": "ghc-8.4.2",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "3f4f5bbd2cdab4e7015ada9196d8d9b3a1ad274293cef011f85c46854596cb57",
|
||||
@@ -1126,6 +1183,13 @@
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.8.4-x86_64-alpine-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "8cebe5ccf454e82acd1ff52ca57590d1ab0f3f44a981b46257ec12158c8c447e",
|
||||
"dlSubdir": "ghc-8.8.4",
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.8.4-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "4862559d221153caf978f4bf2c15a82c114d1e1f43b298b2ecff2ac94b586d20",
|
||||
@@ -1359,6 +1423,13 @@
|
||||
"8.6.1": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "51403b054a3a649039ac988e1d1112561f96750bfced63df864091a3fab36f08",
|
||||
"dlSubdir": "ghc-8.6.1",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.6.1/ghc-8.6.1-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "97d44f303868d74e4d13a2e99c82ffce3d25fd54c704675e5a1939e0d824dbf0",
|
||||
@@ -1584,6 +1655,13 @@
|
||||
"7.10.3": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "2aa396edd2bb651f4bc7eef7a396913ea24923de5aafdc76df6295333e487e48",
|
||||
"dlSubdir": "ghc-7.10.3",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-x86_64-portbld-freebsd.tar.bz2"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "01cfbad8dff1e8b34a5fdca8caeaf843b56e36af919e29cd68870d2588563db5",
|
||||
@@ -1635,6 +1713,13 @@
|
||||
}
|
||||
},
|
||||
"A_32": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "3dde05577c6f94dcb0ba201ebd53ab88553bbc9a3aa8e72237162ed7a9d588a3",
|
||||
"dlSubdir": "ghc-7.10.3",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-i386-portbld-freebsd.tar.bz2"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "d2ccf072457fb100503f6f5430a1e3589ca525a97424263d036b0550bc277f0c",
|
||||
@@ -1699,6 +1784,23 @@
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.2.2-x86_64-alpine-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "cd351c704b92b9af23994024df07de8ca7090ea7675d5c8b14b2be857a46d804",
|
||||
"dlSubdir": "ghc-8.2.2",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-x86_64-portbld11-freebsd.tar.xz"
|
||||
},
|
||||
"11": {
|
||||
"dlHash": "cd351c704b92b9af23994024df07de8ca7090ea7675d5c8b14b2be857a46d804",
|
||||
"dlSubdir": "ghc-8.2.2",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-x86_64-portbld11-freebsd.tar.xz"
|
||||
},
|
||||
"10": {
|
||||
"dlHash": "9e99aaeaec4b2c6d660d80246c0d4dbd41fda88f1eb7a908b29dc8fa8d663949",
|
||||
"dlSubdir": "ghc-8.2.2",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-x86_64-portbld10_3-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"7": {
|
||||
"dlHash": "cd7afbca54edf9890da9f432c63366556246c85c1198e40c99df5af01c555834",
|
||||
@@ -1803,6 +1905,13 @@
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.4.4-x86_64-alpine-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "44fbd142d1c355d6110595c59c760e2c73866ff9259ec85ebf814edb244d1940",
|
||||
"dlSubdir": "ghc-8.4.4",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-portbld-freebsd11.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "47c80a32d8f02838a2401414c94ba260d1fe82b7d090479994522242c767cc83",
|
||||
@@ -1933,6 +2042,13 @@
|
||||
"8.8.3": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "569719075b4d14b3875a899df522090ae31e6fe085e6dffe518e875b09a2f0be",
|
||||
"dlSubdir": "ghc-8.8.3",
|
||||
"dlUri": "https://files.hasufell.de/ghc/ghc-8.8.3-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_Debian": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "42fde2ef5a143e1e6b47ae8875162ea2d4d54b06f0f7fa32ee4f0eb86f2be7ad",
|
||||
@@ -2065,6 +2181,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-x86_64-alpine-linux-musl.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "2240842ab2ae7b955feb8b526aba1c7991248c803383107adf39990441294d2a",
|
||||
"dlSubdir": null,
|
||||
"dlUri": "https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Darwin": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "d4857e068560515e4cbb0e8ca124c370e07892f2a28804d87152834e5fe2b845",
|
||||
@@ -2115,6 +2238,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-alpine-linux-musl.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "f1e35151cca91541b0fb4bdb3ed18f3c348038eab751845ad19c11307d66c273",
|
||||
"dlSubdir": null,
|
||||
"dlUri": "https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Darwin": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "9197c17d2ece0f934f5b33e323cfcaf486e4681952687bc3d249488ce3cbe0e9",
|
||||
@@ -2168,6 +2298,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-alpine-linux-musl.tar.xz"
|
||||
}
|
||||
},
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "33b7d37ea0688c93436eac9ec139d9967687875aa1fa13f2bb73bf05a9a59a1d",
|
||||
"dlSubdir": null,
|
||||
"dlUri": "https://downloads.haskell.org/~cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-portbld-freebsd.tar.xz"
|
||||
}
|
||||
},
|
||||
"Darwin": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "56361cf4b0d920fe23174751fea1fb82a8e1ce522bd9706a3fbe47a72e458c9c",
|
||||
@@ -2206,6 +2343,13 @@
|
||||
"0.1.7": {
|
||||
"viArch": {
|
||||
"A_64": {
|
||||
"FreeBSD": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "54b9b6f98908f6679dda6db025b4047dfe82e6b57ae82c547a9d611b9e4ff105",
|
||||
"dlSubdir": null,
|
||||
"dlUri": "https://downloads.haskell.org/~ghcup/0.1.7/x86_64-portbld-freebsd-ghcup-0.1.7"
|
||||
}
|
||||
},
|
||||
"Darwin": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "00b2c04755d2b40e568afbfc2a485c36697fc55f210eae0d4cd80413c71032ed",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cabal-version: 3.0
|
||||
name: ghcup
|
||||
version: 0.1.7
|
||||
version: 0.1.8
|
||||
synopsis: ghc toolchain installer as an exe/library
|
||||
description:
|
||||
A rewrite of the shell script ghcup, for providing
|
||||
@@ -341,6 +341,7 @@ executable ghcup
|
||||
import:
|
||||
config
|
||||
, base
|
||||
, aeson
|
||||
, bytestring
|
||||
, containers
|
||||
, haskus-utils-variant
|
||||
|
||||
117
lib/GHCup.hs
117
lib/GHCup.hs
@@ -77,7 +77,7 @@ import qualified Data.Text.Encoding as E
|
||||
|
||||
|
||||
|
||||
installGHCBin :: ( MonadFail m
|
||||
installGHCBindist :: ( MonadFail m
|
||||
, MonadMask m
|
||||
, MonadCatch m
|
||||
, MonadReader Settings m
|
||||
@@ -85,7 +85,7 @@ installGHCBin :: ( MonadFail m
|
||||
, MonadResource m
|
||||
, MonadIO m
|
||||
)
|
||||
=> GHCupDownloads
|
||||
=> DownloadInfo
|
||||
-> Version
|
||||
-> PlatformRequest
|
||||
-> Excepts
|
||||
@@ -102,14 +102,13 @@ installGHCBin :: ( MonadFail m
|
||||
]
|
||||
m
|
||||
()
|
||||
installGHCBin bDls ver pfreq@(PlatformRequest {..}) = do
|
||||
installGHCBindist dlinfo ver (PlatformRequest {..}) = do
|
||||
let tver = (mkTVer ver)
|
||||
lift $ $(logDebug) [i|Requested to install GHC with #{ver}|]
|
||||
whenM (liftIO $ ghcInstalled tver)
|
||||
$ (throwE $ AlreadyInstalled GHC ver)
|
||||
|
||||
-- download (or use cached version)
|
||||
dlinfo <- lE $ getDownloadInfo GHC ver pfreq bDls
|
||||
dl <- liftE $ downloadCached dlinfo Nothing
|
||||
|
||||
-- unpack
|
||||
@@ -150,32 +149,62 @@ installGHCBin bDls ver pfreq@(PlatformRequest {..}) = do
|
||||
| otherwise = []
|
||||
|
||||
|
||||
installCabalBin :: ( MonadMask m
|
||||
, MonadCatch m
|
||||
, MonadReader Settings m
|
||||
, MonadLogger m
|
||||
, MonadResource m
|
||||
, MonadIO m
|
||||
, MonadFail m
|
||||
)
|
||||
=> GHCupDownloads
|
||||
-> Version
|
||||
-> PlatformRequest
|
||||
-> Excepts
|
||||
'[ AlreadyInstalled
|
||||
, CopyError
|
||||
, DigestError
|
||||
, DownloadFailed
|
||||
, NoDownload
|
||||
, NotInstalled
|
||||
, UnknownArchive
|
||||
installGHCBin :: ( MonadFail m
|
||||
, MonadMask m
|
||||
, MonadCatch m
|
||||
, MonadReader Settings m
|
||||
, MonadLogger m
|
||||
, MonadResource m
|
||||
, MonadIO m
|
||||
)
|
||||
=> GHCupDownloads
|
||||
-> Version
|
||||
-> PlatformRequest
|
||||
-> Excepts
|
||||
'[ AlreadyInstalled
|
||||
, BuildFailed
|
||||
, DigestError
|
||||
, DownloadFailed
|
||||
, NoDownload
|
||||
, NotInstalled
|
||||
, UnknownArchive
|
||||
#if !defined(TAR)
|
||||
, ArchiveResult
|
||||
, ArchiveResult
|
||||
#endif
|
||||
]
|
||||
m
|
||||
()
|
||||
installCabalBin bDls ver pfreq@(PlatformRequest {..}) = do
|
||||
]
|
||||
m
|
||||
()
|
||||
installGHCBin bDls ver pfreq = do
|
||||
dlinfo <- lE $ getDownloadInfo GHC ver pfreq bDls
|
||||
installGHCBindist dlinfo ver pfreq
|
||||
|
||||
|
||||
installCabalBindist :: ( MonadMask m
|
||||
, MonadCatch m
|
||||
, MonadReader Settings m
|
||||
, MonadLogger m
|
||||
, MonadResource m
|
||||
, MonadIO m
|
||||
, MonadFail m
|
||||
)
|
||||
=> DownloadInfo
|
||||
-> Version
|
||||
-> PlatformRequest
|
||||
-> Excepts
|
||||
'[ AlreadyInstalled
|
||||
, CopyError
|
||||
, DigestError
|
||||
, DownloadFailed
|
||||
, NoDownload
|
||||
, NotInstalled
|
||||
, UnknownArchive
|
||||
#if !defined(TAR)
|
||||
, ArchiveResult
|
||||
#endif
|
||||
]
|
||||
m
|
||||
()
|
||||
installCabalBindist dlinfo ver (PlatformRequest {..}) = do
|
||||
lift $ $(logDebug) [i|Requested to install cabal version #{ver}|]
|
||||
|
||||
bindir <- liftIO ghcupBinDir
|
||||
@@ -190,7 +219,6 @@ installCabalBin bDls ver pfreq@(PlatformRequest {..}) = do
|
||||
$ (throwE $ AlreadyInstalled Cabal ver)
|
||||
|
||||
-- download (or use cached version)
|
||||
dlinfo <- lE $ getDownloadInfo Cabal ver pfreq bDls
|
||||
dl <- liftE $ downloadCached dlinfo Nothing
|
||||
|
||||
-- unpack
|
||||
@@ -227,6 +255,37 @@ installCabalBin bDls ver pfreq@(PlatformRequest {..}) = do
|
||||
Overwrite
|
||||
|
||||
|
||||
installCabalBin :: ( MonadMask m
|
||||
, MonadCatch m
|
||||
, MonadReader Settings m
|
||||
, MonadLogger m
|
||||
, MonadResource m
|
||||
, MonadIO m
|
||||
, MonadFail m
|
||||
)
|
||||
=> GHCupDownloads
|
||||
-> Version
|
||||
-> PlatformRequest
|
||||
-> Excepts
|
||||
'[ AlreadyInstalled
|
||||
, CopyError
|
||||
, DigestError
|
||||
, DownloadFailed
|
||||
, NoDownload
|
||||
, NotInstalled
|
||||
, UnknownArchive
|
||||
#if !defined(TAR)
|
||||
, ArchiveResult
|
||||
#endif
|
||||
]
|
||||
m
|
||||
()
|
||||
installCabalBin bDls ver pfreq = do
|
||||
dlinfo <- lE $ getDownloadInfo Cabal ver pfreq bDls
|
||||
installCabalBindist dlinfo ver pfreq
|
||||
|
||||
|
||||
|
||||
|
||||
---------------------
|
||||
--[ Set GHC/cabal ]--
|
||||
|
||||
@@ -50,6 +50,18 @@ ghc_7103_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-7.10.3|])
|
||||
"80893e367e8318105f7db2064adf202e3d96b1f014e792b73e92f2cacf0b757a"
|
||||
|
||||
ghc_7103_64_freebsd :: DownloadInfo
|
||||
ghc_7103_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-x86_64-portbld-freebsd.tar.bz2|]
|
||||
(Just [rel|ghc-7.10.3|])
|
||||
"2aa396edd2bb651f4bc7eef7a396913ea24923de5aafdc76df6295333e487e48"
|
||||
|
||||
ghc_7103_32_freebsd :: DownloadInfo
|
||||
ghc_7103_32_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-i386-portbld-freebsd.tar.bz2|]
|
||||
(Just [rel|ghc-7.10.3|])
|
||||
"3dde05577c6f94dcb0ba201ebd53ab88553bbc9a3aa8e72237162ed7a9d588a3"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -82,6 +94,12 @@ ghc_802_32_deb8 = DownloadInfo
|
||||
(Just [rel|ghc-8.0.2|])
|
||||
"818621342a2161b8afcc995a0765816bb40aefbfa1db2c8a7d59c04d8b18228a"
|
||||
|
||||
ghc_802_64_freebsd :: DownloadInfo
|
||||
ghc_802_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.0.2|])
|
||||
"b36a20e5cae24d70bbb6116ae486f21811e9384f15d3892d260f02fba3e3bb8c"
|
||||
|
||||
ghc_802_64_darwin :: DownloadInfo
|
||||
ghc_802_64_darwin = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-x86_64-apple-darwin.tar.xz|]
|
||||
@@ -144,6 +162,18 @@ ghc_822_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.2.2|])
|
||||
"f90fcf62f7e0936a6dfc3601cf663729bfe9bbf85097d2d75f0a16f8c2e95c27"
|
||||
|
||||
ghc_822_64_freebsd10 :: DownloadInfo
|
||||
ghc_822_64_freebsd10 = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-x86_64-portbld10_3-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.2.2|])
|
||||
"9e99aaeaec4b2c6d660d80246c0d4dbd41fda88f1eb7a908b29dc8fa8d663949"
|
||||
|
||||
ghc_822_64_freebsd11 :: DownloadInfo
|
||||
ghc_822_64_freebsd11 = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-x86_64-portbld11-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.2.2|])
|
||||
"cd351c704b92b9af23994024df07de8ca7090ea7675d5c8b14b2be857a46d804"
|
||||
|
||||
ghc_822_32_alpine :: DownloadInfo
|
||||
ghc_822_32_alpine = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.2.2-i386-alpine-linux.tar.xz|]
|
||||
@@ -189,6 +219,11 @@ ghc_841_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.4.1|])
|
||||
"d774e39f3a0105843efd06709b214ee332c30203e6c5902dd6ed45e36285f9b7"
|
||||
|
||||
ghc_841_64_freebsd :: DownloadInfo
|
||||
ghc_841_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.4.1/ghc-8.4.1-x86_64-portbld11-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.4.1|])
|
||||
"e748daec098445c6190090fe32bb2817a1140553be5acd2188e1af05ad24e5aa"
|
||||
|
||||
|
||||
|
||||
@@ -229,6 +264,12 @@ ghc_842_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.4.2|])
|
||||
"87469222042b9ac23f9db216a8d4e5107297bdbbb99df71eb4d9e7208455def2"
|
||||
|
||||
ghc_842_64_freebsd :: DownloadInfo
|
||||
ghc_842_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.4.2|])
|
||||
"e9ed417fdf94c2ff2c6e344ed16f332bf6b591511f6442c0d9ea94854882b66c"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -312,6 +353,12 @@ ghc_844_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.4.4|])
|
||||
"28dc89ebd231335337c656f4c5ead2ae2a1acc166aafe74a14f084393c5ef03a"
|
||||
|
||||
ghc_844_64_freebsd :: DownloadInfo
|
||||
ghc_844_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-portbld-freebsd11.tar.xz|]
|
||||
(Just [rel|ghc-8.4.4|])
|
||||
"44fbd142d1c355d6110595c59c760e2c73866ff9259ec85ebf814edb244d1940"
|
||||
|
||||
ghc_844_32_alpine :: DownloadInfo
|
||||
ghc_844_32_alpine = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.4.4-i386-alpine-linux.tar.xz|]
|
||||
@@ -361,6 +408,12 @@ ghc_861_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.6.1|])
|
||||
"9692cdfd202b0e039ea0c3dde5dbf653736c836ca1df46504b179b572100808c"
|
||||
|
||||
ghc_861_64_freebsd :: DownloadInfo
|
||||
ghc_861_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.6.1/ghc-8.6.1-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.6.1|])
|
||||
"51403b054a3a649039ac988e1d1112561f96750bfced63df864091a3fab36f08"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -438,6 +491,13 @@ ghc_863_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.6.3|])
|
||||
"79d069a1a7d74cfdd7ac2a2711c45d3ddc6265b988a0cefa342714b24f997fc1"
|
||||
|
||||
ghc_863_64_freebsd :: DownloadInfo
|
||||
ghc_863_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.6.3/ghc-8.6.3-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.6.3|])
|
||||
"bc2419fa180f8a7808c49775987866435995df9bdd9ce08bcd38352d63ba6031"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -533,6 +593,12 @@ ghc_865_32_alpine = DownloadInfo
|
||||
(Just [rel|ghc-8.6.5|])
|
||||
"3737837550d9b177acfe150e3a3cd4545427ded020487c2ed5194d7b8f116349"
|
||||
|
||||
ghc_865_64_freebsd :: DownloadInfo
|
||||
ghc_865_64_freebsd = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.6.5-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.6.5|])
|
||||
"83a3059a630d40a98e26cb5b520354e12094a96e36ba2f5ab002dad94cf2fb37"
|
||||
|
||||
|
||||
|
||||
-----------------
|
||||
@@ -667,6 +733,12 @@ ghc_883_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.8.3|])
|
||||
"7016de90dd226b06fc79d0759c5d4c83c2ab01d8c678905442c28bd948dbb782"
|
||||
|
||||
ghc_883_64_freebsd :: DownloadInfo
|
||||
ghc_883_64_freebsd = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.8.3-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.8.3|])
|
||||
"569719075b4d14b3875a899df522090ae31e6fe085e6dffe518e875b09a2f0be"
|
||||
|
||||
|
||||
|
||||
-----------------
|
||||
@@ -711,6 +783,12 @@ ghc_884_64_darwin = DownloadInfo
|
||||
(Just [rel|ghc-8.8.4|])
|
||||
"e80a789e9d8cfb41dd87f3284b75432427c4461c1731d220d04ead8733ccdb5e"
|
||||
|
||||
ghc_884_64_freebsd :: DownloadInfo
|
||||
ghc_884_64_freebsd = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.8.4-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.8.4|])
|
||||
"8cebe5ccf454e82acd1ff52ca57590d1ab0f3f44a981b46257ec12158c8c447e"
|
||||
|
||||
ghc_884_64_alpine :: DownloadInfo
|
||||
ghc_884_64_alpine = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.8.4-x86_64-alpine-linux.tar.xz|]
|
||||
@@ -786,6 +864,12 @@ ghc_8101_32_alpine = DownloadInfo
|
||||
(Just [rel|ghc-8.10.1|])
|
||||
"7360cc6b29e9b4ab08f6ea5bc3bcca6f5c216933e81ef1620dcdd700f1fdb289"
|
||||
|
||||
ghc_8101_64_freebsd :: DownloadInfo
|
||||
ghc_8101_64_freebsd = DownloadInfo
|
||||
[uri|https://files.hasufell.de/ghc/ghc-8.10.1-x86_64-portbld-freebsd.tar.xz|]
|
||||
(Just [rel|ghc-8.10.1|])
|
||||
"e8646ec9b60fd40aa9505ee055f22f04601290ab7a1342c2cf37c34de9d3f142"
|
||||
|
||||
|
||||
|
||||
---------------------
|
||||
@@ -817,6 +901,12 @@ cabal_2410_64_alpine = DownloadInfo
|
||||
Nothing
|
||||
"720bef015f834a03deb7180be2952a44e7c2e6c8429137570404c3de4f46b984"
|
||||
|
||||
cabal_2410_64_freebsd :: DownloadInfo
|
||||
cabal_2410_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-portbld-freebsd.tar.xz|]
|
||||
Nothing
|
||||
"33b7d37ea0688c93436eac9ec139d9967687875aa1fa13f2bb73bf05a9a59a1d"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -843,6 +933,12 @@ cabal_3000_64_darwin = DownloadInfo
|
||||
Nothing
|
||||
"d4857e068560515e4cbb0e8ca124c370e07892f2a28804d87152834e5fe2b845"
|
||||
|
||||
cabal_3000_64_freebsd :: DownloadInfo
|
||||
cabal_3000_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-x86_64-portbld-freebsd.tar.xz|]
|
||||
Nothing
|
||||
"2240842ab2ae7b955feb8b526aba1c7991248c803383107adf39990441294d2a"
|
||||
|
||||
cabal_3000_32_alpine :: DownloadInfo
|
||||
cabal_3000_32_alpine = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-i386-alpine-linux-musl.tar.xz|]
|
||||
@@ -880,6 +976,12 @@ cabal_3200_64_darwin = DownloadInfo
|
||||
Nothing
|
||||
"9197c17d2ece0f934f5b33e323cfcaf486e4681952687bc3d249488ce3cbe0e9"
|
||||
|
||||
cabal_3200_64_freebsd :: DownloadInfo
|
||||
cabal_3200_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-portbld-freebsd.tar.xz|]
|
||||
Nothing
|
||||
"f1e35151cca91541b0fb4bdb3ed18f3c348038eab751845ad19c11307d66c273"
|
||||
|
||||
cabal_3200_32_alpine :: DownloadInfo
|
||||
cabal_3200_32_alpine = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-i386-alpine-linux-musl.tar.xz|]
|
||||
@@ -914,6 +1016,13 @@ ghcup_017_64_linux = DownloadInfo
|
||||
"a1d1e8b3c2b00186957c927d09f2cfb457bbfa65c1ab562ff5683963e205bdd5"
|
||||
|
||||
|
||||
ghcup_017_64_freebsd :: DownloadInfo
|
||||
ghcup_017_64_freebsd = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghcup/0.1.7/x86_64-portbld-freebsd-ghcup-0.1.7|]
|
||||
Nothing
|
||||
"54b9b6f98908f6679dda6db025b4047dfe82e6b57ae82c547a9d611b9e4ff105"
|
||||
|
||||
|
||||
ghcup_017_64_darwin10_13 :: DownloadInfo
|
||||
ghcup_017_64_darwin10_13 = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghcup/0.1.7/x86_64-apple-darwin-ghcup-0.1.7|]
|
||||
@@ -958,6 +1067,7 @@ ghcupDownloads = M.fromList
|
||||
, M.fromList [(Nothing, ghc_7103_64_cenots67)]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_7103_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_7103_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -972,6 +1082,7 @@ ghcupDownloads = M.fromList
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_7103_32_cenots67)]
|
||||
)
|
||||
, (FreeBSD, M.fromList [(Nothing, ghc_7103_32_freebsd)])
|
||||
]
|
||||
)
|
||||
]
|
||||
@@ -1002,6 +1113,7 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_802_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_802_64_freebsd)])
|
||||
, (Linux Alpine , M.fromList [(Nothing, ghc_802_64_alpine)])
|
||||
]
|
||||
)
|
||||
@@ -1047,6 +1159,13 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin, M.fromList [(Nothing, ghc_822_64_darwin)])
|
||||
, ( FreeBSD
|
||||
, M.fromList
|
||||
[ (Nothing , ghc_822_64_freebsd11)
|
||||
, (Just [vers|10|], ghc_822_64_freebsd10)
|
||||
, (Just [vers|11|], ghc_822_64_freebsd11)
|
||||
]
|
||||
)
|
||||
, (Linux Alpine , M.fromList [(Nothing, ghc_822_64_alpine)])
|
||||
]
|
||||
)
|
||||
@@ -1090,6 +1209,7 @@ ghcupDownloads = M.fromList
|
||||
, (Linux Mint , M.fromList [(Nothing, ghc_841_64_fedora)])
|
||||
, (Linux Debian, M.fromList [(Nothing, ghc_841_64_deb8)])
|
||||
, (Darwin , M.fromList [(Nothing, ghc_841_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_841_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1137,6 +1257,7 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_842_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_842_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1236,6 +1357,7 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_844_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_844_64_freebsd)])
|
||||
, (Linux Alpine, M.fromList [(Nothing, ghc_844_64_alpine)])
|
||||
]
|
||||
)
|
||||
@@ -1285,6 +1407,7 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_861_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_861_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1379,6 +1502,7 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_863_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_863_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1479,6 +1603,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_865_64_darwin)])
|
||||
, (Linux Alpine, M.fromList [(Nothing, ghc_865_64_alpine)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_865_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1636,6 +1761,7 @@ ghcupDownloads = M.fromList
|
||||
]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_883_64_darwin)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_883_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1689,6 +1815,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Darwin, M.fromList [(Nothing, ghc_884_64_darwin)])
|
||||
, (Linux Alpine, M.fromList [(Nothing, ghc_884_64_alpine)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_884_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1754,6 +1881,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghc_8101_64_darwin)])
|
||||
, (Linux Alpine, M.fromList [(Nothing, ghc_8101_64_alpine)])
|
||||
, (FreeBSD , M.fromList [(Nothing, ghc_8101_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1797,6 +1925,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Alpine, M.fromList [(Nothing, cabal_2410_64_alpine)])
|
||||
, (Darwin , M.fromList [(Nothing, cabal_2410_64_darwin)])
|
||||
, (FreeBSD, M.fromList [(Nothing, cabal_2410_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1827,6 +1956,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Alpine, M.fromList [(Nothing, cabal_3000_64_alpine)])
|
||||
, (Darwin , M.fromList [(Nothing, cabal_3000_64_darwin)])
|
||||
, (FreeBSD, M.fromList [(Nothing, cabal_3000_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1858,6 +1988,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Alpine, M.fromList [(Nothing, cabal_3200_64_alpine)])
|
||||
, (Darwin , M.fromList [(Nothing, cabal_3200_64_darwin)])
|
||||
, (FreeBSD, M.fromList [(Nothing, cabal_3200_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
@@ -1888,6 +2019,7 @@ ghcupDownloads = M.fromList
|
||||
, M.fromList [(Nothing, ghcup_017_64_linux)]
|
||||
)
|
||||
, (Darwin , M.fromList [(Nothing, ghcup_017_64_darwin10_13)])
|
||||
, (FreeBSD, M.fromList [(Nothing, ghcup_017_64_freebsd)])
|
||||
]
|
||||
)
|
||||
, ( A_32
|
||||
|
||||
@@ -123,6 +123,23 @@ toolRequirements = M.fromList
|
||||
)
|
||||
]
|
||||
)
|
||||
, ( FreeBSD
|
||||
, M.fromList
|
||||
[ ( Nothing
|
||||
, Requirements
|
||||
[ "curl"
|
||||
, "gcc"
|
||||
, "gmp"
|
||||
, "gmake"
|
||||
, "ncurses"
|
||||
, "perl5"
|
||||
, "libffi"
|
||||
, "libiconv"
|
||||
]
|
||||
""
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
@@ -91,11 +91,18 @@ getPlatform = do
|
||||
)
|
||||
<$> getDarwinVersion
|
||||
pure $ PlatformResult { _platform = Darwin, _distroVersion = ver }
|
||||
"freebsd" -> do
|
||||
ver <-
|
||||
(either (const Nothing) Just . versioning . decUTF8Safe)
|
||||
<$> getFreeBSDVersion
|
||||
pure $ PlatformResult { _platform = FreeBSD, _distroVersion = ver }
|
||||
what -> throwE $ NoCompatiblePlatform what
|
||||
lift $ $(logDebug) [i|Identified Platform as: #{pfr}|]
|
||||
pure pfr
|
||||
where
|
||||
getMajorVersion = T.intercalate "." . take 2 . T.split (== '.')
|
||||
getFreeBSDVersion =
|
||||
liftIO $ fmap _stdOut $ executeOut [rel|freebsd-version|] [] Nothing
|
||||
getDarwinVersion = liftIO $ fmap _stdOut $ executeOut [rel|sw_vers|]
|
||||
["-productVersion"]
|
||||
Nothing
|
||||
|
||||
@@ -102,6 +102,8 @@ data Architecture = A_64
|
||||
data Platform = Linux LinuxDistro
|
||||
-- ^ must exit
|
||||
| Darwin
|
||||
-- ^ must exit
|
||||
| FreeBSD
|
||||
deriving (Eq, GHC.Generic, Ord, Show)
|
||||
|
||||
data LinuxDistro = Debian
|
||||
|
||||
@@ -97,11 +97,13 @@ instance FromJSONKey (Maybe Versioning) where
|
||||
instance ToJSONKey Platform where
|
||||
toJSONKey = toJSONKeyText $ \case
|
||||
Darwin -> T.pack "Darwin"
|
||||
FreeBSD -> T.pack "FreeBSD"
|
||||
Linux d -> T.pack ("Linux_" <> show d)
|
||||
|
||||
instance FromJSONKey Platform where
|
||||
fromJSONKey = FromJSONKeyTextParser $ \t -> if
|
||||
| T.pack "Darwin" == t -> pure Darwin
|
||||
| T.pack "FreeBSD" == t -> pure FreeBSD
|
||||
| T.pack "Linux_" `T.isPrefixOf` t -> case
|
||||
T.stripPrefix (T.pack "Linux_") t
|
||||
of
|
||||
|
||||
@@ -10,6 +10,7 @@ import GHCup.Utils.Prelude
|
||||
import GHCup.Types
|
||||
|
||||
import Control.Concurrent
|
||||
import Control.Concurrent.Async
|
||||
import Control.Exception ( evaluate )
|
||||
import Control.Exception.Safe
|
||||
import Control.Monad
|
||||
@@ -57,14 +58,6 @@ import qualified "unix-bytestring" System.Posix.IO.ByteString
|
||||
|
||||
|
||||
|
||||
|
||||
-- | Bool signals whether the regions should be cleaned.
|
||||
data StopThread = StopThread Bool
|
||||
deriving Show
|
||||
|
||||
instance Exception StopThread
|
||||
|
||||
|
||||
data ProcessError = NonZeroExit Int ByteString [ByteString]
|
||||
| PTerminated ByteString [ByteString]
|
||||
| PStopped ByteString [ByteString]
|
||||
@@ -131,10 +124,9 @@ execLogged exe spath args lfile chdir env = do
|
||||
pState <- newEmptyMVar
|
||||
done <- newEmptyMVar
|
||||
void
|
||||
$ forkOS
|
||||
$ EX.handle (\(_ :: StopThread) -> pure ())
|
||||
$ forkIO
|
||||
$ EX.handle (\(_ :: IOException) -> pure ())
|
||||
$ flip finally (putMVar done ())
|
||||
$ flip EX.finally (putMVar done ())
|
||||
$ (if verbose
|
||||
then tee fd stdoutRead
|
||||
else printToRegion fd stdoutRead 6 pState
|
||||
@@ -157,7 +149,7 @@ execLogged exe spath args lfile chdir env = do
|
||||
e <- toProcessError exe args <$!> SPPB.getProcessStatus True True pid
|
||||
putMVar pState (either (const False) (const True) e)
|
||||
|
||||
takeMVar done
|
||||
void $ race (takeMVar done) (threadDelay (1000000 * 3))
|
||||
closeFd stdoutRead
|
||||
|
||||
pure e
|
||||
@@ -225,33 +217,41 @@ execLogged exe spath args lfile chdir env = do
|
||||
| BS.length bs > w && w > 5 -> BS.take (w - 4) bs <> "..."
|
||||
| otherwise -> bs
|
||||
|
||||
-- read an entire line from the file descriptor (removes the newline char)
|
||||
readLine :: MonadIO m => Fd -> ByteString -> m (ByteString, ByteString)
|
||||
readLine fd = go
|
||||
-- Consecutively read from Fd in 512 chunks until we hit
|
||||
-- newline or EOF.
|
||||
readLine :: MonadIO m
|
||||
=> Fd -- ^ input file descriptor
|
||||
-> ByteString -- ^ rest buffer (read across newline)
|
||||
-> m (ByteString, ByteString, Bool) -- ^ (full line, rest, eof)
|
||||
readLine fd = \inBs -> go inBs
|
||||
where
|
||||
go inBs = do
|
||||
bs <-
|
||||
liftIO
|
||||
$ handleIO (\e -> if isEOFError e then pure "" else ioError e)
|
||||
$ SPIB.fdRead fd 512
|
||||
let nbs = BS.append inBs bs
|
||||
(line, rest) = BS.span (/= _lf) nbs
|
||||
if
|
||||
| BS.length rest /= 0 -> pure (line, BS.tail rest)
|
||||
| BS.length line == 0 -> pure (mempty, mempty)
|
||||
| otherwise -> (\(l, r) -> (line <> l, r)) <$!> go mempty
|
||||
-- if buffer is not empty, process it first
|
||||
mbs <- if BS.length inBs == 0
|
||||
-- otherwise attempt read
|
||||
then liftIO
|
||||
$ handleIO (\e -> if isEOFError e then pure Nothing else ioError e)
|
||||
$ fmap Just
|
||||
$ SPIB.fdRead fd 512
|
||||
else pure $ Just inBs
|
||||
case mbs of
|
||||
Nothing -> pure ("", "", True)
|
||||
Just bs -> do
|
||||
-- split on newline
|
||||
let (line, rest) = BS.span (/= _lf) bs
|
||||
if
|
||||
| BS.length rest /= 0 -> pure (line, BS.tail rest, False)
|
||||
-- if rest is empty, then there was no newline, process further
|
||||
| otherwise -> (\(l, r, b) -> (line <> l, r, b)) <$!> go mempty
|
||||
|
||||
readTilEOF :: MonadIO m => (ByteString -> m a) -> Fd -> m ()
|
||||
readTilEOF ~action' fd' = go mempty
|
||||
where
|
||||
go bs' = do
|
||||
(bs, rest) <- readLine fd' bs'
|
||||
if
|
||||
| BS.length bs == 0 -> liftIO
|
||||
$ ioError (mkIOError eofErrorType "" Nothing Nothing)
|
||||
| otherwise -> do
|
||||
void $ action' bs
|
||||
go rest
|
||||
(bs, rest, eof) <- readLine fd' bs'
|
||||
if eof
|
||||
then liftIO $ ioError (mkIOError eofErrorType "" Nothing Nothing)
|
||||
else (void $ action' bs) >> go rest
|
||||
|
||||
|
||||
-- | Capture the stdout and stderr of the given action, which
|
||||
@@ -288,13 +288,12 @@ captureOutStreams action = do
|
||||
done <- newEmptyMVar
|
||||
_ <-
|
||||
forkIO
|
||||
$ EX.handle (\(_ :: StopThread) -> pure ())
|
||||
$ EX.handle (\(_ :: IOException) -> pure ())
|
||||
$ flip finally (putMVar done ())
|
||||
$ flip EX.finally (putMVar done ())
|
||||
$ writeStds parentStdoutRead parentStderrRead refOut refErr
|
||||
|
||||
status <- SPPB.getProcessStatus True True pid
|
||||
takeMVar done
|
||||
void $ race (takeMVar done) (threadDelay (1000000 * 3))
|
||||
|
||||
case status of
|
||||
-- readFd will take care of closing the fd
|
||||
@@ -314,13 +313,13 @@ captureOutStreams action = do
|
||||
void
|
||||
$ forkIO
|
||||
$ hideError eofErrorType
|
||||
$ flip finally (putMVar doneOut ())
|
||||
$ flip EX.finally (putMVar doneOut ())
|
||||
$ readTilEOF (\x -> modifyIORef' rout (<> x)) pout
|
||||
doneErr <- newEmptyMVar
|
||||
void
|
||||
$ forkIO
|
||||
$ hideError eofErrorType
|
||||
$ flip finally (putMVar doneErr ())
|
||||
$ flip EX.finally (putMVar doneErr ())
|
||||
$ readTilEOF (\x -> modifyIORef' rerr (<> x)) perr
|
||||
takeMVar doneOut
|
||||
takeMVar doneErr
|
||||
|
||||
@@ -16,7 +16,7 @@ ghcupURL :: URI
|
||||
ghcupURL = [uri|https://www.haskell.org/ghcup/data/ghcup-0.0.2.json|]
|
||||
|
||||
ghcUpVer :: PVP
|
||||
ghcUpVer = [pver|0.1.7|]
|
||||
ghcUpVer = [pver|0.1.8|]
|
||||
|
||||
numericVer :: String
|
||||
numericVer = T.unpack . prettyPVP $ ghcUpVer
|
||||
|
||||
@@ -134,6 +134,7 @@ hr {
|
||||
|
||||
#platform-instructions-linux > div > pre,
|
||||
#platform-instructions-mac > div > pre,
|
||||
#platform-instructions-freebsd > div > pre,
|
||||
#platform-instructions-win32 > div > pre,
|
||||
#platform-instructions-win64 > div > pre,
|
||||
#platform-instructions-default > div > div > pre,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var platforms = ["default", "unknown", "win32", "win64", "linux", "mac"];
|
||||
var platforms = ["default", "unknown", "win32", "win64", "linux", "freebsd", "mac"];
|
||||
var platform_override = null;
|
||||
|
||||
function detect_platform() {
|
||||
@@ -25,6 +25,8 @@ function detect_platform() {
|
||||
if (navigator.platform == "Win64" ||
|
||||
navigator.userAgent.indexOf("WOW64") != -1 ||
|
||||
navigator.userAgent.indexOf("Win64") != -1) { os = "win64"; }
|
||||
if (navigator.platform == "FreeBSD x86_64") {os = "freebsd";}
|
||||
if (navigator.platform == "FreeBSD amd64") {os = "freebsd";}
|
||||
// if (navigator.platform == "NetBSD x86_64") {os = "unix";}
|
||||
// if (navigator.platform == "NetBSD amd64") {os = "unix";}
|
||||
|
||||
@@ -32,6 +34,7 @@ function detect_platform() {
|
||||
if (os == "unknown") {
|
||||
if (navigator.appVersion.indexOf("Win")!=-1) {os = "win32";}
|
||||
if (navigator.appVersion.indexOf("Mac")!=-1) {os = "mac";}
|
||||
if (navigator.appVersion.indexOf("FreeBSD")!=-1) {os = "freebsd";}
|
||||
}
|
||||
|
||||
// Firefox Quantum likes to hide platform and appVersion but oscpu works
|
||||
@@ -40,6 +43,7 @@ function detect_platform() {
|
||||
if (navigator.oscpu.indexOf("Win64")!=-1) {os = "win64";}
|
||||
if (navigator.oscpu.indexOf("Mac")!=-1) {os = "mac";}
|
||||
if (navigator.oscpu.indexOf("Linux")!=-1) {os = "linux";}
|
||||
if (navigator.oscpu.indexOf("FreeBSD")!=-1) {os = "freebsd";}
|
||||
// if (navigator.oscpu.indexOf("NetBSD")!=-1) {os = "unix";}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
<p class="other-help">If you don't like curl | sh, see <a href="https://gitlab.haskell.org/haskell/ghcup-hs#manual-install">other installation methods</a>.<br/>You appear to be running macOS. If not, <a class="default-platform-button" href="#">display all supported installers</a>.</p>
|
||||
</div>
|
||||
|
||||
<div id="platform-instructions-freebsd" class="instructions" style="display: none;">
|
||||
<p>Run the following in your terminal (as a user other than root), then follow the onscreen instructions.</p>
|
||||
<div class="command-button"><pre><span class='ghcup-command'>curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</span></pre><button class="tooltip" onclick="copyToClipboard()"><img src="copy.svg" alt="" /><span class="tooltiptext">Copy to clipboard</span></button></div>
|
||||
<p class="other-help">If you don't like curl | sh, see <a href="https://gitlab.haskell.org/haskell/ghcup-hs#manual-install">other installation methods</a>.<br/>You appear to be running FreeBSD. If not, <a class="default-platform-button" href="#">display all supported installers</a>.</p>
|
||||
</div>
|
||||
|
||||
<div id="platform-instructions-win32" class="instructions">
|
||||
<p>
|
||||
To install Haskell, follow the instructions on
|
||||
@@ -62,7 +68,7 @@
|
||||
<!-- unrecognized platform: ask for help -->
|
||||
<p>I don't recognize your platform.</p>
|
||||
<p>
|
||||
ghcup runs on Linux and macOS. If
|
||||
ghcup runs on Linux, macOS and FreeBSD. If
|
||||
you are on one of these platforms and are seeing this then please
|
||||
<a href="https://gitlab.haskell.org/haskell/ghcup-hs/issues">report an issue</a>,
|
||||
along with the following values:
|
||||
@@ -77,7 +83,7 @@
|
||||
|
||||
<!-- duplicate the default cross-platform instructions -->
|
||||
<div>
|
||||
<p>If you are running Linux, macOS or Windows Subsystem for Linux, run the following in your terminal (as a user other than root), then follow the onscreen instructions.</p>
|
||||
<p>If you are running Linux, macOS, FreeBSD or Windows Subsystem for Linux, run the following in your terminal (as a user other than root), then follow the onscreen instructions.</p>
|
||||
<div class="command-button"><pre><span class='ghcup-command'>curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</span></pre><button class="tooltip" onclick="copyToClipboard()"><img src="copy.svg" alt="" /><span class="tooltiptext">Copy to clipboard</span></button></div>
|
||||
<p class="other-help">If you don't like curl | sh, see <a href="https://gitlab.haskell.org/haskell/ghcup-hs#manual-install">other installation methods</a>.</p>
|
||||
</div>
|
||||
@@ -95,7 +101,7 @@
|
||||
|
||||
<div id="platform-instructions-default" class="instructions">
|
||||
<div>
|
||||
<p>To install Haskell, if you are running Linux, macOS or Windows Subsystem for Linux, run the following
|
||||
<p>To install Haskell, if you are running Linux, macOS, FreeBSD or Windows Subsystem for Linux, run the following
|
||||
in your terminal (as a user other than root), then follow the onscreen instructions.</p>
|
||||
<div class="command-button"><pre><span class='ghcup-command'>curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</span></pre><button class="tooltip" onclick="copyToClipboard()"><img src="copy.svg" alt="" /><span class="tooltiptext">Copy to clipboard</span></button></div>
|
||||
<p class="other-help">If you don't like curl | sh, see <a href="https://gitlab.haskell.org/haskell/ghcup-hs#manual-install">other installation methods</a>.</p>
|
||||
@@ -140,7 +146,7 @@
|
||||
|
||||
<div id="platform-instructions-default" class="instructions">
|
||||
<div>
|
||||
<p>To install Haskell, if you are running Linux, macOS or Windows Subsystem for Linux, run the following
|
||||
<p>To install Haskell, if you are running Linux, macOS, FreeBSD or Windows Subsystem for Linux, run the following
|
||||
in your terminal (as a user other than root), then follow the onscreen instructions.</p>
|
||||
<pre><span class='ghcup-command'>curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</span></pre>
|
||||
<p class="other-help">If you don't like curl | sh, see <a href="https://gitlab.haskell.org/haskell/ghcup-hs#manual-install">other installation methods</a>.</p>
|
||||
|
||||
Reference in New Issue
Block a user