Commit 2c74f92c authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Fix missing dependencies for Stage2 packages

Fix #240.
parent 5d2c1eed
......@@ -28,7 +28,7 @@ cabalRules = do
-- Cache package dependencies
packageDependencies %> \out -> do
pkgs <- interpretInContext (stageContext Stage1) getPackages
let pkgs = knownPackages \\ [hp2ps, libffi, touchy, unlit]
pkgDeps <- forM (sort pkgs) $ \pkg ->
if pkg == rts
then return $ pkgNameString pkg
......
......@@ -31,10 +31,12 @@ buildPackageData context@Context {..} = do
whenM (doesFileExist $ configure <.> "ac") $ need [configure]
-- Before we configure a package its dependencies need to be registered
let depStage = min stage Stage1 -- dependencies come from Stage0/1
depContext = vanillaContext depStage
deps <- packageDeps package
pkgs <- interpretInContext context getPackages
pkgs <- interpretInContext (depContext package) getPackages
let depPkgs = matchPackageNames (sort pkgs) deps
need =<< traverse (pkgConfFile . vanillaContext stage) depPkgs
need =<< traverse (pkgConfFile . depContext) depPkgs
need [cabalFile]
build $ Target context GhcCabal [cabalFile] [mk]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment