{"action":"closed","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/589","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/589/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/589/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/589/events","html_url":"https://github.com/commercialhaskell/stack/issues/589","id":95052165,"number":589,"title":"Support conditional build dependencies in cabal files","user":{"login":"conklech","id":573035,"avatar_url":"https://avatars.githubusercontent.com/u/573035?v=3","gravatar_id":"","url":"https://api.github.com/users/conklech","html_url":"https://github.com/conklech","followers_url":"https://api.github.com/users/conklech/followers","following_url":"https://api.github.com/users/conklech/following{/other_user}","gists_url":"https://api.github.com/users/conklech/gists{/gist_id}","starred_url":"https://api.github.com/users/conklech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conklech/subscriptions","organizations_url":"https://api.github.com/users/conklech/orgs","repos_url":"https://api.github.com/users/conklech/repos","events_url":"https://api.github.com/users/conklech/events{/privacy}","received_events_url":"https://api.github.com/users/conklech/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-14T22:00:55Z","updated_at":"2015-07-15T16:51:43Z","closed_at":"2015-07-15T16:51:42Z","body":"I'm not sure whether this is an issue with stack or something else.\r\n\r\nI'm trying to build `reflex-dom` with stack. It depends on `ghcjs-dom`, which has [a *conditional* dependency on `ghcjs-base` that should *not* be triggered when building with ghc](https://github.com/ghcjs/ghcjs-dom/blob/master/ghcjs-dom.cabal#L558). The condition is `if impl(ghcjs) && flag(jsffi)`.\r\n\r\nWith a stack.yaml file that specifies `ghcjs-dom-0.1.1.3` in the `extra-deps`, I get the following error:\r\n\r\n    --  While attempting to add dependency,\r\n        Could not find package ghcjs-base in known packages\r\n    \r\n    --  Failure when adding dependencies:\r\n          ghcjs-base: needed (-any), but not present in build plan\r\n        needed for package: ghcjs-dom-0.1.1.3\r\n\r\nWhen building with GHC, ghcjs-base should not be required by ghcjs-dom. I tried to override this requirement by manually setting the flag `jsffi` to false in stack.yaml, which also should eliminate the `ghcjs-base` dependency, but that does does not change anything:\r\n\r\n    flags: \r\n      ghcjs-dom:\r\n        webkit: true\r\n        jsffi: false"}}