Skip to content

Commit

Permalink
Handle hadrian-based GHC installations
Browse files Browse the repository at this point in the history
with an ugly hack

fixes #20
  • Loading branch information
l29ah committed Jul 21, 2023
1 parent 113b0f0 commit a04606a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Distribution/Gentoo/GHC.hs
Expand Up @@ -236,8 +236,12 @@ checkLibDirs v thisGhc libDirs =

isValid dir = any (`isGhcLibDir` dir) libDirs

-- Correct the path for hadrian-based installations
-- See https://github.com/gentoo-haskell/haskell-updater/issues/20
thisGhc' = if BS.isSuffixOf (BS.pack "/lib") thisGhc then BS.dropEnd 4 thisGhc else thisGhc

Check failure on line 241 in Distribution/Gentoo/GHC.hs

View workflow job for this annotation

GitHub Actions / build (3.4, 8.8)

Not in scope: ‘BS.dropEnd’

Check failure on line 241 in Distribution/Gentoo/GHC.hs

View workflow job for this annotation

GitHub Actions / build (3.8, 8.10)

Not in scope: ‘BS.dropEnd’

-- Invalid if it's this GHC
isInvalid fp = fp == thisGhc || BS.isPrefixOf (thisGhc `BS.snoc` pathSeparator) fp
isInvalid fp = fp == thisGhc' || BS.isPrefixOf (thisGhc' `BS.snoc` pathSeparator) fp

-- A valid GHC library directory starting at libdir has a name of
-- "ghc", then a hyphen and then a version number.
Expand Down

0 comments on commit a04606a

Please sign in to comment.