Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge/Dependencies.hs: treat 'binary+library' as 'library' and not th…

…e binary

The error is observed on 'lambdabot.cabal', which exports
both library and binary. We generated only binary-style depends,
which is incorrect.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
commit 1bfd162e5cf091efc87e3c98ea2dbb90ec573d27 1 parent 682ac49
@trofi trofi authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 Merge/Dependencies.hs
View
6 Merge/Dependencies.hs
@@ -58,11 +58,13 @@ import Distribution.PackageDescription ( PackageDescription(..)
, TestSuite(..)
, targetBuildDepends
)
-import Data.Maybe ( isNothing )
+import Data.Maybe ( isJust, isNothing )
import Data.List ( nub )
import qualified Distribution.Package as Cabal
+import qualified Distribution.PackageDescription as Cabal
import qualified Distribution.Version as Cabal
+
import Distribution.Compiler
import qualified Portage.Dependency as Portage
@@ -111,7 +113,7 @@ resolveDependencies overlay pkg mcompiler =
compiler = maybe (fst GHCCore.defaultGHC) id mcompiler
hasBuildableExes p = any (buildable . buildInfo) . executables $ p
- treatAsLibrary = (not . hasBuildableExes) pkg || hasLibs pkg
+ treatAsLibrary = isJust (Cabal.library pkg)
haskell_deps
| treatAsLibrary = map set_build_slot $ map add_profile $ haskellDependencies overlay pkg
| otherwise = haskellDependencies overlay pkg
Please sign in to comment.
Something went wrong with that request. Please try again.