avoid head warnings with recent ghc versions

This commit is contained in:
Joey Hess 2025-02-12 12:43:03 -04:00
parent 46d38b002d
commit 2567bc0e2c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -49,11 +49,15 @@ mklibs top _installedbins = do
-- linker shims.
writeFile (fromOsPath (top </> literalOsPath "libdirs"))
(unlines (map fromOsPath libdirs'))
writeFile (fromOsPath (top </> literalOsPath "gconvdir"))
(fromOsPath (parentDir $ Prelude.head gconvlibs))
writeFile (fromOsPath (top </> literalOsPath "gconvdir")) $
case gconvlibs of
[] -> ""
(p:_) -> fromOsPath (parentDir p)
mapM_ (installLib installFile top) linkers
let linker = Prelude.head linkers
linker <- case linkers of
[] -> error "unable to find linker"
(l:_) -> return l
mapM_ (installLinkerShim top linker) exes
return (any hwcaplibdir libdirs)