Compare commits
14 Commits
update-tra
...
hadrian
| Author | SHA1 | Date | |
|---|---|---|---|
| 86c144b285 | |||
| 7ec6e8604c | |||
| de70f4820f | |||
|
|
febe6fcb35 | ||
|
|
3055529d4c | ||
|
|
d276bfb3ec | ||
| 9db0664465 | |||
| e9c727647a | |||
| 55eef8a3d3 | |||
| d07ad3eb26 | |||
|
|
ad53b141c7 | ||
|
|
23c13a07a9 | ||
|
|
a186b07763 | ||
|
|
1ca628aba1 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
.ghci
|
||||
.vim
|
||||
codex.tags
|
||||
dist-newstyle/
|
||||
cabal.project.local
|
||||
.stack-work/
|
||||
|
||||
@@ -597,6 +597,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.6.3/ghc-8.6.3-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "355bd85c69933c31bbe99b4269ce719acfd0aad0b45e359ac39b9bb13996acc6",
|
||||
"dlSubdir": "ghc-8.6.3",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.6.3/ghc-8.6.3-x86_64-centos7-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "52ae92f4e8bb2ac0b7847287ea3da37081f5f7bf8bbb7c78ac35fde537d1a89f",
|
||||
@@ -687,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"
|
||||
}
|
||||
},
|
||||
@@ -732,6 +739,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "0618b94854edc6be5302489df905e627820b71be6b66c950f5e3088fe92df0a1",
|
||||
"dlSubdir": "ghc-8.10.1",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-centos7-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "3c4cd72b4806045779739e8f5d1658e30e57123d88c2c8966422cdbcae448470",
|
||||
@@ -871,6 +885,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "80ab566f4411299f9e5922d60749ca80f989d697db19e03ed875619d699f0edf",
|
||||
"dlSubdir": "ghc-8.6.5",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-centos7-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "cf78b53eaf336083e7a05f4a3000afbae4abe5bbc77ef80cc40e09d04ac5b4a1",
|
||||
@@ -1124,6 +1145,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.8.1/ghc-8.8.1-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "6cdd34e4dbaeb801e805811f91cf43a2d5f64b22f884718ffbd3542a2f4dd14f",
|
||||
"dlSubdir": "ghc-8.8.1",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.8.1/ghc-8.8.1-x86_64-centos7-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "851a78df620bc056c34b252c97040d5755e294993fa8afa5429708b5229204d6",
|
||||
@@ -1493,6 +1521,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.8.2/ghc-8.8.2-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "f065a017d7a38f235f186ffe32d8261a4fd39c7e945d5cde85c0984c2569db99",
|
||||
"dlSubdir": "ghc-8.8.2",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.8.2/ghc-8.8.2-x86_64-centos7-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "dbe2db717b33460f790e155e487d2a31c9b21a9d245f0c9490ad65844c3ea21f",
|
||||
@@ -1866,6 +1901,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "83a96650f5a92b1e4d7651d256d6438624342d40e780e68125033435a54cd674",
|
||||
"dlSubdir": "ghc-8.4.4",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-centos70-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "8ab2befddc14d1434d0aad0c5d3c7e0c2b78ff84caa3429fa62527bfc6b86095",
|
||||
@@ -1996,6 +2038,13 @@
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-x86_64-apple-darwin.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_RedHat": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "4b2b5313f7c12b81e54efcb26705fa9e4ad5b98f2b58bfc76fb0c9ba1d55eb1f",
|
||||
"dlSubdir": "ghc-8.8.3",
|
||||
"dlUri": "https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-x86_64-centos7-linux.tar.xz"
|
||||
}
|
||||
},
|
||||
"Linux_UnknownLinux": {
|
||||
"unknown_versioning": {
|
||||
"dlHash": "45ee1de3bfc98cbcc4886b65fc7651ade2d3820aa85eac2dbe9bc7bf91e7c818",
|
||||
|
||||
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"
|
||||
|
||||
|
||||
@@ -1360,6 +1360,7 @@ ghcupDownloads = M.fromList
|
||||
, M.fromList [(Nothing, ghc_844_64_fedora)]
|
||||
)
|
||||
, (Linux CentOS, M.fromList [(Nothing, ghc_844_64_centos)])
|
||||
, (Linux RedHat, M.fromList [(Nothing, ghc_844_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_844_64_centos)]
|
||||
)
|
||||
@@ -1509,6 +1510,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Fedora, M.fromList [(Nothing, ghc_863_64_fedora)])
|
||||
, (Linux CentOS, M.fromList [(Nothing, ghc_863_64_centos)])
|
||||
, (Linux RedHat, M.fromList [(Nothing, ghc_863_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_863_64_centos)]
|
||||
)
|
||||
@@ -1612,6 +1614,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Fedora, M.fromList [(Nothing, ghc_865_64_fedora)])
|
||||
, (Linux CentOS, M.fromList [(Nothing, ghc_865_64_centos)])
|
||||
, (Linux RedHat, M.fromList [(Nothing, ghc_865_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_865_64_centos)]
|
||||
)
|
||||
@@ -1665,6 +1668,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Fedora, M.fromList [(Nothing, ghc_881_64_fedora)])
|
||||
, (Linux CentOS, M.fromList [(Nothing, ghc_881_64_centos)])
|
||||
, (Linux RedHat, M.fromList [(Nothing, ghc_881_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_881_64_centos)]
|
||||
)
|
||||
@@ -1718,6 +1722,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Fedora, M.fromList [(Nothing, ghc_882_64_fedora)])
|
||||
, (Linux CentOS, M.fromList [(Nothing, ghc_882_64_centos)])
|
||||
, (Linux RedHat, M.fromList [(Nothing, ghc_882_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_882_64_centos)]
|
||||
)
|
||||
@@ -1771,6 +1776,7 @@ ghcupDownloads = M.fromList
|
||||
)
|
||||
, (Linux Fedora, M.fromList [(Nothing, ghc_883_64_fedora)])
|
||||
, (Linux CentOS, M.fromList [(Nothing, ghc_883_64_centos)])
|
||||
, (Linux RedHat, M.fromList [(Nothing, ghc_883_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_883_64_centos)]
|
||||
)
|
||||
@@ -1834,6 +1840,7 @@ ghcupDownloads = M.fromList
|
||||
, (Just [vers|7|], ghc_8101_64_centos)
|
||||
]
|
||||
)
|
||||
, ( Linux RedHat, M.fromList [(Nothing, ghc_8101_64_centos)])
|
||||
, ( Linux AmazonLinux
|
||||
, M.fromList [(Nothing, ghc_8101_64_centos)]
|
||||
)
|
||||
|
||||
@@ -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