Without this patch, Cabal terminates if GHC_PACKAGE_PATH is set. This is an annoyance with Guix as it makes heavy use of GHC_PACKAGE_PATH to have GHC pickup Haskell package installed via Guix. Therefore, Cabal does presently not work by default in environments created by Guix. This is a workaround which makes Cabal respect GHC_PACKAGE_PATH. Taken from https://github.com/haskell/cabal/issues/3728 diff -upr a/libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs b/libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs --- a/libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs 2022-11-06 20:41:17.000000000 +0100 +++ b/libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs 2023-12-18 14:34:15.148911717 +0100 @@ -71,6 +71,7 @@ module Distribution.Simple.GHC ( ) where import Prelude () +import Distribution.Compat.Environment (lookupEnv) import Distribution.Compat.Prelude import qualified Distribution.Simple.GHC.Internal as Internal @@ -117,7 +118,7 @@ import System.Directory , canonicalizePath, removeFile, renameFile, getDirectoryContents ) import System.FilePath ( (), (<.>), takeExtension , takeDirectory, replaceExtension - ,isRelative ) + , isRelative, searchPathSeparator ) import qualified System.Info #ifndef mingw32_HOST_OS import System.Posix (createSymbolicLink) @@ -333,9 +334,11 @@ getInstalledPackages :: Verbosity -> Com -> ProgramDb -> IO InstalledPackageIndex getInstalledPackages verbosity comp packagedbs progdb = do - checkPackageDbEnvVar verbosity checkPackageDbStack verbosity comp packagedbs - pkgss <- getInstalledPackages' verbosity packagedbs progdb + envPackageDBs <- + maybe [] (map SpecificPackageDB . unintersperse searchPathSeparator) + <$> lookupEnv "GHC_PACKAGE_PATH" + pkgss <-# Chinese (simplified) translation of the Guix manual. # Copyright (C) 2013-2019 the authors of Guix (msgids) and the following authors (msgstr) # This file is distributed under the same license as the guix manual package. # Meiyo Peng <meiyo@riseup.net>, 2019. # 郑俊杰 <873216071@qq.com>, 2021, 2023, 2024. # Liu Tao <lyuutau@outlook.com>, 2021, 2023. # Xinglu Chen <public@yoctocell.xyz>, 2021. # Charles Lee <lchopn@gmail.com>, 2021. # Went He <1437061699@qq.com>, 2021, 2023. # Whired Planck <fungdaat31@outlook.com>, 2022. # chin housin <sharingfun@163.com>, 2022. # Julien Lepiller <fedora-account@lepiller.eu>, 2022. # Yang Yulin <yylteam@icloud.com>, 2022. # Thomas Cheng <orangecza@gmail.com>, 2023. # Hilton Chain <yareli@ultrarare.space>, 2023. # Yi Cao <cygauss@outlook.com>, 2023. # Burgess Chang <bsc@brsvh.org>, 2023. # Florian Pelz <pelzflorian@pelzflorian.de>, 2023, 2024. # a x <meruarasu@email1.io>, 2023. # Integral <integral@member.fsf.org>, 2024. # Celestial y <clsty@celestialy.top>, 2024. # Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>, 2024. # voyage 200 <hello_cmd@outlook.com>, 2024. msgid "" msgstr "" "Project-Id-Version: gu