Update ghcup build
This commit is contained in:
parent
e6b0a8086a
commit
7e08589078
@ -2,15 +2,14 @@ packages: ./ghcup-gen/ghcup-gen.cabal
|
|||||||
|
|
||||||
package ghcup
|
package ghcup
|
||||||
tests: False
|
tests: False
|
||||||
flags: -tui +no-exe
|
flags: +tui +no-exe
|
||||||
|
|
||||||
source-repository-package
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
location: https://gitlab.haskell.org/haskell/ghcup-hs.git
|
location: https://github.com/haskell/ghcup-hs.git
|
||||||
tag: v0.1.17.8
|
tag: v0.1.19.0
|
||||||
|
|
||||||
constraints: http-io-streams -brotli,
|
constraints: http-io-streams -brotli,
|
||||||
any.Cabal ==3.6.2.0,
|
|
||||||
any.aeson >= 2.0.1.0
|
any.aeson >= 2.0.1.0
|
||||||
|
|
||||||
package libarchive
|
package libarchive
|
||||||
@ -25,5 +24,5 @@ package cabal-plan
|
|||||||
package aeson
|
package aeson
|
||||||
flags: +ordered-keymap
|
flags: +ordered-keymap
|
||||||
|
|
||||||
allow-newer: base, ghc-prim, template-haskell, language-c
|
package streamly
|
||||||
|
flags: +use-unliftio
|
||||||
|
@ -40,7 +40,7 @@ import System.Exit
|
|||||||
import System.FilePath
|
import System.FilePath
|
||||||
import System.IO
|
import System.IO
|
||||||
import Text.Regex.Posix
|
import Text.Regex.Posix
|
||||||
import GHCup.Utils.String.QQ
|
import GHCup.Prelude.String.QQ
|
||||||
|
|
||||||
import qualified Data.ByteString.Lazy as BSL
|
import qualified Data.ByteString.Lazy as BSL
|
||||||
import qualified Data.Map.Strict as M
|
import qualified Data.Map.Strict as M
|
||||||
@ -84,6 +84,7 @@ generateHLSGhc format output = do
|
|||||||
, DownloadFailed
|
, DownloadFailed
|
||||||
, UnknownArchive
|
, UnknownArchive
|
||||||
, ArchiveResult
|
, ArchiveResult
|
||||||
|
, ContentLengthError
|
||||||
] $ do
|
] $ do
|
||||||
fp <- liftE $ downloadCached dli Nothing
|
fp <- liftE $ downloadCached dli Nothing
|
||||||
let subd = _dlSubdir dli
|
let subd = _dlSubdir dli
|
||||||
|
@ -11,7 +11,7 @@ import GHCup.Types
|
|||||||
import GHCup.Errors
|
import GHCup.Errors
|
||||||
import GHCup.Platform
|
import GHCup.Platform
|
||||||
import GHCup.Utils.Dirs
|
import GHCup.Utils.Dirs
|
||||||
import GHCup.Utils.Logger
|
import GHCup.Prelude.Logger
|
||||||
import GHCup.Types.JSON ( )
|
import GHCup.Types.JSON ( )
|
||||||
|
|
||||||
import Control.Exception ( displayException )
|
import Control.Exception ( displayException )
|
||||||
@ -177,7 +177,7 @@ main = do
|
|||||||
, fancyColors = not no_color
|
, fancyColors = not no_color
|
||||||
}
|
}
|
||||||
dirs <- liftIO getAllDirs
|
dirs <- liftIO getAllDirs
|
||||||
let leanAppstate = LeanAppState (Settings True 0 False Never Curl True GHCupURL False GPGNone True) dirs defaultKeyBindings loggerConfig
|
let leanAppstate = LeanAppState (Settings True 0 Lax False Never Curl True GHCupURL False GPGNone True Nothing (DM mempty)) dirs defaultKeyBindings loggerConfig
|
||||||
|
|
||||||
pfreq <- (
|
pfreq <- (
|
||||||
flip runReaderT leanAppstate . runE @'[NoCompatiblePlatform, NoCompatibleArch, DistroNotFound] $ platformRequest
|
flip runReaderT leanAppstate . runE @'[NoCompatiblePlatform, NoCompatibleArch, DistroNotFound] $ platformRequest
|
||||||
@ -187,7 +187,7 @@ main = do
|
|||||||
flip runReaderT leanAppstate $ logError $ T.pack $ prettyShow e
|
flip runReaderT leanAppstate $ logError $ T.pack $ prettyShow e
|
||||||
liftIO $ exitWith (ExitFailure 2)
|
liftIO $ exitWith (ExitFailure 2)
|
||||||
|
|
||||||
let appstate = AppState (Settings True 0 False Never Curl True GHCupURL False GPGNone True) dirs defaultKeyBindings (GHCupInfo mempty mempty mempty) pfreq loggerConfig
|
let appstate = AppState (Settings True 0 Lax False Never Curl True GHCupURL False GPGNone True Nothing (DM mempty)) dirs defaultKeyBindings (GHCupInfo mempty mempty mempty) pfreq loggerConfig
|
||||||
|
|
||||||
let withValidateYamlOpts vopts f = case vopts of
|
let withValidateYamlOpts vopts f = case vopts of
|
||||||
ValidateYAMLOpts { vInput = Nothing } ->
|
ValidateYAMLOpts { vInput = Nothing } ->
|
||||||
|
@ -15,8 +15,8 @@ import GHCup.Errors
|
|||||||
import GHCup.Types
|
import GHCup.Types
|
||||||
import GHCup.Types.Optics
|
import GHCup.Types.Optics
|
||||||
import GHCup.Utils
|
import GHCup.Utils
|
||||||
import GHCup.Utils.Logger
|
import GHCup.Prelude.Logger
|
||||||
import GHCup.Utils.Version.QQ
|
import GHCup.Prelude.Version.QQ
|
||||||
|
|
||||||
import Codec.Archive
|
import Codec.Archive
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
@ -245,12 +245,13 @@ validateTarballs (TarballFilter etool versionRegex) = do
|
|||||||
, DownloadFailed
|
, DownloadFailed
|
||||||
, UnknownArchive
|
, UnknownArchive
|
||||||
, ArchiveResult
|
, ArchiveResult
|
||||||
|
, ContentLengthError
|
||||||
]
|
]
|
||||||
$ do
|
$ do
|
||||||
case etool of
|
case etool of
|
||||||
Right (Just GHCup) -> do
|
Right (Just GHCup) -> do
|
||||||
tmpUnpack <- lift mkGhcupTmpDir
|
tmpUnpack <- lift mkGhcupTmpDir
|
||||||
_ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) tmpUnpack Nothing False
|
_ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) Nothing (fromGHCupPath tmpUnpack) Nothing False
|
||||||
pure Nothing
|
pure Nothing
|
||||||
Right _ -> do
|
Right _ -> do
|
||||||
p <- liftE $ downloadCached dli Nothing
|
p <- liftE $ downloadCached dli Nothing
|
||||||
@ -260,7 +261,7 @@ validateTarballs (TarballFilter etool versionRegex) = do
|
|||||||
$ p
|
$ p
|
||||||
Left ShimGen -> do
|
Left ShimGen -> do
|
||||||
tmpUnpack <- lift mkGhcupTmpDir
|
tmpUnpack <- lift mkGhcupTmpDir
|
||||||
_ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) tmpUnpack Nothing False
|
_ <- liftE $ download (_dlUri dli) Nothing (Just (_dlHash dli)) Nothing (fromGHCupPath tmpUnpack) Nothing False
|
||||||
pure Nothing
|
pure Nothing
|
||||||
case r of
|
case r of
|
||||||
VRight (Just basePath) -> do
|
VRight (Just basePath) -> do
|
||||||
|
@ -47,14 +47,14 @@ executable ghcup-gen
|
|||||||
build-depends:
|
build-depends:
|
||||||
, aeson-pretty ^>=0.8.9
|
, aeson-pretty ^>=0.8.9
|
||||||
, base >=4.13 && <5
|
, base >=4.13 && <5
|
||||||
, bytestring ^>=0.10
|
, bytestring ^>=0.11
|
||||||
, containers ^>=0.6
|
, containers ^>=0.6
|
||||||
, deepseq ^>=1.4
|
, deepseq ^>=1.4
|
||||||
, filepath ^>=1.4.2.1
|
, filepath ^>=1.4.2.1
|
||||||
, ghcup ^>=0.1.17.3
|
, ghcup ^>=0.1.19.0
|
||||||
, haskus-utils-variant ^>=3.2
|
, haskus-utils-variant ^>=3.2
|
||||||
, libarchive ^>=3.0.3.0
|
, libarchive ^>=3.0.3.0
|
||||||
, megaparsec ^>=9.0
|
, megaparsec >=8.0.0 && <9.3
|
||||||
, mtl ^>=2.2
|
, mtl ^>=2.2
|
||||||
, optics ^>=0.4
|
, optics ^>=0.4
|
||||||
, optparse-applicative >=0.15.1.0 && <0.17
|
, optparse-applicative >=0.15.1.0 && <0.17
|
||||||
@ -63,7 +63,7 @@ executable ghcup-gen
|
|||||||
, regex-posix ^>=0.96
|
, regex-posix ^>=0.96
|
||||||
, resourcet ^>=1.2.2
|
, resourcet ^>=1.2.2
|
||||||
, safe-exceptions ^>=0.1
|
, safe-exceptions ^>=0.1
|
||||||
, text ^>=1.2.4.0
|
, text ^>=2.0
|
||||||
, transformers ^>=0.5
|
, transformers ^>=0.5
|
||||||
, versions >=4.0.1 && <5.1
|
, versions >=4.0.1 && <5.1
|
||||||
, yaml-streamly ^>=0.12.0
|
, yaml-streamly ^>=0.12.0
|
||||||
|
Loading…
Reference in New Issue
Block a user