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