Skip to content

Conditional inclusion of packages: #2048

@hamishmack

Description

@hamishmack

Is there a way to do this? For instance we have this in leksah.cabal:

if os(osx)
    build-depends:
        gi-gtkosxapplication >=0.2.0.12 && <0.3

But if we want to include this in packages: we get:

No .cabal file found in directory /home/jpmoresmau/Documents/leksah/haskell-gi/bindings/GtkosxApplication/

In this case it is because haskell-gi cannot generate the package on Linux.

Could we perhaps add an optional-packages: section where stack would look for a .cabal file and only include the listed directory if a .cabal file was found?

CC @JPMoresmau

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions