Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 86c144b285 | |||
| 7ec6e8604c | |||
| de70f4820f | |||
|
|
febe6fcb35 | ||
|
|
3055529d4c | ||
|
|
d276bfb3ec | ||
| 9db0664465 | |||
| e9c727647a | |||
| 55eef8a3d3 | |||
|
|
a186b07763 | ||
|
|
1ca628aba1 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
.ghci
|
||||
.vim
|
||||
codex.tags
|
||||
dist-newstyle/
|
||||
cabal.project.local
|
||||
.stack-work/
|
||||
|
||||
@@ -694,7 +694,7 @@
|
||||
"Linux_Alpine": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "cb13b645d103e2fba2eb8dfcc4e5f2fbd9550c00c4df42f342b4210436dcb8a8",
|
||||
"dlSubdir": "ghc-8.10.1",
|
||||
"dlSubdir": "ghc-8.10.1-x86_64-unknown-linux",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-alpine3.10-linux-integer-simple.tar.xz"
|
||||
}
|
||||
},
|
||||
|
||||
4
hie.yaml
Normal file
4
hie.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
cradle:
|
||||
cabal:
|
||||
- path: "."
|
||||
component: "ghcup:lib:ghcup"
|
||||
@@ -883,7 +883,7 @@ ghc_8101_64_darwin = DownloadInfo
|
||||
ghc_8101_64_alpine :: DownloadInfo
|
||||
ghc_8101_64_alpine = DownloadInfo
|
||||
[uri|https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-alpine3.10-linux-integer-simple.tar.xz|]
|
||||
(Just [rel|ghc-8.10.1|])
|
||||
(Just [rel|ghc-8.10.1-x86_64-unknown-linux|])
|
||||
"cb13b645d103e2fba2eb8dfcc4e5f2fbd9550c00c4df42f342b4210436dcb8a8"
|
||||
|
||||
|
||||
|
||||
@@ -417,13 +417,26 @@ ghcToolFiles ver = do
|
||||
([s|^([a-zA-Z0-9_-]*[a-zA-Z0-9_]-)?ghc$|] :: ByteString)
|
||||
)
|
||||
|
||||
(Just symver) <-
|
||||
(B.stripPrefix (toFilePath ghcbin <> "-") . takeFileName)
|
||||
<$> (liftIO $ readSymbolicLink $ toFilePath (bindir </> ghcbin))
|
||||
when (B.null symver)
|
||||
(throwIO $ userError $ "Fatal: ghc symlink target is broken")
|
||||
let ghcbinPath = bindir </> ghcbin
|
||||
ghcIsHadrian <- liftIO $ isHadrian ghcbinPath
|
||||
onlyUnversioned <- if ghcIsHadrian
|
||||
then pure id
|
||||
else do
|
||||
(Just symver) <-
|
||||
(B.stripPrefix (toFilePath ghcbin <> "-") . takeFileName)
|
||||
<$> (liftIO $ readSymbolicLink $ toFilePath ghcbinPath)
|
||||
when (B.null symver)
|
||||
(throwIO $ userError $ "Fatal: ghc symlink target is broken")
|
||||
pure $ filter (\x -> not $ symver `B.isSuffixOf` toFilePath x)
|
||||
|
||||
pure . filter (\x -> not $ symver `B.isSuffixOf` toFilePath x) $ files
|
||||
pure $ onlyUnversioned files
|
||||
where
|
||||
-- GHC is moving some builds to Hadrian for bindists,
|
||||
-- which doesn't create versioned binaries.
|
||||
-- https://gitlab.haskell.org/haskell/ghcup-hs/issues/31
|
||||
isHadrian :: Path Abs -- ^ ghcbin path
|
||||
-> IO Bool
|
||||
isHadrian = fmap (/= SymbolicLink) . getFileType
|
||||
|
||||
|
||||
-- | This file, when residing in ~/.ghcup/ghc/<ver>/ signals that
|
||||
|
||||
Reference in New Issue
Block a user