Skip to content

Commit

Permalink
Workaround environment file parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyl20 committed Jan 27, 2025
1 parent 733f9e1 commit f92289a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,13 @@ buildBootLibraries cabal ghc ghcpkg derive_constants genapply genprimop opts dst
exitFailure

-- The libraries have been installed globally.
(global_gb:pkg_ids) <- (map (drop 11) . drop 2 . lines) <$> readFile boot_libs_env
putStrLn $ "We've built boot libraries in " ++ global_gb ++ ":"
--
-- FIXME: Sometimes the package environment contains the path to the global db,
-- sometimes not... I don't know why yet.
-- (global_db:pkg_ids) <- (map (drop 11) . drop 2 . lines) <$> readFile boot_libs_env
let global_db = "~/.cabal/store/ghc-9.13-inplace/package.db"
pkg_ids <- (map (drop 11) . drop 2 . lines) <$> readFile boot_libs_env
putStrLn $ "We've built boot libraries in " ++ global_db ++ ":"
mapM_ (putStrLn . (" - " ++)) pkg_ids

-- TODO: copy the libs in another db
Expand Down

0 comments on commit f92289a

Please sign in to comment.